Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-11-29

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:08 colomon jnthn: Any reason why we shouldn't handle this by just changing "svn up" to "svn up -r29188" in Makefile.in?  This has the advantage of merging with existing Rakudo installations more nicely...
00:09 jnthn heh
00:09 jnthn What about the initial checkout? That'd need similarly patching.
00:09 jnthn YOu're right though.
00:09 colomon I just did.
00:09 jnthn That will be far more transparent.
00:09 jnthn wfm.
00:10 colomon I will commit this in another minute or two.
00:11 jnthn 'k
00:22 SmokeMachine joined #perl6
00:26 colomon Done.
00:28 colomon now to make fudge rat.t until it passes in ng.  :)
00:35 colomon_ joined #perl6
00:47 Wolfman2000 phenny: tell masak I finally understand Catalyst ResultSet abstractions. Take a look at my github, and see if you can incorporate some of the split stuff I just did. ;)
00:47 phenny Wolfman2000: I'll pass that on when masak is around.
00:58 snarkyboojum_ joined #perl6
01:00 JeffreyKegler joined #perl6
01:06 pugs_svn r29206 | colomon++ | [t/spec] Fudge rat.t so that it works with Rakduo-ng.
01:12 gfx joined #perl6
01:12 pugs_svn r29207 | colomon++ | [t/spec] Unfudge tests that work in Rakudo-ng.
01:15 colomon Ummm... numeric context tests that are todo-passing in ng....
01:15 colomon ng: my Int $x = +'2'; say $x; say $x.WHAT;
01:15 p6eval ng b155b4: sh: ./perl6: No such file or directory␤
01:16 colomon grumble
01:23 colomon ng: my Int $x = +'2'; say $x; say $x.WHAT;
01:23 p6eval ng f6ad9a: 2␤Num()␤
01:23 * Tene resists the temptation to play with implementing macros in ng.
01:24 colomon Tene: You know you want to do it....
01:24 Tene Maybe after I finish $realjob work.
01:25 colomon ng: my Int $x = '4' - 3; say $x; say $x.WHAT;
01:25 p6eval ng f6ad9a: 1␤Num()␤
01:25 Tene I got some half-reasonable macros working in my scheme compiler for Parrot today.
01:25 Tene are there any macro tests?
01:26 colomon I've no idea.
01:26 * colomon just doesn't want to be the only one hacking on ng tonight...
01:27 Tene Ah.  If you choose some tasks for me, I can hack on ng in a few hours, I expect.
01:27 colomon hmmm....
01:28 colomon list assignment?
01:28 colomon loop?
01:28 Tene loop sounds good.
01:29 colomon I don't have a clue how to do it, but if you can work it out I will celebrate.  :)
01:29 Tene I like loops.
01:29 colomon And if you've got loop and gather/take, you can do all sorts of cool things.
01:30 Tene is there a test for loop specifically?
01:31 colomon S04-statements/loop.t, I'm guessing.
01:32 Tene Yeah, I can do that pretty easily.
01:32 colomon \o/
01:34 gfx_ joined #perl6
01:34 pugs_svn r29208 | colomon++ | [t/spec] Unfudge four tests that are passing, but add two fudged tests to help verify those previously fudged tests are correct.
01:38 dbrock joined #perl6
01:41 Wolfman2000 colomon: back from dinner. I don't understand what you mean with that last commit message.
01:42 colomon Do you understand what is meant by fudging in this context?
01:42 Wolfman2000 fudging...I think I've seen that used as lying before.
01:42 TimToady that's more or less correct :)
01:42 colomon Okay, I'll start from step one then.
01:42 colomon (afk for a moment)
01:44 colomon When we talk about fudging the tests, what we mean is putting in a todo or skip directive in the test source, so that test is marked either as "we know this will give incorrect results" or "this test fails so hard it must be skipped entirely".
01:45 colomon So for instance, I added this line earlier to rat.t:
01:45 colomon #?rakudo 24 skip 'Int overflow in Rat calculations NYI in Rakudo-ng'
01:45 colomon That means, in rakudo, skip the next 24 tests.  Everything else is a quick explanation of why to skip those tests.
01:45 colomon (in rakudo's make spectest, I mean.)
01:46 colomon In the case of the commit above, there were four tests marked "todo" which were never-the-less passing.
01:46 Wolfman2000 unexpected successes then?
01:46 colomon Yes.
01:46 colomon exactly.
01:47 colomon In this case, the first two tests were basically this:
01:47 colomon ng: my Int $x = +'2'; say $x;
01:47 TimToady the fundamental goal is that eventually a conforming implementation can run all the test and treat those as mere comments without running through the fudge preprocessor
01:47 p6eval ng f6ad9a: 2␤
01:47 colomon What I discovered playing around was this:
01:47 TimToady in that sense, yes, fudging is lying about how well you do against the official test suite :)
01:48 colomon ng: my Int $x = +'2'; say $x; say $x.WHAT;
01:48 p6eval ng f6ad9a: 2␤Num()␤
01:48 Wolfman2000 ...that should say Int()
01:48 colomon Exactly.
01:48 colomon So I unfudged those two tests, and added another test saying "this should say Int".
01:49 colomon But because it doesn't say Int yet, I had to fudge the new test.
01:49 Wolfman2000 I'm guessing there are ways to make rakudo ignore the fudging and just get straight to the cake.  ...which is apparently a lie right now.
01:50 TimToady t/spec/README has more about this too
01:50 TimToady the point of using the comment syntax is that each implementation can ignore the fudge comments of other implementations
01:50 colomon Wolfman2000: I know you can do it by passing the test file straight to ./perl6.
01:51 colomon But in general that's only useful if you are hunting unexpected successes.
01:51 TimToady yes, the fudging is applied by the fudgeall that is called when you do make, but you can bypass it
01:51 colomon TimToady: Actually, I should ask you about this set of tests.
01:51 Wolfman2000 I understand the basics.
01:52 colomon ng: my Int $x = +'2'; say $x; say $x.WHAT
01:52 p6eval ng f6ad9a: 2␤Num()␤
01:52 Wolfman2000 Now, while it's on my mind...is Perl 6 supposed to allow using Perl 5 modules or not? I thought Perl 6 was supposed to be non backwards compatible with Perl 5
01:52 colomon TimToady: looking at that again, I'm presuming +'2' should be an Int.
01:52 colomon but the next set of tests is basically
01:53 TimToady + is a cast to Numeric, which should translate to an appropriate type. +'2.0' should be Rat, +'2.0e0' would be Num
01:53 colomon ng: my Num $x = +'2'; say $x; say $x.WHAT
01:53 p6eval ng f6ad9a: 2␤Num()␤
01:53 colomon Should that work?  If +'2' is an Int, shouldn't the assignment to Num $x fail?
01:54 TimToady Wolfman2000: it's specced to interoperate with P5, though early implementations may be slow on providing this
01:54 TimToady unless I can finish my STD_P5.pm file  :)
01:54 Wolfman2000 ...so for now, stick to helping by playing around now and then and eventually getting up a Perl 6 syntax highlighting pastebin. Got it.
01:55 TimToady colomon: depends on how many enemies we want to make :)
01:55 TimToady I think we should find a way to assign an int to a num without failing
01:56 TimToady in an rvalue sense, Int does Num already, kinda
01:56 colomon TimToady: certainly seems like it would be DWIMmy
01:57 TimToady anything Integral does Real, in the same sense
01:57 Wolfman2000 ng: my $x = +'2'; say "Int" if $x = $x.Int;
01:57 p6eval ng f6ad9a: Int␤
01:57 Wolfman2000 ...seems like there is some DWIMmy in there already. Just force a cast if...wait
01:57 Wolfman2000 ng: my $x = +'2'; say "Int" if $x == $x.Int;
01:57 p6eval ng f6ad9a: Int␤
01:57 Wolfman2000 okay, force the cast.
02:00 colomon TimToady: okay, then if I say my Num $x = +'2' and it DWIMmily works, should $x be a Num?
02:01 TimToady seems like it
02:01 colomon okay, I've just coded the test for that as well.  :)
02:02 TimToady I need to figure out how such coercions are officially allowed, I guess...
02:02 colomon :)
02:08 colomon ng: say +"3/2"
02:08 p6eval ng f6ad9a: 3␤
02:09 colomon ng: say +"3/2" ~~ Rat
02:09 p6eval ng f6ad9a: 0␤
02:10 colomon ng: say 3 ~~ Rat
02:10 p6eval ng f6ad9a: 0␤
02:10 colomon hmmm,.. wonder why that test is blowing up for me?
02:17 pugs_svn r29209 | colomon++ | [t/spec] Tests for handling +'3/2', and tests to make sure Numification returns the correct type.
02:19 orafu joined #perl6
02:20 Tene colomon: looks like I'm almost done with $realjob
02:20 colomon yay!
02:21 colomon ng: while 1 { say "hello"; break; }
02:22 p6eval ng f6ad9a:
02:22 p6eval ..hello␤Warning␤hello␤Warning␤hello␤Warning␤hello​␤Warning␤hello␤Warning␤hello␤Warning␤hello␤Warnin​g␤hello␤Warning␤hello␤Warning␤hello␤Warning␤hello​␤Warning␤hello␤Warning␤hello␤Warning␤hello␤Warnin​g␤hello␤Warning␤hello␤Warning␤hello␤Warning␤hello​␤Warning␤hello␤Warning␤hello␤Warning␤hello␤War…
02:22 Wolfman2000 colomon: I think you mean last instead of break...
02:22 Wolfman2000 ng: while 1 { say "hello"; last; }
02:22 p6eval ng f6ad9a: hello␤Could not find non-existent sub &last␤current instr.: '_block23' pc 131 (EVAL_1:64)␤
02:22 colomon Wolfman2000: Indeed!
02:22 diakopter well
02:22 Wolfman2000 ...and yet that didn't quite work.
02:22 colomon well, that's one way to stop.
02:22 Wolfman2000 colomon: I think I just gave you your new task.
02:23 colomon actually, I didn't think while worked at all.
02:23 colomon now I wonder if someone implemented loop when I wasn't looking.
02:23 Tene TimToady: what's the difference between 'break' and 'last'?
02:23 Wolfman2000 ng: my $tmp = 0; while $tmp < 5 { say $tmp ** 2;}
02:23 colomon ng: loop { say "hello"; last; }
02:24 p6eval ng f6ad9a:
02:24 p6eval ..0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤​0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤​0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤​0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤​0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0�
02:24 p6eval ng f6ad9a: Could not find non-existent sub &loop␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
02:24 Wolfman2000 ...right, forgot to increment
02:24 Wolfman2000 ng: my $tmp = 0; while $tmp < 5 { say $tmp++ ** 2;}
02:24 p6eval ng f6ad9a: 0␤1␤4␤9␤16␤
02:24 Wolfman2000 side effect statements...gotta love em
02:24 Tene TimToady: Nevermind, I found the answer in S04.
02:24 colomon Tene: you know, if while works, it might be more useful to implement last than loop.
02:25 quantumEd ng: last
02:25 p6eval ng f6ad9a: Could not find non-existent sub &last␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
02:25 Tene colomon: 'last' is trivial... 'sec
02:25 diakopter ng: while 1 { ({ say 1; return 1})() };
02:25 Tene updating to latest...
02:25 p6eval ng f6ad9a: 1␤No exception handler and no message␤current instr.: '_block34' pc 237 (EVAL_1:117)␤
02:25 colomon Tene: all the more reason to do it, then!  :)
02:25 Tene colomon: check for 'next' and 'redo' for me?
02:26 colomon ng: my $t = ; while $t < 5 { $t++; next if $t == 3; say $t }
02:26 p6eval ng f6ad9a: Confused at line 1, near "my $t = ; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
02:27 colomon ng: my $t = 0; while $t < 5 { $t++; next if $t == 3; say $t }
02:27 p6eval ng f6ad9a: 1␤2␤Could not find non-existent sub &next␤current instr.: '_block27' pc 167 (EVAL_1:72)␤
02:28 colomon ng: my $i = 0; while (defined($i)) { if (++$i < 3) { redo }; last } ; say $i
02:28 p6eval ng f6ad9a: Could not find non-existent sub &redo␤current instr.: '_block41' pc 309 (EVAL_1:131)␤
02:29 colomon Tene: last, next, and redo, all waiting for an intrepid programmer to tackle them...
02:34 Tene colomon: added... testing...
02:35 Wolfman2000 colomon, Tene: I admit me trying to tackle ng is asking a bit much of me, but perhaps I can offer an idea for redo. Is it possible to just GOTO the original statement without the incrementing, and have next jump to the line before the GOTO to increment?
02:35 Wolfman2000 I'm kind of assuming this needs to be done in PIR
02:36 colomon joined #perl6
02:36 colomon \o/
02:36 Wolfman2000 colomon: should I repeat what I just said?
02:36 Tene colomon: pushed.
02:36 colomon Wolfman2000: I missed whatever you said, yup.
02:36 Wolfman2000 colomon, Tene: I admit me trying to tackle ng is asking a bit much of me, but perhaps I can offer an idea for redo. Is it possible to just GOTO the original statement without the incrementing, and have next jump to the line before the GOTO to increment? I'm kind of assuming this needs to be done in PIR.
02:36 Tene Wolfman2000: i added the infrastructure to take care of that on all pct-generated loops.  All you need to do is throw the right flavor of exception.
02:37 Wolfman2000 Tene: Working on the dedicated pastebin right now. Afraid to touch ng.
02:37 Wolfman2000 ...that reminds me. How do we get the dalek bot to put my commits up here?
02:37 Tene dalek?
02:38 Tene pointme: dalek?
02:38 pointme Sorry, I don't know anything about that project
02:38 Wolfman2000 ...where IS dalek?
02:38 Tene ah, there's no dalek in here.
02:38 Wolfman2000 presently in #november-wiki only right now
02:38 Wolfman2000 wonder why
02:39 Tene colomon: can you verify that next/last/redo work for your purposes?
02:40 colomon Tene: let me see...
02:42 colomon_ joined #perl6
02:42 Wolfman2000 colomon: your connection alright?
02:43 colomon my laptop keeps losing its wifi connection to my router.
02:43 colomon been doing it for about a week now, driving me nuts.
02:43 colomon_ joined #perl6
02:45 colomon Tene++: looks like they all work at a quick test.
02:45 Tene I bet we win back some spec tests with that.
02:46 colomon Tene: I don't doubt it.  Just don't know which ones.  :)
02:52 jaldhar joined #perl6
02:55 nihiliad joined #perl6
02:59 Tene colomon: looking at 'loop' now.
02:59 colomon cool
02:59 Tene also making tea, so kind aafk
03:05 colomon Ooooo....
03:08 colomon phenny: tell moritz_ Remember how you were saying that .match was broken in split?  It's not the match method that doesn't work, it's the call to it that's broken.  I just implemented split on Str and the same problem comes up with .index.  And I just tested both match and index by hand and they do work.
03:08 phenny colomon: I'll pass that on when moritz_ is around.
03:08 Wolfman2000 colomon: must love discovering what's wrong with ng while you try to make it right.
03:08 Wolfman2000 I have to wonder...how do you feel when you uncover these issues?
03:09 colomon It's all part of the debugging process.
03:10 colomon I feel a lot better finding bugs like this in ng than I do getting random Bus errors in master just because my code runs long enough to break rakudo and/or parrot.
03:12 colomon phenny: tell moritz_ Switching $.index to self.index makes it work.
03:12 phenny colomon: I'll pass that on when moritz_ is around.
03:20 colomon Updated splits pushed.  Neither version works yet, as far as I can tell.
03:21 colomon ng: my $l = Inf; $l--; say $l
03:21 p6eval ng 4aa094: Inf␤
03:23 Wolfman2000 ...that's one of the things in math that still bothers me.
03:23 Wolfman2000 You can always add one or subtract one from Infinity and still get Infinity.
03:23 Wolfman2000 It's as if there is no limit.
03:24 Wolfman2000 ng: say Inf - Inf;
03:24 p6eval ng 4aa094: NaN␤
03:24 Wolfman2000 and subtracting two Infinities is impossible.
03:24 Wolfman2000 It's as if you want the world to blow up.
03:24 Wolfman2000 ng: say 5 / 0;
03:24 p6eval ng 4aa094: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 231554 (src/gen/core.pir:22590)␤
03:24 Wolfman2000 ...did I see this right? ng failed at failing?
03:25 Wolfman2000 Does this mean it succeeded?
03:25 colomon Nope, it just did a super-fail.
03:25 colomon It not only failed, it couldn't figure out how to fail with grace.
03:26 colomon Tene: You there?
03:26 Tene colomon: Yeah, just back from errands.  Just about to do loop().
03:26 colomon I may have a gather / take bug.
03:27 Tene orly?  pls share.
03:28 colomon one sec
03:28 colomon ummm... okay, that's extra freaky.
03:29 lisppaste3 colomon pasted "split fails weirdly, part 1" at http://paste.lisp.org/display/91226
03:30 colomon In that case, it looks like gather / take doesn't actually return anything?
03:30 colomon but....
03:30 Tene colomon: Um... you're not saving the gather into anything.
03:30 Tene you just have 'gather' on its own.  not like: my @a = gather { ... };
03:30 colomon It should be the return value of the method, no?
03:31 Tene not when you have a 'say' after it.
03:31 colomon oh, right!
03:31 colomon unfortunately, that wasn't my real bug.
03:32 colomon If I take away that last say statement, "This is a test".split(/is/).perl.say never returns.
03:32 Tene colomon: .perl on lists is what hangs.
03:32 colomon orly?
03:32 Tene Yes.
03:33 Tene ng: my @a = 1, 2, 3, 4; say @a.perl;
03:33 colomon you are correct!
03:33 colomon Tene++
03:33 p6eval ng 4aa094:  ( no output )
03:33 colomon Well, yay!  gather / take works.
03:33 colomon Unfortunately, split is very broken.
03:34 colomon hopefully moritz_ can take a stab at sorting out the bugs when he wakes up.  I need to get to bed now.
03:35 Tene goodnight, colomon.  Thanks for prompting me to work on ng tonight.
03:35 colomon Thank you for working on it!  It may seem small, but I feel like we (primarily you) made important progress tonight.
03:37 Tene pmichaud: have any plans for what to work on tonight yet?
03:38 pmichaud Tene: I'm still recovering from the trip, alas.
03:39 pmichaud (and I'm still getting interruptions)
03:40 Tene :)
03:40 pmichaud I think I'm going to try to get a fresh start tomorrow
03:40 Tene I'm just now working on adding 'loop', but the version copied from STD.pm doesn't happen to Just Work.  Now I have to think about it.  :P
03:42 pmichaud I'm not sure why STD.pm wants the $<eee> =   part
03:42 pmichaud seems like we could do without it.
03:42 Tene Yeah, I'm trying a simplified version now.
04:01 naressi joined #perl6
04:05 Tene Okay, pushed 'loop', and t/spec/S04-statements/loop.rakudo passes.
04:05 Wolfman2000 Tene++ ✓
04:06 Wolfman2000 ...I so want someone to make a multi sub term:(✓) to have this mean Bool::True, or better yet: have Bool::True return ✓.
04:11 jaldhar joined #perl6
04:17 gbacon joined #perl6
04:19 justatheory joined #perl6
04:19 s1n joined #perl6
04:19 colomon joined #perl6
04:27 Tene colomon: I just fixed Str.split(Str)
04:28 Tene pmichaud: any specific ng tasks you'd like me to work on?
04:33 envi^home joined #perl6
04:38 justatheory joined #perl6
04:40 pmichaud Tene: not at the moment
04:40 Tene Okay, great.
04:45 zloyrusskiy joined #perl6
04:46 pmichaud time for sleep here
04:46 pmichaud bbt
04:46 Tene Goodnight.
04:51 patspam joined #perl6
04:53 diakopter all your base the cake is a lie
05:02 JimmyZ joined #perl6
05:21 JimmyZ ng: gather
05:21 p6eval ng 637392: Could not find non-existent sub &gather␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
05:22 Tene JimmyZ: you keep trying that... what are you hoping just 'gather' on its own will do?
05:23 JimmyZ Tene: I thought you'was sleeping ;)
05:23 Tene JimmyZ: No, pm is.
05:23 JimmyZ I just find why it is different from master.
05:23 Tene rakudo: gather
05:23 p6eval rakudo 7347ec: too few positional arguments: 0 passed, 1 (or more) expected␤in Main (file <unknown>, line <unknown>)␤
05:23 JimmyZ s/just/just want
05:24 JimmyZ or Is gather is a function or syntax ?
05:24 Tene syntax
05:25 Tene Here, let me add something real quick...
05:25 Tene rakudo is failing to parse it as syntax because there's no block after it, so it falls back to calling it as a function.
05:25 Wolfman2000 ...I can just see the future now. Skype and Google Wave.
05:25 * Wolfman2000 just got done with an hour long video chat with one of his best friends.
05:26 JimmyZ ng also call it as a function?
05:27 Tene JimmyZ: There is no 'gather' function defined in the core setting, according to the spec.
05:27 JimmyZ Wolfman2000: what's the future?
05:27 Tene rakudo happens to have one because that's what I named the function used to implement 'gather', and it happened to end up in the right namespace to be called like that.
05:27 JimmyZ wave is really useful.
05:27 Tene rakudo master
05:27 Wolfman2000 JimmyZ: Google Wave for code collaboration, Skype Chat for voice
05:27 Tene I named it differently in ng, to avoid conflicting with any user-defined 'gather' functions.
05:27 Tene rakudo: for
05:28 p6eval rakudo 7347ec: Could not find non-existent sub for␤in Main (file src/gen_setting.pm, line 324)␤
05:28 Tene rakudo: try
05:28 SmokeMachine joined #perl6
05:28 p6eval rakudo 7347ec: Could not find non-existent sub try␤in Main (file src/gen_setting.pm, line 324)␤
05:28 JimmyZ ng: for
05:28 p6eval ng 637392: Could not find non-existent sub &for␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
05:28 Tene see?  no different.
05:29 JimmyZ Tene: yes
05:30 Tene does that answer your question?
05:31 JimmyZ Tene: yes. Tene, I think that's why Perl 6 is different from other languages.
05:31 Tene Howso?
05:31 JimmyZ some language can't use keywords as function.
05:33 JimmyZ I treated gather as a function. :)
05:33 JimmyZ builtin function
05:34 Tene It isn't.  It's in the same catagory as 'try'.
05:37 JimmyZ Thank Tene++ for clarification.
05:47 diakopter rakudo: say try eval
05:47 Tene No problem. :)
05:47 p6eval rakudo 7347ec: Null PMC access in type()␤in Main (file <unknown>, line <unknown>)␤
05:47 diakopter ng: say try eval
05:47 p6eval ng 637392: Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
05:50 diakopter ng: my &my; say my("hihi")
05:50 p6eval ng 637392: Can not do non-typename cases of type_constraint yet at line 1, near ")"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
05:51 diakopter ng: my &my; say (my(Int)).WHAT
05:51 p6eval ng 637392: List()␤
05:53 diakopter ng: say say(Int).WHAT
05:53 p6eval ng 637392: Int()␤Bool()␤
05:53 diakopter (last seem ok to me)
05:54 colomon joined #perl6
06:07 diakopter std: package my; my my my
06:07 p6eval std 29209: [31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/kt5Nxe5Ag0 line 1 (EOF):␤------> [32mpackage my; my my my[33m⏏[31m<EOL>[0m␤    expecting any of:␤   typename␤ whitespace␤FAILED 00:01 103m␤
06:10 diakopter ng: my Int &foo = 5; say &foo.WHAT;
06:10 p6eval ng 637392: Int()␤
06:10 diakopter urgh
06:10 diakopter masakbot: I summon thee
06:10 diakopter ng: my Sub &foo = 5; say &foo.WHAT;
06:11 p6eval ng 637392: Int()␤
06:11 diakopter wheh
06:12 diakopter ng: my Int %foo = 5; say %foo.WHAT;
06:12 p6eval ng 637392: Int()␤
06:22 zloyrusskiy joined #perl6
06:24 Tene ng: loop(my $i = 1; $i <= 10; $i++) { next if $i % 2 == 0; last if $i > 7; say $i; }
06:24 p6eval ng 637392: 1␤3␤5␤7␤
06:26 rhr joined #perl6
06:27 TimToady std: loop(my $i = 1; $i <= 10; $i++) { next if $i % 2 == 0; last if $i > 7; say $i; }
06:27 p6eval std 29209: [31m===[0mSORRY![31m===[0m␤loop() interpreted as function call at line 1; please use whitespace around parens␤Unexpected block in infix position (two terms in a row) at /tmp/W8hzhCnfES line 1:␤------> [32mloop(my $i = 1; $i <= 10; $i++) [33m⏏[31m{ next if $i % 2 == 0; last if $i >
06:27 p6eval ..…
06:27 Tene Ack.
06:27 Tene The version in STD.pm didn't work in ng, so I simplified it until it did.
06:29 TimToady ng: loop (my $i = 1; $i <= 10; $i++) { next if $i % 2 == 0; last if $i > 7; say $i; }
06:29 p6eval ng 637392: 1␤3␤5␤7␤
06:29 TimToady at least put the space after "loop"
06:29 Tene TimToady: where are protoregexes defined?  I didn't see much in S05.
06:30 TimToady S05:1071
06:30 TimToady and STD
06:38 colomon_ joined #perl6
06:47 Wolfman2000 ...it's official. git++ is useful for going back to old commits and restoring what once worked.
07:00 cahek joined #perl6
07:02 colomon_ joined #perl6
07:23 mberends joined #perl6
07:24 Exodist joined #perl6
07:25 Exodist joined #perl6
07:39 diakopter std: my &loop; loop(my $i = 1; $i <= 10; $i++){ next if $i % 2 == 0; last if $i > 7; say $i; }
07:39 p6eval std 29209: ok 00:02 128m␤
07:40 diakopter std: loop(my $i = 1; $i <= 10; $i++){ next if $i % 2 == 0; last if $i > 7; say $i; }
07:40 p6eval std 29209: Undeclared routine:␤  'loop' used at line 1␤ok 00:01 106m␤
07:41 JimmyZ joined #perl6
07:41 mberends diakopter: 'loop (' with a space
07:43 JimmyZ ng: print (my $i = 1; $i <= 10; $i++){ next if $i % 2 == 0; last if $i > 7; say $i; }
07:43 p6eval ng 637392: Confused at line 1, near "print (my "␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
07:43 JimmyZ std: print (my $i = 1; $i <= 10; $i++){ next if $i % 2 == 0; last if $i > 7; say $i; }
07:43 p6eval std 29209: ok 00:01 106m␤
07:43 JimmyZ perl6: print (my $i = 1; $i <= 10; $i++){ next if $i % 2 == 0; last if $i > 7; say $i; }
07:43 p6eval elf 29209: Global symbol "$i" requires explicit package name at (eval 126) line 3.␤Global symbol "$i" requires explicit package name at (eval 126) line 3.␤syntax error at (eval 126) line 3, near "(if"␤Global symbol "$i" requires explicit package name at (eval 126) line 3.␤ at ./elf_h line 5881␤
07:43 p6eval ..rakudo 7347ec: Confused at line 2, near "{ next if "␤in Main (file <unknown>, line <unknown>)␤
07:43 p6eval ..pugs: *** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator or ")"␤    at /tmp/5g1kkyOdrf line 1, column 17␤
07:46 diakopter mberends: yes, I know.  see the recent backlog.
07:47 mberends diakopter: will do. is parsing loop() as a function intended?
07:49 * Wolfman2000 can't sleep...
07:51 mberends diakopter: STD does a more correct parse loop() than ng
07:55 kaare joined #perl6
07:55 Wolfman2000 ...I was wondering about this bit of information...
07:55 Wolfman2000 diakopter: you're probably awake still. What's the rule on bots in this room?
07:57 Tene Wolfman2000: I'm not aware of any specific policies... mostly just don't be obnoxious, and if anybody complains, you'll be asked to change the behavior of your bot.
07:58 Wolfman2000 Tene: Since I couldnt' sleep, I've been looking at what I could do with Github. I recently found out how to allow others write access to my repo (you're one of them), but I also noticed a hooks section...that includes IRC.
07:59 Wolfman2000 Apparently, Github can make robots report progress on commits in the room. I am unsure how wise it is to use this service.
08:08 Wolfman2000 ...and now I think I'm going to try to get some sleep again. Hopefully, I'll stay asleep for at least 6 hours.
08:14 diakopter mberends: I meant, I removed the space between 'loop' and '(' and also between ')' and '{'
08:15 diakopter that killed the "bad loop()" error msg
08:47 diakopter cool: http://qa.perl.org/
08:52 agentzh joined #perl6
09:12 mberends cool indeed. So many good things in Perl 5 that we should try to assimilate :)
09:20 meppl joined #perl6
09:23 beggars joined #perl6
09:28 iblechbot joined #perl6
09:29 colomon Tene: you almost drove me mad trying to figure out what you changed in split before I looked at the commit diff....
09:50 Tene rakudo: use Getopt::Obj:from<parrot>; my $x = Getopt::Obj.new();
09:50 p6eval rakudo 7347ec: Null PMC access in get_pmc_keyed()␤in Main (file <unknown>, line <unknown>)␤
10:29 brody joined #perl6
10:47 dakkar joined #perl6
11:09 colomon ng: say <ahh j  l?
11:09 p6eval ng 12c2f5: Confused at line 1, near "say <ahh j"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
11:09 colomon ng: say <ahh j  l>
11:09 p6eval ng 12c2f5: ahhjl␤
11:16 snarkyboojum joined #perl6
11:36 lisppaste3 colomon pasted "bizarre split test failure" at http://paste.lisp.org/display/91232
11:36 colomon I'm hoping someone can see something I'm missing here...
11:39 agentzh joined #perl6
11:49 snarkyboojum joined #perl6
11:53 colomon ng: say ("a b", "c") eq <a b c>
11:53 p6eval ng 12c2f5: 0␤
11:54 colomon ng: say ~("a b", "c") eq ~<a b c>
11:54 p6eval ng 12c2f5: 0␤
11:54 colomon ng: say ~("a b", "c")
11:54 p6eval ng 12c2f5: 2␤
11:55 colomon rakudo: say ("a b", "c") eq <a b c>
11:55 p6eval rakudo 7347ec: 1␤
11:56 colomon ng: say ("a b", "c").Str
11:56 p6eval ng 12c2f5: a b c␤
12:01 pmurias joined #perl6
12:21 colomon ng: 'theXXbigXXbang'.split('XX', *).Str
12:21 p6eval ng 12c2f5:  ( no output )
12:22 colomon ng: say 'theXXbigXXbang'.split('XX', *).Str
12:22 p6eval ng 12c2f5: the big bang␤
12:23 colomon ng: say 'theXXbigXXbang'.split('XX', *).Str eq 'the big bang'
12:23 p6eval ng 12c2f5: 1␤
12:24 colomon huh
12:24 colomon is 'theXXbigXXbang'.split('XX', *).Str, 'the big bang', 'Str.split(Str) (with * limit)';
12:24 colomon consistently dies.
12:24 colomon with no message.
12:25 colomon ng: testing frustration this morning
12:25 p6eval ng 12c2f5: Could not find non-existent sub &morning␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
12:25 colomon :)
12:28 pugs_svn r29210 | colomon++ | [t/spec] Clone from split-simple.t and try to make the tests simple enough that ng can actually pass them.
12:30 colomon phenny: tell moritz_ Why are we testing 123.split(2) ?  That's totally not in the spec...
12:30 phenny colomon: I'll pass that on when moritz_ is around.
12:43 zloyrusskiy joined #perl6
12:45 colomon ng: say 'theXbigXbang'.split(/X/, -1).perl
12:45 p6eval ng 12c2f5: sh: ./perl6: No such file or directory␤
12:49 colomon ng: say 'theXbigXbang'.split(/X/, -1).per
12:49 p6eval ng 12c2f5: Method 'per' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
12:50 colomon ng: say 'theXbigXbang'.split(/X/, -1).perl
12:50 p6eval ng 12c2f5:  ( no output )
12:52 colomon ng: my @a = gather { take 5; }; say @a.perl
12:52 p6eval ng 12c2f5:  ( no output )
12:53 colomon ng: my @a = gather { take 5; }; say @a.Str
12:53 p6eval ng 12c2f5: 5␤
12:53 * colomon is going to have to write Array.perl just so he stops falling into that trap...
12:54 colomon ng: say 'theXbigXbang'.split(/X/, -1).Str
12:54 p6eval ng 12c2f5: theXbigXbang␤
12:55 schmalbe joined #perl6
12:59 colomon ng: for 'abcb'.split(/b/) { .say }
12:59 p6eval ng 12c2f5: a␤c␤␤
13:05 colomon ng: say Nil.elems
13:05 p6eval ng 12c2f5: 0␤
13:10 SirKay joined #perl6
13:10 SirKay Morning all.
13:10 colomon \o
13:10 SirKay how is Rakudo doing?
13:12 pugs_svn r29211 | colomon++ | [t/spec] Skip two tests which quite inexplicably fail.  Start adding limit tests back in.
13:13 colomon Rakudo is branched at the moment, with a better-designed but only partially rebuilt branch ("ng") receiving 99% of the development time.
13:13 colomon Rakudo's master branch works just about the same as it did four or five weeks ago, plus a couple of minor patches.
13:14 SirKay Okay.  So if I am a new programmer wishing to aid in the development of Rakudo, which should I put most of my effort into?
13:14 colomon Oh, ng for sure.
13:15 SirKay though the details may go over my head, I must confess I am curious as to why it is branched.
13:15 colomon But if you're just trying to get your feet wet, probably the best bet is finding tests to add to the test suite.
13:15 SirKay getting my feet wet is about all I can do at this point.
13:16 SirKay my programming knowledge is limited to trivia and a very small amount of perl 5.
13:17 colomon Basically, the core developers felt that there were some significant limitations in the old implementation that a fresh start could do away with.
13:17 colomon It's branched so that the old implementation is still out there for people trying to use perl 6; the new ng branch still has huge holes in it.
13:17 SirKay hmm.
13:18 SirKay well the computer I would be using it on is technically not even mine.
13:18 SirKay so perhaps using a program with "huge holes" in it might be dangerous?
13:18 jnthn o/
13:18 colomon I think we're expecting that ng will become the "master" branch sometime in December.
13:18 jnthn colomon: Yes, that's my expectation too.
13:19 colomon SirKay: If you just want to dabble with Perl 6 programming, then using the old master branch is the way to go.
13:19 colomon jnthn: I've got split working (moritz_++ for getting it started, and Tene++ for help) but testing it is proving to be a complete bear.
13:19 jnthn SirKay: The ng branch basically is putting a bunch of things in place at the same time. In a sense, it's one big refactor of a bunch of stuff (not everything...just a lot of things) rather than doing several of them.
13:20 jnthn SirKay: The big ticket items being stuff related to parsing, laziness and metamodel bits.
13:21 SirKay Okay, so if I go for the old implementation will I still be having the same syntax and stuff?
13:21 jnthn SirKay: Either way, the worst that you'll encounter on either branch is that the compiler gives errors and/or the odd segfault. Neither will be damaging. Even the default make install target will build things completely contained under one directory.
13:21 jnthn SirKay: Yes.
13:21 SirKay Alright.
13:22 SirKay It will be a windows computer, too.
13:22 jnthn SirKay: That's fine, I hack on Rakudo on Windows.
13:22 jnthn If you're compiling it yourself, I recommend MS VC++ compiler (there's a free version available).
13:23 SirKay so far my ultimate aim is to learn enough Perl 6 to help contribute to its development, and also to make my own language.
13:24 jnthn Sounds good. :-)
13:24 masak joined #perl6
13:24 jnthn lolitsmasak
13:24 mberends lolitsmasak!
13:24 SirKay hmm.
13:24 masak lolitsjnthnandmberends!
13:24 phenny masak: 00:47Z <Wolfman2000> tell masak I finally understand Catalyst ResultSet abstractions. Take a look at my github, and see if you can incorporate some of the split stuff I just did. ;)
13:24 SirKay So Rakudo isn't quite a stand alone executable yet?
13:25 mberends SirKay: never will be, it's a Parrot guest application
13:25 SirKay I see.
13:26 SirKay I just figured that parrot was able to make stand alone executables.
13:26 jnthn SirKay: We build an executable, but it uses libparrot.dll and a couple of other DLLs too (or s/dll/so/ off Windows, I guess.)
13:26 jnthn Well, I guess you *could* statically link everything into one huge binary, but I'm not sure it would be much of a win...
13:26 masak SirKay: it's hard to be standalone with something like 'eval'.
13:28 masak ooh, TimToady rethunk enums!
13:28 colomon On the "testing split will drive me insane" front: changing tests 21 and 22 to use a Str instead of a Regex makes test 4 crash silently.
13:28 colomon masak: TimToady blames you.  ;)
13:28 masak colomon: I see that. :)
13:28 SirKay Is there any reason for a new programmer to learn Perl 5?
13:29 jnthn masak: Given how long I've whined about the enum spec, I massively thank you. :-)
13:29 masak jnthn: :)
13:30 colomon SirKay: depends on what you are trying to do.  there are several areas (like string processing on large files) where Perl 5 will be drastically faster than Perl 6 for at least a few more years.
13:30 mberends SirKay: lots :-) Perl 5 is practical, massively supported
13:30 SirKay What I am trying to do is become good at programming in general.
13:31 SirKay I do want to help with Perl 6, especially if it promises to make parsing/lexing that much easier, but I am noticing a lot of "maybes" and "sort ofs" about its current status, if that makes any sense.  I guess another way to put it would be, would I be building my house on rock or sand, if I started with and focused mainly on Perl 6?
13:31 masak (Day.mapping.invert)++
13:33 masak TimToady: does the PairValSet generated by .mapping guarantee order?
13:34 masak TimToady: by the spec examples, it looks that way, but a Set generally doesn't guarantee order, IIUC.
13:34 masak TimToady: also, what do we gain from speaking about PairValSet rather than Set[PairVal] ?
13:36 SirKay Obviously, if a person chases two rabbits, he loses them both.  So I fear that trying to do both things at once would be detrimental.
13:37 darkfather joined #perl6
13:37 mberends SirKay: even that depends on exactly what you build. the methodology of test driven development help answer the question, and offers the best guarantees of your own code being reliable.
13:37 masak SirKay: excellent question! I think you should start simple and ease into Perl 6, to find out if it's what you want.
13:37 explorer__ joined #perl6
13:38 SirKay hmm.
13:38 masak SirKay: learning Perl 6 and becoming an active member in its community has definitely helped me understand programming better, though.
13:38 SirKay How much programming experience did you start with before?
13:39 masak SirKay: as you may or may not know, I'm currently deeply involved in learning about the parsing stuff, and I have good hopes of soon being able to inspect and manipulate Perl 6 ASTs.
13:39 masak SirKay: I had programmed BASIC and Pascal and some assembly since about 12. nothing serious. I learned Java at university.
13:39 explorer__ joined #perl6
13:40 SirKay you learned it enough to be able to be basically competent?
13:40 masak at the point where Perl 6 and I met, I had just become deeply interested in OO design/methodology and patterns.
13:40 masak SirKay: for a while, Java was my strongest language. I knew Perl well enough at that point to miss some aspects of it in Java.
13:41 SirKay Then you are already accomplished, excellent.
13:41 SirKay However, I am not accomplished.  This is the closest I have come to anything semi-serious I've done with programming, and even that was just a few easily written subs: http://perlmonks.org/?view​mode=public;node_id=584356
13:42 SirKay the program itself is not my own, I simply saw it and thought to add a few features.
13:43 masak SirKay: in my view, your question should not be "what do I have to start with?" but "what interests me?". it's about optimizing for fun, and becoming accomplished in the process.
13:43 SirKay may I speak to you in private?
13:43 masak go right ahead.
13:46 pugs_svn r29212 | colomon++ | [t/spec] Str version of four Regex tests, half of which fail hard.
13:54 darkfather left #perl6
14:09 JimmyZ joined #perl6
14:19 carlin rakudo: say "{}#{}";
14:20 p6eval rakudo 7347ec: Embedded comments now require backticks at line 2, near "{}\";"␤in Main (file <unknown>, line <unknown>)␤
14:28 Wolfman2000 *yawn* morning...again
14:28 Wolfman2000 masak: If it helps, I think I figured out how to add you as a collaborator to the pastebin I'm working on. Unfortunately, I have no way of testing that for you.
14:29 masak Wolfman2000: I'll have a look.
14:32 masak Wolfman2000: yes, it worked.
14:33 Wolfman2000 masak: I wonder what you committed...git pull claims I'm already up to date
14:34 masak Wolfman2000: oh, nothing. just checked the github page; it says I have a clone URL, which means I can push to the repo.
14:42 Wolfman2000 ah
14:47 pmurias joined #perl6
14:51 am0c joined #perl6
14:58 patspam joined #perl6
15:02 colomon rakudo: say "this is a test".index("");
15:02 p6eval rakudo 7347ec: 0␤
15:07 Wolfman2000 rakudo: say "this is a test".index("is");
15:07 p6eval rakudo 7347ec: 2␤
15:10 masak rakudo: "This is a test" ~~ /is/; say $/.from; $/.next; say $/.from
15:10 p6eval rakudo 7347ec: 2␤5␤
15:11 jnthn masak: Is that spec?
15:11 masak jnthn: no.
15:12 jnthn masak: Was gonna say...I thought match objects were immutable. :-)
15:12 masak I think nqp-rx does all this very differently anyway.
15:12 jnthn aye, same
15:12 masak match objects are definitely not immutable in Rakudo master. :P
15:12 jnthn ;-)
15:12 jnthn Yeah but nor a constants.
15:13 Wolfman2000 Let me guess. They aren't bugs: they are features!
15:13 jnthn ;-)
15:13 masak Wolfman2000: in the case of $/.next, yes.
15:13 masak very much so.
15:13 jnthn Wolfman2000: Aye, Perl 6 is *so* advanced that we let you change constnats!
15:13 masak and infinite loops run in just under 5 seconds.
15:14 nareaisd joined #perl6
15:14 masak (unfortunately, due to Parrot bottlenecks, so do 0-iteration loops.)
15:14 mberends lol
15:18 masak I'm slightly surprised that neither Perl 5 nor Perl 6 people chose to continue the discussion on http://perlmonks.org/?node_id=809868
15:18 colomon didn't know what I could say after your post.
15:18 masak ah. Warnock strikes again.
15:19 colomon and strive to keep my mouth shut if I don't have anything useful to say.  :)
15:19 * colomon admits he fails frequently at that one.
15:19 masak colomon: does zwon, in your opinion, merit a reply?
15:20 colomon I dunno, his post seems pretty reasonable.
15:20 masak I find it comes off as slightly too negative towards Perl 6, but I don't think I want to be the one to point that out. and maybe it doesn't need to be pointed out.
15:20 jnthn It wasn't so bad.
15:20 masak it is indeed reasonable.
15:20 masak just not the way I would have phrased it. :)
15:20 jnthn "different lineages" is a lot to type, y'know. :-P
15:21 masak I think I'm fine with people saying 'Perl 6 is another language' nowadays.
15:21 jnthn (While it's a great way of expressing it, I'm not entirely convinced it's quite catch-phrasey.)
15:21 masak those people tend to be Perl 5 folks, and they have their reasons.
15:21 Wolfman2000 ...okay. How many here believe the claim that Git's branching mechanism is one of those killer features?
15:21 * masak raises hand
15:22 * mberends too
15:22 jnthn Well, if you want to take it to an extreme, Perl 5.8 and 5.10 are different languages too. ;-)
15:22 masak jnthn: ooh! almost material for a blog post.
15:22 Wolfman2000 jnthn: One of the few things I recall liking 5.10 over 5.8... the // and //= operators
15:22 Wolfman2000 what else did 5.10 offer?
15:23 colomon say
15:23 colomon given / when
15:23 jnthn masak: Is that a hint? :-P
15:23 colomon basically it stole a lot of Perl 6 features.
15:23 masak jnthn: start reasonable by pointing out how Perl 5 and Perl 6 are different languages. then 5.8 and 5.10... then syntax-altering modules... then BEGIN blocks... :)
15:23 jnthn :-)
15:23 masak jnthn: I don't know who should write it. maybe moritz_ would pull it off best.
15:24 jnthn "Perl has never really been designed to remain 'one language' anyway."
15:24 jnthn Or something. :-)
15:24 colomon it occurred to me recently that people complaining about how Perl 6 was pulling development resources away from Perl 5 had it backwards...  :)
15:24 jnthn Certainly though, I think the Perl community are very open to the whole idea of dialects of a language and language tweaks, compared to other languages.
15:25 * colomon has made split('') work, and completely broken normal split on Str in the process.
15:27 colomon Ah, how can I detect Undef in ng at the moment?
15:27 Wolfman2000 Mu?
15:28 colomon ng: say Mu.WHAT;
15:28 p6eval ng a7929a: Could not find non-existent sub &Mu␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
15:28 colomon nope.
15:29 pmurias joined #perl6
15:29 colomon However, I should either have Int or Undef.  So maybe if I check for Int...
15:30 colomon bother, Undef ~~ Int doesn't work either.
15:31 pmurias masak: re http://perlmonks.org/?node_id=809868 why would anyone want to get involved in such a discussion?
15:31 jnthn Heh, we should rename Object to Mu in ng.
15:31 * jnthn will do it tomorrow (or maybe today) if he ain't beaten to it
15:31 Wolfman2000 I thought Object and Mu were supposed to be different
15:31 jnthn I'm note sure I like it still, but I decided to Mute my arguments.
15:31 masak pmurias: because someone outside of the Perl 6 community is asking about Perl 6, and requesting information and clarifications about the process.
15:32 jnthn *not
15:33 pmurias masak: a post detiling while all the old perl 6 implementations failed would be entertaining
15:34 pmurias * detailing why
15:34 masak pmurias: indeed.
15:34 quantumEd joined #perl6
15:34 masak a fair amount of research would be needed to make it accurate, though.
15:35 masak also, a reasonably wide meaning of 'failed' would have to be adopted. I wouldn't describe Pugs, for example, though it's been at a standstill for two years, as having failed.
15:35 pmurias died would be a better word?
15:36 masak no. :) sleeping, or hibernating.
15:36 masak .oO( pining for the fjords )
15:36 jnthn But plz not undead.
15:38 jnthn I'm not so sure it'd be so much entertaining as informative for current/future impls.
15:40 * jnthn goes to read for a bit
15:41 pugs_svn r29213 | colomon++ | [t/spec] Added tests for split on '', split(Str) with the Str at the first position of the string to split, brought on-line a lot of the old limit tests.  Add done_testing as well.
15:49 colomon I think split mostly works now, but that test file is a bit of a nightmare.
15:50 masak colomon++
15:50 masak why is it a nightmare?
15:51 colomon I kept on running into issues where adding a test at a later point in the file would break an unchanged test earlier in the file.
15:52 colomon So it ended up with tests you can run by hand with no issues fudged out in the test file.
15:53 colomon Also, I'm very sure someone is going to want to go through the actual split code and clean it up.  I don't feel like it is a good example of quality perl 6 at the moment.  Getting code that works at the moment can be a bit of a trick...
15:53 masak nod.
15:54 masak maybe we should spend up to a month or so before the April release, just combing through the CORE setting and making it shine.
15:55 colomon I'd be in favor of that.
15:55 colomon possibly even do that at the beginning of the new year.  Once ng has more features, programming in it will be very different...
15:56 masak indeed.
15:56 pmurias mildew-js: say 1
15:56 p6eval mildew-js: Can't open perl script "mildew": No such file or directory␤
15:57 masak by the way, pmichaud said a week or so ago that he expected ng->master to occur in a week or so. how are we doing on that front?
15:57 colomon There's been shockingly little progress, IMO.  :)
15:58 colomon I'd say at least another week, maybe two.
15:59 colomon s/maybe/more likely/
16:01 Psyche^ joined #perl6
16:06 masak oh well. it's three weeks till the December release.
16:12 colomon I'm just hoping we're getting ng for Christmas.  ;)
16:12 Wolfman2000 colomon: what about Hannukah or Kwaanza?
16:12 masak I think the chances are still good for that.
16:12 Wolfman2000 Hannukah is Dec 12th or so this year. Good luck.
16:13 jnthn Yeah, I suspected the "in a week" was a tad optimistic, what with thanksgiving.
16:14 cognominal joined #perl6
16:14 * jnthn is getting there with the roles/metamodel bits now though, at least...
16:14 masak in a week, modulo thanksgiving. :)
16:14 jnthn ;-)
16:15 Wolfman2000 ...okay, I need one of those git reminders. How do I push a branch to my github?
16:15 colomon I figured the theory was that a lot of work was going to be done over Thanksgiving weekend....
16:15 jnthn Part of it is that there's a couple of tricky unresolved issues (one being exactly what iterators look like, the other being That MMD Issue)
16:15 colomon jnthn: certainly I'll be very happy when both of those are there.
16:16 jnthn colomon: Me too.
16:16 patspam1 joined #perl6
16:16 colomon on the plus side, now that we have loops and gather/take, I think I may be able to fake iteration over ranges (by converting it to iteration over lists, which we do have, internally).
16:16 colomon that should help with some tests.
16:21 masak \o/
16:26 elmex joined #perl6
16:27 colomon well, bother
16:27 jan_ joined #perl6
16:29 jnthn colomon: whoz op?
16:31 colomon My beautiful clean little mapping from RangeIterator to a list doesn't do squat in context.
16:31 lisppaste3 colomon pasted "updated Range.Iterator" at http://paste.lisp.org/display/91239
16:32 jnthn Aww. :-(
16:33 * jnthn wonders why not
16:33 lisppaste3 colomon annotated #91239 "In usage..." at http://paste.lisp.org/display/91239#1
16:33 colomon If that suggests anything to you, I'm all ears.
16:38 masak colomon: well, the 1..6.map variant shouldn't work. the error message is harsh, but correct.
16:38 masak hm, or not.
16:38 masak anyway, without parens, the map should map over the 6.
16:39 colomon Hmmm... so actually, with the parens it's dying in my Iterator function, maybe.
16:39 colomon that's semi-promising...
16:40 jnthn oh noes bus error!
16:40 colomon oooo, typo.
16:40 colomon said "take $i", should have been "take $value".
16:40 jnthn The bus error is still ungood... :-/
16:40 colomon bug errors and I are old friends here.  :(
16:41 colomon errr... that's weird.
16:42 colomon now it loops a whole lot, then bus errors
16:43 colomon ng: say Nil eq Nil
16:43 p6eval ng 792106: 1␤
16:51 colomon utterly mystified.  afk
16:57 pmichaud good morning, #perl6
16:57 Wolfman2000 morning pmichaud
16:57 * Wolfman2000 is starting to understand the power of branches.
16:59 jnthn hi pmichaud
17:00 masak morning, pmichaud
17:01 Wolfman2000 masak: Is there a way to push to github that I deleted a branch?
17:01 masak Wolfman2000: git push origin :branchname
17:02 Wolfman2000 ...I just got the octocat of doom
17:02 Wolfman2000 or whatever the github mascot is supposed to look like
17:02 pmichaud http://github.com/guides/remove-a-remote-branch
17:03 Wolfman2000 masak++, pmichaud++: thanks for the assistance.
17:18 masak given a nonzero Complex, what's the recommended way (in Perl 6) to get the counterclockwise angle between the x axis and the vector from 0 to that complex number?
17:18 masak atan2?
17:18 * Wolfman2000 doesn't recall
17:21 masak yep, atan2(.im, .re) seems to do it. and then multiplication by 180/pi turns it into degrees.
17:21 Wolfman2000 I wonder if pi is defined in Perl...
17:21 masak which Perl? Perl 5?
17:22 diakopter pmichaud: g'morn
17:29 Wolfman2000 masak: ...either or
17:29 ejs joined #perl6
17:38 colomon rakduo: say pi
17:38 masak Wolfman2000: it is defined in Perl 6. see S32.
17:38 colomon rakudo: say pi
17:38 masak S32-Numeric, to be exact.
17:38 p6eval rakudo 7347ec: 3.14159265358979␤
17:38 Wolfman2000 ...okay, I have to try this.
17:39 Wolfman2000 rakudo: say pi.Rat
17:39 p6eval rakudo 7347ec: 3.14159292035398␤
17:39 Wolfman2000 ...that didn't work how I thought it would.
17:39 colomon rakudo: say pi.Rat.perl
17:39 p6eval rakudo 7347ec: 355/113␤
17:40 TimToady STD currently has it as 3.14159_26535_89793_238 since that fits in a Rat64
17:41 TimToady CORE.setting, rather
17:41 pmurias joined #perl6
17:41 jnthn Perl 6. Where even Pi isn't irrational.
17:42 * jnthn lols at the irony of storing an irrational in a Rat
17:43 colomon it's no odder than storing it in a float...
17:43 ejs joined #perl6
17:43 jnthn colomon: Well, yes...the naming isn't quite so amusing there though :-)
17:47 * colomon still wonders if implementing lazy irrationals is possible....
17:47 jnthn omgipatchedng
17:48 jnthn Damm, still don't parse S14-role/basic.t!
17:48 elmex joined #perl6
17:49 colomon "omgipatchedng" -- is that how we do it when the bots are down?  ;)
17:49 nihiliad joined #perl6
17:51 iblechbot joined #perl6
17:52 jnthn colomon: Yeah, though it's a little lacking in specifics of what damage I did. :-)
17:52 jnthn er, enhacnements. I mean enhancements.
17:52 colomon but it tells us to go to github and get the details.
17:53 mdxi wouldn't a mechanism or lazy irrationals still, eventually, need a way to store near-infinite integers (representing teh fractional part)? like UTF-8 but for numbers? i'm sure someone has already done this, somewhere, at some time :)
17:54 colomon mdxi: I figured the representation would be a lazy list of digits...
17:55 mdxi forgive me; i'm not conversant on the existing internals. i'll go back to lurking moar :)
17:56 colomon mdxi: believe me, this is just a vague notion, not a carefully planned out implementation!  I'm too lazy to do the hard work for something so fundamentally impractical.
17:56 TimToady the problem isn't how to implement it, but how to know how much precision is required.
17:58 jnthn ng: my $x = [42]; say $x.WHAR
17:58 p6eval ng 792106: Method 'WHAR' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
17:58 jnthn gah
17:58 jnthn ng: my $x = [42]; say $x.WHAT
17:58 p6eval ng 792106: Array()␤
17:59 mdxi i'd figured something like coroutines such that every 'yield' would get you one more digit. but i've been reading about concurrent systems all week, so that's my current hammer (adn everything looks like a set of nails, which need to be hit one or more at a time)
18:01 mdxi i don't even know if that's possible, but it is fun to think about :)
18:01 * jnthn wonders if he actually codes faster while listening to DragonForce...
18:03 mdxi i have long been partial to trollish/folk/adventure/viking metal as drown-it-all-out coding music. it works at least as well as electronica, plus it gives you Fighting Spirit :)
18:03 jnthn I could never quite take viking metal seriously... :-)
18:04 * colomon wonders if he could get a grant to compare coding speed listening to Peter Horan & Gerry Harrington versus Dervish -- same sort of music, but the latter is like 50% faster.
18:04 mdxi i'm pretty sure i don't take it seriously either, but i do unironically enjoy it :)
18:05 mdxi (he says as an old, long-form Coke ad by Petula Clark plays in iTunes)
18:06 SirKay I wonder if people would be all gung ho about viking metal if they knew what vikings were really like.
18:07 mdxi i'm a really bad metalhead in general. i mean, i'm currently wearing a bright orange Tiger Cub scout troop leader tshirt. and i'm old. and i have short hair.
18:07 mdxi but i grew up with it, adn there's still awesome stuff out there :)
18:08 moritz_ re
18:08 phenny moritz_: 03:08Z <colomon> tell moritz_ Remember how you were saying that .match was broken in split?  It's not the match method that doesn't work, it's the call to it that's broken.  I just implemented split on Str and the same problem comes up with .index.  And I just tested both match and index by hand and they do work.
18:08 phenny moritz_: 03:12Z <colomon> tell moritz_ Switching $.index to self.index makes it work.
18:08 phenny moritz_: 12:30Z <colomon> tell moritz_ Why are we testing 123.split(2) ?  That's totally not in the spec...
18:09 masak lolitsmoritz!
18:09 colomon moritz_: split more or less actually works by now.  :)
18:09 * jnthn sorta has the hair for it, but that's probably about it. :-)
18:10 moritz_ colomon: what part works "less"? :-)
18:10 pmichaud boy, I'm going to have a lot of commits to review :-|
18:10 colomon ng: for "this is a test".split("this") { .say }
18:10 p6eval ng 792106: this is a test␤
18:10 SirKay oh hey pm.
18:11 colomon on the other hand:
18:11 colomon ng: for "this is a test".split("is") { .say }
18:11 p6eval ng 792106: th␤ ␤ a test␤
18:11 jnthn pmichaud: Heh. At least I didn't do so many last two days. ;-)
18:11 colomon ng: for "this is a test".split(/is/)  { .say }
18:11 p6eval ng 792106: th␤ ␤ a test␤
18:11 jnthn colomon++ and tene++ and moritz++ have been busily patching though. :)
18:11 pmichaud well, I think my goal for today is to nail down what I want for the laziness/iterator interface
18:12 colomon \o/
18:12 SirKay I got the Dragon Book the other day.
18:12 jnthn pmichaud: That would be a good goal.
18:12 jnthn pmichaud: I get the impression we're hurting for that.
18:12 TimToady looks like something is considering index of 0 to be false
18:12 pmichaud jnthn: same here
18:12 colomon TimToady: there's no way I can find to tell the difference in ng yet.
18:12 jnthn pmichaud: I think I'm most of the way through piecing back the object model fundementals.
18:12 pmichaud colomon: ...???
18:13 pmichaud jnthn: +1
18:13 pmichaud I suspect that's the other piece we'll be needing very soon
18:13 jnthn pmichaud: There's much more I want to do.
18:13 jnthn pmichaud: But post-ng.
18:14 * jnthn just about resisting temptation to do Something Epic for now.
18:14 SirKay you should always go forth and do epic shit
18:15 cognominal joined #perl6
18:15 jnthn SirKay: Yeah, but I don't want to be single-handedly responsible for delaying an already long branch for antoher week plus to do it.
18:15 pmichaud afk, lunch
18:15 jnthn SirKay: And a week's an optimistic estimate.
18:15 jnthn :-)
18:16 SirKay frankly I wish I was in a place that I could do something even adequate, much less epic :p
18:16 colomon pmichaud: I'm not saying there's no way to do it in ng.  Just that I spent a half-hour and couldn't find it.
18:16 SirKay the problem of course is that I'm too lazy.
18:17 colomon pmichaud: Tene++ changed index to return Undef on failure, as a "best possible current workaround".
18:17 colomon But I coudn't find stable code to detect Undef.
18:17 colomon ng: say "this is a test".index("z") ~~ Int
18:17 p6eval ng 69293d: No applicable candidates found to dispatch to for '&infix:<~~>'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
18:18 colomon ng: say "this is a test".index("z").WHAT
18:18 p6eval ng 69293d: Method 'WHAT' not found for invocant of class 'Undef'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
18:18 colomon etc.
18:18 jnthn huh.
18:19 colomon Technically it should be returning Mu, right?  But that's NYI.
18:19 jnthn our multi infix:<~~>($topic, Regex $matcher) {
18:19 jnthn oh, well, that's wrong for one.
18:19 jnthn Well
18:19 jnthn our multi infix:<~~>($topic, $matcher) {
18:19 jnthn more so
18:19 jnthn Wants to be Object $topic
18:19 jnthn Well
18:19 jnthn Mu $topic
18:19 jnthn :-)
18:20 jnthn oh wait
18:20 jnthn not it doesn't
18:20 jnthn Or it won't auto-thread.
18:20 jnthn :-|
18:21 jnthn colomon: Something looks...odd...there anyway.
18:21 * jnthn wonders if he can get away with the s/Object/Mu/ in ng without too much pain.
18:22 mberends jnthn: JFDI. WFM. ;)
18:23 * masak is still kinda boo-hoo t'wards Mu
18:24 jnthn masak: It's actually quite mnemonic for us, since it rhymes with Eww.
18:24 colomon jnthn: :)
18:24 masak jnthn: I thought it rhymed with 'Do'.
18:25 colomon I thought it rhymed with "Moo".
18:25 jnthn masak: Huh? You pronounce "eww" wrong?
18:25 moritz_ coding is hard, let's go rhyming :-)
18:25 jnthn ;-)
18:25 moritz_ colomon: re 123.split(2), it's not (yet) explicitly in the spec, but should work[tm]
18:26 colomon moritz_: dear heavens, why?
18:26 colomon I mean, I get 123.split("2")...
18:27 moritz_ is there any reason why you'd want the user to force to coerce the 2 to Str first?
18:28 colomon is there any reason why you'd want to split on an Int variable?
18:28 masak yes.
18:28 masak many reasons.
18:28 colomon Would it be just Ints, or should Any.split(Any) work?
18:28 masak the latter.
18:29 colomon I dunno, easy enough to add, but it seems like it encourages bad programming to me...
18:30 masak There once was a Perl 6 class 'Mu'
18:30 masak Whose presence TimToady brought through
18:30 masak As 'Object' once spec'd
18:30 masak The spec's done gone wreck'd
18:30 masak Which made me and jnthn go 'Eww!'
18:30 masak
18:31 mberends aaahh
18:31 masak colomon: I disagree. it's quite Perlish to do operations on the 'primitive' types without coercion first.
18:32 moritz_ aye
18:32 moritz_ that's a big difference to javascript, for example
18:32 colomon masak: but this would let you do operations on any type with .Str.
18:32 colomon It makes your code dependent on implementation-specific features....
18:32 masak colomon: yes, and I would begrudge having to cast explicitly like that.
18:33 moritz_ where a + b could mean either addition or concatenation, depending on the type of a
18:33 masak colomon: implementation-specific? how so?
18:33 colomon There's no formal spec for how, say, a Num converts to a Str.
18:33 jnthn masak: <bow>
18:33 masak :)
18:33 colomon It's safe for Ints (I presume) but not much else.
18:34 jnthn (done gone wreck'd)++
18:34 Wolfman2000 masak: Are you saying Mu is gone now?
18:34 masak colomon: I don't buy that argument. if you split on a non-string, you probably know what you're doing.
18:34 masak Wolfman2000: no. again, wishful thinking.
18:34 Wolfman2000 good. I like 無
18:34 pmurias would it be possible to lexically throw out .split like methods from Any
18:34 pmurias ?
18:35 masak pmurias: 'lexically throw out'?
18:35 pmurias remove them from Any in a lexical scope
18:36 masak good question.
18:37 masak perhaps your best shot is to override them in a lexical scope using 'augment class Any'.
18:37 colomon ng: for 1.4e-2.split('.') { .say }
18:37 p6eval ng 69293d: 0␤014␤
18:38 justatheory joined #perl6
18:38 colomon ng: for 1.4e-2.split(.4e-2) { .say }
18:38 p6eval ng 69293d: No applicable candidates found to dispatch to for 'split'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
18:42 colomon All right, masak & moritz_, I'll change it to any, but y'all have to write the tests...
18:42 masak colomon: :) just so you know, this has been up for discussion before.
18:43 masak ISTR pmichaud recommended making the signatures quite broad. I could even dig up the email if you want.
18:43 colomon Can't make him write the tests, he's too busy.
18:44 jnthn It's the same argument for the most part as why $a + $b should always do a numeric addition.
18:44 jnthn Even if $a and $b are strings.
18:45 colomon The difference there is that only num-y things are going to have a .Num method.
18:45 colomon Odds are pretty much every class with have a .Str....
18:45 jnthn Aww.
18:45 jnthn My s/Object/Mu/ patch fails some tets.
18:48 colomon Arrrg.  Method 'Str' not found for invocant of class 'Perl6Str'
18:48 colomon ng: say "fdfsfd" ~~ Str
18:48 p6eval ng 1bbf3e: 1␤
18:48 colomon ng: say 33123 ~~ Str
18:48 p6eval ng 1bbf3e: 0␤
18:49 jnthn augment Str { method Str { self } } # no?
18:51 colomon hey, who changed ng?
18:52 jnthn colomon: Like, today?
18:52 jnthn Thee and I, it seems...
18:52 colomon It's your fault.
18:52 jnthn Usually is. :-P
18:52 colomon Just take me an extra five minutes to send the patch.
18:52 jnthn What have I done this time?
18:53 jnthn OK but...epic patch coming soonish too
18:53 colomon Give me five minutes?
18:53 jnthn sure
18:53 colomon You just checked things in so I couldn't push.  No prob.
18:53 jnthn ah, ok
18:53 jnthn gah
18:53 jnthn I get some test fails still, so can't push yet anyways.
18:53 colomon jnthn: Is that the Mu patch?
18:54 jnthn colomon: yeah
18:55 colomon omgipatchedng
18:55 colomon ng now has Any.split(Any).  Hackers of the future, please forgive me.
18:56 Wolfman2000 colomon: ...why are you asking for forgiveness?
18:57 * Wolfman2000 is too wrapped up on his pastebin project to fully follow the ngness
18:57 jnthn OH NO
18:57 * jnthn thinks he knows what is wrong... :-/
18:59 jferrero joined #perl6
19:00 colomon Wolfman2000: because I'm inclined to think accepting Any for split's argument is more likely to let sloppy bugs sneak through than it is to enable cool hacks.  But everyone else seems to think that's wrong, so I've implemented it their way.
19:01 * moritz_ thinks it should be s/Any/Base/, but that's not spec (yet?)
19:01 colomon moritz_: I just got rid of the type altogether, so no worries there.
19:01 jnthn .oO( Meme Driven Development )
19:01 jnthn OK, I have a compelte patch to swith us to Mu.
19:01 jnthn *complete
19:01 * masak does not feel very solid approval towards the name 'Base', but likes the idea
19:02 jnthn Bad news is that it requires a Parrot version bump.
19:02 Tene pmichaud: keep me up to date on iterators/lazy interface.
19:02 moritz_ masak: think as "Base" being a metasyntactic variable (like Foo) holding a better name of that role :-)
19:02 masak moritz_: :)
19:02 Tene jnthn: you're also changing the parrot pmc's name?
19:02 colomon jnthn: Parrot bumps that work aren't a big issue, IMO.  :)
19:02 jnthn Tene: nah
19:03 jnthn Tene: Just adding something to P6Object.pir.
19:03 Tene orly?
19:03 jnthn Tene: 1 line addition, should be backward compat.
19:03 Tene kk
19:03 jnthn Unless some poor soul using P6Object had a class called Mu, anyway. :)
19:04 Wolfman2000 jnthn: I somehow doubt it
19:04 jnthn Well, if they did, tough.
19:05 Tene Well, pmc always intended P6Object to be subclassable...
19:05 Tene s/pmc/pm/
19:05 Tene ><
19:05 jnthn lol
19:05 jnthn Tene: It is and we do. ;-)
19:06 jnthn Will test that nothing we pull in with latest Parrot breaks things, and then push the Mu change.
19:06 jnthn In other exciting news, it's time to cook dinner.
19:07 * colomon was just looking for recipes for chicken thighs and pesto
19:07 * colomon might go with Panko-Pesto Chicken Thighs
19:07 masak shouldn't that be P6Mu nowadays? :/
19:07 jnthn masak: It's all gots.
19:07 rgrau_ joined #perl6
19:08 jnthn masak: And *that* would require a deprecation cycle and I ain't playing with that policy.
19:08 masak :)
19:08 * jnthn even noted dep policy in his commit message :-)
19:09 jnthn Aww. Only 2 days left in Slovakia this year.
19:10 jnthn lol. Heavy rain in England.
19:10 * jnthn notes that he'll be mostly afk Wednesday due to $journey
19:11 jnthn ooh...actually...I'm on the Train With Wifi.
19:11 jnthn \o/
19:11 jnthn oh f**k
19:11 colomon and power outlets?  That's like a dream come true for me....
19:11 jnthn The Parrot bump has broken the Rakudo build.
19:12 jnthn colomon: yes, those too :-)
19:12 jnthn colomon: The only slgiht issue is that the train tends to be running late. :-/
19:13 moritz_ Method 'peek_ast' not found for invocant of class 'Regex;Match'
19:14 jnthn moritz_: That's exactly what I get.
19:14 jnthn summon pmichaud!
19:14 jnthn :-)
19:15 * jnthn glances terrified at EXPR
19:15 Tene yay death!
19:15 Tene Can I play too?  /me updates.
19:15 Tene wait, which rakudo?  ng?
19:15 jnthn Oh great, now we've got arson too. ;-)
19:15 jnthn Tene: yes, ng.
19:16 jnthn oh, looks like an easy fix.
19:17 jnthn s/peek_ast/ast/ is what was done in EXPR for NQP.
19:17 jnthn Yes, that helps.
19:19 jferrero joined #perl6
19:30 jnthn Eww, we has Mu.
19:30 Tene jnthn: don't like Mu?
19:31 ng_feed joined #perl6
19:31 masak Tene: NO WE DON'T LIKE MU.
19:31 Tene Aw, I was kinda hoping for an answer of "Mu"
19:31 masak Tene: no, the answer is a clear 'no'.
19:32 diakopter masak: heyguesswhat
19:32 diakopter masak: want to talk regex funness?
19:32 masak diakopter: sure!
19:33 diakopter I've been tinkering with ways to do LTM with Perl 6 grammars
19:33 Wolfman2000 I like Mu
19:33 diakopter and I had this idea
19:33 * masak listens attentively
19:35 colomon joined #perl6
19:36 moritz_ ng: say Nil.defined
19:36 p6eval ng 719b51: 1␤
19:36 diakopter if a "want this token" expression can be expressed as a regular expression, then I can compile a new JS RegExp, and iteratively test a reversed version of it (the pattern) against a reversed/flipped string (of the input string), while changing the .lastIndex property of the JS RegExp
19:37 diakopter so that only 1 JS RegExp can be used to get its longest match
19:38 explorer__ joined #perl6
19:39 moritz_ and fail epically when matching against lazy streams :-)
19:39 masak rakudo: class A { method postcircumfix:<{ }>($k) { 1 } } class B { method m() { my &r = { my $a; } while False { if False { my $a; } } } }
19:39 p6eval rakudo 7347ec: Confused at line 2, near "class B { "␤in Main (file <unknown>, line <unknown>)␤
19:39 masak oh, right.
19:40 masak rakudo: class A { method postcircumfix:<{ }>($k) { 1 } }; class B { method m() { my &r = { my $a; } while False { if False { my $a; } } } }
19:40 p6eval rakudo 7347ec: Redeclaration of variable $a␤Confused at line 2, near "{ if False"␤in Main (file <unknown>, line <unknown>)␤
19:40 * masak submits rakudobug
19:40 moritz_ diakopter: so you want to start at the end of string, try if it matches, and if try from somewhere else?
19:40 jnthn masak: wow, nicely golfed
19:40 diakopter moritz_: well, no... just take a few chars, and if matches them all, take a few more and try again
19:40 moritz_ and do a binary search between the end of string and the current position, or something?
19:40 moritz_ hm
19:40 masak jnthn: it's a really wonky bug.
19:41 explorer joined #perl6
19:41 diakopter I thought about a binary search, yeah
19:41 masak rakudo: class A { method postcircumfix:<{ }>($k) { 1 } }; class B { method m() { my &r = { my $a; }; while 0 { if 0 { my $a; } } } }
19:41 diakopter but maybe just start at "10 more chars" or something, and exponentially grow... at e/2 or something
19:41 p6eval rakudo 7347ec: Redeclaration of variable $a␤
19:42 moritz_ diakopter: do you want to do this for each branch of an alternation, or for the whole regex?
19:42 diakopter a whole pattern if the entire pattern is regular
19:42 diakopter (just to get the fated ltm length)
19:42 moritz_ and then how do you determine which branch matched? try again?
19:43 masak rakudo: class A { method postcircumfix:<{ }>($k) { 1 } }; class B { method m() { my &r = { my $a; }; if 0 { if 0 { my $a; } } } }
19:43 diakopter descend recursively, yeah
19:43 p6eval rakudo 7347ec: Redeclaration of variable $a␤
19:43 diakopter well, actually that's not strictly necessary
19:43 diakopter if each sub-match is in a defined group
19:44 diakopter then I just find the slot in the results array that's non-empty
19:44 masak rakudo: class A { method postcircumfix:<{ }>($k) { 1 } }; my &r = { my $a; }; if 0 { if 0 { my $a; } }
19:44 diakopter and the number of that slot will tell me which group provided the match
19:44 p6eval rakudo 7347ec: Redeclaration of variable $a␤
19:44 diakopter (b/c that's how JS RegExp groupings/results work)
19:44 moritz_ waitwaitwait... p6eval works with class definitions again without timeout? what happened?
19:45 * diakopter didn't touch it (p6eval)
19:45 masak rakudo: class A { method postcircumfix:<{ }>() {} }; my &r = { my $a }; if 0 { if 0 { my $a } }
19:45 diakopter oh, it emitted the warning
19:45 p6eval rakudo 7347ec: Redeclaration of variable $a␤
19:45 masak moritz_: I'm not sure it ever had something to do with class definitions.
19:45 diakopter but didn't complete
19:45 moritz_ so the compile time runs
19:46 diakopter moritz_: since I'm constructing the textual representation of the JS RegExp object myself, I can keep track of which sub-pattern produced which grouping
19:47 moritz_ I don't know enough about JS regexes to comment that, but if it's possible that's great
19:47 diakopter I suspect the same strategy could be used in Perl REs
19:47 diakopter what's the limit on the number of groupings in a Perl 5 regex?
19:47 diakopter is there one?
19:48 moritz_ none that I know of
19:49 masak jnthn: that, by the way, is the bug that causes GGE::OPTable not to be able to be compiled.
19:49 diakopter what bug?
19:50 moritz_ ng: eval '++'; say "alive"
19:50 p6eval ng 719b51: alive␤
19:50 moritz_ ng: use Test; plan 2; eval_lives_ok 'die "foo"'; eval_lives_ok '++', 'bla';
19:50 p6eval ng 719b51: 1..2␤not ok 1 - ␤not ok 2 - bla␤# Looks like you failed 2 tests of 2␤
19:51 moritz_ ng: use Test; plan 2; eval_lives_ok '"foo"'; eval_lives_ok '1', 'bla';
19:51 p6eval ng 719b51: 1..2␤ok 1 - ␤ok 2 - bla␤
19:53 * diakopter reads, flabbergasted, about perl5.10 (??{ code }) and (?&NAME)
19:53 colomon_ joined #perl6
19:54 ng_feed joined #perl6
19:54 ng_feed rakudo-ng: moritz++
19:54 ng_feed rakudo-ng: [t/spectest.data] 5 more test files won back, one passes that master never passed
19:54 pmurias diakopter: did you manage to get V8 working on a windows box?
19:55 * moritz_ wonders why ng_feed didn't report anything before
19:55 diakopter pmurias: yep; with msvc... I haven't tried it with g++ under cygwin or msys
19:56 diakopter moritz_: I noticed it doesn't recover from netsplit sometimes
19:57 diakopter pmurias: msys(mingw32), I mean
19:58 pmurias diakopter: what changes did you do?
19:58 diakopter for msvc?
19:58 pmurias yes
19:59 diakopter for msvc 2008 and later, you have to send in some PATH info to scons (it essentially ignores the current environment values)
19:59 diakopter you'll also need some tiny subset of the Windows SDK installed
19:59 diakopter which is like 2GB or something
19:59 pmurias diakopter: i meant V8.pm not V8
20:00 diakopter right, but you have to build V8.pm with the same compiler used to build V8 (and perl, for that matter)
20:00 moritz_ diakopter: don't think too high of (??{ ... }) patterns ... fglock tried to compile Perl 6 regexes to Perl 5 regexes that way, and got lots of segfaults
20:01 diakopter heh
20:01 moritz_ they are marked experimental, and they are experimental. Really.
20:01 diakopter ok.
20:01 diakopter as in, "if it works for you, great!" :)
20:01 moritz_ right
20:03 diakopter actually, I just realized, I'll need only one JS RegExp object for each regular production
20:04 diakopter since I can just truncate the string input up to the starting position
20:04 diakopter (as well as reversing)
20:05 diakopter intriguing...
20:06 diakopter (: .ɹǝuuɐɯ sıɥʇ uı pǝddı1ɟ uɐǝɯ ʇ,uop ı puɐ
20:06 diakopter oh, hm
20:07 Wolfman2000 ...times like this I wonder WHY there are certain characters in Unicode
20:07 diakopter oh, ilbot2 got it right
20:07 diakopter I got a few boxes on my screen
20:08 diakopter http://irclog.perlgeek.de/​perl6/2009-11-29#i_1782048
20:08 Tene jnthn: did you fix the issue with the parrot update?
20:15 jnthn Tene: yes
20:16 moritz_ diakopter: looks fine here... missing fonts?
20:17 diakopter it's the same font that's displayed on the webpage
20:18 diakopter it's a putty+screen+irssi+pebcak issue
20:19 quantumEd joined #perl6
20:21 masak rakudo: class A { method postcircumfix:<{ }>() {} }; my &r = {;}; if 0 { if 0 { my $a } }
20:22 p6eval rakudo 7347ec: Redeclaration of variable $a␤
20:22 masak this is worse than I first thought.
20:22 masak now there are not even two declarations of the variable.
20:22 * masak amends the RT ticket
20:30 masak does anyone have any idea about how to work around the above false-positive warning?
20:32 moritz_ don't use postcircumfix:<{ }>
20:33 masak right.
20:33 masak that is quite a sacrifice at this point.
20:33 masak but I will see what I can do. :)
20:37 moritz_ well, you asked for a workaround :-)
20:39 masak I did indeed. :)
20:40 masak I'm not going to do a reprise of http://use.perl.org/~masak/journal/38430 :)
20:44 moritz_ :-)
20:45 pmichaud back
20:45 Wolfman2000 ...piece of advice if you guys ever feel like rewriting Perl 5 modules into Perl 6.
20:46 Wolfman2000 Make sure Devel::Cover works faster than it presently does, especially when working with other modules like DBIC and Catalyst
20:46 quantumEd joined #perl6
20:47 mberends brian d foy talked about Devel::Cover and Perl::Critic at YAPC::2009, calling them "tarpits" ;)
20:47 Wolfman2000 mberends: meaning slower than molasses?
20:47 mberends you get hopelessly sucked in. (speaking from experience)
20:48 masak Wolfman2000: saying that such a module as Devel::Cover should be faster is one thing... having the algorithmic insight to produce such a speedup is another. :)
20:48 mberends Wolfman2000: you usee them during testing, not runtime. You become their coding slave.
20:49 Wolfman2000 mberends: ...in this case, isn't that a good thing?
20:50 mberends Wolfman2000: yes and no. Good code is nice, but aspiring to perfection is a time sink.
20:50 * Wolfman2000 doubts his own computer can do things that much faster than Feather can.
20:50 Wolfman2000 mberends: As far as why I'm doing this...I want to avoid some of the mistakes I made in the past when dealing with ORMs and websites. I want to be absolutely sure I don't run into any bugs.
20:52 mberends Wolfman2000: that's good. just know when to stop worrying about all the nits they pick. 100% coverage is also very rare.
20:52 Wolfman2000 mberends: Thanks for that reminder. Considering the behavior of Syntax::Highlight::Perl6, I'm not expecting 100% on everything.
20:52 mberends :)
20:52 diakopter sweet
20:53 Wolfman2000 ...I forgot. Does Perl 6 include a round up/ceiling function?
20:53 diakopter I proved the concept in JS... it finds the ltm even when there are non-greedy quantifiers in the target pattern...
20:53 Wolfman2000 rakudo: say "3.4".ceiling
20:53 p6eval rakudo 7347ec: 4␤
20:53 Wolfman2000 rakudo: say rand * 6
20:53 p6eval rakudo 7347ec: 8.48909442421677e-316␤
20:54 Wolfman2000 rakudo: say rand 6
20:54 p6eval rakudo 7347ec: Confused at line 2, near "6"␤in Main (file <unknown>, line <unknown>)␤
20:54 Wolfman2000 rakudo: say rand(6)
20:54 Wolfman2000 ...
20:54 Wolfman2000 great: I broke rakudo
20:54 p6eval rakudo 7347ec: too many arguments passed - 0 params expected␤in sub
20:54 mberends Wolfman2000: you're using random for syntax highlighting ? ;-) ;-)
20:54 masak Wolfman2000: is it integers you want?
20:54 Wolfman2000 masak: a random number between 1 - 6
20:55 masak rakudo: say (1..6).pick
20:55 Wolfman2000 mberends: testing different parts
20:55 p6eval rakudo 7347ec: 1␤
20:55 Wolfman2000 ...right, I forgot about that
20:55 masak Wolfman2000: rand() is one of the parts where Perl 6 limits in order to enhance thought. :)
20:55 masak thus, it's no longer a function with one optional parameter.
20:56 diakopter and actually, it needs only one test, duh
21:04 * diakopter read S05.html#Longest-token_matching  in an altogether new light :D
21:04 diakopter *reads
21:07 diakopter aha! this can work!
21:07 masak diakopter: only now did I catch your comments about your current LTM investigations. it sounds exciting! and quite fun, too.
21:07 diakopter it can meet the spec's requirements
21:07 diakopter yay
21:08 diakopter actually, I could apply this to STD.pm
21:08 diakopter afk&
21:11 mathw Hey
21:12 masak lolitsmathw
21:13 mathw not much lol
21:13 mathw I did no perl 6 this weekend I'm afraid
21:14 masak we like you anyway. :)
21:14 mathw I find my mind consumed by the prospect of my interview on thursday... so I've been knitting
21:14 masak ooh, knitting!
21:14 Wolfman2000 ...and I just discovered through testing that my code was wrong. Joy.
21:15 mathw Wolfman2000: how lovely. Was it before or after giving it to a customer? Because last time that happened to me at work, it was after.
21:15 Wolfman2000 mathw: depends on if those that can access my github are customers.
21:15 mathw hmm
21:15 mathw well they're not paying
21:15 * mathw is still a little bitter about that particular QA team failure
21:16 mathw Okay so tests are sometimes wrong or incomplete
21:16 mathw And devs make mistakes
21:16 Wolfman2000 in this case, the test was right.
21:16 mathw but the QA team didn't even bother to run the tests for the very issue the release was meant to fix... and theirs covered a case mine didn't
21:18 * moritz_ eats self-made Vanillekipferl
21:18 moritz_ well, made by my girlfriend - close enough
21:18 moritz_ mathw: that's frustrating
21:19 mathw moritz_: yes
21:19 Tene moritz_: sounds delicious. :)
21:20 moritz_ Tene: they are, yes :-)
21:23 mberends moritz_: that looked like Vanilla Perl at first glance ;)
21:23 PacoLinux joined #perl6
21:37 colomon ng: say Mu
21:37 p6eval ng 461974: Mu()␤
21:37 colomon ng: say Nu.notdef
21:37 p6eval ng 461974: Could not find non-existent sub &Nu␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
21:38 colomon ng: say Mu.notdef;
21:38 p6eval ng 461974: Method 'notdef' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
21:38 colomon ng: my $a = Mu; say $a ~~ Mu;
21:38 p6eval ng 461974: 1␤
21:38 colomon say $a ~~ Int
21:38 jnthn colomon: I didn't add notdef. Feel free.
21:38 colomon ng: my $a = Mu; say $a ~~ Int;
21:38 p6eval ng 461974: 0␤
21:39 colomon jnthn: Am I attempting to use Mu correctly?
21:39 jnthn Looks like it so far...
21:39 hercynium joined #perl6
21:39 jnthn The results so far are what I expected anyway.
21:40 colomon But is the notion right?  Where we would have formerly return undef, now we return Mu?
21:40 jnthn I'm still a bit hazy on when Mu and when Nil...
21:41 colomon (and I'm assuming augment class Mu { multi method notdef() { return true; } } is too simple...)
21:41 mathw I don't think you always return Mu instead of undef
21:41 mathw you may find it more appropriate to return the type object for the type you'd be returning if it was defined
21:41 jnthn colomon: It's just !self.defined, no? :-)
21:41 colomon jnthn: is defined defined?  ;)
21:42 jnthn rakudo: say Mu.defined
21:42 p6eval rakudo 7347ec: Could not find non-existent sub Mu␤in Main (file src/gen_setting.pm, line 324)␤
21:42 jnthn ng: say Mu.defined
21:42 p6eval ng 461974: 0␤
21:42 jnthn gah
21:42 jnthn :-)
21:42 jnthn Yes, it's defined.
21:42 jnthn ng: say Mu.new.defined
21:42 p6eval ng 461974: 1␤
21:42 jnthn \o/
21:42 colomon ng: say 10.defined
21:42 p6eval ng 461974: 1␤
21:42 Wolfman2000 ...Mu is nothingness! How can it be defined?
21:42 moritz_ colomon: !$.defined is the .notdef definition in Object.pm in master
21:42 jnthn Wolfman2000: When you make something from nothing.
21:43 jnthn ;-)
21:43 Wolfman2000 jnthn++: I can't defeat that logic.
21:43 colomon Ummm.... does Mu.true work?
21:43 Wolfman2000 ng: say Mu.true
21:43 p6eval ng 461974: 0␤
21:43 snarkyboojum joined #perl6
21:44 Wolfman2000 ng: say Mu.new.true
21:44 p6eval ng 461974: 1␤
21:44 colomon ng: say 10.true
21:44 p6eval ng 461974: 1␤
21:44 masak rakudo: say Mu.defined
21:44 p6eval rakudo 7347ec: Could not find non-existent sub Mu␤in Main (file src/gen_setting.pm, line 324)␤
21:44 colomon The reason I ask is it is coded $.defined, and I had huge problems with $. as a sub call in the split functions this morning.
21:45 colomon s/sub/method/
21:45 moritz_ that's an old version of rakudo
21:45 jnthn use self.
21:45 masak ng: say Mu.defined
21:45 p6eval ng 461974: sh: ./perl6: No such file or directory␤
21:46 colomon jnthn: That's what I did to make it work.  But I see Mu.true is method true { $.defined }
21:46 moritz_ oh, it was an svn lock in rakudo's parrot true
21:46 jnthn Hmm. That one seems to work.
21:50 ng_feed rakudo-ng: colomon++
21:50 ng_feed rakudo-ng: Mu.notdef defined.
21:53 colomon \o/
21:54 Wolfman2000 hey, the ng_feed is back up
21:55 moritz_ public service announcement: tha "rakudo:" evalbot target will be not working for a few minutes or hours
21:55 Wolfman2000 :(
21:55 Wolfman2000 ...wait, I have a better face
21:55 Wolfman2000
21:56 masak moritz_++ # thanks for your good work on evalbot
21:56 colomon indeed, bravo!
22:03 ng_feed rakudo-ng: colomon++
22:03 ng_feed rakudo-ng: Any.index now returns Mu if it doesn't find the string.  Any.split(Any) checks for that, so that if the spliter string is at the first position of the string being split, things still work.
22:17 moritz_ rakudo: say 1
22:17 p6eval rakudo 7ce13d: 1␤
22:17 masak \o/
22:17 colomon ng: say 1
22:17 p6eval ng 2df628: 1␤
22:17 colomon ship it!
22:17 Wolfman2000 that...wasn't too long. moritz_++: what was the issue?
22:18 moritz_ Wolfman2000: two things... parrot's svn had a lock which I had to remove manually
22:18 moritz_ Wolfman2000: second: parrot's build failed
22:18 moritz_ and a realclean didn't help
22:18 moritz_ so nuked the parrot's svn completely
22:18 Wolfman2000 ...that's one way of cleaning up a bird
22:18 colomon ng: for "is this a test?".split("is") { .say }
22:18 p6eval ng 2df628: ␤ th␤ a test?␤
22:19 moritz_ colomon++
22:19 jnthn \o/
22:19 moritz_ ng: say 'is this a test'.split(/is/).join('|')
22:19 p6eval ng 2df628: | th| a test␤
22:19 moritz_ ng: say 'is this a test'.split(/is/, :match).join('|')
22:19 p6eval ng 2df628: Unexpected named parameter 'match' passed␤current instr.: 'perl6;Any;split' pc 206548 (src/gen/core.pir:12318)␤
22:19 colomon :match?
22:19 moritz_ ng: say 'is this a test'.split(/is/, :all).join('|')
22:19 p6eval ng 2df628: |is| th|is| a test␤
22:19 moritz_ colomon: misremembered the name
22:20 colomon ah.
22:20 cognominal_ joined #perl6
22:20 moritz_ ng: say 'is this a test'.split(/is/, 1, :all).join('|')
22:20 p6eval ng 2df628: is this a test␤
22:20 colomon moritz_++ # great (if slightly buggy :) initial implementation.
22:20 moritz_ ng: say 'is this a test'.split(/is/, 2, :all).join('|')
22:20 p6eval ng 2df628: |is| this a test␤
22:20 moritz_ colomon: what's the bug?
22:21 colomon moritz_: I fixed all the bugs I found.
22:21 colomon Your version didn't handle the limit argument.
22:22 colomon Also used $m.to when you wanted $m.from once.  And a couple of other tiny things like that.
22:22 colomon Stuff you'd have fixed in under five minutes if you'd been able to test it.
22:22 * moritz_ reads git log -p
22:23 moritz_ colomon++ # fixing my bugs
22:29 |Jedai| joined #perl6
22:29 IllvilJa joined #perl6
22:42 moritz_ off-topic question... I read (parts of) the silmarillion over the weekend
22:42 moritz_ and I was a bit puzzled
22:42 moritz_ because... Glorfindel died, after Gondolin fell
22:42 SirKay that's what Tolkein's books do.
22:43 moritz_ yet he rides out from Rivendell to help Frodo and the others
22:43 moritz_ in LOTR 1
22:43 Tene GHOST
22:43 moritz_ vampire-elve? :-)
22:46 masak moritz_: different Glorfindel?
22:46 moritz_ name reuse didn't seem to be Tolkien's style in other places
22:46 moritz_ oh, wikipedia knows.
22:47 moritz_ http://tolkiengateway.net/w​iki/Glorfindel_of_Rivendell "He was distinctive because of his return to Middle-earth after death, acting as an emissary of the Valar, on a similar mission to the Istari who were to come several thousand years later."
22:47 Tene See?  Ghost!
22:48 colomon Er, would you consider Gandalf a ghost?
22:49 moritz_ Tene++ # intimate Tolkien knowledge :-)
22:54 ng_feed rakudo-ng: colomon++
22:54 ng_feed rakudo-ng: Pull Any.reverse from master.
22:55 Tene pmichaud: any progress on thinking about iterators and lazy?
22:59 lisppaste3 colomon pasted "S32-str/flip.t bus error in the debugger" at http://paste.lisp.org/display/91250
23:00 zaslon lolmasakhazblogged! masak++ 'November 29 2009 -- drowning in workarounds': http://use.perl.org/~masak/journal/39961?from=rss
23:01 colomon Extra frustrating because, as far as I can tell, we should pass all the unfudged tests....
23:04 moritz_ all tests except 9 pass
23:04 moritz_ here
23:04 moritz_ colomon: do you have icu installed?
23:05 * moritz_ is particularly surprised that the 10th test pass
23:06 colomon no
23:07 colomon afk dinner
23:35 nbrown joined #perl6
23:37 diakopter ng: say Mu.WHAT.new
23:37 p6eval ng 7d3cac: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 237018 (src/gen/core.pir:23636)␤
23:49 masak WHAT! new? :)
23:49 diakopter ng: our sub fail { say $^a }; say Mu.WHAT.new
23:49 p6eval ng 7d3cac: Method 'Str' not found for invocant of class 'Mu'␤
23:50 masak "the ng branch is so primitive that you have to bring your own 'fail' routine to it just to be able to fail..." :P
23:50 Tene Um, I can fix that.
23:50 Tene Well, kinda.
23:50 masak \o/
23:50 Tene Fail is supposed to do more than just die, isn't it?
23:50 snarkyboojum_ joined #perl6
23:51 Tene Return an object that dies if it's used, or somehting?
23:51 Tene Are there tests?
23:51 masak I would think so.
23:51 masak yes, fail returns an unthrown exception.
23:54 Tene Which file has fail() tests?
23:54 Tene I'm just stepping out right now to go set up class for tomorrow, but I can work on fail() tonight.
23:55 masak I'll try to locate such a file.
23:55 masak I can't guarantee success. :P
23:55 Tene masak: You mean you might fail? ;)
23:55 Tene masak: you could always write one. *hopeful*
23:55 diakopter ng: say Mu.defined; say Mu.new.defined
23:55 p6eval ng 7d3cac: 0␤1␤
23:56 masak Tene: what about t/spec/S04-exceptions/fail.t ?
23:57 Tene masak: That looks great.

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

Perl 6 | Reference Documentation | Rakudo