»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:32
Chillance left
|
|||
sorear | would anyone complain too loudly if I made . match a single codepoint in :codepoints mode? | 00:47 | |
00:47
jimmy1980 left
00:48
fridim_ left
|
|||
sorear | I am mostly having :codepoints track UTS18 semantics, but UTS18 strongly encourages . be made to match CR-LF as a unit | 00:48 | |
CR-LF is a single extended grapheme, so I'll make . match CR-LF in :graphs mode | |||
00:48
jimmy1980 joined
00:49
wolfman2000 joined
|
|||
colomon | sorear++ # ha! | 00:50 | |
00:52
snearch left
|
|||
sorear | colomon: huh? | 00:52 | |
colomon | " Improve documentation of Builtins.cs functions for colomon" | 00:53 | |
sorear | ah | ||
colomon | not saying I didn't need it. | ||
just amused that you put it that way. | |||
00:58
molaf_ joined
01:01
molaf left
|
|||
djanatyn | woo, got first place at our school's programming competition. | 01:05 | |
And I made a pretty fun little webapp | |||
now I can go back to doing perl6 GCI tasks! | |||
donri | GCI? | 01:27 | |
01:32
am0c joined
01:34
hundskatt left
|
|||
lichtkind | good night | 01:49 | |
01:49
lichtkind left
01:53
jaldhar joined
01:55
jimmy1980 left
01:56
jimmy1980 joined
02:14
Chillance joined
|
|||
djanatyn | donri: google code-in | 02:15 | |
GSOC for pre-university students | |||
02:17
leprevost joined
02:25
orafu left
02:29
orafu joined
02:31
leprevost left
02:38
jimmy1980 left
02:39
Chillance left
02:40
jimmy1980 joined
02:47
tokuhirom joined,
donri left
02:56
jimmy1980 left
03:02
jimmy1980 joined
03:05
Guest97044 left
03:12
jimmy1980 left
03:18
jimmy1980 joined
|
|||
sorear | TimToady: ping. Why do we have both \v and \n? | 03:29 | |
S05 makes clear that the only difference between the two is CRLF handling | 03:31 | ||
03:53
og01 joined
03:56
yeltzooo joined
04:13
jimmy1980 left
04:18
thou left
04:20
jimmy1980 joined
04:24
JimmyZ joined,
jimmy1980 left
04:31
jimmy1980 joined
04:40
thou joined
|
|||
dalek | ecza: b1b54fc | sorear++ | lib/Builtins.cs: Add support for supplementary characters to chr and ord |
04:42 | |
04:49
JimmyZ left
04:56
abercrombie joined
|
|||
Timbus | if you shouldn't use exceptions for non-exceptional situations, what do you do when you have an error, but it's not a problem? (general programming related question, not just perl 6) | 04:59 | |
05:00
thou left
|
|||
Timbus | like i have a hardware module i made in moose/p5. it queries the device and gets a numerical value, but sometimes the device can only give an 'overrange' value as a response | 05:00 | |
so, the method get_value() should.. throw an exception, return undef, comedy third option? | 05:01 | ||
sorear | 1 or 2 depending on circumstances | 05:03 | |
2 is probably better here | |||
or return 'overrange' | |||
japhb | In straight Perl 5 I would probably return undef. In Perl 6 I would fail | ||
sorear | exceptions are useful when there's no point continuing | ||
like, if the hardware module doesn't seem to be present at all, you should throw an exception | 05:04 | ||
Timbus | well overrange just means 'ignore the result this time, try again in a second or two' | ||
sorear | because it makes no sense to continue running if the hardware isn't there | ||
japhb | ... and the flip side of that is if the hardware just has occasional blips, then you don't need an exception, you just need an in-band error marker | ||
Timbus | like returning maxint or something? | 05:05 | |
japhb | Timbus, well, that's why I suggested undef. It really means "there's nothing here that makes sense" | ||
Without blowing up. | |||
Timbus | what if there are multiple reasons to return undef | ||
eg, device is in use already, overrange, has nothing to say, | 05:06 | ||
japhb | And sorear is absolutely right that actual persistent malfunction or missing hardware should throw an exception (that the higher levels should probably catch and work with the user to resolve) | ||
Timbus | yeah ive got that covered | ||
sorear | then return an error code | ||
if there are multiple reasons to return an in-band failure | 05:07 | ||
japhb | Also, remember that in Perl, you can return more than one value. | ||
Timbus | that's my curret method | ||
japhb | You can return a measurement and a status code every time | ||
Timbus | return (undef, $error) | ||
sorear | also consider that you might have some failures that should throw, and other failures that shouldn't | ||
sorear is still dubious of the value of Failure | 05:08 | ||
Timbus | but it feels clunky and odd to leave this up to the user to figure out what is going on | ||
even though in this case, im the user as well | |||
japhb | sorear, to me Failure means "The library reports status, the caller decides policy". Which IMO is a major improvement over the Perl 5 world of "The library tries to set policy, and the caller works around it." | 05:09 | |
05:09
BooK joined,
awwaiid joined,
felher joined,
jjore joined
|
|||
japhb | .oO( Minor netsplit, or coincidence? ) |
05:10 | |
05:11
Helios joined
|
|||
sorear | japhb: it actually reduces encapsulation because use fatal only goes one level down | 05:11 | |
japhb: die "foo" and some_function_that_calls_die are the same from a user POV; not so with fail! | 05:12 | ||
japhb: not a netsplit | |||
if it were a netsplit, they'd have quit [*.net *.split] | |||
japhb | sorear, fair enough -- but on my screen a half dozen users timed out in quick succession. | 05:13 | |
Server reboot? | |||
sorear | my best guess is a glitch in the international routing system | 05:14 | |
japhb | Anyway ... if Failure is outside of Any, and infectious like NaN, I would think 'use fatal' begins to make more sense to the user. | ||
sorear | a server reboot would manifest as a netsplit | ||
japhb: neither of those assertions about Failure match my current knowledge | 05:15 | ||
japhb shrugs ... I never studied the IRC protocol | |||
sorear | this isn't something that IRC actually specs | ||
it's freenode behavior | |||
japhb | Ah | ||
sorear | I've seen server reboots before | ||
japhb | I said three things in that one message, which two were you saying don't match your understanding? | ||
sorear | japhb: outside of Any & infectious | 05:16 | |
japhb | sorear, spec commit 3c53f87 | 05:17 | |
dalek | ecza: a8ad0e9 | sorear++ | lib/Cursor.cs: Make non-LTM regex primitives surrogate character aware |
05:28 | |
05:35
jimmy1980 left
|
|||
moritz | good morning | 05:35 | |
sorear | japhb: it's an improvement but it's still far too easy to lose failures that way | 05:36 | |
05:36
jimmy1980 joined
|
|||
sorear | japhb: also, note that sinking a failure produces an exception | 05:37 | |
japhb | ... which makes total sense to me, since it is easy to not sink | ||
sorear | japhb: so if a failure is generated inside a library, it's quite likely that what the user sees will be an exception | ||
japhb | Hmmm | ||
sorear | I came around on junctions. It's possible I may yet come to support Failure | 05:38 | |
moritz still wonders if "use fatal" shouldn't be the default | |||
japhb | IWBNI there were a way to simply say "I know this might fail, but I don't want to deal with it, just pass it directly up to my caller" | ||
sorear | japhb: you can make that happen by default, all you have to do is use exceptions instead | 05:41 | |
{ my $x = (try foo); say $x.defined } isn't that much worse than { my $x = foo; say $x.defined; } | 05:42 | ||
failures optimize for the sites where errors are handled at the expense of making semantic analysis of propagation sites harder | 05:43 | ||
japhb | I'm saying, without the ability to intentionally and easily pass a Failure along *as a Failure*, it takes some of the wind out of the value of 'use fatal' and 'no fatal' | ||
sorear | TimToady likes to play the parallel processing card, but it has always seemed to me that if there is an unrecoverable error somewhere in an expression, it doesn't actually make sense to evaluate the rest of the subexpressions | 05:44 | |
japhb: s/some/most/ | |||
but I agree with that complaint | 05:45 | ||
japhb | sorear, but it's not subexpressions he's worried about. He's talking about expressions in separate data "threads" (in the GPGPU sense) | ||
It is quite easy for some copies of an expression to hit a boundary condition or bad input data, and other copies to be perfectly valid. | 05:46 | ||
sorear | japhb: if some threads are hitting a boundary condition that you didn't test for, you have buggy code | 05:49 | |
when I find a bug in my programs, I want them to _stop_ | |||
05:50
media-786 joined
|
|||
sorear | keep-going-after-crashes is a very bad policy | 05:50 | |
unless it's being done explicitly and with measures in place to contain data corruption | 05:51 | ||
a non-handwavey, _sane_ use case is a necessary condition for me to think something is a good ide | |||
a | |||
Timbus | does this extend to using undef in like numeric operations and stuff? | 05:52 | |
because i see a use in that | |||
japhb | sorear, Imagine you are shading just the foreground objects in a graphics scene. You draw a full-screen quad and run a pixel shader "thread" on each pixel in the scene. The output of your shader will be written to the screen buffer if it is valid data. The foreground is a sphere, so necessarily there are pixels that will be correctly shaded, and others that should not be shaded with this shader. How do you cleanly run them all in paral | 05:53 | |
lel, making it easy to (in parallel) decide which shader outputs should be written to the screen buffer? | |||
sorear | Timbus: undef and NaN are different because they have more sensible meanings | 05:54 | |
05:54
birdwindupbird joined,
birdwindupbird left
|
|||
Timbus | yes | 05:55 | |
sorear | japhb: you return rgba (0,0,0,0) from the shader when you need a hole | ||
japhb | I'm saying the output of the shader, if it is a valid rgba value, is written *directly* to the screen buffer, not blended. | ||
moritz | you can use $pixel // $black or $pixel orelse $black for that | ||
japhb | moritz, are you suggesting sending a type object through? Or are you agreeing that Failure is the right thing to return? | 05:56 | |
sorear | japhb: you need to return an out-of-band value, but it would be a bad idea to make errors produce the same out-of-band value | 05:57 | |
moritz | japhb: nope. I have no idea how my reply made you think that. | ||
japhb | (FWIW, real graphics cards either use a 'discard' instruction, which is basically fail() with no extra info carried along, or use 'writeable Z' to force the output to be outside the clip region -- and on many cards, thereby kill performance optimizations_ | 05:58 | |
moritz | japhb: erm, to the first question | ||
sorear | if the shader crashes, you should draw something obtrusive like bright orange on the screen, and ideally log it as well | ||
moritz | japhb: but it really, really depends on how you do the whole thing | ||
japhb: it is very likely that you'd use packed native arrays in performance critical operations | 05:59 | ||
japhb: and those don't support failures anyway | |||
sorear | I beleive in failing noisily | ||
japhb | sorear, you just opened up the next phase of where I was going to go with this: "Now that you have decided on how to send this out of band info through, now how do you use the same mechanism as a debugging tool?" :-) | ||
moritz | ie my int @a[$x-res, $y-res] | ||
japhb | moritz, the PDL solution to this was (among other things) to support infectious data values, including NaN. | 06:00 | |
sorear | japhb: there should be an out of band value meaning "transparent" | ||
japhb: or "discard" | |||
moritz | japhb: well, if you use num, you also get NaN support | ||
sorear | japhb: "discard" should not be the same as "the shader crashed". bad japhb, no cookie | ||
japhb | sorear, I'm not sure how you got that from what I said. | 06:01 | |
I never suggested the shader crashed | |||
sorear | we were talking about fail, were we not? | ||
out of band values are fine, if they can be safely ignored | |||
japhb | Merely that it was valid that it should discover it had crossed a boundary condition, and needed some way to indicate "I cannot continue, and no answer I can give you in my standard output would be valid here." | ||
I don't think of Failure merely as "weak exception". I think of it as "Mu with structure" | 06:02 | ||
or "Mu with intent to not continue" | |||
If Failure cannot be ignored, then as you mentioned early on in this conversation, that's a flaw in the design of Failure. | 06:03 | ||
moritz | japhb: the point of Failure is precisely that you can ignore it, but it's still designed in a way that you usually don't lose information in the process | 06:04 | |
sorear | I support Failure iff S04:1295-1300 are eliminated | ||
moritz | japhb: ie you can write my @new = @values >>+>> 1 and it won't throw an eexception if one of the @values is a Failure | ||
japhb | moritz, sure, which I agree with, but sorear had pointed out that Failure as currently designed may explode into Exception in your face, without you intending to allow that. | 06:05 | |
sorear | you've convinced me to intepret Failure as a kind of generalized NaN | ||
japhb | \o/ | ||
I was worried I really was failing to make my case. | |||
moritz | but the resulting Failure should carry the original error condition that led to the Failure in the first place | ||
sorear | but there are a lot of places in the spec and in apps code that use fail that really, really, really should use die | ||
Timbus | ^ | ||
sorear | all I/O errors should die | ||
japhb | I am not surprised by that. | ||
sorear | all assertion failures should die | 06:06 | |
Timbus | All Errors Must Hang!! | ||
er... Die | |||
japhb | "That there's a hangin' offense." | ||
sorear | currently in the spec Failure is a mutant halfbreed creature that tries to propagate both up the call stack and down data dependency chains | 06:07 | |
one or the other needs to go | |||
since we already have exceptions, I'd like to see Failure become "purely infectious" | 06:08 | ||
moritz | what's wrong with a Failure eventually becoming a loud exception? | ||
japhb | I'm not sure it can be purely infectious ... I don't think you want to print Failure() to a data file and have it silently contain bogosity. You should be forced at some point to decide how to deal with the Failures within your large data set, before sharing them with the outside world. | 06:09 | |
But I can see the point that merely being in sink context should not be enough to trigger the "upgrade" | 06:10 | ||
moritz cannot | |||
when you use it in sink context, you're about to lose information about what went wrong | |||
and that's usually not what you want | |||
japhb | moritz, I'm not saying I absolutely agree with that statement. I'm saying I can see that it is a point valid enough to discuss further. | 06:11 | |
For example, is it worth having a 'use silent-sink' pragma? | |||
moritz would put it into the same catgory as "no strict;" | 06:12 | ||
sorear | moritz: uh, there are major problems with the idea of sink trapping | ||
my ($c) = function; | |||
japhb | moritz, hmmm, that's an interesting idea | ||
sorear | suppose function returns (1, fail()) | ||
suppose function returns (1, 1..1e10, fail()) | |||
japhb imagines a function that is known to return a long list with Failure in all odd slots, and choosing to only continue computing on all the even slots. | 06:14 | ||
sorear | sink context upgrades would require Failure-free algorithms to pay huge iteration costs | ||
06:14
woosley joined
|
|||
japhb | Or a mathematical function that is well-behaved everywhere but at some singularities, and just grepping them away. | 06:14 | |
sorear, by implicitly forcing eagerness? | 06:15 | ||
moritz | sorear: I'd still prefer to have sink context explode where we can do it efficiently | ||
sorear | japhb: writing Failure to data files should throw | ||
japhb | moritz, that's getting on the thin ice of "unreliable detection of error" | ||
sorear, ah good, we agree there. | 06:16 | ||
sorear | Failure.gist, and thus say Failure, should succeed | ||
(another reason to like the gist change) | |||
japhb | The worst case is not always exploding, or always not exploding, its exploding sometimes in a way that the normal programmer cannot make a correct mental model of when danger may occur. | ||
moritz | japhb: I agree. The rules need to be simple | 06:17 | |
so the real question is if there are simple but effective rules | |||
but I still think that serial computation is the default, and thus 'use fatal' should be default too | 06:18 | ||
japhb is reminded of Haskell's bright line between pure and impure actions | |||
moritz | japhb: which comes at the cost of making impure actions very hard to understand for the newcomer | 06:19 | |
japhb | moritz, NO KIDDING | ||
sorear | I also really don't like the way that Failure considers itself handled after .Bool | 06:21 | |
japhb | sorear, you think it should only be handled after .defined? | ||
sorear | japhb: No | ||
06:21
media-786 left
|
|||
japhb | sorear, what are you suggesting then? | 06:21 | |
moritz was always a bit uneasy about that part too | |||
sorear | japhb: .try maybe | ||
.success? | 06:22 | ||
moritz | soemthing explicit anyway | ||
sorear | what we don't want to do is put users in a situation of accidentally handling failures | ||
japhb | I can agree with that. | ||
Though I'd argue that .defined is much stronger in intent than .Bool. | |||
sorear | e.g. suppose function() returns a number or fails | ||
what about if function() > 5 { ... } | |||
Failure > 5 is supposed to be Failure | 06:23 | ||
iiuc | |||
japhb | Yes, just like undef propagates in Perl 5. | ||
sorry, I should perhaps use 'NULL as in SQL' | |||
sorear | japhb: s/Perl 5/SQL/ | 06:24 | |
I actually think that testing a Failure for .Bool should throw | |||
because there's no sensible way to propagate Failure into $y in { if foo() { $y = 1 } else { $y = 2 } } | |||
japhb | Oh now that's an interesting point | 06:25 | |
moritz | you could make .Bool go BOOM :-) | ||
moritz tries to sleep again | 06:26 | ||
japhb | Good luck, moritz | 06:27 | |
So the only safe operations on unhandled concrete Failure would be .defined and //, and looking at its metaclass | 06:29 | ||
s/metaclass/class and metaclass info/ | |||
sorear | I am not so sure any of that should be "safe" | 06:30 | |
japhb | sorear, why not? | ||
sorear | because // is short-circuiting, it allows Failure to contaminate control flow | ||
japhb | So far, I am unconvinced that .defined and // are not clear indications that the programmer understands that out-of-band information is expected | 06:31 | |
Let me know if that had too many negatives | |||
sorear | // clearly indicates "out of band" but this might be a case of "out of out of band" | ||
japhb | LOL | 06:32 | |
sorear | I often write functions that return Any for specific reasons | ||
japhb | There are only two kinds of undefined, right? Type objects and "things that override .defined", which until the user decided to go crazy, starts with only Failure(). | ||
hmmm | 06:33 | ||
sorear | yes | ||
japhb | I see your OOOOB point. | ||
I'm not sure I have a good response to it other than DIHWIDT | 06:34 | ||
... which I always find unsatisfying | |||
japhb thought he would spend the evening implementing contaminating-Failure-outside-Any, not discussing all the angles on whether it's even the Right Thing | 06:36 | ||
:-) | |||
sorear | muahahaha. | 06:46 | |
now, if Failures are this prone to turning into real exceptions, it seems to me that they don't provide much of a useful failsoft guarantee | 06:47 | ||
if we don't have a useful failsoft guarantee, then failsoft parallel operators need to provide their own try() | 06:48 | ||
at which point ... why bother? | |||
japhb | At this point, I see a 70% chance that we merely need to tweak the concept and spec to get to something useful (though perhaps not identical in intent to the current spec), and a 30% chance this is an unrecoverable thing that needs a major rethink. | ||
sorear | I don't think this is completely unrecoverable. NaN was pretty successful, after all. | 06:49 | |
We need to get colomon++ into this conversation. | 06:50 | ||
I am to understand he has recently read quite a bit of Kahan | |||
japhb | Why him in particular? | ||
Ah. I had W. Kahan for quite a few classes. | |||
sorear | If anyone was likely to have written about the usefulness of NaN, it would be him. | 06:51 | |
japhb | I perhaps misrepresented myself. When I said it might be conceptually unrecoverable, I meant that we might not be able to make something useful and self consistent that means much of anything like the current Failure as specced, and that it either goes away completely, or becomes nothing more than, as you said, (type-)generalized NaN. | 06:52 | |
[Coke] | sorear: I see spectest has new failures in niecza. will fudge them this weekend. | ||
(unless I am beaten to it.) | 06:53 | ||
japhb | I want to keep: 1. OOB "cannot continue" (or OOOOB, as the case may be). 2. Throws when you try to write it to the world outside the program. 3. Can be converted either to a default value, or to an Exception. Beyond that, I'm all for negotiation and inquiry into the best behavior we can manage. | 06:55 | |
sorear | japhb: agreed on all points | 06:57 | |
japhb | And on that high note, I think this may be a good place to call it a night. | 06:58 | |
07:00
drbean left
|
|||
japhb | good night, y'all | 07:01 | |
sleep & | |||
sorear | gnight | 07:02 | |
07:07
drbean joined
07:19
sayu joined
|
|||
Woodi | en.wikipedia.org/wiki/Exception_han...rom_policy | 07:30 | |
small note: in RL we have numbers sets like Integers, Reals, etc. in programming world we have numbers-sets-augmented-with-undef. So undef is sometimes used as acceptable value and in other cases as failure indicator. But failures are meta-thing/lower lvl, happens during computation and do not belong to "problem domain sets". Just to clear base of problem... | 07:37 | ||
moritz | nom: class A { method x { 'a' } }; role R { method x { 'r' } }; class B is A does R { }; say B.x | 08:02 | |
p6eval | nom 68d0b8: OUTPUT«r» | ||
moritz | thought so, good. | ||
08:06
alim joined
08:13
drbean left
08:19
drbean joined
|
|||
sorear | phenny: tell [Coke] Please don't fudge regressions in niecza | 08:26 | |
phenny | sorear: I'll pass that on when [Coke] is around. | ||
sorear | phenny: tell [Coke] Before releases I go through the spectest and fix regressions. If you fudge them, I can't fix them. | 08:27 | |
phenny | sorear: I'll pass that on when [Coke] is around. | ||
sorear | phenny: tell [Coke] Fudging is fine if someone changed the _test_ without bothering to check niecza | 08:28 | |
phenny | sorear: I'll pass that on when [Coke] is around. | ||
sorear | (that probably sounds clueless) | 08:32 | |
08:36
JimmyZ joined
08:37
tokuhirom left
08:38
JimmyZ left
|
|||
sorear | Should "SS" match /:i ^\w$/ ? | 08:42 | |
Should "SS" match /:i ^<[...ß...]>$/ ? | |||
08:59
grondilu joined
|
|||
grondilu | lol there is an article about contributing on planetsix.perl.org. Now I have no more excuse not to help you guys :-) | 08:59 | |
sorear | hello, grondilu | 09:10 | |
grondilu | hi | 09:11 | |
09:13
MayDaniel joined
09:25
am0c left
09:34
grondilu left
09:41
MayDaniel left
10:10
drbean left
10:16
drbean joined
10:23
jimmy1980 left
10:28
fridim_ joined
10:30
jimmy1980 joined
10:37
Suresh joined
10:46
drbean left
10:52
drbean joined
10:53
qnu joined
11:01
dudulz left
|
|||
qnu | panda bootstrap.sh fails while installing Test::Mock.. is this a known issue (fresh rakudo nom installation)? | 11:07 | |
11:08
Chillance joined
11:09
hundskatt joined
11:14
dudulz joined
11:19
jimmy1980 left
11:20
woosley left
|
|||
moritz | I think so | 11:21 | |
but I also think it's supposed to work if you install it directly | 11:23 | ||
dalek | Heuristic branch merge: pushed 65 commits to rakudo/ex-from-actions by moritz | ||
qnu | well, i installed Test::Mock manually and modified .panda/state, and rest of panda install went ok. | 11:24 | |
as a general best practice, i'm supposed to keep .perl6/bin in PATH and .perl6/lib in PERL6LIB envs? | 11:26 | ||
11:26
jimmy1980 joined
|
|||
tadzik | yes | 11:26 | |
11:29
drbean left
11:31
Trashlord left
11:32
dudulz left
|
|||
moritz | .perl6/lib is automatically searched, I believe | 11:32 | |
nom: say @*INC | |||
p6eval | nom 68d0b8: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval/nom-inst2/lib/parrot/3.10.0-devel/languages/perl6/lib .» | ||
qnu | yes.. good. except now I got "Incorrect pre-compiled version of lib/JSON/Tiny.pm loaded" when running panda. | 11:34 | |
11:35
drbean joined,
jimmy1980 left
11:36
jimmy1980 joined
11:39
mj41 joined
|
|||
qnu | can i remote .pir files from .perl6/lib? :) | 11:41 | |
moritz | yes | ||
jnthn will sort out the Test::Mock failures this weekend | 11:47 | ||
qnu | cool.. with these tweaks i got now everything up & running.. | 11:49 | |
11:49
rsimoes left
12:00
alim left
12:07
whiteknight joined,
whiteknight is now known as Guest18629
12:22
donri joined
12:24
sayu left
12:45
drbean left
|
|||
moritz | nom: say 1.^name | 12:47 | |
p6eval | nom 68d0b8: OUTPUT«Int» | ||
12:50
Suresh left
12:51
shinobicl_ joined,
drbean joined
13:05
replore_ joined
|
|||
dalek | kudo/nom: 187e23a | moritz++ | src/core/Mu.pm: make uninitialized warnings a bit more verbose |
13:09 | |
moritz hopes that tadzik writes his advent post soon | 13:11 | ||
colomon | still a lot of the 10th left in this part of the world... | ||
moritz | well, more than half over here | 13:12 | |
jnthn | Don't confuse physical timezone with individual's timezones. ;-) | 13:13 | |
13:14
mkramer joined
13:17
mkramer1 joined
13:18
qnu left
13:19
mkramer left
13:20
mkramer1 left
13:21
drbean left
13:27
drbean joined
13:28
Trashlord joined
13:33
jimmy1980 left,
dudulz joined
|
|||
dalek | kudo/nom: 7e77c0c | moritz++ | src/core/Mu.pm: fix previous commit |
13:37 | |
13:40
jimmy1980 joined
13:47
JimmyZ joined
14:05
mkramer joined
14:06
sayu joined
14:10
mkramer left
14:17
drbean left
|
|||
dalek | kudo/nom: 5eed440 | jnthn++ | / (2 files): Implement getting the name of a scalar container through $a.VAR.name. |
14:23 | |
kudo/nom: c3d61d8 | jnthn++ | src/core/Mu.pm: Dispatchy and type-checky things should not decontainerize, but just pass on invocants. |
|||
kudo/nom: 1f9310d | jnthn++ | src/core/Mu.pm: Include variable name (at least, in the scalar case) in uninitialized warnings. |
|||
jnthn | > my $a; say +$a | 14:24 | |
Use of uninitialized variable $a of type Any in numeric context | |||
\o/ | |||
14:24
drbean joined
14:35
agentzh joined,
jimmy1980 left
|
|||
tadzik | winter-- | 14:37 | |
I wake up, and it's not _still_ dark. It's _already_ dark | |||
cognominal_ | change hemisphere :) | 14:38 | |
14:39
cognominal_ is now known as cognominal
14:40
jimmy1980 joined
14:42
fridim_ left
|
|||
jnthn | tadzik: heh. And you're further south than me. :P | 14:44 | |
JimmyZ | moritz: there is some typo in the commit, 'in of' | 14:54 | |
ah, fixed by jnthn++ | 14:56 | ||
15:08
agentzh left
15:09
sayu left
15:10
Bzek joined
15:11
mkramer joined
15:15
mkramer left
15:17
gbacon joined
15:19
mkramer joined
|
|||
Woodi | good * :) | 15:25 | |
maybe intermediate OOP advent post would be nice ? | |||
for example I can't find something like" self!..." anywhere. | 15:27 | ||
colomon | tadzik: how's your Advent post coming along? | ||
15:30
mj41 left
15:31
mkramer left
|
|||
jnthn | Hm, intermediate OO is maybe too general, though could do one on private methods, trusts, etc. | 15:31 | |
15:31
mkramer joined,
Psyche^ joined
15:35
Patterner left,
Psyche^ is now known as Patterner
|
|||
Woodi | I just looked into available docs and everywhere is just how to create class and use fields. even no example how to use method in other method. so maybe "more basics" with examples :) not sure I can handle this | 15:44 | |
15:47
drbean left,
mkramer left
15:50
shinobicl_ left
15:54
drbean joined
|
|||
JimmyZ | rakudo: my $r = 2; sub cached($r is rw) { $r = 40; }; say $r; | 16:13 | |
p6eval | rakudo 1f9310: OUTPUT«2» | ||
JimmyZ | rakudo: my $r = 2; sub cached(\$r) { $r = 40; }; say $r; | ||
p6eval | rakudo 1f9310: OUTPUT«2» | ||
jnthn | JimmyZ: You never called the sub... :) | 16:14 | |
JimmyZ | $r is rw is same as \$r? | 16:15 | |
jnthn | no | 16:16 | |
Though they're similar | |||
"is rw" should fail to bind it the thing passed isn't rw | |||
\$r doesn't have such a requirement. Also it's no longer spec...you'd just write "\r" now. | 16:17 | ||
JimmyZ | rakudo: my $r = 2; sub cached($r is rw) { $r = 40; }; cached(2); say $r; | ||
p6eval | rakudo 1f9310: OUTPUT«Cannot assign to a non-container in sub cached at /tmp/Te2mSZu_7d:1 in block <anon> at /tmp/Te2mSZu_7d:1 in <anon> at /tmp/Te2mSZu_7d:1» | ||
jnthn | But I don't think std was updated yet, and I'd kinda prefer to wait for that. | ||
JimmyZ | rakudo: my $r = 2; sub cached(\$r) { $r = 40; }; cached(2); say $r; | ||
p6eval | rakudo 1f9310: OUTPUT«Cannot assign to a non-container in sub cached at /tmp/dMGQzoXReu:1 in block <anon> at /tmp/dMGQzoXReu:1 in <anon> at /tmp/dMGQzoXReu:1» | ||
JimmyZ | rakudo: my $r = 2; sub cached(\r) { $r = 40; }; cached($r); say $r; | 16:18 | |
p6eval | rakudo 1f9310: OUTPUT«===SORRY!===Malformed parameter at line 1, near "\\r) { $r ="» | ||
JimmyZ | std: my $r = 2; sub cached(\r) { $r = 40; }; cached($r); say $r; | ||
p6eval | std be1f10e: OUTPUT«===SORRY!===Malformed parameter at /tmp/bPHOqBH_g2 line 1:------> my $r = 2; sub cached(⏏\r) { $r = 40; }; cached($r); say $r; expecting any of: name new name to be defined parameter routine_def signatureParse | ||
..failedF… | |||
jnthn | Yeah... | 16:19 | |
JimmyZ | \r is ugly? | 16:21 | |
jnthn | Well, you'd refer to it just as "r" afterwards | 16:22 | |
The problem is that it's contextless | |||
Meaning that it doesn't really make sense to have a sigil on it | |||
JimmyZ | so I just need to say r = 40; ? | 16:24 | |
jnthn | yeah, you'd do that. | ||
JimmyZ doesn't like it | 16:25 | ||
16:26
jimmy1980 left
|
|||
JimmyZ | something sub foo(\r) { my $b = 20; r = $b; } | 16:26 | |
jnthn | Well, if you're using it much in your code, you're probably doing something wrong. | ||
The vast majority of parameters should be read only. | |||
\ is for not enforcing context, which probably means you're writing some kind of dispatcher (which you won't be doing often). | 16:27 | ||
JimmyZ | I don't like sub foo(\r) { my $b = 20; r = $b; }, r in the code block looks like a sub name | ||
jnthn | iiuc, it's parsed as a term | ||
JimmyZ | time and now is a term too | 16:28 | |
jnthn | yes | ||
Though you can't assign to those. :) | |||
now = 2220; # wooo, time travel! | |||
JimmyZ | but something r=$b looks like lvalue | 16:29 | |
jnthn | JimmyZ: But if that's what you want, you should have used "is rw" | ||
In the majority of cases. | |||
\ is about contextlessness, which normally is only useful if you want to pass the thing on | 16:30 | ||
JimmyZ | or $b = r, r still like a a sub name or code block | ||
16:30
gbacon left
|
|||
jnthn | JimmyZ: But that'd be a slightly weird thing to do too. I mean, you'd often not take something in a parameter list with \ in order to not impose context, then assign it to a scalar (which does impose context) | 16:31 | |
16:32
jimmy1980 joined
|
|||
jnthn | JimmyZ: I agree it looks a little odd. It's just that I think you're overestimating how often it should be used. | 16:32 | |
JimmyZ | jnthn: the setting most use Mu \$self:, which will be changed to Mu \self: ? | 16:33 | |
jnthn | JimmyZ: Yes | ||
JimmyZ: Note that where the setting does that, it tends to be due to delaying context | |||
JimmyZ: All the uses of it I introduced today are in order to preserve the *exact* thing that the user wrote as the invocant, rather than to decontainerize it. | |||
That's not a usual thing. | |||
Note that the things I used it in were related to type checking and dispatching. | 16:34 | ||
(Yes, we make some uses of it in the setting as an optimization. But that's because we don't have a smart enough optimizer yet. :-)) | |||
16:36
mj41 joined
16:37
hrj left
|
|||
JimmyZ | you're right, but I still like the sigil, the perl landmark :) | 16:37 | |
std: my $r = 2; sub cached(\%r) { say %r }; | 16:38 | ||
p6eval | std be1f10e: OUTPUT«ok 00:01 124m» | ||
16:46
syslq joined
|
|||
syslq | Will perl6 be eable to use perl5 cpan modules? | 16:46 | |
16:49
drbean left
|
|||
jnthn | syslq: Some Perl 6 implementations have already explored this area a bit; the goal is that yes, it will be possible (at least, for quite a few modules). | 16:51 | |
syslq | jnthn: thanks, cpan is huge asset | ||
jnthn | Very much so. | 16:52 | |
16:55
drbean joined
16:59
JimmyZ left
17:00
JimmyZ joined
|
|||
cognominal | nom: grammar A { token list { a } }; A.parse('a', :rule<list> ) | 17:05 | |
p6eval | nom 1f9310: OUTPUT«Too many positional parameters passed; got 2 but expected 1 in method list at src/gen/CORE.setting:1012 in !reduce at src/stage2/QRegex.nqp:909 in !cursor_pass at src/stage2/QRegex.nqp:889 in regex list at /tmp/S8O1qlEoba:1 in method parse at src/gen/CORE.se… | ||
JimmyZ | nom: if 42 -> *@_ { say @_.perl } | 17:06 | |
p6eval | nom 1f9310: OUTPUT«Array.new()» | ||
JimmyZ | nom: sub b(*@a) { say @a; }; b(3,6,2); | ||
p6eval | nom 1f9310: OUTPUT«3 6 2» | ||
cognominal | jnthn, that should not pick the list method in CORE.setting? | ||
jnthn | cognominal: er... | 17:07 | |
cognominal: Yeah, you didn't specify any actions class | 17:08 | ||
cognominal: If you had, then it'd be legitimate. | |||
JimmyZ | nom: if 42 -> *@a { say @a.perl } | ||
p6eval | nom 1f9310: OUTPUT«Array.new()» | ||
JimmyZ | how do I get @a value ? | ||
jnthn | nom: if 42 -> *@a { say @a } | 17:09 | |
p6eval | nom 1f9310: OUTPUT«» | ||
jnthn | hmm | ||
nom: if 42 -> $a { say $a } | 17:10 | ||
p6eval | nom 1f9310: OUTPUT«42» | ||
cognominal | jnthn, I don't see how it is related to an action class. Here "list: is a legitimate rule. | ||
jnthn | nom: if 42 -> $a? { say $a } | ||
p6eval | nom 1f9310: OUTPUT«Mu()» | ||
jnthn | ah | ||
cognominal: Look at the stack trace more carefully. It reached your list regex just fine. | |||
JimmyZ | S06:1904 said it's wrong | ||
17:11
fsergot joined
|
|||
cognominal | ho, I get it. | 17:11 | |
jnthn | cognominal: Yeah...it's probably setting $*ACTIONS to Any or some such. | ||
cognominal: I think I'd consider this a bug anyway. Please file a ticket, or maybe try patching it. | |||
cognominal | ok, thx | 17:12 | |
jnthn | JimmyZ: I'm not sure I see the relevance of that line of spec. | 17:13 | |
syslq | jnthn: the thing I love about pl, is not needing like five interpreter versions on the system (read python), make sure you guys keep that in mind :) | ||
jnthn | JimmyZ: I do think Rakudo is kinda wrong here though. | ||
JimmyZ: I can guess why it is too. It probably goes looking at .arity. | 17:14 | ||
JimmyZ | ah, I misunderstand that line | 17:15 | |
jnthn: you're right, rakudo may be wrong | 17:16 | ||
JimmyZ sleeps | |||
jnthn | JimmyZ: That said, I don't get why you'd ever actually write what you did. ;-) | ||
Since you know there's always exactly one arg. :) | |||
sleep well, JimmyZ | |||
JimmyZ | jnthn: because that line writes if $SAYIT -> *@_ { say @_; } | 17:18 | |
nom: if 42, 44, 22 -> *@a { say @a.perl } | 17:19 | ||
p6eval | nom 1f9310: OUTPUT«Array.new()» | ||
JimmyZ | niecza: if 42, 44, 22 -> *@a { say @a.perl } | 17:20 | |
p6eval | niecza v12-10-ga8ad0e9: OUTPUT«(42, 44, 22)» | ||
jnthn | JimmyZ: oh, oddness... | ||
JimmyZ: Anyway, I can probably fix it. Feel free to submit a ticket. | |||
JimmyZ sleeps firstly | |||
g' night | |||
17:21
JimmyZ left
|
|||
szabgab | masak: ping | 17:21 | |
masak: Opera tells me strangelyconsistent.org/blog/feed.atom fails the XML parsing | |||
jnthn | szabgab: masak is on vacation and likely not following irc; suggest phenny'ing that to him :) | 17:22 | |
szabgab | emailing him | ||
jnthn | that orks too | ||
er, works | |||
szabgab | orks work too :) | 17:23 | |
tadzik | colomon: working on it | 17:30 | |
will be online in an hour | |||
moritz | jnthn++ | 17:31 | |
17:33
kaare_ joined
|
|||
moritz | nom: say Any + Int | 17:40 | |
p6eval | nom 1f9310: OUTPUT«Use of uninitialized value of type Any in numeric contextUse of uninitialized value of type Int in numeric context0» | ||
colomon | tadzik++ | 17:41 | |
[Coke] | sorear: I opened tickets for everything. You'd rather they were failing? | ||
phenny | [Coke]: 08:26Z <sorear> tell [Coke] Please don't fudge regressions in niecza | ||
[Coke]: 08:27Z <sorear> tell [Coke] Before releases I go through the spectest and fix regressions. If you fudge them, I can't fix them. | |||
[Coke]: 08:28Z <sorear> tell [Coke] Fudging is fine if someone changed the _test_ without bothering to check niecza | 17:42 | ||
colomon | jnthn: any idea how say ~$/<chord_accidental>.WHAT; could get me "Use of uninitialized value in string context", when say ~$/<chord_accidental>.perl; gets me (Match.new(orig ... etc. (this in nom). Does a Parcel not have a name? | ||
moritz | nom: my Int $x; my $y; $x + $y; +$x | 17:43 | |
p6eval | nom 1f9310: OUTPUT«Use of uninitialized variable $x of type Int in numeric contextUse of uninitialized variable $y of type Any in numeric contextUse of uninitialized variable $x of type Int in numeric context» | ||
[Coke] | (when I fudged things earlier.) | ||
seen sorear? | |||
aloha | sorear was last seen in #perl6 8 hours 32 mins ago saying "hello, grondilu". | ||
moritz | colomon: use .WHAT.gist | ||
[Coke] | phenny: tell sorear: everything fudged so far has a ticket. | ||
phenny | [Coke]: I'll pass that on when sorear is around. | ||
moritz | colomon: .WHAT is just the type object, and that stringifies to '' with a warning | 17:44 | |
jnthn | colomon: danger precedence! | ||
moritz | but it .gist's without a warning, or you can use .^name directly on the object | ||
[Coke] | phenny: tell sorear it's kind of a PITA to tell the difference between things you broke and things other people didn't bother to checker. | ||
phenny | [Coke]: I'll pass that on when sorear is around. | ||
jnthn | ~$/<chord_accidental>.perl is ~($/<chord_accidental>.perl) | ||
Oh, maybe you know that... | |||
hm | |||
oh! | 17:45 | ||
Though maybe same thing | |||
[Coke] will just concentrate on rakudo's tests, he supposes. | |||
jnthn | ~$/<chord_accidental>.WHAT is ~($/<chord_accidental>.WHAT) | ||
And thus what moritz++ points out is the issue | |||
colomon | jnthn++, moritz++ | 17:46 | |
jnthn | [Coke]: Do you have ICU working with Parrot on Windows? | 17:47 | |
colomon is not sure how the ~ snuck into his code... | |||
18:08
xinming_ joined
18:11
xinming left
|
|||
jnthn | tadzik: Fixed one test in Test::Mock | 18:31 | |
tadzik: And skipped the others that fail for the moment so people aren't blocked on bootstrapping the ecosystem. | |||
tadzik: Hope this helps. | |||
tadzik | jnthn: great, thanks! | 18:32 | |
blog post preview: perl6advent.wordpress.com/?p=867&am...eview=true | |||
suggestions will be welcome, if something is unclear or chaotic let me know | |||
jnthn | tadzik: Seems that it has line breaks in wrong places. | ||
[Coke] | jnthn: I thought I had at one point. | 18:33 | |
jnthn | "Plain, Old Documentation" - don't think the comma is meant to be there. It changes the meaning. ;-) | ||
18:34
mj41 left
|
|||
tadzik | jnthn: yeah, fixe that | 18:35 | |
okay | |||
corrected that too | |||
jnthn | tadzik++ # nice post! | 18:37 | |
tadzik | I think I'll mention Pod test suite too | 18:38 | |
...suite, or suit? | 18:39 | ||
suite I think :) added | 18:40 | ||
jnthn | suite | 18:41 | |
:) | |||
tadzik | ok, publishing, take cover :) | ||
jnthn hides under his desk | |||
tadzik | ta-da! perl6advent.wordpress.com/2011/12/1...ng-perl-6/ | ||
jnthn | \o/ | 18:42 | |
18:43
molaf_ left
18:45
MayDaniel joined
|
|||
jnthn | tadzik: plz can haz commit bit for Panda? | 18:49 | |
tadzik | jnthn: sure thing | 18:54 | |
maybe I should move it to Perl6 org | 18:55 | ||
jnthn | tadzik: I have a bootstrap.bat | ||
tadzik | jnthn: given | ||
\o/ | |||
jnthn | tadzik: That does what bootstrap.sh does but for Windows | ||
tadzik | works on windows? | ||
jnthn | tadzik: Next problem: no wget on Windows :( | ||
tadzik | :\ | ||
we should use LWP::Simple maybe | |||
sorear | good * #perl6 | ||
phenny | sorear: 17:43Z <[Coke]> tell sorear everything fudged so far has a ticket. | ||
sorear: 17:44Z <[Coke]> tell sorear it's kind of a PITA to tell the difference between things you broke and things other people didn't bother to checker. | |||
tadzik | hello sorear | ||
dalek | nda: 253154c | jnthn++ | bootstrap.bat: Add a bootstrap.bat, to get us started with Windows support for Panda. |
18:57 | |
jnthn | tadzik: Or some very stripped down "just the bits we need" equivalent | 18:58 | |
tadzik | aye | 18:59 | |
ok, I'm gone for today, see you tomorrow! | 19:00 | ||
cognominal | jnthn: in nqp, how can I distinguish a class derived from Any from the Any class itself | ||
testing that could fix the bug about $*ACTIONS | 19:01 | ||
19:02
MayDaniel left
|
|||
jnthn | cognominal: I don't think that's really the right approach. | 19:03 | |
cognominal: It should probably be fixed somewhere in Rakudo, not in nqp | |||
19:03
am0c joined
|
|||
jnthn | cognominal: You can do the check there with === though | 19:04 | |
nom: say Any === Any; say Int === Any; | |||
p6eval | nom 1f9310: OUTPUT«Bool::TrueBool::False» | ||
cognominal | ok | ||
dalek | nda: bdeae83 | jnthn++ | README.md: Add installation instructions for Windows. |
19:16 | |
nda: 6f00754 | jnthn++ | bin/panda: Fix home directory handling on Windows. |
19:27 | ||
nda: 8beee70 | jnthn++ | README.md: Clarification. |
19:30 | ||
kudo/nom: 70d7154 | jnthn++ | src/Perl6/Metamodel/SubsetHOW.pm: .^find_method on a subset shouldn't throw. |
|||
19:35
drbean left
|
|||
sorear | [Coke]: oh, if you're going to ticket them, that's fine | 19:38 | |
jnthn | phenny: tell tadzik hmm, there's quite a few not-so-Windows-friendly bits, it seems. It claims to work, but there's no .perl6 directory created! Will see if I can figure it all out, anyways... | 19:40 | |
phenny | jnthn: I'll pass that on when tadzik is around. | ||
19:41
drbean joined
19:52
snearch joined
|
|||
[Coke] | sorear: the only ones I'm not ticketing are one that weren't even in t/spectest.data before. | 20:06 | |
anything that was already running but has a failure was (is) getting a ticket. | |||
excellent | |||
sorear | I'm mostly just annoyed by af38363d | 20:07 | |
[Coke] | in roast? | 20:08 | |
sorear | yes | 20:09 | |
[Coke] | Apologies, that was an old one. I'm not sure if those were tests that were already in t/spectest.data or not. | 20:12 | |
I'll ticketify those this weekend. | |||
son needs computer now, though. | |||
sorear wonders whether in the short term it would be better to have an O(n) Str.chars that respects surrogates or an O(1) Str.chars that doesn't | 20:13 | ||
cognominal | jnthn, I thought adding in src/core/Grammar.pm the following function would do it but it is not called. method !reduce($name) { $*ACTIONS.$name if $*ACTIONS !== Any and $*ACTIONS.can: $name } | 20:22 | |
The interactions between nqp code and rakudo code is still am mystery to me. need sleep. CU tomorrow. | 20:24 | ||
20:32
am0c left
20:36
localhost left
20:37
localhost joined
21:06
sayu joined
21:07
sayu_ joined
21:28
MayDaniel joined
21:29
jlaire joined
21:42
fridim_ joined
21:43
lichtkind joined
|
|||
lichtkind | hope i can write the categorize text | 21:44 | |
22:10
MayDaniel left,
drbean left
22:16
Sarten-X left,
drbean joined
22:26
jimmy1980 left
22:27
Sarten-X joined
22:28
fsergot left,
kaare_ left
22:30
jimmy1980 joined
|
|||
sorear | lichtkind: Was that a question? | 22:51 | |
lichtkind | no :) | 22:52 | |
dalek | ecza: 20a790d | sorear++ | / (3 files): Properly implement &codes, use it where appropriate |
||
22:56
snearch left
23:13
skangas left
23:37
worr joined
23:45
sayu_ left,
sayu left
23:47
alim joined
23:57
am0c joined
|