Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-04-04

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 hercynium joined #perl6
00:12 davidad joined #perl6
00:25 payload joined #perl6
00:26 wayland76 Here's a lambdabot idea: link it to Google define, and have it grep for perl or programming definitions in the output
00:26 wayland76 (as an alternative to the perl6 glossary idea that mncharity presented)
00:28 c9s_ joined #perl6
00:40 dduncan joined #perl6
00:42 nihiliad joined #perl6
01:16 meppl joined #perl6
01:27 davidad joined #perl6
01:37 minazo joined #perl6
01:54 dalek rakudo: fb2752d | pmichaud++ | t/spectest.data:
01:54 dalek rakudo: Add S05-mass/named-chars.t to spectest (w/icu requirement)
01:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​b2752d2baee1442c53e2c3bc2dff1ebe954cb3e
01:57 minazo left #perl6
02:33 meppl good night
02:46 s1n frioux|home, frew|work: ping
03:22 alester joined #perl6
03:36 Sepheebear joined #perl6
03:46 s1n jnthn: ping
04:03 wayland76 I'm proably the only one left :)
04:06 cotto joined #perl6
04:21 s1n does actions.pm have any mechanism to check if a file exists?
04:26 s1n rakudo: use v6
04:26 p6eval rakudo 881ed3:  ( no output )
04:27 s1n wtf, that's giving me a NSF complaint
04:27 justatheory joined #perl6
04:29 pmichaud s1n: what platform?
04:30 pmichaud std: #<is this an error?>
04:30 p6eval std 26066: OUTPUT«Undefined␤ok 00:02 34m␤»
04:30 pmichaud std:#<is this an error?>
04:30 pmichaud std: 'hello'
04:30 p6eval std 26066: OUTPUT«ok 00:02 35m␤»
04:30 pmichaud std: #(is this an error?)
04:30 s1n pmichaud: gentoo amd64
04:30 p6eval std 26066: OUTPUT«Undefined␤ok 00:02 34m␤»
04:31 s1n how can we make that NSF error tell me what file it's complaining about? where would i find that code?
04:32 s1n ahh, i had to do a real clean, it stopped doing it now
04:32 pmichaud yes, I need to clean up the makefile to detect those situations a bit better.
04:33 s1n rakudo: use v6;
04:33 p6eval rakudo 881ed3:  ( no output )
04:33 s1n man, nevermind
04:33 s1n it's still doing it for me
04:33 s1n without the semi-colon, it works, from -e
04:37 pugs_svn r26067 | pmichaud++ | [t/spec]: Add some #?rakudo skip markers, fix some tests.
04:48 pugs_svn r26068 | pmichaud++ | [t/spec]:  Fix embedded comment error in S32-array/delete.t .
04:53 s1n nope, figured it out
04:53 s1n when i leave the rakudo directory, it then gives the NSF error
04:54 s1n when i am in that directory, everything works fine
04:54 s1n pmichaud: sound like a bug?
04:54 s1n even when i copy the fakexecutable, it still fails
04:55 s1n same thing with using 'parrot perl6.pbc' when outside of the rakudo directory
04:57 dalek rakudo: 0e8b7a4 | pmichaud++ | t/01-sanity/09-types.t:
04:57 dalek rakudo: Fix error in comment in t/01-sanity/09-types.t
04:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​e8b7a403252c7293dc8ad8422d2dc2e0c44c65c
04:57 dalek rakudo: 68ea385 | pmichaud++ |  (3 files):
04:57 dalek rakudo: Add ability to support embedded comments.
04:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​8ea3850c4c11a30ad7d969dd5a93ee71c3daf5e
05:06 pmichaud yes, sounds like a bug.
05:07 pmichaud but it's working for me.  :-|
05:07 pmichaud oh, I spoke too soon.  I get the same error.  Hrm.
05:10 pmichaud oh, looks like a bug jnthn introduced.
05:10 pmichaud I suspect I'll have to let him repair it.
05:12 pmichaud The code being generated by actions.pm is now adding a  line like:   .include "src/pr_macros.pir"
05:12 pmichaud which obviously won't work from outside of rakudo's root.
05:38 s1n pmichaud, jnthn: i filed it as #64448
05:38 s1n this is kinda stopping me from my development and i don't understand what it's doing there to know how to fix it myself
05:40 s1n pmichaud: there are in fact 3 uses of .include in actions.pm, are all 3 going to be issues?
05:49 pmichaud s1n: no, the other .includes use stuff that comes with parrot
05:49 pmichaud so the others aren't an issue.
05:49 pmichaud I don't understand what it's doing either -- jnthn just added it today.
05:49 pmichaud (I'm also not sure why it's a macro and not just a normal function, which is the way we've been doing most stuff like this.)
05:53 pmichaud comments indicate we have to do it this way to get a newclosure from the correct scope
05:54 eternaleye joined #perl6
05:55 pmichaud I think there ought to be a cleaner approach than the macro one.
06:00 dalek rakudo: 924ec3f | pmichaud++ | docs/spectest-progress.csv:
06:00 dalek rakudo: spectest-progress.csv update: 347 files, 8406 passing, 0 failing
06:00 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​24ec3f497e8fe40a568d198385b920a5c031a8f
06:00 wayland76 Are you telling me macros are unclean?
06:00 wayland76 :)
06:02 pmichaud they generate a lot more code than a simple function call.
06:02 pmichaud anyway, sleep time for me.  bbl
06:03 wayland76 Ah, there is that.  Goodnight :)
06:03 nacho joined #perl6
06:15 Interfect joined #perl6
07:09 DemoFreak joined #perl6
07:12 ejs joined #perl6
07:12 dduncan left #perl6
07:33 jhuni joined #perl6
07:37 kane_ joined #perl6
07:54 pmurias joined #perl6
07:58 Tene_ joined #perl6
08:16 c9s_ joined #perl6
08:19 meteorjay joined #perl6
08:32 masak joined #perl6
08:33 masak ahoj, Parrot-butterflies.
08:35 iblechbot joined #perl6
08:36 wayland76 Parrot?
08:37 wayland76 (for a minute I was wondering what "ahodj" was, until I discovered it was a euro-ism (or IPA-ism) for "ahoy")
08:38 masak wayland76: aye. it's a common greeting in Slovakia.
08:39 wayland76 Oh, I like sovlakia -- lamb or chicken for preference :)
08:39 wayland76 (souvlakia *is* the plural for souvlaki, isn't it? :) )
08:39 masak ehm.
08:39 wayland76 :)
08:39 wayland76 sorry
08:39 masak :P np.
08:40 masak now, there was this Spec addition that I let slip yesterday...
08:40 * masak backlogs
09:01 masak the return type of shift, according to S32, is Scalar.
09:01 masak what if the first element happens to be a Hash or an Array?
09:02 * masak thinks that return type should be Any or Object
09:05 ashizawa joined #perl6
09:07 masak I'd be happy if someone reviewed this patch to S09: http://gist.github.com/90163
09:08 masak it captures what I want to say, but I feel it might not be clear enough to merit inclusion in the spec.
09:08 masak comments welcome.
09:10 wayland76 forgiveness...permission :)
09:11 barney joined #perl6
09:13 moritz_ masak++
09:13 masak ok, so I'll commit, then.
09:14 masak it's just that I feel that the entire issue explained in that section is... subtle.
09:15 masak hm, I'll add a phrase about ++ and -- et al DWIMming, too.
09:15 wayland76 Well, if TimToady doesn't like it, he can say so :)
09:16 masak I hope others dare speak up, as well. :)
09:17 moritz_ ruoso will ;-)
09:17 masak 哈哈
09:17 mjk joined #perl6
09:19 wayland76 What's with the triangle and two squares?
09:19 masak wayland76: I find that the sound of laughter is best captured by sinographs. I don't know why, but they really look like laughter to me.
09:19 masak wayland76: it says "haha".
09:20 Patterner What about ":) :)"..?
09:20 masak Patterner: those are two smiles.
09:20 masak ...rotated 90 degrees.
09:20 wayland76 LoL?
09:21 wayland76 (List of Lists, right? :) )
09:21 masak fair enough, but none of these are actually onomatopoetic.
09:21 masak the character 哈 is actually pronounced "ha1"
09:22 wayland76 What's 1?
09:22 masak wayland76: a high, level tone.
09:22 masak well, you asked. :)
09:22 wayland76 I did.
09:22 wayland76 How do you say it with a tone pattern like this: /^
09:23 masak rising and then dropping?
09:23 wayland76 Rising on the first, and rising and dropping on the second :)
09:23 masak in Mandarin, that's not a single tone. but I guess tone 2 followed by tone 4 would sound something like that.
09:23 wayland76 oh, ok :)
09:32 pugs_svn r26069 | masak++ | [S09] added table of operations that autovivify
09:32 masak moritz_: running 'make spectest' on a half-month-old t/spec turned out to be a bad idea. :)
09:32 wayland76 Anyway, since there's no activity on my Parrot patches, I think I'll go read for a while.  I may not be back until Monday.
09:32 masak moritz_++ # much must have happened in the spectest suite.
09:33 masak moritz_: by the way I'm getting 'Redeclaration of variable ' on some test files, and warnings on some others.
09:33 moritz_ masak: I know
09:33 masak thought so. :)
09:34 moritz_ in particular my.t tests redeclaration
09:35 masak aye.
09:48 jnthn oh hai
09:49 masak jnthn: hai
09:49 jnthn oooh...I broke-ish Rakudo :-(
09:50 masak the one on github? or your local copy?
09:51 jnthn erm, well both
09:52 masak sounds interesting? if what you say is true, how come all tests pass? :P
09:52 masak s/\?/./
09:52 jnthn masak: I broke using Rakudo out of the build directory, apparently. :-(
09:52 * moritz_ can confirm that it's broken
09:52 jnthn By trying to do good code re-use. ;-)
09:53 masak oh.
09:53 jnthn Yeah, makes sense now I think about it. Just pondering a good solution...
09:53 masak that's right, it doesn't work here either.
09:56 ejs joined #perl6
09:58 jnthn (git stash)++
09:59 masak git stash is strange. :)
09:59 masak it's like a completely orthogonal way of storing away changes.
09:59 moritz_ it works fine as long as your stash is small
09:59 moritz_ if it's too big, you forget which stash is what
10:01 masak left #perl6
10:01 masak joined #perl6
10:02 masak I've never had more than one thing stashed at a given time, I think.
10:02 jnthn I've just pushed a second one...
10:02 jnthn Though plan to grab it back soonish.
10:03 jnthn OK, I need coffee, then to fix my fail.
10:05 pugs_svn r26070 | moritz++ | remove duplicate test (for example S12-attributes/instance.t
10:05 pugs_svn r26071 | moritz++ | [t] merge oo/attributes/attribute_list.t into instance.t
10:11 pugs_svn r26072 | moritz++ | remove bogus test
10:13 aindilis joined #perl6
10:14 pugs_svn r26073 | moritz++ | moved both.t to spec, after small cleanup
10:17 pugs_svn r26074 | moritz++ | remove partially bogus and duplicate test
10:17 dalek rakudo: 4698d3f | (Moritz Lenz)++ | t/spectest.data:
10:17 dalek rakudo: add S12-methods/class-and-instance.t to spectest.data
10:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​698d3f96554260043f562f6dc2d18a106d07d8b
10:20 moritz_ somhow I forget the [t] marker when working with git :(
10:20 moritz_ moritz--
10:21 pugs_svn r26075 | moritz++ | [t] move overload.t to spec/
10:21 pugs_svn r26076 | moritz++ | [t] remove now empty directory (why can't git-svn do that?)
10:24 pugs_svn r26077 | moritz++ | [t] move test with longer name than content to spec/integration/
10:27 jnthn (BTW fix for the stuff I broke currently smoking)
10:27 pugs_svn r26078 | moritz++ | fixed wrong usage of try { }
10:28 moritz_ @karma moritz
10:28 lambdabot moritz has a karma of 500
10:28 jnthn Half way to a thousand :-)
10:29 jnthn @karma jnthn
10:29 lambdabot You have a karma of 200
10:29 jnthn Beating me my miles.
10:29 jnthn *by
10:29 jnthn @karma jonathan
10:29 lambdabot jonathan has a karma of 65
10:29 jnthn meh
10:35 jnthn moritz_: I'm seeing a fail in t\spec\S12-attributes\instance - that's one you just added/updated, I think?
10:35 jnthn FAILED tests 88-93
10:44 Cybera1 joined #perl6
10:45 dalek rakudo: f17a691 | jnthn++ | src/parser/actions.pm:
10:45 dalek rakudo: Can't .include the parametric roles macro at runtime, so just inline the PIR (best I can think of for now; don't see to have Q:PIR{ } in NQP, which may allow something shorter).
10:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​17a691557a54b792ce9fcbdec4214125e7a051e
10:45 dalek rakudo: 64a8988 | jnthn++ | :
10:45 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
10:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​4a8988cd2e4246c0e19986462f938256f324a60
10:46 jnthn Erm. I think dalek missed two other patches that were in there too...
10:47 masak they were ex-TER-minated!
10:47 jnthn :-P
10:47 jnthn For anyone who's curious, I just made Positional and Associative also be parametric roles.
10:48 jnthn oh curious
10:48 jnthn On github if you follow the link for that commit you get a 404.
10:48 masak github has done that for me a lot lately.
10:49 jnthn quickreportgithubbug
10:49 masak I've asked on #github and github-devel, but gotten no sensible reply.
10:49 masak :/
10:49 jnthn :-S
10:49 jnthn I suspsect that dalek not seeing them and this issue are not unrelated.
10:50 masak I think it's reasonable to assume that github has run into scaling problems.
10:54 mikehh joined #perl6
10:58 * jnthn gets back to the patch that he ran out of energy to debug last night
10:59 jnthn All being well, we should have typed arrays/hashes/subs in the next few days.
10:59 moritz_ jnthn: (re failing test) looking...
11:00 masak jnthn: (re typed arrays) neat.
11:01 masak jnthn: what about the untyped-array-of-ints problem? did that one ever get resolved?
11:02 jnthn masak: Not that I'm aware of.
11:02 pugs_svn r26079 | moritz++ | [t/spec] fixed bad plan, jnthn++
11:04 jnthn masak: Though cleaning up S14 is on my task list, so may ponder it a bit during that.
11:09 masak the untyped-array-of-ints problem, in my opinion, is a place where gradual typing becomes a bit ugly.
11:10 moritz_ which problem are you refering to?
11:10 pugs_svn r26080 | moritz++ | [t] move autopair_instantiation.t to spec/, clean up
11:11 masak moritz_: an untyped array, containing just Ints, say.
11:11 masak moritz_: passed to a sub which only accepts Array of Int.
11:11 jnthn rakudo: my $x = Pair.new(key => 'DEFAULT', value => 1); say $x.key
11:11 p6eval rakudo 881ed3: OUTPUT«DEFAULT␤»
11:12 masak moritz_: it feels wrong not to accept the array as a matching parameter, just because it's not typed.
11:12 moritz_ aye
11:12 masak moritz_: but the alternative -- traversing it and checking -- is even worse.
11:12 moritz_ agreed
11:12 masak moritz_: and what if it's lazily infinite?
11:12 jnthn rakudo: my $x = Perl6Pair.new(key => 'DEFAULT', value => 1); say $x.key
11:12 p6eval rakudo 881ed3: OUTPUT«invoke() not implemented in class 'NameSpace'␤current instr.: '_block14' pc 62 (EVAL_17:40)␤»
11:13 masak jnthn: that looks like a bug.
11:13 dalek rakudo: 58d1635 | (Moritz Lenz)++ | t/spectest.data:
11:13 dalek rakudo: we now pass autopairs.t
11:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​8d1635151ad3eff623401fd53e352cdd88f09ae
11:13 moritz_ masak: check the first item, and dispatch on its type. And then install an assertion that throws an exception when the other values aren't of that type (if it's bound to something with a type constraint)
11:13 moritz_ Perl6Pair isn't specced anywhere :)
11:14 masak moritz_: sounds intriguing.
11:14 masak moritz_: you're right. no bug.
11:15 jnthn Actually I think the real problem is more general.
11:15 jnthn That scheme works for arrays, but then what of hashes?
11:15 jnthn And then what of types that users write, etc.
11:15 moritz_ right
11:17 masak a hash doesn't have a first item.
11:17 masak and the "first item" part was the only thing in moritz_'s solution that felt arbitrary, so maybe something else is needed instead.
11:18 moritz_ maybe containers need to define a 'tell me a preliminary type' method
11:18 moritz_ or even better
11:18 moritz_ they override .can
11:19 masak ooh!
11:19 moritz_ and give the "right" answer, whatever is "right" in their opinion
11:20 moritz_ (and maybe return a Maybe instead of a True, or something)
11:21 moritz_ enum canType <NOWAY MAYBE ABSOLUTELY>; # ;-)
11:21 moritz_ afk
11:24 jnthn Ouch.
11:24 jnthn That's an...interesting...ordering problem.
11:25 PhatEddy joined #perl6
11:25 jnthn (The export trait depends partly on Pair.key
11:25 jnthn ...and exports itself...and export depends upon constructing pairs)
11:28 masak heh.
11:29 jnthn export trait's implementation calls key
11:29 jnthn Thing is, by that point we didn't actually re-bless key into a Rakudo class.
11:29 jnthn Which now it's expected to be at the point of its first invocation.
11:29 agentzh joined #perl6
11:30 jnthn oh, key isn't currently exporing itself, but it maybe should be...
11:30 jnthn So moving it up in the setting ordering helps.
11:34 masak expect more of this down the road.
11:35 PhatEddy I think I have a patch for the 99999[0] problem.  Anyone have a thought about where the test for the case might go?
11:37 jnthn Actually I've moved Pair.key out of the setting - I think it's one of those cases where we might just have to accept that it's kinda "low level".
11:37 jnthn And now
11:37 jnthn > sub foo($x) returns Int { return $x ?? 42 !! "oh hai" }
11:37 jnthn > say foo(1); say foo(0);
11:37 jnthn 42
11:37 jnthn Type check failed on return value
11:37 lambdabot <no location info>: parse error on input `$'
11:37 lambdabot <no location info>: parse error on input `;'
11:37 jnthn Now to see if we have any chance of making it through the tests.
11:37 masak jnthn: cool.
11:39 jnthn Whee.
11:39 jnthn > sub foo() returns Int { }
11:39 jnthn > say &foo ~~ Callable
11:39 jnthn 1
11:39 jnthn > say &foo ~~ Callable[Str]
11:39 jnthn 0
11:39 lambdabot Not in scope: `say'Not in scope: `&'Not in scope: `foo'Not in scope: `~~'No...
11:39 lambdabot Not in scope: `say'Not in scope: `&'Not in scope: `foo'Not in scope: `~~'No...
11:39 lambdabot Not in scope: `sub'Not in scope: `foo'Not in scope: `returns'Not in scope: ...
11:39 jnthn > say &foo ~~ Callable[Int]
11:39 lambdabot Not in scope: `say'Not in scope: `&'Not in scope: `foo'Not in scope: `~~'No...
11:39 jnthn 1
11:39 jnthn erm, sorry lambdabot!
11:40 masak jnthn: wow!
11:44 jnthn std: sub foo() returns Callable[Int] { }
11:44 p6eval std 26080: OUTPUT«ok 00:02 34m␤»
11:44 jnthn hmm, wonder why we can't parse that.
12:33 kane_ joined #perl6
12:51 pmurias masak: .<> is desugared to .{}
12:51 ruoso joined #perl6
12:51 masak pmurias: so I should leave it out?
12:53 pmurias think so
12:53 * masak does so
12:53 ruoso HellO!
12:54 pmurias ruoso: hi
12:54 ruoso masak, .{} and .[] doesn't autovivify
12:54 ruoso pmurias, hi
12:54 masak ruoso: no, I know that.
12:54 masak that's the point of the rest of that section.
12:54 masak but I'm at a loss to express what I want better than that.
12:55 pmurias ruoso: so my %hash<foo><bar> = 1 doesn't autovivify %hash<foo>?
12:55 masak pmurias: yes, it does.
12:55 masak and that's my point.
12:56 ruoso pmurias, yes... but only at the point you assigned
12:56 masak ...and it's not very clear in my addition.
12:56 ruoso not before that
12:56 masak ruoso: we agree.
12:56 * moritz_ found that quite clear before
12:56 masak now help me make the text say that, too. :)
12:57 meppl joined #perl6
12:57 pmurias masak: i'm not sure .unshift will autovivify
12:57 ruoso masak, "causes the protoobject to be of the given type:"
12:57 pugs_svn r26081 | masak++ | [S09] removed .<> from the table
12:57 pugs_svn r26081 | masak++ |
12:57 pugs_svn r26081 | masak++ | It's just sugar anyway. pmurias++ for pointing that out.
12:57 masak ruoso: that's a long table heading.
12:58 masak pmurias: well, me neither.
12:58 ruoso masak, that's not for the header
12:58 moritz_ why shouldn't it?
12:58 ruoso but for the text before the table
12:58 masak ok.
12:58 ruoso the header can simply be
12:58 ruoso "operator", "type"
12:59 pmurias moritz_: normal autovivication works during binding
12:59 masak ruoso: ok. your first suggestion makes for a strange sentence, but I'll see if I can make it work somehow.
13:00 masak ruoso: "causes the protoobject to instantiate to the right type just in time:"
13:00 masak ruoso: does that work for you?
13:01 ruoso a proto only instantiates to its own type
13:01 jnthn rakudo: say Bool::True ~~ Bool
13:02 p6eval rakudo 881ed3: OUTPUT«1␤»
13:02 masak ruoso: my %hash; %hash<foo><bar> = 42; # instantiates %hash<foo> as a Hash
13:02 jnthn rakudo: say Bool.ACCEPTS(True)
13:02 p6eval rakudo 881ed3: OUTPUT«0␤»
13:02 jnthn rakudo: say Bool.ACCEPTS(Bool::True)
13:02 p6eval rakudo 881ed3: OUTPUT«1␤»
13:02 masak ruoso: my %hash; %hash<foo>.push(42); # instantiates %hash<foo> as an Array
13:02 ruoso it creates a proto of the hash type
13:03 ruoso eich is later instatiated
13:03 ruoso 8wich
13:03 masak ok...
13:03 masak still not sure I understand the exact mechanism.
13:03 pmurias moritz_: disregard my answer, i got confused
13:05 masak ruoso: what about %hash<foo>[0]<bar>.push(42) ? that one has to instantiate two Hashes and two Arrays.
13:05 ruoso the decision of it being a hash happens at .{} time
13:05 ruoso but it is not instantiated at that time
13:05 masak ruoso: ack.
13:05 pmurias masak: my %hash; my $bar := %hash<foo>;%hash<foo> doesn't exists here;$bar = 5;%hash<foo> is 5 here
13:05 masak pmurias: ack.
13:06 masak I'm not sure why you're telling me this.
13:06 masak I know.
13:06 pmurias masak: my %hash; my $bar := %hash<foo><bar>;%hash<foo> doesn't exists here;$bar = 5;%hash<foo> is a Hash here
13:06 pmurias masak: that's what i meant to say ;)
13:06 masak yes.
13:06 masak I know this.
13:07 pmurias so it's not the .{} which autovivfies but binding to %hash<foo><bar>
13:07 masak I have a patch with ruoso's latest suggestions, along with my improvements. can I commit it, or should I nopaste it?
13:07 masak pmurias: yes. I know.
13:07 masak pmurias: if you feel that the added table contradicts that somehow, please help me improve it.
13:08 masak don't just tell me things that I already know. :)
13:08 pugs_svn r26082 | jnthn++ | [t/spec] A few tweaks to keep the return type checks happy.
13:08 brunoV joined #perl6
13:09 masak http://gist.github.com/90203
13:11 pmurias masak: did you find the .push and .unshift autovivification in the specs?
13:11 masak pmurias: no, the table is a tidied-up version of a moritz_ IRC comment.
13:12 masak but it makes sense to me.
13:12 moritz_ pmurias: if he did, he wouldn't have to add it ;-)
13:12 masak I think .push is the same kind of change as assigning to .{}
13:12 moritz_ .[]
13:13 masak oh. right.
13:13 ruoso masak, but that would imply that you can simply
13:13 ruoso push %foo<bar>, 1
13:13 ruoso and that's not going to fly
13:13 moritz_ ruoso: that's exactly how it works in perl 5
13:13 moritz_ and maybe the way to go is over the subs
13:13 pmurias ruoso: push %foo<bar>,1 is arguably better
13:14 pmurias as push is known to work on Arrays
13:14 moritz_ because there can simply be a function push($type_that_autovivs_potentially is rw, *@args)
13:14 moritz_ that does the autoviv
13:14 moritz_ and the method form could dispatch to that
13:14 moritz_ walk &
13:14 ruoso hmm...
13:15 ruoso what is the $type_that_autovivs_potentially ?
13:15 masak I feel the current discussion is not about the change I'm about to commit, so I'll just go ahead and commit it.
13:15 ruoso masak, I'm still unconfortable
13:15 masak ruoso: me too.
13:16 pmurias masak: by the same reasoning one could expect .substr in lvalue context to also autovivify
13:16 ruoso about the relationship between the protoobject and the instantiation
13:16 masak I don't entirely understand this issue.
13:16 masak pmurias: I think the difference is that Hash and Array are container types.
13:16 ruoso the protoobject doesn't "instantiate to the right type"
13:16 ruoso the protoobject needs to be of the correct type from beggining
13:17 ruoso it just happens to be autovivified laetr
13:17 masak ruoso: ok, I think I see what you mean.
13:17 PhatEddy rakudo: my @a; @a[1] = "b"; my @b = @a
13:17 p6eval rakudo 881ed3: OUTPUT«Null PMC access in isa()␤current instr.: '!CALLMETHOD' pc 16471 (src/builtins/guts.pir:74)␤»
13:18 masak PhatEddy: old or new? :)
13:18 PhatEddy Just a reminder on patch rt 62948
13:18 masak ah.
13:18 pmurias masak: .{} and .[] are special cased
13:19 masak pmurias: aye, so the issue really is that they don't belong in a table with push and unshift, yah?
13:19 jnthn rakudo: my @a; @a[1] = "b"; say "alive"
13:19 p6eval rakudo 881ed3: OUTPUT«alive␤»
13:19 jnthn rakudo: my @a; @a[1] = "b"; say @a.perl
13:19 p6eval rakudo 881ed3: OUTPUT«Null PMC access in isa()␤current instr.: 'parrot;List;!flatten' pc 5960 (src/classes/List.pir:227)␤»
13:19 masak especially since push and unshift work immediately, whereas .[] and .{} are delayed, as ruoso points out.
13:20 ruoso masak, pmurias, well.. the question is really if push should autovivify or not...
13:20 jnthn rakudo: my @a; @a[1] = "b"; say @a[0]
13:20 p6eval rakudo 881ed3: OUTPUT«Use of uninitialized value␤␤»
13:20 masak ruoso: I think it should.
13:20 jnthn rakudo: my @a; @a[1] = "b"; .say for @a
13:20 p6eval rakudo 881ed3: OUTPUT«Use of uninitialized value␤␤b␤»
13:20 jnthn Hmm.
13:20 ruoso the table should contain everything that autovivifies, determining the type of the autovivified object
13:20 PhatEddy jnthn: hint rt 62948 describes the problem in some detail (http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=62948)
13:22 pmurias perl6: my $foo;$foo<bar> = 1; say $foo;
13:23 p6eval pugs: OUTPUT«bar 1␤␤»
13:23 p6eval ..elf 26082: OUTPUT«bar    1␤»
13:23 p6eval ..rakudo 881ed3: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Failure'␤current instr.: 'postcircumfix:{ }' pc 4118 (src/classes/Associative.pir:77)␤»
13:23 ruoso mildew: say "am I alive?"
13:23 p6eval mildew: OUTPUT«Bareword found where operator expected at perl6-snapshot/STD.pm line 4, near "$LANG is"␤  (Missing operator before is?)␤Bareword found where operator expected at perl6-snapshot/STD.pm line 5, near "$PKGDECL is"␤   (Missing operator before is?)␤Bareword found where operator expected
13:23 p6eval .....
13:23 ruoso pft
13:23 Cybera left #perl6
13:24 pmurias a make in perl6-snapshot is needed
13:24 M_o_C joined #perl6
13:25 dKingston joined #perl6
13:32 masak the discussion about push, unshift, .[] and .{} stalled. I can't commit what I have, and I don't know what to change it to in order to be able to commit.
13:34 dalek joined #perl6
13:34 jnthn erm. oops!
13:34 * jnthn promises to write shorter commit messages next time
13:35 masak :P
13:35 jnthn OK, first cut of returns enforcement is in.
13:35 jnthn Not at all perfect yet.
13:35 * masak smells rakudobugs in the air
13:36 rgs joined #perl6
13:37 jnthn For example, it currently doesn't check implicit return values just yet.
13:37 masak implicit return values?
13:37 masak as in 'return' ?
13:37 jnthn sub foo() returns Int { return "oh hai" } # fails
13:37 jnthn sub foo() returns Int { "oh hai" } # not enforced yet
13:38 masak aha, as in 'no return' :)
13:38 jnthn Yes.
13:38 jnthn Want pm's input on how to do that best.
13:38 masak jnthn: while you're between tasks, do you have any thoughts on http://rt.perl.org/rt3/Tic​ket/Display.html?id=62622 ?
13:39 jnthn This does bulk up the output a little in the PAST and in the PIR, so we may want to use a PIR macro or something to help that...
13:39 jnthn looking...
13:39 masak especially the last comment.
13:40 jnthn making prefix:<+> smarter is not so hard
13:40 masak yes, but the other thing...? :)
13:40 jnthn Taht's harder. :-P
13:41 masak I suspected as much.
13:41 jnthn Thing is that it's probably going to dispatch as infix:<+>(Any,Any)
13:41 masak I'll nopaste a piece of code from Druid to show a real-life case where this is annoying.
13:41 jnthn I guess it could then do prefix:<+> on each of its arguments and redispatch, which would probably give you the semantics you want.
13:42 jnthn But at the cost of a double-dispatch.
13:42 jnthn (Since prefix:<+> would be smart enough to give an Int, so infix:<+>(Int,Int) would get called, which would give back an Int)
13:42 masak http://gist.github.com/90211
13:43 masak I'm already typing those variables as Int, why should I need to explicitly cast the subtractions?
13:44 masak that I needed to surprised me.
13:45 PhatEddy left #perl6
13:45 ruoso masak, what is the type of $<coords>[0]<row_number>?
13:46 masak ruoso: a Match, I guess.
13:46 ruoso well...
13:46 ruoso the return of Str - Int can't be Int
13:46 masak no?
13:47 ruoso what if the Str contain "1/3"
13:47 masak I see that.
13:47 ruoso rakudo: say "1/3" - 1;
13:47 p6eval rakudo 881ed3: OUTPUT«0␤»
13:47 ruoso hmm... wasn't that supposed to be numified correctly?
13:47 ruoso rakudo: say "0.33" - 1;
13:47 p6eval rakudo 881ed3: OUTPUT«-0.67␤»
13:47 jnthn ruoso: I guess because we don't do Rat yet.
13:47 ruoso ah
13:47 ruoso ok
13:48 masak ruoso: in my particular case, I know for a fact that the string will always numify to an integer.
13:48 ruoso then you should be happy by using Num as the type of your variable
13:48 masak ruoso: and if 4 - 3 is an integer, why shouldn't "4" - 3 be?
13:49 masak ruoso: I don't see why I should need to.
13:49 ruoso masak, because the return of Str - Int is not an Int
13:49 ruoso it's a Num
13:49 ruoso rakudo: say ("1" - 1).WHAT
13:49 p6eval rakudo 881ed3: OUTPUT«Num␤»
13:49 masak well, that's what the ticket is about :)
13:49 ruoso there's no issue there
13:49 ruoso Int is a type
13:50 ruoso it's not a subset of Num
13:50 ruoso (one could argue that it could be... )
13:51 ruoso if you really want Int precision, the cast is appropriae
13:51 masak ruoso: http://irclog.perlgeek.de/​perl6/2009-02-28#i_946119
13:51 ruoso if you don't really care, your variable should be of a less narrow type
13:51 masak ruoso: I'll be using those values as indexes to arrays, so I really care.
13:52 masak ruoso: I just want Perl 6 to be as accommodating as possible here.
13:52 ruoso well...
13:52 ruoso I guess you could have something like...
13:53 ruoso multi infix:<->(Str $a where /^\d+$/, Int $b --> Int) { }
13:53 pugs_svn r26083 | jnthn++ | [t/spec] Correct and change fudging of some return type checking tests.
13:53 ruoso because that's pretty much what you want
13:53 masak ruoso: yes. but putting it like that makes it seem a little silly.
13:54 masak ruoso: I want Perl 6 to numify to an Int if that's possible.
13:54 jnthn ruoso: If prefix:<+>("4") is meant to give Int, it's possible for the Any,Any case to re-dispatch. It'd give the semantics masak wants. But then it's a performance question.
13:55 ruoso rakudo: say (+"1").WHAT
13:55 p6eval rakudo 881ed3: OUTPUT«Num␤»
13:55 masak ruoso: http://irclog.perlgeek.de/​perl6/2009-02-28#i_946150
13:55 ruoso so...
13:55 masak so...
13:55 ruoso multi prefix:<+>(Str $a where /^\d+$/--> Int) { }
13:56 masak ruoso: no, not a Str. it has already numified to an Int at that point.
13:56 masak I don't think extra variants of prefix:<+> are needed.
13:56 ruoso rakudo: multi prefix:<+>(Str $a where /^\d+$/--> Int) { int(+$a) }; say (+"1").WHAT
13:56 p6eval rakudo 881ed3: OUTPUT«Malformed routine definition at line 1, near "prefix:<+>"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
13:56 ruoso ops
13:57 ruoso masak, well.. that can be made at a lower level or at a higher level
13:57 ruoso but it looks just like a different multi variant
13:57 masak ok.
13:57 masak whatever.
13:57 masak as long as it DTRT.
13:58 masak ruoso: but it's not just Str.
13:58 masak in my case, it's a Match.
13:58 ruoso I guess that makes it even worse...
13:58 ruoso because it's in the numification of Match, not Str
13:58 ruoso actually
13:58 ruoso it's the same thing
13:59 masak ruoso: well, the numification of a Match is just the numification of the stringification of that Match.
13:59 ruoso because the Match delegates the numification to the Str containing the matched part
13:59 masak aye.
13:59 masak but that still doesn't make that Match a Str.
13:59 masak so dispatch will fail.
13:59 jnthn It's time for me to go and drink beer. Back later, perhaps. ;-)
13:59 masak jnthn: o/
13:59 s1n jnthn: your fix for that macro works now
14:00 ruoso so... the question is wether conceptually there is a prefix:<+>(Str $x where /^\d+$/ --> Int) { }
14:01 masak no. I don't see why you think the question is that.
14:01 masak I just want things to numify to the narrowest numerical type, and everything will solve itself.
14:01 ruoso because if the CORE API defines that prefix<+>(Str) returns a Num, the cast is necessary
14:02 masak ruoso: then I don't think it should be defined as returning a Num.
14:02 ruoso exactly
14:02 masak either that, or Int should do Num.
14:02 ruoso rakudo: say Int ~~ Num
14:02 p6eval rakudo 881ed3: OUTPUT«1␤»
14:02 masak oh, good. :)
14:02 masak problem solved?
14:03 masak it returns an Int, which does Num. everyone's happy.
14:03 ruoso the CORE API just need to say that prefix:<+>(Str $x where /^\d+$/) returns Int
14:03 ruoso masak, but it doesn't return Int all the time
14:03 masak right.
14:03 ruoso it only returns Int when /^\d+$/
14:03 ruoso that's why I say that "conceptually"
14:03 ruoso there is another variant for prefix:<+?
14:03 ruoso *prefix:<+>
14:04 masak ruoso: I still don't see why you need to specify that multi variant.
14:04 ruoso even if that is implemented in some other way
14:04 ruoso in terms of API spec
14:04 ruoso if you are making strong typing
14:04 ruoso you want strong typign
14:04 ruoso and the types should be enforced
14:05 masak hm, fair enough.
14:05 ruoso so you need to document when you get a narrower type
14:05 masak ruoso: your regex will need to cover integers written in other bases, too.
14:05 masak ruoso: and technically, the string need only start with a number.
14:05 ruoso well... actually....
14:06 ruoso prefix:<+>(Str $x where <STD::int>) # or some such
14:06 masak nice!
14:08 ruoso hmm...
14:08 ruoso is there a way to get the match variable from a regex being used in a signature?
14:09 ruoso hmm... maybe
14:09 ruoso prefix:<+>(Str $x where /$match := <STD::int>/)
14:10 ruoso std: multi foo(Str $x where /$match := <STD::int>/) { say $match }
14:10 p6eval std 26083: OUTPUT«##### PARSE FAILED #####␤Malformed multi␤Malformed routine␤Unrecognized regex metacharacter at /tmp/bhj8W7h2nt line 1:␤------> [32mmulti foo(Str $x where /$match :[31m= <STD::int>/) { say $match }[0m␤    expecting any of:␤        quantifier␤       regex atom␤     rxinfix␤
14:10 p6eval ..ws␤FAILED 00:02 38m␤»
14:10 moritz_ maybe $/ is available inside the sub?
14:10 ruoso what if there is more than one regex in the signature
14:10 ruoso ?
14:11 moritz_ screwup :-)
14:11 ruoso what is the correct way of doing named capture in inline regexes?
14:12 ruoso std: my $foo; $foo ~~ /$named := (bla)/;
14:12 p6eval std 26083: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex metacharacter at /tmp/P83i4eytm7 line 1:␤------> [32mmy $foo; $foo ~~ /$named :[31m= (bla)/;[0m␤    expecting any of:␤        quantifier␤       regex atom␤       rxinfix␤        ws␤Other potential difficulties:␤  Variable $named is
14:12 p6eval ..not predeclared at /tmp/P83...
14:12 ruoso std: my $foo; $foo ~~ /$<named> := (bla)/;
14:12 p6eval std 26083: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex metacharacter at /tmp/JBonKhOvhK line 1:␤------> [32mmy $foo; $foo ~~ /$<named> :[31m= (bla)/;[0m␤    expecting any of:␤      quantifier␤       regex atom␤       rxinfix␤        ws␤FAILED 00:02 36m␤»
14:20 pugs_svn r26084 | pmurias++ | [re-smop] porting over LexicalScope - needs Hash and Scalar
14:21 meteorjay joined #perl6
14:23 abra joined #perl6
14:25 diakopter joined #perl6
14:26 masak hm, unable to run my Druid tests. getting 'compiler returned NULL ByteCode' from Rakudo.
14:26 moritz_ masak: with latest rakudo_
14:26 masak moritz_: aye.
14:26 moritz_ s/_/?/
14:26 masak also, it claims that Test.pir does not exist in my RAKUDO_DIR, when it clearly does.
14:26 moritz_ and did you reconfigure before building?
14:27 masak possibly not. doing a clean rebuild of everything.
14:27 masak hopefully, all my worries will go away.
14:27 * ruoso cook lunch &
14:30 PerL_MonK joined #perl6
14:31 dalek rakudo: 0bb68ee | (Geoffry Broadwell)++ |  (2 files):
14:31 dalek rakudo: Configure improvements
14:31 dalek rakudo: [Configure] Use Getopt::Long instead of manual options parsing
14:31 dalek rakudo: [Configure] Add --parrot-opt passthrough to parrot configure
14:31 dalek rakudo: [gen_parrot.pl] Pass @ARGV to Configure; exit on Configure fail; visual tweaks
14:31 dalek rakudo: [Configure] Visual tweaks
14:31 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
14:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​bb68ee0bcd5f026866108fae42152123d042bcc
14:32 moritz_ jnthn: can RT #64448 be closed? or do you want tests? (don't know if it can be tested from within Perl 6 yet)
14:32 masak yup, problems went away.
14:33 s1n moritz_: i think you can close that one
14:33 s1n i've been testing it all morning and i think we're hardpressed to write a test for that
14:33 s1n unless we move the test suite outside rakudo?
14:39 pmichaud good morning, #perl6
14:39 masak hi, pmichaud
14:39 agentzh joined #perl6
14:41 pmichaud jnthn: I think I might have a solution for the newclosure problem.  Actually, I have several solutions :-)
14:41 pmichaud one of which should be good enough.
14:43 diakopter rakudo: say "'morn!"
14:43 p6eval rakudo 881ed3: OUTPUT«'morn!␤»
14:44 japhb moritz_: thank you for committing my patch
14:46 diakopter yay,/wc
14:46 diakopter left #perl6
14:46 diakopter joined #perl6
14:49 diakopter joined #perl6
14:52 moritz_ japhb: you're welcome
14:53 pmichaud I think it should be parrot-options instead of parrot-opt
14:53 moritz_ I can change that, it's a no-brainer ;-)
14:53 pmichaud wait, there's more.
14:53 Tene joined #perl6
14:54 masak rakudo: .say for (1..8).reverse; say "!"; say (1..8).reverse.perl
14:54 japhb pmichaud: I waffled on that for a while ... basically it came down to how I would name a variable -- abbreviated only when the abbreviation is common and every programmer would know exactly what the abbreviation meant.
14:54 masak p6eval?
14:55 pmichaud it should also be abbreviated only if frequently used.  If used infrequently, it should probably be spelled out.
14:55 pmichaud I don't expect the option to be frequently used.
14:55 japhb pmichaud: note that --parrot-opt sends *one* option per mention.  --parrot-options implies it would send more than one.
14:56 p6eval joined #perl6
14:56 pmichaud I'm not even sure that we should have --parrot-option
14:56 moritz_ maybe parrot-conf?
14:56 japhb pmichaud: ... and that would be the argument that had me waffling.  *I'll* use it every time; I don't know how others will use it.
14:56 moritz_ rakudo: say "alive"
14:56 p6eval rakudo 881ed3: OUTPUT«alive␤»
14:57 moritz_ rakudo: .say for (1..8).reverse; say "!"; say (1..8).reverse.perl
14:57 pmichaud I suspect that people who need custom options for parrot shouldn't be using --parrot-config
14:57 japhb moritz_: That's used to say where the parrot-conf binary is
14:57 pmichaud sorry, --parrot-opt
14:57 pmichaud or --gen-parrot
14:57 japhb moritz_: (Existing code)
14:57 moritz_ japhb: ok
14:58 ZuLuuuuuu_ joined #perl6
14:58 japhb pmichaud: I have to send '--jitcapable=0' all the time.  But I like having the ability to just --gen-parrot, and know I will get exactly the parrot rev you have blessed.
14:58 cognominal joined #perl6
14:58 moritz_ masak: .say for (1..8).reverse doesn't produce any output
14:59 masak moritz_: indeed.
14:59 masak just submitted a rakudobug about it.
14:59 moritz_ "good"
14:59 pmichaud why is that a rakudo bug?
14:59 masak :/
14:59 masak pmichaud: because it's wrong.
14:59 moritz_ pmichaud: because 1..8.reverse should produce 8..1:by(-1)
14:59 masak and now I have to make a workaround for Druid. :/
14:59 pmichaud oh, okay.
14:59 moritz_ or a list 8, 7, 6, 5, 4, 3, 2, 1
15:00 pmichaud since most of Range is now in setting, it ought to be possible to make that work :-)
15:00 moritz_ rakudo: .say for (1..8).list.reverse
15:00 masak pmichaud: it used to work.
15:00 masak I've been relying on it since December.
15:00 pmichaud oh, then I suspect a bug in the setting code that was just added.
15:00 masak moritz_: don't we have tests for that?
15:00 p6eval joined #perl6
15:00 masak pmichaud: aye.
15:00 masak trying to find the commit.
15:01 pmichaud I didn't get a good chance to review it; I know there are other bugs in there.
15:01 masak commit 2752e0e62, it seems.
15:01 moritz_ yes
15:01 pmichaud japhb:  how about   --gen-parrot-options="--jitcapable --prefix=somewhere --optimize"    ?
15:02 moritz_ I should have reviewed more carefully, it seems
15:02 moritz_ and we need better test coverage
15:02 masak strange, the .reverse method looks as though it should handle this.
15:02 Psyche^ joined #perl6
15:02 pmichaud I suspect the error is in the from/to handling
15:02 masak it negates .by, just as it should.
15:02 masak anyway, now you know.
15:02 * masak goes back to working around
15:03 japhb pmichaud: I suppose so.  Would you accept '--parrot-options' instead of '--gen-parrot-options'?
15:03 pmichaud I'd like it to be clear that the options are going to gen-parrot
15:03 pmichaud as opposed to being options that we might pass when running parrot.
15:03 japhb Oh, I see your point
15:03 japhb OK, will rebase and make a new patch
15:04 japhb (to go on top of the existing one)
15:04 masak ah, .list.reverse works as a workaround for now.
15:06 pmichaud japhb: that would be excellent, thanks.
15:06 pmichaud Also, do we know that every perl installation has Getopt::Long?  I'm pretty sure it does, but I'm often surprised by such things.
15:06 moritz_ pmichaud: it's in core
15:06 pmichaud okay, great.
15:06 s1n what version of core was it added?
15:06 japhb pmichaud: I checked corelist.  It was in version 5.0
15:06 s1n there you go
15:06 japhb (To be clear, I checked *before* I created the patch.  ;-)
15:07 pmichaud japhb++
15:07 moritz_ pmichaud: would you accept Range.perl generate a Range.new(from => ..., to => ..., by => -1) for by != 1?
15:07 pmichaud moritz_: yes.
15:07 nihiliad joined #perl6
15:07 moritz_ or should it do that in all cases, for consistentcy?
15:07 pmichaud I'd also accept that it put the :by adverb on the end (even though we don't parse it yet)
15:08 moritz_ I can do that too
15:08 pmichaud I think I like the Range.new approach for the moment.
15:08 pmichaud I don't like the given/take in Range.perl, though.
15:08 pmichaud we should be able to just do   ('^' if $.to_exclusive)
15:08 pugs_svn r26085 | moritz++ | [t/spec] test for RT #64458, masak++
15:08 masak moritz_++
15:09 moritz_ pmichaud: ok, I'll improve that method now
15:09 pmichaud say [~] 1, ('^' if 0), '..', ('^' if 1), 10
15:09 pmichaud rakudo: say [~] 1, ('^' if 0), '..', ('^' if 1), 10
15:09 p6eval rakudo 881ed3: OUTPUT«10..^10␤»
15:09 pmichaud oops
15:09 pmichaud oh, that fix didn't make it in yet.
15:09 pmichaud leave given/take until I can fix the ('^' if 0).
15:10 pmichaud (which I will do now)
15:11 kidd joined #perl6
15:12 pmichaud +1133 passing spectests since Oslo release.  Good progress this month :-)
15:14 masak wow. that's a lot of tests.
15:15 pmichaud yes, and there's still ~3 weeks until the next release :-)
15:15 japhb (rakudo team)++
15:16 justatheory joined #perl6
15:19 moritz_ pmichaud: what's your fix then? returning Nil from a not-executed if?
15:19 pmichaud returning ()
15:19 moritz_ ah, that's the same
15:19 pmichaud (empty list)
15:20 pmichaud S04 technically says it returns ()
15:20 moritz_ ok
15:20 pmichaud so I'm doing that.  It may be that S04 should be updated to say that it returns nil.
15:20 pmichaud the place it matters is with something like:
15:20 pmichaud my $x = (3 if 0);
15:21 pmichaud should $x become a Capture, or should it be Nil/Failure?
15:21 pmichaud anyway, I'm just following the spec.  :-)
15:21 pmichaud (the written spec)
15:21 moritz_ that's fine by me
15:22 pmichaud spectesting the (1-line) fix now
15:22 moritz_ ok, I have some changes here that depend on it ;-)
15:23 pmichaud do we have any tests for   ($value if $cond)  yet?
15:23 moritz_ I don't know of any
15:23 moritz_ but the suite is large... :)
15:24 pmichaud rakudo:  my @a = ($_ * 2 for 1..5);  say @a.perl;
15:25 masak p6eval is sick today.
15:25 pmichaud I think it might be caught in an infinite loop from    (1..10).reverse
15:25 masak why would that loop infinitely?
15:25 masak it doesn't on my box...
15:25 moritz_ no, it showed that it wants to eval it
15:26 pmichaud because    before the latest commit,   Range.reverse used to do   .list.reverse
15:26 masak latest commit? is dalek sick too?
15:27 pmichaud sorry, "commit that moved Range methods from pir to setting"
15:27 masak ah.
15:27 pmichaud cspencer's patch changed Rakudo's interpretation of Range.reverse
15:27 pmichaud changed it to match the spec, but also broke it.
15:27 masak aye.
15:27 moritz_ and .list is still lin PIR, it seems
15:27 pmichaud because Ranges don't know how to do negative :by yet
15:28 japhb pmichaud: Now that I'm working on the new patch, I remembered why I did only one parrot option per --parrot-opt ... because if you allow multiple, then you need to use system($string) rather than system(@list) in order to get the options to flatten -- but system($string) won't be portable if $^X contains spaces ....  Do you mind if I do --gen-parrot-option (no 's') and do one option per?  That way I can still do system(@list).
15:29 pmichaud japhb: could split the string on spaces.
15:29 moritz_ pmichaud: not so easy, for --cc="ccache gcc"
15:29 japhb pmichaud: that assumes none of the options contain spaces either ... and then to fix that you get into parsing ...
15:29 pmichaud which gets back to my point of:  people with complex parrot build requirements shouldn't be using --gen-parrot.
15:31 pmichaud that said, I'll accept --gen-parrot-option (no 's') if that's what you prefer.
15:31 japhb pmichaud: --gen-parrot does two things:  One, it's convenient shorthand and saves typing and brain work.  Two, it tries to guarantee that parrot is in sync with Rakudo's expectations.  Neither of those mean I shouldn't be able to pass down an option or two
15:31 japhb OK, thank you.
15:33 pmichaud (ranges)    I'd love to implement :by, but it's really tricky.
15:33 moritz_ hrm
15:33 moritz_ ranges use ++ to get to the next value
15:34 moritz_ which they need for string delemiters
15:34 pmichaud correct
15:34 pmichaud and it gets trickier with:    'a'..'z':by(1.5)
15:34 moritz_ so we're limited to integer :by for now, I'd say
15:34 moritz_ pmichaud: I think non-integer :by simply doesn't make sense for non-numbers
15:35 pmichaud this was already discussed here on #perl6 as being valid
15:35 pmichaud personally I think that the spec for string ranges is a bit broken
15:35 pmichaud but now that I'm thinking about it, I might know an easier way to resolve it.
15:36 moritz_ more interesting... if :by is negative, should -- be used? or ++ on .to?
15:37 meteorjay joined #perl6
15:38 pmichaud I think that :by negative means that we decrement from
15:39 pmichaud (on iteration/shift)
15:39 pmichaud my $a = 10..1:by(-1);  $a.shift;   say $.perl;   #  "9..1:by(-1)"
15:40 pmichaud can we restart p6eval?
15:40 moritz_ it seems the -1 case should be only a few lines of PIR
15:40 moritz_ pmichaud: I'm realcleaning and building both parrot and rakudo right now
15:40 pmichaud okay.
15:40 moritz_ pmichaud: will restart p6eval once that's done
15:40 pmichaud but here's an example that shows the difficulty of string ranges
15:41 pmichaud oh, nm, I'll come up with it later.
15:42 pmichaud anyway, I think I'll re-do Range.
15:42 pmichaud so that $.from and $.to are always numeric
15:42 moritz_ should I re-do .reverse for now to return a list, to help masak?
15:43 pmichaud yes, that would seem to work.  I don't know how long it'll take to clean up Range.
15:43 masak I'm fine, I have a workaround. :)
15:43 pmichaud so, whatever you two decide :)
15:44 masak my Druid tests just caught a mistake I made in a refactoring. life is good.
15:44 moritz_ tests++
15:45 masak they rock.
15:45 xinming joined #perl6
15:46 p6eval joined #perl6
15:46 moritz_ rakudo: say "back"
15:46 p6eval rakudo 0bb68e: OUTPUT«back␤»
15:48 pugs_svn r26086 | moritz++ | [evalbot] warn if unlink of temp file failed
15:48 smtms joined #perl6
15:49 pugs_svn r26087 | pmichaud++ | [t/spec]:  Unfudge + clean up tests of ($value if answer) statement modifier
15:50 moritz_ so we did have such tests. Impressing :)
15:50 pmichaud well, two.
15:50 grawity joined #perl6
15:50 moritz_ that's less impressing ;-)
15:52 pugs_svn r26088 | pmichaud++ | [t/spec]:  Add tests for ($value unless $answer) statement modifier.
15:53 pmichaud arggggh.... fixing   ($value if $answer)  causes Range.perl to _break_
15:53 moritz_ pmichaud: never mind, I have a modified Range.perl here that relies on your fix :)
15:53 pmichaud I think that might break also.
15:53 pmichaud I went through this exercise on Thursday
15:53 pmichaud I thought the problem might be something else... but apparently it's not.
15:54 moritz_ should I nopaste my changes for you to try?
15:54 pmichaud yes, that would save me recreating them :-)
15:55 moritz_ I'll email them if that's ok, that's easier for me right now
15:55 pmichaud that's fine, yes.
15:55 pmichaud ohhhhhhhhhh CRAP
15:56 moritz_ pmichaud: sent
15:56 pmichaud it's okay, I know where the problem lies.
15:56 davidad joined #perl6
15:57 pugs_svn r26089 | moritz++ | [t/spec] test ($expresion if $condition) in scalar context
16:02 * masak discovers that proto does not build Druid properly
16:02 masak I see what the problem is, but I'm too tired to think up a solution.
16:04 pmichaud okay, one more round of spectests, then I can push this commit.
16:04 |jedai| joined #perl6
16:04 grawity left #perl6
16:06 ZuLuuuuuu_ left #perl6
16:11 japhb hacking is *so* much slower when the kids are awake and not watching TV ...
16:11 japhb pmichaud: new patch sent to rakudobug
16:11 pmichaud japhb: looking
16:12 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=64460
16:12 pmichaud I'll let moritz++ apply if he's ready for that :-)
16:12 pmichaud I'm in the middle of spectesting.
16:12 moritz_ ok
16:13 japhb I hate how RT smashes indents ...
16:13 moritz_ + my @opts = @{ $options{'gen-parrot-option'} || {} };
16:13 moritz_ shouldn't that be || [] ?
16:13 japhb moritz_: OH HELL
16:13 japhb yes
16:13 japhb sorry
16:13 pmichaud moritz++ # I would probably not have noticed that.
16:13 japhb I tested with 1 option, and multiple options, but of course not 0.  Because I'm an idiot today.
16:13 japhb sigh, thanks moritz_++
16:14 moritz_ japhb: if you send your patches with git-format-patch HEAD^ I don't have to add the authorship information manually (for the next time ;)
16:15 japhb That's what I did ...
16:15 Khisanth joined #perl6
16:15 * japhb wonders why it didn't work right
16:15 moritz_ when I do it, I get a From: $author
16:15 moritz_ in the second line
16:15 moritz_ and date etc.
16:16 pmichaud maybe older version of git?
16:16 japhb Mine is fairly new: git version 1.6.2.1
16:16 japhb Perhaps because I sent with git send-email, and it didn't DTRT?
16:17 moritz_ ah, that's it
16:17 moritz_ git-format-patch adds email headers
16:17 moritz_ and rt swallows them
16:17 japhb rt--
16:18 japhb I guess then use git-format-patch, but then attach to manually-created email instead of git send-email ...
16:19 moritz_ that'll be easier for us
16:20 pmichaud I'm open to creating a (Perl 5) script that automates patch submission, if anyone's interested.
16:21 moritz_ good idea
16:21 japhb moritz_: fair enough.  I'm still just trying to figure out how to best contribute, so when I have something bigger than just Configure patches, it will be smoother.
16:21 pmichaud japhb: we're all still trying to figure that out, I think.
16:21 japhb pmichaud: fair enough.  :-)
16:22 pmichaud so your contributions here are particularly valuable :-)
16:23 moritz_ ok, patch applied locally; I'll push it when pmichaud's changes went in, because I have other local changes as well that depend on it
16:23 japhb heh
16:24 moritz_ I could move them to a branch and rebase, but that seems too much hassle
16:24 japhb OK, sent
16:25 japhb moritz_: er ... my patch?  Or a different one?
16:25 moritz_ japhb: yours
16:25 japhb I just amend'ed and resent the corrected patch, so of course I think I messed with you.
16:26 masak it's almost possible to pick the Perl 6 track for all of NPW.
16:26 japhb nice
16:26 masak people interested in Rakudo will have something to look forward to.
16:27 davidad joined #perl6
16:28 pmichaud I hope there are some.  :-)
16:29 pmichaud so far the list of "people attending talk" was pretty small when I looked on Thu.
16:29 pmichaud that said, I don't mind performing to an empty house :-)
16:29 pmichaud (I much prefer a full house, but I'll perform to a nearly empty one)
16:29 moritz_ ok, here's my idea for the create-patch script:
16:30 moritz_ 1) if we're on branch master, just do a git-format-patch HEAD^
16:30 moritz_ 2) if we're on a different branch, squash all changes from the current branch into master, and git-format-patch that commit
16:31 moritz_ (and for the second option require a commit message, because the "squashed commit of..." isn't all that informative)
16:31 moritz_ does that sound sane?
16:31 pmichaud sounds good to me.
16:32 japhb moritz_: kinda feels a little limiting, but let's see how it works out ... not like we can't change it later.  :-)
16:32 moritz_ japhb: if you don't want the limits, you use git directly
16:32 moritz_ japhb: but not everybody is all that comfortable with that
16:32 japhb moritz_: I guess I had something simpler in mind:
16:33 japhb 1) git-format-patch -1
16:33 japhb 2) create email, attach patch, send to rakudobug
16:33 japhb Squash management, was, in my mind, outside the scope
16:34 pmichaud I think squashing could be helpfu.
16:34 pmichaud *helpful
16:34 pmichaud but I'll let the person writing the script decide :-)
16:34 moritz_ we can have both ;-)
16:34 japhb pmichaud: no argument at all ... but maybe just have a "--no-squash" option?  It's possible I might be on a branch, but not want to merge back to master before sending the patch
16:35 moritz_ yes, squashing should be optional
16:36 pmichaud or have a --squash option
16:36 moritz_ how should it send the mail? with Mime::Lite?
16:36 japhb moritz_: that's a decent one, but are there any that were in core?
16:37 moritz_ japhb: don't think so
16:37 pmichaud if there's not a good one in core, I'm willing to take one from CPAN
16:37 japhb pmichaud: agreed
16:37 moritz_ corelist /mail/ doens't find any
16:38 * japhb forgot about that regex option
16:41 masak rakudo: regex foo_bar { foobar }; say "foobar" ~~ /<foo_bar>/
16:41 p6eval rakudo 0bb68e: OUTPUT«foobar␤»
16:41 masak rakudo: regex foo-bar { foobar }; say "foobar" ~~ /<foo-bar>
16:41 p6eval rakudo 0bb68e: OUTPUT«Statement not terminated properly at line 1, near "~~ /<foo-b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:41 * moritz_ wants a MAIN sub for Perl 5, and sub names with hyphens
16:41 masak pmichaud: can I report this to rakudobug?
16:41 pmichaud masak:  no, because it's not a bug :-)
16:42 masak I thought it best to ask for exactly this reason. :)
16:42 pmichaud or you can report it, but I'll respond with a message to p6l saying "wtf?"
16:42 masak :)
16:42 moritz_ it's ambiguous in the sepc, I think
16:42 pmichaud agreed.
16:42 moritz_ maybe we need a wtf mail
16:42 masak ok, let's do it that way.
16:42 * masak submits rakudobug
16:42 moritz_ for example char classes could require whitespaces
16:43 moritz_ around the -
16:43 pmichaud oh
16:43 moritz_ std: /<foo-bar>/
16:43 pmichaud S05 beats us to it.
16:43 p6eval std 26089: OUTPUT«ok 00:03 35m␤»
16:43 pmichaud However, in order to combine classes you must prefix a named
16:43 pmichaud character class with C<+> or C<->.  Whitespace is required before
16:43 pmichaud any C<-> that would be misparsed as an identifier extender.
16:43 moritz_ wow
16:43 moritz_ TimToady++
16:43 japhb rakudo: regex foo-bar { foobar }; say "foobar" ~~ /<foo-bar>/
16:43 pmichaud okay, it's a rakudobug, and I don't have to ask p6l whazzup
16:43 p6eval rakudo 0bb68e: OUTPUT«Statement not terminated properly at line 1, near "~~ /<foo-b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:44 japhb Interesting ... gives the same error with or without trailing /
16:44 pmichaud I just have to fix PGE to recognize perl6's new identifier
16:44 pmichaud it's because PGE wants  <+foo-bar>
16:44 pmichaud without that, it can't recognize <foo-bar> as being anything usable
16:45 pmichaud so the pattern fails, so the smart match fails, so...
16:47 pmichaud okay,   ($value if $answer)   pushed.
16:47 pmichaud (_finally_)
16:47 masak rakudo: regex foo'bar { foobar }; say "foobar" ~~ /<foo'bar>/
16:47 moritz_ that serial testing is slow :(
16:47 p6eval rakudo 0bb68e: OUTPUT«Statement not terminated properly at line 1, near "~~ /<foo'b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:47 masak make sure you get that case too. :)
16:47 moritz_ however redoing it in parallel requires another perl module to be present
16:48 moritz_ (parrot shipped with a Test::Harness 3.something iirc)
16:48 dalek rakudo: a06d768 | pmichaud++ | src/ (2 files):
16:48 dalek rakudo: Add ($value if $cond) semantics for if/unless modifiers.
16:48 dalek rakudo: Fix punning of 'list' method and 'list' operator in Range.
16:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​06d768bb97c7368e355b72889e25a0b458f0284
16:48 * masak pulls and heads home to bake bread
16:52 grawity joined #perl6
16:53 grawity left #perl6
16:54 dKingston joined #perl6
16:55 sephee joined #perl6
16:56 sephee joined #perl6
17:01 moritz_ cool, prototype of patch sending script works ;-)
17:06 * ruoso .oO( ohloh is a really cool thing to mention in a CV... it now measures 4 years experience of Perl, by the Open Source contributions I've made... )
17:06 eiro hello wolrd
17:07 moritz_ sadly ohloh tracs the openfoundry pugs repository
17:07 moritz_ which doesn't show the commits of the last ~2 years
17:07 ruoso ah,,,
17:07 ruoso is it?
17:08 ruoso moritz_, nops... it uses svn.pugscode.org
17:08 ruoso it's just ohloh that is behind in the project updats
17:11 pmichaud afk, lunch
17:13 ruoso the cool thing is looking at pugs repo and seeing it say that pugs is with 19.5M dollars ;)
17:13 ruoso s/with/worth/
17:21 ruoso pmurias, do you think we still need the GlobalInterpreter?
17:21 ruoso I was thinking we could get rid of it...
17:22 ruoso by passing the interpreter to the initializers that require one
17:22 ruoso what do you think?
17:25 pmurias ruoso: i think we can get rid of it
17:25 ruoso cool
17:25 ruoso I think we're pretty close to finish the refactoring aren't we?
17:26 ruoso (I should say you, since you're doing it almost alone ;)
17:26 ruoso work--
17:26 pmurias scalar,hash,code and IO and re-mildew will be able to run code on re-smop
17:27 ruoso :)
17:32 payload joined #perl6
17:32 pmurias bbl&
17:33 ruoso @tell pmurias one other thing I'd like to have in this refactoring is cleaning up the CORE namespace, putting it all inside a SMOP package, so we can hide it later...
17:33 lambdabot Consider it noted.
17:37 dalek rakudo: db0dd4f | (Geoffry Broadwell)++ | Configure.pl:
17:37 dalek rakudo: [Configure] change option name to --gen-parrot-option.
17:37 dalek rakudo: Also minor related cleanups
17:37 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
17:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​b0dd4f2c5dbb99f99df8cb9c29a9ff81b3092e0
17:37 dalek rakudo: 2fb96f8 | (Moritz Lenz)++ | src/setting/Range.pm:
17:37 dalek rakudo: Range.reverse returns a list for now, because :by(-1) is NYI
17:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​fb96f86927a7e26bd572e17cfcb87a41e71df0b
17:37 dalek rakudo: 105ec22 | (Moritz Lenz)++ | src/setting/Range.pm:
17:37 moritz_ ruoso: ok, then it's updated... last time I checked (perhaps 2 months ago) they used the old one, and I sent them a mail
17:37 dalek rakudo: better Range.perl
17:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​05ec22a9e9cdae0c294506265618c7b4d301486
17:40 TimToady joined #perl6
17:42 * japhb wonders why my name keeps getting mangled
17:42 japhb (in the commit messages
17:50 japhb Hmmm 'git config user.name' is correct ...
17:51 japhb moritz, is my name missing the 'e' between the r and y in the patch headers?
17:51 |jedai| joined #perl6
17:54 Psyche^ joined #perl6
17:59 amoc joined #perl6
18:15 NordQ joined #perl6
18:18 s1n pmichaud: still going to give a talk to dallas.p6m?
18:24 pmichaud s1n: sure, I can do that sometime.  Haven't scheduled it yet.
18:27 * pmichaud sits outside on the back porch and enjoys the incredibly beautiful weather we're having here.
18:27 jferrero joined #perl6
18:28 TimToady yes, am admiring the weather in Houston on the telly.  I suspected there was a golf tournament in Houston cuz I saw a blimp when we stopped there yesterday, and confirmed when I got home :)
18:29 TimToady well, it's nearer Humble, really
18:29 s1n yes, today's weather greatly improved
18:29 pmichaud wb, TimToady.  Trip went well?
18:30 TimToady yes, all five talks went pretty well
18:30 pmichaud I greatly enjoyed your MIT talk :-)
18:30 TimToady though the one at Bloomberg was very nip-and-tuck
18:30 TimToady actually started a minute or two late because we had to run a video cable to another room
18:31 TimToady their "video wall" didn't like my laptops output, or vice versa
18:31 TimToady s/ps/p's/
18:32 TimToady anything hanging fire that I haven't noticed in my brief dips in the cyberstream?
18:32 TimToady besides junctions, of course... :)
18:33 pmichaud I've got a lot of posts to make with questions... but nothing urgent.
18:33 pmichaud Your answer about threading over  1 < $x < 3  caught me by surprise.
18:33 TimToady that's how I've been thinking of it, don't know how hard it is to implement that way though
18:34 gravity Is the MIT talk online somewhere?
18:34 pmichaud I think it may end up being slightly easier.
18:34 TimToady and maybe not general enough, given some of the other speculations
18:34 TimToady but maybe for 6.0 we'll just do something conservative
18:34 pmichaud anyway, I'm letting it percolate in the background.  Currently we have to do some special stuff in PCT in order to get chained expressions to work at all -- fixing the threading to be like what you imagine might also eliminate some of those.
18:37 s1n TimToady: is the Spec (documentation) supposed to display sanely with perl5's perldoc tool?
18:41 TimToady the specs are some unhappy hybrid of p5 and p6 pod, I suspect
18:41 TimToady groceries &
18:45 pugs_svn r26090 | s1n++ | [spec] minor touch-ups to better format the pod for perl5's perldoc tool.
18:45 s1n moritz_: are you aware of any tests for reading $*IN?
18:49 dduncan joined #perl6
18:49 pmichaud TimToady: Oh, I could use some guidance on my "Deciphering infix:<cmp>" message to p6l (sent 2009-03-26)
18:50 pmichaud I suspect I can clean up quite a few things in Rakudo with an answer to that one.
19:04 dKingston joined #perl6
19:11 rindolf joined #perl6
19:11 rindolf Hi all.
19:12 pmichaud Range.pir:56 :    +                    'from_exlcusive => ' ~ $.to_exclusive.perl,
19:12 pmichaud looks like a couple of typos there.
19:13 * pmichaud fixes.
19:15 s1n pmichaud: when are we getting together again?
19:16 pmichaud oh, my schedule is opening up again for a week or so.  Feb and Mar were really hectic because of so many non-perl related events for me.
19:16 pmichaud (mainly having to do with family stuff)
19:16 pmichaud But I depart for Oslo a week from Tuesday.
19:17 s1n i'm in between work in school right now
19:17 s1n just about to start up new assignments, this week is good for me
19:18 pmichaud My wife is away this weekend so I don't know what our plans are for the week.  We could tentatively pick and evening and get together (also with frioux if desired).
19:19 s1n i have time this weekend if you really want
19:19 s1n i haven't been able to get ahold of frioux for most of this week
19:19 PhatEddy joined #perl6
19:21 pmichaud I have to stick around the house to watch kids until at least tomorrow afternoon.
19:29 justatheory joined #perl6
19:29 PhatEddy rakudo: my Bool $a; say 3 cmp $a
19:29 p6eval rakudo db0dd4: OUTPUT«Use of protoobject as value␤1␤»
19:29 PhatEddy rakudo: my Bool $a; say $a cmp 3
19:29 p6eval rakudo db0dd4: OUTPUT«-1␤»
19:30 pmichaud why would one compare a Bool there?
19:30 PhatEddy rakudo: my Bool $a; say 3 cmp +$a
19:30 p6eval rakudo db0dd4: OUTPUT«Use of protoobject as value␤1␤»
19:30 PhatEddy It isn't a great use but I am not sure why not??
19:31 pmichaud fair enough.  :-)
19:33 PhatEddy Note that the example above may or may not be connected to parrot tt - 285 -
19:33 PhatEddy rakudo: say undef cmp 3
19:33 p6eval rakudo db0dd4: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 15341 (src/builtins/cmp.pir:146)␤»
19:33 PhatEddy rakudo: say 3 cmp undef
19:33 p6eval rakudo db0dd4: OUTPUT«Use of uninitialized value␤1␤»
19:36 pmichaud I can't speak for parrot's desired semantics, but it's likely to be irrelevant soon in Rakudo's case.
19:36 pmichaud (because Rakudo's infix:<cmp> won't be using Parrot's 'cmp' opcode.
19:37 pmichaud (at least, not generically as it does now)
19:39 PhatEddy If I don't see another matching rt ticket then I might put up a p6 one for non-cumutative cmp error behavior.
19:39 pmichaud I think there's already a ticket for that?
19:41 |jedai| joined #perl6
19:43 PhatEddy I don't see anything under cmp or commutative for p6 but will take another look ...
19:45 pmichaud guess not.
19:45 pmichaud (I don't see it either.)
19:50 PhatEddy found it I think - rt <a href="http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=61836">61836</a> - it's just been too long since I worked on it ...
20:02 pmichaud ah, yes, that's likely to be an interesting case as well.
20:03 pmichaud I've got a message open to p6l asking about the semantics of infix:<cmp> (and thus min) -- we may need to see how that comes out first.
20:03 TimToady seems like cmp should be commutative, whatever it does
20:03 TimToady been thinking about cmp
20:03 TimToady I think for different types we want it to default to something dwimmy as long as consistency can be maintained
20:04 pmichaud there's also the case of    3 cmp undef   (as PhatEddy++ notes above)
20:04 TimToady trick is not getting into a situation where three types do A < B < C < A
20:05 TimToady if the default is something like coerce to Str and then cmp, then we get a warning on undefs
20:05 TimToady though we might get a *lot* of warnings...
20:05 pmichaud I don't know that I have an issue with that :-)
20:05 pmichaud but something like    3 min undef    may also be related
20:05 pmichaud my Int $a;   say 3 min $a;   # ???
20:07 TimToady 0 and a warning, if we stick with p5 semantics...
20:08 TimToady but something to be said for sticky undefs on that sort of thing
20:08 pmichaud and also we have that   [min]()  == +Inf
20:08 TimToady yes
20:08 TimToady so that's grep out undefs semantics
20:09 TimToady which doesn't help with cmp
20:09 TimToady since you don't know which way to bias it
20:10 pmichaud and since min is (currently) defined with cmp as a default... things get weird.
20:10 lambdabot joined #perl6
20:10 pmichaud at least, I think it is.
20:10 pmichaud oh, that's .min
20:10 pmichaud instead of infix:<min>
20:11 payload joined #perl6
20:15 pmurias joined #perl6
20:19 pmurias ruoso:re SMOP namespace, i don't think it's nessesary we can overwrite the entries in the CORE:: namespace once we have better variants
20:25 sri_kraih_ joined #perl6
20:26 ZuLuuuuuu joined #perl6
20:31 pugs_svn r26091 | moritz++ | [t/spec] more tests for Range.reverse
20:34 pugs_svn r26092 | moritz++ | [t/spec] unfudge a passing TODO test for rakudo
20:35 pmichaud back in 20 # waiting spectest run to finish
20:35 moritz_ japhb: no, I mis-spelled your name when I applied to first version of the patch, sorry
20:37 ruoso pmurias, my point is that some names doesn't belong to the CORE namespace at all
20:46 pmurias ruoso: you mean like AdhocSignature?
20:47 ruoso yeah... and some other things
20:57 M_o_C joined #perl6
20:59 ejs joined #perl6
21:06 dalek rakudo: 5942053 | pmichaud++ | src/parser/actions.pm:
21:06 dalek rakudo: Change 'newclosure' to 'clone' in create_parametic_role,
21:06 dalek rakudo: as a first step in converting it from a macro to a normal sub.
21:06 dalek rakudo: All tests still pass.
21:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​94205319e9f22ddd1022058665d7a432525de07
21:06 dalek rakudo: e0cf1ed | pmichaud++ | src/ (2 files):
21:06 dalek rakudo: Move 'create_parameterized_role' from a macro to a subroutine in guts.pir.
21:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​0cf1ed24238657b5494600b2d493439b60e29e1
21:06 dalek rakudo: 0310a36 | pmichaud++ | src/setting/Range.pm:
21:06 dalek rakudo: Fix typos in Range.perl() .
21:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​310a3658f0d7437cb350db6aa706096ed5cacb9
21:15 s1n pmichaud: ping
21:17 ejs1 joined #perl6
21:19 ZuLuuuuuu left #perl6
21:22 dKingston joined #perl6
21:25 orafu joined #perl6
21:26 * jnthn looks through the huge backscroll to see who mentioned him
21:28 jnthn pmichaud: I assume your patch moving the parametric role creation works. though I am curious to know why... :-|
21:29 jnthn OTOH, after 3 liters of beer maybe tell me tomorrow. ;-)
21:29 pmichaud it works.
21:29 jnthn OK, if it passes all the spectests it's *prorably* ok.
21:29 jnthn The point is that the roles end up with their methods having the correct outers.
21:29 pmichaud if using newclosure on a Sub that has already had capture_lex performed on it (as all PCT blocks do), then only a clone is needed.
21:29 jnthn Oh!
21:30 jnthn OK, yes, you're right.
21:30 jnthn pmichaud++
21:30 FurnaceBoy joined #perl6
21:30 jnthn Thanks for spotting that.
21:30 jnthn You eliminated pr_macros.pir as a result?
21:30 jnthn (If not, it's an easy patch to do so. OTOH, maybe you needn't.)
21:30 pmichaud oh, I didn't take it out of the repo yet.. meant to do it but was sidetracked waiting for spectest run to finish.
21:30 pmichaud I'll do that now.
21:31 moritz_ s1n: (re tests for $*IN) no :/
21:31 jnthn pmichaud: Or now you've shown the way, feel free to leave it to me.
21:31 pmichaud oh, I was also thinking of making a dependency for Makefile -- this might be a good time to do that also.
21:32 jnthn OK. If it's easy enough for you to do it, then feel free to JFDI. :-)
21:32 pmichaud I just need a way to force a failure when attempting to build the Makefile
21:32 * moritz_ pushed a branch named mail-patch to github
21:32 jnthn rakudo: sub foo($x) returns Int { return $x ?? 42 !! "fails it" }; foo(1); foo(0);
21:32 p6eval rakudo 0310a3: OUTPUT«Type check failed on return value␤current instr.: 'die' pc 15853 (src/builtins/control.pir:204)␤»
21:33 moritz_ my new script for sending git pathes by mail is in there
21:33 moritz_ it's still fairly simplistic, and for now sends patches to me, to not spam the RT queue with test mails :-)
21:33 jnthn rakudo: sub foo($x) returns Int { return $x ?? 42 !! "fails it" }; say foo(1); say foo(0);
21:33 pmichaud DCONWAY is giving a Perl 6 tutorial at OSCON.
21:33 p6eval rakudo 0310a3: OUTPUT«42␤Type check failed on return value␤current instr.: 'die' pc 15853 (src/builtins/control.pir:204)␤»
21:33 * pmichaud makes plans to go.
21:33 * jnthn can't afford the flights
21:34 jnthn ...and was slightly overwheled by the size of OSCON.
21:34 pmichaud flights looked reasonably cheap this year
21:34 jnthn pmichaud: Note the above works. However...
21:34 pmichaud jnthn: will you be at YAPC::EU ?
21:34 jnthn rakudo: sub foo($x) returns Int { $x ?? 42 !! "fails it" }; say foo(1); say foo(0);
21:34 p6eval rakudo 0310a3: OUTPUT«42␤fails it␤»
21:34 jnthn pmichaud: of course! ;-)
21:34 * moritz_ wonders how dconway can keep up with all the Perl 6 changes but not find any time to work on pod6
21:34 pmichaud okay, I'm still trying to make arrangements to be there.
21:35 jnthn pmichaud: Any suggestions for making the implicit return be assigned to exception and doing a goto?
21:35 jnthn pmichaud: I couldn't see a neat way. :-|
21:35 pmichaud moritz_: easy -- he's keeping up with the Perl 6 changes, leaving no time to work on pod6
21:35 jnthn YAPC::EU - yes, would be good.
21:35 moritz_ pmichaud: ;)
21:36 pmichaud jnthn: I've been thinking that iwbni the implicit return fell through to the other code somehow.  No, I don't have a quick answer for it.
21:36 pmichaud but I haven't thought about it much yet.  There's undobutedly a clean answer.
21:36 jnthn OK.
21:36 jnthn At least that makes me think I didn't miss something really obvious.
21:36 jnthn It's not quite fall-through.
21:37 pmichaud we have to do something dealing with implicit return anyway.
21:37 jnthn Because the return val is expected to be in exception.
21:37 jnthn Aye.
21:37 pmichaud because the semantics are slightly different from p5 (and from what PCT currently implements)
21:37 jnthn Well, not just for what I did now, but also for C<as>.
21:38 pmichaud we can always have the exception "fall through" to whatever the normal return code needs to be.
21:38 pmichaud and refactor the common stuff there.
21:39 jnthn True.
21:39 pmichaud it's very likely all part of the LEAVE "block"
21:39 jnthn Perhaps.
21:39 s1n rakudo: my @t = <hello world>; say "fail: @t[0]"
21:39 p6eval rakudo 0310a3: OUTPUT«fail: @t[0]␤»
21:39 pmichaud (which might not be a true block)
21:39 s1n no interpolation yet?
21:39 jnthn no
21:39 moritz_ not of hash/array items
21:39 pmichaud we have interpolation, just not of things ending in postcircumfix.
21:40 jnthn pmichaud: I'm open to whatever solution you think is best there.
21:40 s1n oooh
21:40 pmichaud rakudo: my @t = <hello world>;  say "fail {@t[0]}";
21:40 p6eval rakudo 0310a3: OUTPUT«fail hello␤»
21:40 jnthn pmichaud: However, scheduling wise, I am trying to get my current grant polished off in the next week.
21:41 pmichaud I don't have any immediate suggestions.  If it can't wait for NPW, you may just need to hack something in for now then.
21:41 pmichaud I _really_ need to get farther along on my grant.
21:41 jnthn pmichaud: Sure, I know.
21:41 jnthn pmichaud: My scheme was more, apply for a small grant, complete it and immediately submit for the next one along with filing a final report.
21:42 pmichaud well, that was mine too... but I'm having to monitor other changes and do tasks that weren't explicitly listed in my grant :0(
21:42 jnthn Ideally, I'll submit my next grant application before NPW.
21:42 pmichaud so my grant keeps getting starved a bit.
21:42 jnthn Yes, I don't at all envy you that task. It's pretty much a grant in itself. :-(
21:43 pmichaud well, I kinda folded those things into my existing grant, but they aren't cashable milestones.
21:43 pmichaud i.e., it's hard for me to say "yes, I did those things, pay me."
21:43 jnthn I guess me throwing so much stuff into Rakudo has both helped and not helped in that sense.
21:44 jnthn Well, we have the Perl 6 prelude now at least...
21:44 pmichaud anyway, my guess would be that we really ought to get some clarification from TimToady on his expectations for leave  (exception?  not an exception?)  and that will guide us as to handle the other stuff.
21:44 jnthn Aye.
21:44 pmichaud I'd like to have my first milestone report in prior to NPW, myself.
21:45 PhatEddy left #perl6
21:45 jnthn I plan to get typed arrays and hashes in place somewhat next week.
21:45 s1n rakudo: class Foo { has %.bar = ('some', 1) }
21:45 p6eval rakudo 0310a3:  ( no output )
21:46 s1n damnit, i'm getting nonexistant sub some
21:46 jnthn I am *very* close then to things like multi a(Int &x) { }; multi a(Str &x) { }; working. I believe.
21:46 jnthn And stick whatever sigil in there you want.
21:46 jnthn & or % and @
21:47 pmichaud that will be very helpful.
21:47 jnthn It falls out pretty neatly of the parametric roles stuff I already did.
21:47 jnthn s/of/from/
21:47 pmichaud for all of the review/extra stuff your work may have given me (some, but not overly so), I'm _really_ glad to have your work in Rakudo now.  We absolutely need it, and this has been the right time for it.
21:48 jnthn You have the both good and bad role of pumpking. :-)
21:49 pmichaud indeed, it goes with the job.  As long as people aren't too frustrated  by how I'm handling things then I'm okay with it.  :-)
21:49 jnthn Oh, I'm most certainly glad to have someone with a bunch more experience than I have looking at what I'm doing. :-)
21:49 pmichaud (and yes, I know there's some frustration... but I don't always know how to avoid it)
21:49 pmichaud okay, back patio is getting too warm... time to go back inside the house... bbiab
21:50 jnthn Heh. Today was the first day this year here in Blava where it's been warm enough to sit outside in a t-shirt to enjoy a few beers. :-)
21:51 jnthn A balcony is the one thing my otherwise awesome appartment is missing that would make it completely perfect.
21:53 s1n rakudo: class Foo { has %.bar = ("some", 1) }; my Foo $f; $f.bar<some>.say
21:53 p6eval rakudo 0310a3: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Failure'␤current instr.: 'postcircumfix:{ }' pc 5354 (src/classes/Associative.pir:107)␤»
21:54 s1n what's wrong with that code?
21:54 jnthn hmm
21:55 s1n if i do a 'my $f = Foo.new', it works
21:55 jnthn rakudo: class Foo { has %.bar = ("some", 1) }; my Foo $f; Foo.new;
21:55 p6eval rakudo 0310a3:  ( no output )
21:55 jnthn s1n: Oh.
21:55 jnthn Yeah
21:55 jnthn Of course.
21:55 s1n .new isn't automatically called?
21:55 jnthn No. The proto-object is a "empty instance".
21:55 jnthn Doens't let you access attributes.
21:55 s1n why isn't an undef error then?
21:56 s1n should it not be a parsefail?
21:56 jnthn no
21:56 jnthn not a parse fail, it'd be runtime I expect
21:56 jnthn It's fine to call a method that doesn't access sate
21:56 s1n man, that took me several hours to reproduce
21:56 jnthn (OK, maybe we can statically detect that one does...)
21:57 s1n should i file a bug on that?
21:57 pmichaud rakudo: class Foo { has %.bar = ('some', 1) };  my Foo $f .= new;  $f.bar<some>.say;
21:57 jnthn Only to the degree that we want a better error on accessing attributes in a proto.
21:57 p6eval rakudo 0310a3: OUTPUT«1␤»
21:57 pmichaud looks like it's correct to me.
21:58 jnthn pmichaud: Rakudo is correct, though I think it'd be nice if trying to access an attribute on a proto-object gave you something more helpful.
21:58 pmichaud that sounds tricky-ish.
21:58 s1n well, i was looking at a parsefail for a few hours that should have been an undef runtime error (imho), and it took me forever to create that test case as to it's cause
21:59 jnthn s1n: The error tells you it's an undef... :-)
21:59 jnthn (Failure)
21:59 pmichaud "invocant of class 'Failure'"  means it's an undef.  There is no Undef type.
21:59 jnthn pmichaud: Well, my thought was do it in the getattribute vtable method for proto-object.
22:00 jnthn pmichaud: However, that got in the way of something else, IIRC. I never had time to track down what/why.
22:00 s1n i'm suggesting the error (ugly parrot errors) just be cleaned up if possible
22:00 pmichaud I suspect that proto-objects might still have attributes :-)
22:00 pmichaud s1n:  I'm happy to clean them up if we can (1) clearly detect the error and (2) have better text to give.  It's not always possible to do those at the moment.
22:00 jnthn s1n: Actually, the "Parrot error" is pretty accurate...
22:01 pmichaud but filing tickets about confusing error messages is perfectly okay.
22:01 pmichaud (we might say "there's not much we can do about it yet", but at least we'll have a record of them.)
22:01 pmichaud (and can create FAQ items that explain them better)
22:01 s1n alright, it was highly unintuitive to me what the cause was
22:01 jnthn s1n: Though I agree it can be improved since doing stuff like that on a proto-object is potentially a common mistake.
22:01 s1n the fact that you can't fix it yet is okay, but it really didn't help me any
22:01 pmichaud I suspect part of the problem was not recognizing that    my Foo $f;  doesn't create an instance of Foo.
22:02 jnthn *nod*
22:02 s1n is it supposed to create an instance of Foo?
22:02 pmichaud no.
22:02 jnthn No
22:02 pmichaud but if you expect it to do so, then you get confusing errors.
22:02 s1n i kinda expected it too
22:02 jnthn And to be honest, it hadn't ever occured to me that it would. But that may be my background in other languages with types.
22:02 s1n (too much c++)
22:02 pmichaud my Foo $f  simply says that $f is constrained to only hold objects of type Foo.
22:02 jnthn Well, also it sets the initial undef value of $f.
22:02 pmichaud jnthn: yes, in C/C++  saying   Foo f;   creates an instance of Foo
22:03 jnthn pmichaud: Really?!
22:03 s1n my $f is Foo; seems cleaner and more logical to me
22:03 pmichaud I think it's really   my $f of Foo;
22:03 s1n jnthn: yes, the compiler will provide a default constructor :)
22:03 pmichaud my $f is Foo would be something different.
22:03 jnthn Wow.
22:03 jnthn OK, I didn't ever do C++ (yet).
22:03 pmichaud jnthn: it's little different from saying      struct Foo f;
22:04 pmichaud (which creates the struct)
22:04 jnthn C# and Java both make it creating an instance of the object surprising to me.
22:04 s1n pmichaud: in c++, they're the same semantics :)
22:04 jnthn Ah, yes, true.
22:04 jnthn OK, then I see it somewhat.
22:04 pmichaud s1n:  Yes, I know -- I've been writing C++ since it was known as "cfront"  :-)
22:04 s1n pmichaud: i still manage cfront code :)
22:05 pmichaud now _that's_ a bit scary :-)
22:05 s1n yes, yes it is
22:05 jnthn .oO( Was I born then? )
22:05 pmichaud jnthn:  I was using cfront in 1986.
22:05 s1n i cower in fear when i have to interact with Rogue Wave
22:05 jnthn pmichaud: OK, so I was like, a year old.
22:05 jnthn pmichaud: I wasn't programming at that age. ;-)
22:05 s1n pmichaud: we have cfront that was in use 2 years ago hah!!
22:06 s1n s/in use/newly created/
22:06 PerL_MonK s1n think about your Foo as not being able to be called as my Foo $f(1,2,3);
22:07 PerL_MonK default constructor upon class definition would need something like that
22:07 pmichaud canonical mechanism is   my Foo $f .= new(...args...);
22:07 PerL_MonK object rather
22:07 pmichaud if no args, then   my Foo $f .= new;
22:08 PerL_MonK in Perl6 maybe, which doesnt seem natural really :)
22:08 s1n pmichaud: yeah, that cleared up like 4 bugs HAH
22:08 PerL_MonK compared to Java/C++/Python or whatever other OOP
22:08 s1n that was totally unintuitive
22:08 pmichaud I'm not responsible (mostly) for language design.  :-|
22:08 s1n i assumed that proto was going to default the .new with no parameters
22:09 PerL_MonK noone actually blamed you about it :)
22:09 PerL_MonK that was.. let's say a quick note
22:09 PerL_MonK but my Foo $f; $f.new(1,2,3); looks nice
22:09 jnthn I think pretty much every other language I've worked in that did OO actually required you to create an instance of the object. :-)
22:10 jnthn PerL_MonK: Yeah, apart from that won't actually do what you want... :-)
22:10 PerL_MonK yeah make that ->
22:10 jnthn PerL_MonK: Since with that $f is not changed, but still the proto.
22:10 pmichaud $f.new(1,2,3)  creates (then discards) an object of type Foo
22:10 jnthn my Foo $f .= new(1,2,3)
22:10 pmichaud $f remains unchanged, since it wasn't assigned to.
22:10 s1n jnthn: the case i was referring to still calls the constructor, but if you don't specify, it will use the no parameter version
22:10 jnthn Or my $f = Foo.new(1,2,3) # if you can't want $f typed
22:11 s1n which is exactly .new()
22:11 PerL_MonK blah
22:11 s1n so 'stl::string blah' call's stl::string's empty parameter constructor, basically defaulting blah to be ""
22:11 s1n which is what i was used to
22:12 pmichaud time to order (and fetch) pizza...bbiaw
22:13 s1n what's wrong with this one:
22:13 s1n rakudo: my %foo = ("test", 1); my @bar = <test>; say %foo<@bar[0]>;
22:13 p6eval rakudo 0310a3: OUTPUT«Use of uninitialized value␤␤»
22:14 pmichaud <@bar[0]>  is same as   {'@bar[0]'}
22:14 s1n oh
22:14 s1n duh
22:16 mib_hh520ivx joined #perl6
22:16 s1n @seen frioux|home
22:16 lambdabot frioux|home is in #perl6. I don't know when frioux|home last spoke.
22:16 s1n @seen frew|work
22:16 lambdabot frew|work is in #perl6. I don't know when frew|work last spoke.
22:17 s1n store&
22:19 payload joined #perl6
22:27 Tene_ joined #perl6
23:36 mfwitten joined #perl6
23:49 dKingston joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo