Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-03-01

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:27 zwut00 joined #perl6
00:28 zwut00 left #perl6
00:41 clsn joined #perl6
00:45 go|dfish joined #perl6
00:52 ty joined #perl6
01:03 fridim__ joined #perl6
01:25 stevan_ joined #perl6
02:02 jnap joined #perl6
02:03 xenoterracide joined #perl6
02:09 hoverboard joined #perl6
02:21 bowtie joined #perl6
02:30 stevan_ joined #perl6
02:32 FROGGS_ joined #perl6
02:45 jnap joined #perl6
02:46 klapperl_ joined #perl6
03:34 jnap joined #perl6
03:37 rhe joined #perl6
04:12 xenoterracide joined #perl6
04:17 xinming joined #perl6
04:47 xinming_ joined #perl6
05:08 wooden joined #perl6
05:08 wooden joined #perl6
05:45 xinming joined #perl6
05:47 wooden left #perl6
05:51 lue r: sub foo($a) { say $a.perl }; foo; foo(one(1,2,3)); # I would expect this to fail, because Junction !~~ Any . Is this just a WAT on my part?
05:51 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Calling 'foo' requires argumentsâ�¤    Expected: :(Any $a)â�¤at /tmp/tmpfile:1â�¤------> [32msub foo($a) { say $a.perl }; [33mâ��[31mfoo; foo(on…»
05:53 lue r: sub foo($a?) { say $a.perl }; foo; foo(one(1,2,3)); # I would expect this to fail, because Junction !~~ Any . Is this just a WAT on my part?
05:53 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«Any␤1␤2␤3␤»
05:59 lue Unlike normal declaration (my $a = Junction vs. my Any $a = Junction), this will work with  sub foo(Any $a?)
06:00 lue Does seem to be a WAT on my part in any case.
06:03 TimToady r: sub foo($a?) { say $a }; foo; say foo(one(1,2,3)).perl;
06:03 yoleaux 28 Feb 2014 23:18Z <lue> TimToady: if I read the last section of S08 correctly (and correctly understand that \foo operates on a Parcel basis), does that mean \foo is considerable as a replacement for ¢foo ?
06:03 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«(Any)␤1␤2␤3␤one(Bool::True, Bool::True, Bool::True)␤»
06:03 TimToady it's just autothreading like it's supposed to
06:04 * lue gets the idea the Junctions both are and aren't suitable to be specified as a type, as opposed to a more generic construct, which is strangely appropriate :P
06:06 lue TimToady: is there a way to say that you want to treat the junction as one object, instead of something to be autothreaded? The only thing I've found is "Junction $a", which sorta ruins the point of the example I was trying to construct.
06:08 TimToady well, you'd have to construct an object with a Junction attribute in order to treat one as an object
06:08 TimToady Junction is outside Any because it's a concept, not an object
06:10 Timbus r: sub foo($a?) { say $a.perl }; foo; foo(\one(1,2,3));
06:10 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«Any␤Capture.new( list => (one(1, 2, 3),).list, hash => EnumMap.new())␤»
06:11 lue OK then. Guess that means my example will have to contend with a boring Mu type to demonstrate that parameters types are Any by default :/
06:35 Guest14435 joined #perl6
06:37 Guest14435 perl6: say [+] 1,2,3,4
06:38 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279, niecza v24-109-g48a8de3: OUTPUT«10␤»
06:39 Guest14435 perl6: say [*] 1,2,3,4
06:39 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279, niecza v24-109-g48a8de3: OUTPUT«24␤»
06:42 Guest14435 niecza: say (1,2,3,4) »+«(6,7,8,9)
06:42 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/y_2Qdm_F26 line 1:�------> [32msay (1,2,3,4) [33m�[31m»+«(6,7,8,9)[0m��Parse failed��»
06:48 vincent22 joined #perl6
06:50 vincent22 perl6: (1,2,3) »+« (4,5,6)
06:50 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279, niecza v24-109-g48a8de3: ( no output )
06:51 vincent22 per6: (1,3,4) «+» (5,6,7)
06:51 TimToady you need a "say"
06:51 vincent22 perl6: say (1,2,3) »+« (4,5,6)
06:51 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279, niecza v24-109-g48a8de3: OUTPUT«5 7 9␤»
06:51 vincent22 per6: say (1,3,4) «+» (5,6,7)
06:52 vincent22 TimToady: thank you!
06:53 vincent22 per6: say (1,3,4) «+» (5,6,7)
06:53 TimToady yu need an 'l'
06:53 TimToady I need an 'o' :)
06:56 vincent22 perl6: say (1,2,3,4) »+« (4,5,6,1)
06:56 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279, niecza v24-109-g48a8de3: OUTPUT«5 7 9 5␤»
06:56 vincent22 perl6: say (1,2,3,4,5,6,7,8,9) »+« (4,5,6,1)
06:56 camelia rakudo-jvm c62279: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 9 elements, right: 4 elements␤  in sub hyper at gen/jvm/CORE.setting:16736␤  in sub hyper at gen/jvm/CORE.setting:16727␤  in block  at gen/jvm/CORE.setting:16716…»
06:56 camelia ..rakudo-parrot c62279: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 9 elements, right: 4 elements␤  in sub hyper at gen/parrot/CORE.setting:16987␤  in sub hyper at gen/parrot/CORE.setting:16975␤  in block  at gen/parrot/CORE.se…»
06:56 camelia ..rakudo-moar c62279: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 9 elements, right: 4 elements␤  in sub hyper at src/gen/m-CORE.setting:16733␤  in sub hyper at src/gen/m-CORE.setting:16724␤  in block  at src/gen/m-CORE.setting…»
06:57 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Ran off end of non-dwimmy right␤  at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3347 (ANON @ 34) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3353 (_hyper_posi…»
07:33 darutoko joined #perl6
07:51 pragma- joined #perl6
07:51 pragma- whoever drew that Camelia thing should be taken out back and shot.
07:51 pragma- that is all.
07:51 pragma- left #perl6
08:03 darutoko- joined #perl6
08:05 darutoko joined #perl6
08:09 berekuk joined #perl6
08:24 bjz joined #perl6
08:35 bjz_ joined #perl6
08:49 dmol joined #perl6
09:02 pippo joined #perl6
09:10 colomon joined #perl6
09:10 rindolf joined #perl6
09:21 molaf joined #perl6
09:24 zaydon joined #perl6
09:25 zaydon left #perl6
09:25 xinming joined #perl6
09:27 timotimo that doesn't sound like fun
09:45 bjz joined #perl6
09:51 masak unless you shoot them with squeaky mice.
09:52 spider-mario joined #perl6
09:54 moritz \o
09:55 pippo j: say 3,3,1...4;
09:55 camelia rakudo-jvm c62279: OUTPUT«Unable to deduce sequence␤  in method sink at gen/jvm/CORE.setting:12252␤  in block  at gen/jvm/CORE.setting:16285␤  in block  at gen/jvm/CORE.setting:7503␤  in block  at gen/jvm/CORE.setting:7505␤  in method reify at gen/jvm/CORE.setting:7531␤ …»
09:55 pippo m: say 3,3,1...4;
09:55 camelia rakudo-moar c62279: OUTPUT«===SORRY!===␤Unable to deduce sequence␤»
09:55 tgt joined #perl6
09:57 pippo m: say (3,3,1...4) <<+>> 1;
09:57 camelia rakudo-moar c62279: OUTPUT«===SORRY!===␤Unable to deduce sequence␤»
09:58 pippo m: say 1;
09:58 camelia rakudo-moar c62279: OUTPUT«1␤»
10:11 Rotwang joined #perl6
10:12 pippo left #perl6
10:13 pippo joined #perl6
10:13 pippo left #perl6
10:13 pippo joined #perl6
10:17 xenoterracide_ joined #perl6
10:19 pippo left #perl6
10:20 pippo joined #perl6
10:21 Alula joined #perl6
10:23 pippo left #perl6
10:25 pippo joined #perl6
10:36 timotimo how is 3,3,1...4 supposed to work? o_O
10:38 denis_boyun joined #perl6
10:41 moritz not at all
10:46 berekuk joined #perl6
10:48 colomon I tried running emmentaler on Moar overnight, it looks like it crashed (after quite a few tests) with the message "Invalid opcode executed (corrupt bytecode stream?) opcode 3584"
10:49 masak o.O
11:00 colomon hmmm, wonder if the crash is deterministic.
11:00 colomon ./smoker projects.json
11:00 colomon ===SORRY!===
11:00 colomon Missing or wrong version of dependency 'lib/File/Find.pm'
11:00 colomon :\
11:05 berekuk joined #perl6
11:15 kurahaupo_mobile joined #perl6
11:25 xinming_ joined #perl6
11:42 pdcawley joined #perl6
11:52 berekuk joined #perl6
11:55 colomon so, pandabrew/bin/pandabrew rebootstrap fixed the "Missing or wrong…" problem above.
11:55 jnthn 3584 is not a valid opcode number, I'm fairly sure of that :)
11:55 colomon as nearly as I can figure, this means emmentaler somehow broke the p6 module library
12:00 colomon ooo, it is repeatable, and the File::Find thing is partially explained.
12:00 colomon ==> Successfully installed File::Find
12:00 colomon Invalid opcode executed (corrupt bytecode stream?) opcode 3584
12:08 jnthn colomon: Hmm. Can you reduce it to a smaller test case?
12:08 colomon hmmm
12:12 timotimo jnthn: what does today's tuit supply look like? :)
12:14 jnthn timotimo: Empty, 'fraid...
12:14 timotimo 'tis okay
12:14 jnthn I got done with my course writing workload, but have somebody here to visit for the weekend.
12:14 timotimo mi e seems somewhat shallow as well
12:15 jnthn So figure I should show them around rather than sit hacking all day :)
12:15 jnthn Just ran a spectest to enjoy seeing less S05 fail on r-m though :)
12:15 jnthn TimToady++
12:19 colomon jnthn: shorter way of duplicating the bug: try installing File::Find using panda (on MoarVM)
12:22 mj41 joined #perl6
12:26 jnthn colomon: I gotta head out soon, but try https://gist.github.com/jnthn/9289075 which could tell us the previus op, which may give a hint.
12:31 timotimo set a breakpoint to that line and find out when it happens, then time-traveling-debug it?
12:31 timotimo could set a breakpoint to whatever the previous opcode is, count how often it gets hit, then "c" over that breakpoint the known number of times - 1 and then turn on recording?
12:32 jnthn Sometimes printf is just less work :P
12:32 timotimo :)
12:33 colomon hurm, how do I get rakudo to rebuild with that change installed?
12:33 timotimo make m-clean
12:33 timotimo make -j4 m-install
12:33 timotimo but you don't need to rebuild
12:33 jnthn You don't
12:33 jnthn Just build a latest Moar and make install it to the same place and run
12:33 jnthn No need to rebuild nqp or Rakudo for most Moar changes
12:34 colomon ah, I did make but not make install
12:34 timotimo that's right (and makes me happy)
12:36 xinming joined #perl6
12:37 colomon ==> Successfully installed File::Find
12:37 FROGGS joined #perl6
12:37 colomon Invalid opcode executed (corrupt bytecode stream?) opcode 3584, prev 139
12:43 timotimo invoke_o?
12:47 timotimo colomon: can you make panda output the command it invokes?
12:47 timotimo and then invoke "moar --dump" with whatever .moarvm file it tries to run?
12:48 treehug88 joined #perl6
12:48 jnthn Hm, I wonder what it's invoking...
12:48 jnthn Gotta head out now, anyways...
12:51 * colomon is completely lost in the panda source
12:53 colomon oooo, maybe....
12:56 colomon "rm_rf"
12:56 colomon so… unlink?
12:57 colomon oh, hold on
12:57 colomon I'll bet it's actually find (from File::Find)
12:58 Rotwang joined #perl6
12:59 timotimo if you're in gdb, you can print a traceback with a helper function of moarvm
12:59 colomon not in gdb
12:59 colomon I'm just adding "say" all over the panda / shell::command code
13:00 timotimo hah :)
13:02 colomon okay, hypothetically it could be map, sort, or reverse, but I'm betting it is find.
13:02 colomon this is the line: for find(dir => $path).map({ .Str }).sort.reverse
13:02 colomon and it never gets to the first iteration of the for loop
13:04 xinming_ joined #perl6
13:16 colomon this sounds kind of weird, but my impression is what is happening is the new File::Find panda compiles (incorrectly?) somehow overrides the File::Find which panda is already using.
13:17 colomon don't really know how to prove that, and I've got $work to do and a five-year-old badgering me to play Lego Star Wars.
13:17 timotimo :D
13:18 rindolf joined #perl6
13:50 hellwolf joined #perl6
13:50 hellwolf left #perl6
14:05 FROGGS dalek is still not here :/
14:07 pippo left #perl6
14:07 pippo joined #perl6
14:12 FROGGS this is the point where I need to think about open issues left todo in the "eleven" branches
14:13 FROGGS I guess doing wrapper for installed scripts for windows would be nice to have
14:13 FROGGS s/doing/doing the/
14:14 xragnar_ joined #perl6
14:31 hoverboard joined #perl6
14:32 mtk joined #perl6
14:45 kivutar joined #perl6
14:56 fridim__ joined #perl6
15:06 Mouq Shouldn't this be <&test()> or something? https://github.com/perl6/roast/blob/mas​ter/S05-metasyntax/angle-brackets.t#L46
15:07 Mouq p6: my $pass = 0; my sub test (Int $a = 1) {$pass += $a}; '3.14' ~~ /3 <&test()>/; say $pass
15:07 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in metachar:sym<assert>; couldn't find final '>' �at /tmp/tmpfile:1�------> [32m = 1) {$pass += $a}; '3.14' ~~ /3 <…»
15:07 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Nominal type check failed in binding '$a' in 'test'; got Cursor, needed Int␤  at /tmp/tmpfile line 0 (test @ 1) ␤  at /tmp/tmpfile line 1 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3119 (Regex.ACCEPTS @ 10) …»
15:07 Mouq p6: my $pass = 0; my sub test (Cursor $c, Int $a = 1) {$pass += $a; $c}; '3.14' ~~ /3 <&test()>/; say $pass
15:07 camelia niecza v24-109-g48a8de3: OUTPUT«1␤»
15:07 camelia ..rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse expression in metachar:sym<assert>; couldn't find final '>' �at /tmp/tmpfile:1�------> [32m) {$pass += $a; $c}; '3.14' ~~ /3 <…»
15:08 Mouq p6: my $pass = 0; my sub test (Cursor $c, Int $a = 1) {$pass += $a; $c}; '3.14' ~~ /3 <&test>/; say $pass
15:08 camelia niecza v24-109-g48a8de3: OUTPUT«1␤»
15:08 camelia ..rakudo-moar c62279: OUTPUT«P6opaque: no such attribute '$!pos'␤  in method ACCEPTS at src/gen/m-CORE.setting:12593␤  in method ACCEPTS at src/gen/m-CORE.setting:784␤  in block  at /tmp/tmpfile:1␤␤»
15:08 camelia ..rakudo-parrot c62279: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 139569 (src/gen/p-CORE.setting.pir:59493) (gen/parrot/CORE.setting:10965)␤called from Sub 'Bool' pc 451655 (src/gen/p-CORE.setting.pir:187711) (gen/parrot/CORE.setting:12300)␤cal…»
15:08 camelia ..rakudo-jvm c62279: OUTPUT«java.lang.RuntimeException: No such attribute '$!pos' for this object␤  in method ACCEPTS at gen/jvm/CORE.setting:12595␤  in method ACCEPTS at gen/jvm/CORE.setting:784␤  in block  at /tmp/tmpfile:1␤␤»
15:08 Mouq o.O
15:08 Mouq Well, good job niecza. I'm pretty sure those are faulty tests
15:10 segomos joined #perl6
15:10 Mouq (Though I'm not certain enough to change them. Someone who feels more confident that they are definitely wrong may)
15:11 Mouq r: my $name = 'alpha'; say 'abcdef' ~~ /<::($name)>/
15:11 camelia rakudo-jvm c62279: OUTPUT«===SORRY!===␤Cannot stringify this␤»
15:11 camelia ..rakudo-moar c62279: OUTPUT«===SORRY!===␤cannot stringify this␤»
15:11 camelia ..rakudo-parrot c62279: OUTPUT«No such method 'QAST::Var<-3372209812372949685>' for invocant of type 'Cursor'␤  in regex  at /tmp/tmpfile:1␤  in method ACCEPTS at gen/parrot/CORE.setting:12616␤  in method ACCEPTS at gen/parrot/CORE.setting:780␤  in block  at /tmp/tmpfile:1␤␤»
15:25 benabik joined #perl6
15:30 FROGGS The first character after the identifier determines the treatment of the rest of the text before the closing angle. The underlying semantics is that of a function or method call, so if the first character is a left parenthesis, it really is a call to either a method or function:
15:30 FROGGS <foo('bar')>
15:30 FROGGS Mouq: ^^
15:31 FROGGS but I'd propose to use the & sigil when a sub is meant... calling are sub or method with the same statement feels a bit weird
15:36 FROGGS hmmm, but it is supposed to take locally delared regexes into account...
15:36 araujo joined #perl6
15:39 pragma- joined #perl6
15:47 Mouq FROGGS: Yeah, I don't know how that works
15:47 Mouq r: my regex foo { abcd }; /<foo>/
15:47 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: ( no output )
15:48 Mouq r: my regex foo { abcd }; /<&foo>/
15:48 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: ( no output )
15:48 Mouq r: my regex foo { abcd }; 'abcd' ~~ /<foo>/
15:48 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: ( no output )
15:48 Mouq r: my regex foo { abcd }; 'abcd' ~~ /<&foo>/
15:49 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: ( no output )
15:56 LLamaRider joined #perl6
16:02 araujo joined #perl6
16:02 araujo joined #perl6
16:09 masak cool tip: put an action class inside a method, and use closure semantics to refer to variables in the method outside of the action class.
16:11 jnthn pro tip: the methods are *not* cloned, they live in the method table ot he class. So never, ever do this if you plan to write multi-threaded code :P
16:11 jnthn *of the
16:11 jnthn (put another way: you ain't getting closure semantics there.)
16:13 masak hrm.
16:15 masak r: class C { method foo { my $x = 0; my class D { method bar { $x++ } }; D.new.bar; say $x } }; C.new.foo for ^2
16:15 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«1␤1␤»
16:15 masak jnthn: I fail to see the bit in the above that would blow up with multi-threading.
16:15 masak could you spell it out for me?
16:16 masak (but no, realistically, I don't ever expect to multi-thread this parsing code)
16:17 jnthn masak: Sure. Thread A enters foo. The class block is captured, and so the methods also are. You call D.new.bar. While it's running, thread B enters. It captures the class and methods. Now your action methods will all be seeing thread B's $x.
16:17 jnthn There's only one method table. The code objects in it can't point to two outers.
16:18 masak the second invocation of foo overwrites the OUTER of the lexpad of the first?
16:19 masak is there any way to demo that with camelia? maybe with reentrancy instead of multi-threadiness?
16:19 jnthn Well, you can create it with our too I suspect.
16:21 arnsholt joined #perl6
16:21 arnsholt o/
16:22 jnthn perl6: sub foo($n) { my $y = $n; class A { method m() { say $y } }; foo($n - 1) if $n; A.m }; foo(1)
16:22 camelia niecza v24-109-g48a8de3: OUTPUT«(Any)␤(Any)␤»
16:22 camelia ..rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«0␤0␤»
16:22 jnthn masak: There's a reentrancy based appraoch
16:22 jnthn o/ arnsholt
16:25 masak perl6: sub foo($n) { my $y = $n; my class A { method m() { say $y } }; foo($n - 1) if $n; A.m }; foo(1)
16:25 camelia niecza v24-109-g48a8de3: OUTPUT«(Any)␤(Any)␤»
16:25 camelia ..rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«0␤0␤»
16:25 jnthn The "my" there is just talking about where the symbol A gets installed.
16:26 masak jnthn++
16:26 masak yes, I see it now.
16:26 masak for reentrancy, at least ;)
16:26 jnthn You don't get this in JavaScript 'cus you are building a new method table every time in the constructor. ;-)
16:26 jnthn Of course, that just gives you other issues. :)
16:26 masak r: sub foo($n) { my $y = $n; my class A { method m() { say "inside $y" } }; foo($n - 1) if $n; A.m; say "outside $y" }; foo(1)
16:26 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«inside 0␤outside 0␤inside 0␤outside 1␤»
16:27 masak jnthn: indeed.
16:27 moritz today I used Perl 6 to educate a die-hard OO programmer about closures
16:27 masak \o/
16:27 arnsholt Cool!
16:27 jnthn Today I used Perl 6 to educate a die-hard closures programmer about OO :D
16:27 arnsholt Did he see the light, in the end?
16:29 moritz https://gist.github.com/moritz/9292385 is the example I used
16:29 moritz turns out the combination of dir() and IO::Path makes it *very* convenient to write file-recursing code
16:30 masak 's a nice example. moritz++
16:30 moritz it worked on the very first try, without having to worry about concatenating paths, exluding . and .. etc.
16:30 masak it's nice because $counter "threads into" the execution of &walk, coroutine-style.
16:41 pecastro joined #perl6
16:46 stevan_ joined #perl6
16:47 LLamaRider \o/ MoarVM with Panda works great, even my crummy P6 module works well on it
16:47 LLamaRider tadzik++
16:48 tadzik :)
16:48 tadzik glad to hear that
16:53 LLamaRider moritz: nice speedup upgrade would be to recurse all subdirs in parallel (if you don't care about the counter that is)
16:54 moritz LLamaRider: that was totally not the purpose :-)
16:58 LLamaRider moritz: I just randomly thought of what else would be nice to add in there :) Looks cool in any case.
16:59 moritz so, what primitives would one use? a supply into which several async blocks feed?
17:00 timotimo you can just put a whole bunch of start { } blocks and awaits
17:00 timotimo start each sub directory, await the result of them all
17:01 moritz but I want to call the callback as soon as a result is available
17:01 timotimo oh
17:01 timotimo good point i guess
17:01 timotimo the supply doesn't do any synchronisation, so you'd probably want to use a channel instead
17:02 LLamaRider you can just not wait for them to return, just let each subdir do its own thing and print from the callback. If you don't care about getting the list back, that's most efficient.
17:02 moritz timotimo: but the channel blocks on read, no?
17:02 moritz LLamaRider: but I use an unsafe operation ($counter++) in the callback
17:02 moritz LLamaRider: so I need some form of synchronization
17:02 timotimo since the channel would cause the stuff to get serialised
17:03 pecastro joined #perl6
17:03 moritz first I should rewrite it as non-recursive
17:05 moritz because then I use an arrays as queue
17:05 timotimo ah
17:05 xinming joined #perl6
17:05 timotimo so that's what you mean, yeah
17:05 timotimo now i get it :)
17:06 skids joined #perl6
17:07 timotimo well, supplies call the subscribed methods immediately after .more-ing a value
17:08 timotimo so that may indeed be a good target for a callback; though it could run multiple at the same time if you have multiple threads traversing the directories
17:09 jnthn If you have many threads producing results that a single consumer should nom, then a Channel is the right thing.
17:09 timotimo yay, i said a right! :)
17:09 jnthn Or even one thread producing and another consuming concurrently.
17:10 timotimo if the callback is very cheap, it may not even be worth it
17:10 moritz I don't want to parellize the callback, but the directory reading
17:11 timotimo rakudo is kind of still far away from getting I/O bottlenecked when traversing directory trees :)
17:14 zakharyas joined #perl6
17:16 LLamaRider Hm, was just invited to give a Perl talk to a bunch of undergrads in the Computer Science club at my uni. They have a series of talks on languages they've used in internships and such. Thinking if I present something it should be Perl 6.
17:17 LLamaRider Any recommendations for punch-packed materials that would grab the short attention spans of hipster undergrads? :>
17:20 moritz \o/ it seems to work
17:23 timotimo moritz: soon on moar, too :3
17:23 mtk joined #perl6
17:24 moritz https://gist.github.com/moritz/9293475 that's the parallel version
17:25 moritz and it seems to run quite fast, though when it's done it seems to hang forever
17:26 moritz maybe when it awaits all those promises
17:26 LLamaRider moritz++ thanks for indulging me :> Which backend are you using?
17:26 arnsholt Does Panda working on Moar mean that NativeCall on Moar is close to the to the top of the list of blockers for a Moar star?
17:26 timotimo it's quite cool that you can for $dirs.list outside and $dirs.send inside
17:26 moritz LLamaRider: I developed the serial version on moar, but parallel stuff only works on the JVM atm
17:26 timotimo moritz: i think you want to close the $files
17:27 timotimo otherwise the $reader won't finish, will it?
17:27 moritz oh
17:27 moritz and I have to close $dirs too
17:28 moritz but when?
17:29 moritz OH NOEZ
17:30 timotimo after @file-readers perhaps?
17:30 timotimo oh, hm.
17:31 timotimo yeah, that's not really that easy :P
17:32 moritz I fear the whole thing must be written differently
17:33 timotimo there's not really a way to signalize it's all finished, aye.
17:33 jnthn Channels do have a "completed" mechanism.
17:33 jnthn If you are doing it that way.
17:33 jnthn dinner &
17:34 timotimo yes, but the code the way it is right now isn't really easily changable for a single point to signalize the channel is finished
17:35 LLamaRider question: isn't having to end blocks with " 1; }; " a code smell ?
17:36 LLamaRider I'm used to doing this in P5's eval{} blocks, but always thought it's a potential sign of bad design.
17:38 moritz LLamaRider: it probably is; I'm simply not yet used to the new sink context rules
17:40 moritz oh, I think I know what I can do
17:40 rindolf joined #perl6
17:40 moritz I can .poll the $dirs channel
17:41 mhasch joined #perl6
17:44 moritz and if .poll doesn't return anything, I can check if all the @file-readers are done, and if yes, call $dirs.close
17:44 mhasch hi #perl6! Quick question:
17:44 mhasch How do I tell the Configure.pl script in rakudo-star where my icu-config is located ?
17:45 __thou joined #perl6
17:45 moritz mhasch: you extend PATH to make icu-config available in it
17:45 kurahaupo_mobile joined #perl6
17:47 mtk joined #perl6
17:50 moritz https://gist.github.com/moritz/9293475 # this one seems to work
17:51 moritz 186s in serial, 130s in parallel
17:51 kurahaupo_mobile joined #perl6
17:52 moritz for a full rakudo git repo, including a checkout of roast, nqp, moar and parrot
17:52 moritz 18805 files
17:53 kurahaupo__ joined #perl6
17:54 moritz .poll often doesn't return any elements; doing something more sensible than 'next;' in there would be beneficial
17:54 * moritz feels he's doing something RONG
17:56 kurahaupo_mobile joined #perl6
17:59 Guest69589 left #perl6
18:00 moritz I have a list of promises, and want to wait until at least one of them is done
18:00 moritz how do I do that?
18:00 moritz winner seems to be the way to do it
18:00 moritz but I can't seem to make heads nor tails out of it
18:00 * vendethiel wants to change that name
18:01 vendethiel (I don't think it really make sense)
18:02 moritz winner * { ... } what does that do?
18:06 vendethiel > nk
18:06 vendethiel > so any(@files X~ '.' X~ @extensions) Xeqv @best | @good
18:06 vendethiel does | flatten ?
18:13 vendethiel let's find out!
18:13 vendethiel r: say 1 == (1, 2) | (3, 4)
18:13 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«any(False, False)␤»
18:13 vendethiel not that way!
18:14 moritz r: say ((1, 2)| (3, 4)).perl
18:14 vendethiel r: say 1 == [|] (1, 2) (3, 4)
18:14 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«any($(1, 2), $(3, 4))␤»
18:14 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32msay 1 == [|] (1, 2) [33mâ��[31m(3, 4)[0mâ�¤    expecting any of:â�¤        postfixâ�¤     …»
18:14 vendethiel r: say 1 == [|] (1, 2), (3, 4)
18:14 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«any(True, False, False, False)␤»
18:14 kurahaupo__ joined #perl6
18:14 vendethiel r: say so 1 == [|] (1, 2), (3, 4)
18:14 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«True␤»
18:14 vendethiel isn't it kinda inefficient, though :(
18:14 moritz seems it does flatten
18:14 vendethiel not really
18:15 vendethiel well, not as I meant it, it doesn't generate junctions inside the lists
18:16 kurahaupo_mobile joined #perl6
18:23 fridim__ joined #perl6
18:23 dmol joined #perl6
18:25 colomon vendethiel: did you want to get something like (1 | 2) | (3 | 4) out?
18:26 vendethiel colomon: yep. [|] did the job though :)
18:28 mhasch *sigh* miniparrot segfaults the first time it is called in a rakudo-star-2014.01 bootstrap. Are ther known issues I should be aware of?
18:32 rindolf joined #perl6
18:32 arnsholt masak: I think you linked a page with an algorithm to efficiently select from a set according to a non-uniform distribution at some point. Do you happen to remember what page?
18:32 colomon arnsholt: isn't that what Bag.pick does?
18:33 arnsholt Hmm, probably
18:33 colomon I mean, I'm not sure it's the best algo, but it's somewhat functional
18:34 arnsholt Hmm, not the algorithm I'm looking for
18:34 colomon m:  my $bag = ('red' => 1000000, 'blue' => 3).Bag; say $bag.pick(20)
18:34 camelia rakudo-moar c62279: OUTPUT«red red red red red red red red red red red red red red red red red red red red␤»
18:35 arnsholt I'm looking for the algorithm, though, not the Perl 6 implementation
18:37 arnsholt If what I'm thinking of happens, I'll probably end up doing it in Python
18:40 telex joined #perl6
18:42 Mouq r: multi a (Int $, |everything) { [+] everything.list }; multi a (Num $, |everything) { [*] everything.list }; say a(1,2,3,4,0); say a(1e1,2,3,4,0)
18:42 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«9␤0␤»
18:42 Mouq n: multi a (Int $, |everything) { [+] everything.list }; multi a (Num $, |everything) { [*] everything.list }; say a(1,2,3,4,0); say a(1e1,2,3,4,0)
18:42 camelia niecza v24-109-g48a8de3: OUTPUT«9␤0␤»
18:43 Mouq Hm. I had the impression |everything would get the first argument too
18:45 TimToady no, it's just a snapshot of the current remaining binding
18:46 TimToady maybe you want callsame
18:46 TimToady if we have the method form
18:48 TimToady r: sub foo(|) { &infix:[*].callsame }; say foo 3,4
18:48 Mouq TimToady: The set operators use the type of the first element to deterimine if they should act in a Setty or Baggy way. I was wondering if there was a way to check the type of the first argument of (**@p) while still putting everything in @p
18:48 camelia rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    &infix:<Whatever<139646339443584>> used at line 1â�¤â�¤Â»
18:48 camelia ..rakudo-jvm c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    &infix:<Whatever<1362387953>> used at line 1â�¤â�¤Â»
18:48 camelia ..rakudo-parrot c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    &infix:<Whatever<6306859678214230833>> used at line 1â�¤â�¤Â»
18:48 TimToady r: sub foo(|) { &infix:<*>.callsame }; say foo 3,4
18:48 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«No such method 'callsame' for invocant of type 'Sub+{<anon>}+{Precedence}'␤  in sub foo at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
18:48 TimToady nope
18:48 TimToady nor do we understand &prefix:<[*]> yet, I think
18:49 Mouq We definitely don't understand &prefix:<[*]> yet
18:49 TimToady just woke up after sleeping 11 hours, obviously it was my antibiotics that were giving me insomnia
18:50 TimToady why do I feel like I've been taken out and shot?
18:52 TimToady r: multi a (|everything, Int $) { [+] everything.list }; multi a (|everything, Num $) { [*] everything.list }; say a(1,2,3,4,0); say a(1e1,2,3,4,0)
18:52 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Cannot put required parameter  after variadic parametersâ�¤at /tmp/tmpfile:1â�¤------> [32mmulti a (|everything, Int $[33mâ��[31m) { [+] everyth…»
18:52 TimToady that's supposed to be possible
18:52 xinming_ joined #perl6
18:52 TimToady since | is supposed to snapshot the curent binding
18:53 TimToady S06:1238
18:53 synopsebot Link: http://perlcabal.org/syn/S06.html#line_1238
18:54 Mouq n: multi a (|everything, Int $) { [+] everything.list }; multi a (|everything, Num $) { [*] everything.list }; say a(1,2,3,4,0); say a(1e1,2,3,4,0)
18:54 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot call &a; none of these signatures match:␤    Int, *@_, *%_␤    Num, *@_, *%_␤  at /tmp/2gBzLGWHtR line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib…»
18:55 TimToady | is not, in that sense, a variadic parameter, because from the standpoint of the binding, it's supposed to consume 0 args, not all of them.
18:55 TimToady From an implementation standpoint, of course, this is problematic, because you don't want to clone the rest of the capture for |
18:55 TimToady | needs to be fast when it's the final thing
18:56 Mouq n: multi a (|everything, |also_everything) { say everything; say also_everything }; a(1,2,3,:abcd)
18:56 camelia niecza v24-109-g48a8de3: OUTPUT«\(1, 2, 3, |{"abcd" => Bool::True})␤\()␤»
18:56 Mouq r: multi a (|everything, |also_everything) { say everything; say also_everything }; a(1,2,3,:abcd)
18:56 camelia rakudo-parrot c62279: OUTPUT«1 2 3 "abcd" => Bool::True␤1 2 3 "abcd" => Bool::True␤»
18:56 camelia ..rakudo-jvm c62279: OUTPUT«This representation can not unbox to a native str␤  in block  at gen/jvm/CORE.setting:6741␤  in method gist at gen/jvm/CORE.setting:6737␤  in method gist at gen/jvm/CORE.setting:1039␤  in sub say at gen/jvm/CORE.setting:13126␤  in sub a at /tmp/tm…»
18:56 camelia ..rakudo-moar c62279: OUTPUT«This representation (VMIter) cannot unbox to a native string␤  in block  at src/gen/m-CORE.setting:6741␤  in method gist at src/gen/m-CORE.setting:6737␤  in method gist at src/gen/m-CORE.setting:1039␤  in sub say at src/gen/m-CORE.setting:13124␤ …»
18:56 Mouq :O parrot++
18:57 pippo joined #perl6
18:59 FROGGS arnsholt: yes, I think NativeCall and at least one precomp bug are the blockers of r-m*
18:59 TimToady is the binder treating the capture as mutable when it binds args?  that is, is | assuming that it can eat all the remaining args?
19:00 * Mouq has no clue how the binder works
19:00 * TimToady too
19:01 * TimToady should, given his role of designer
19:02 * TimToady actually decided to start to delve into the guts last year some time, not just a week ago :)
19:02 TimToady languages designers often spec things that are impossible to implement efficiently :)
19:03 FROGGS TimToady: well, you know both sides :o)
19:03 mhasch impossible is a strong word
19:04 pippo joined #perl6
19:04 TimToady I was told 14 years ago that I was to stay away from the implementation because they already knew how I implement things, and wanted to do it differently :)
19:04 moritz some of the requirements of p6 are also strong words :-)
19:04 TimToady I've been thinking it was time to relax my mostly self-imposed exile there :)
19:04 colomon +1
19:04 colomon ;)
19:05 moritz TimToady: when I have a list of promises, how can I wait for the first to finish?
19:05 TimToady it wasn't really so much that they didn't want me to introduce Joe Code to their implementation, but also I didn't want to show favoritism to one effort
19:05 TimToady await @promises[0]
19:06 moritz I meant "first" in the temporal sense, not in the array-index sense
19:06 TimToady ah
19:06 TimToady you want, like, the "winner" :)
19:07 moritz TimToady: that's what I thought too, but I couldn't figure out the correct 'winner' invocation
19:07 d^_^b joined #perl6
19:07 d^_^b joined #perl6
19:08 TimToady that's why I respecced it to take a list in the opening clause, rather than relying on the cases to enumerate them
19:08 TimToady so winner @promises {...} is supposedd to do what you want
19:08 moritz what's the '...'?
19:10 FROGGS IIRC "winner" is like "given"
19:10 TimToady done * {...}
19:10 moritz I tried leaving the block empty, but that gave me a Nominal type check failed for parameter '&block' from somewhere within the 'winner' impl
19:10 FROGGS so it is winner/done like given/when?
19:10 TimToady though you should also be able to do winner * { done @promises {...}}, by spec
19:10 TimToady I see the arg after winner isn't specced well
19:10 moritz wouldn't that wait for all @promises
19:11 TimToady "winner"
19:11 TimToady this isn't a marathon where you wait for everyone to finish
19:11 TimToady with this race, you shoot everyone who didn't come in first
19:12 TimToady or are you really interested in a marathon?
19:12 moritz no, the Channel handles the marathon for me :-)
19:12 TimToady winner is for when you really are interested only in the first result
19:13 moritz I'm trying to improve https://gist.github.com/morit​z/9293475/#file-find-pl6-L29
19:13 moritz though it feels the whole thing is rather hacky, and there should be a much simpler solution
19:14 TimToady I try to stay out of implementation... :P
19:14 moritz ftr, the "the whole thing" I meant my script, not the rakudo-j implementations :-)
19:14 moritz s/the/with/
19:15 TimToady a walker would seem to want all the results, not the first one
19:17 moritz well, I get all of them by calling .poll until the channel is empty
19:17 TimToady yeah, that algo seems a bit introspecty, which is a smell
19:17 moritz the problem is, I can't use $dirs.list, because then I don't know when to .close $dirs
19:17 TimToady but my brane is not awake enough to supply a replement algo yet
19:17 TimToady *place
19:18 treehug88 joined #perl6
19:18 TimToady ok, let's just implement timely destuction...oh wait...
19:20 TimToady well, where timely means DESTROY called from the GC, but we don't have that either
19:21 TimToady seems we need a way to tell a lazy list "I'm done reading from you"
19:22 TimToady so throw away all your gathers and such
19:23 tgt joined #perl6
19:24 TimToady we have shutdown semantics on channels, but not lazy lists
19:24 perigrin .oO(lazy lists are channels from beyond!)
19:25 TimToady I wonder how inefficiently I can spec shutdown on lists
19:26 hoverboard joined #perl6
19:26 TimToady and whether we've just invented a new scope, list generator scope
19:26 * perigrin prefers mint scope.
19:27 * TimToady too
19:27 Sqirrel joined #perl6
19:27 perigrin list generator scope tastes too much like listerine for me.
19:27 TimToady they've got mint listerine now though :)
19:27 TimToady I'm running on Listerinux Mint right now
19:27 pmurias joined #perl6
19:28 TimToady ah, don't get me started free associating when I've just woke up!
19:28 perigrin hehe
19:28 perigrin I'll charge for the associations then.
19:28 perigrin problem solved.
19:29 TimToady otoh, that's how I just saw the major hole in our lists
19:29 TimToady which might be what the Haskellers call a "space leak"
19:30 perigrin I'm pretty sure a space leak is what happens when I try to read expositions on Haskell
19:30 pmurias rurban_: do you plan to resume development of parrot (I have noticed that you have recently started committing to it's repo and you want to encourage a parroty GSoC project)
19:32 TimToady Now how am I supposed to backlog when you folks keep frontlogging?
19:33 FROGGS TimToady: you just have to wait for the night in europe :o)
19:33 lue irclog.perlgeek.de should do, unless you hit refresh a bunch :)
19:33 TimToady but then it's Too Late!!!
19:34 TimToady and there's no one to enjoy all my witty remarks, as well as the ones I just think are witty
19:34 FROGGS we just keep quiet for a few minutes then :o)
19:35 TimToady just don't say anything interesting :)
19:35 FROGGS ohh, I can do that :o)
19:36 TimToady ETOOINTERESTING
19:36 TimToady "Unable to deduce sequence" is LTA
19:37 * mhasch is still fighting Configure.pl.  Why would a script with that name touch the hierarchy given as --prefix ?
19:37 TimToady because, alas, it's using the stuff there to calculate dependencies instead of having make do it
19:38 TimToady feel free to fix our build system :)
19:39 d^_^b joined #perl6
19:39 d^_^b joined #perl6
19:42 xenoterracide_ joined #perl6
19:45 mhasch Hm. I am still trying to understand the build process and will happily suggest improvements after.
19:46 TimToady I'm not sure who is most cognizant of build design at this point...
19:47 mhasch Seems best to not specify a prefix.  Which means, the binaries will get installed in /path/where/i/unwrapped/the/tarball/install .
19:47 Mouq mhasch: If it means anything, I always use --prefix=/usr/local
19:48 mhasch Mouq: /opt/perl6 for me, but same general idea.
19:52 lue Haven't done a parrot-only build in a while, but when I used to do that it defaulted to /usr/local all the way up to rakudo. I'm still not entirely happy that I have to specify /usr/local for moar (and thus nqp and rakudo too)
19:53 mhasch What beats me is that make test complains about NQP being too old, which should have been built only minutes before.
19:54 kurahaupo_mobile joined #perl6
19:54 lue did Configure complain about it being too old?
19:56 mhasch Configure was happy (and populated the prefixed hierarchy with all sorts of stuff
19:56 Mouq mhasch: What exactly is your Configure line?
19:57 mhasch perl Configure.pl --gen-nqp --gen-parrot --parrot-option=--icuheaders=​/usr/include/x86_64-linux-gnu --parrot-option="--icushared=`icu-config --ldflags`" --prefix=/opt/perl6
19:57 lue mhasch: by the way, I've never experienced the "Configure populates the prefix" thing you're talking about (or else I'd have to do sudo Configure.pl)
19:59 TimToady I think we're taling about --gen things here, which do put stuff into the prefix dir
19:59 TimToady *talking
19:59 mhasch lue, TimToady: that's what I figured
20:00 lue Good thing I don't use the --gen stuff then :)
20:00 TimToady so if you regen those things by hand, you really need to be careful to say 'make install' rather than just make
20:01 TimToady there should be some top-level make option that make installs all those things underneath, but I don't think we're there yet
20:02 mhasch I think I'll wipe everything clean and start over. While experimenting with icu flags there might have been leftovers from a previous run somewhere.
20:02 TimToady if you want your gen things to track HEAD, you have to do that all by hand currently, or re-Configure at the top
20:03 Mouq --gen-nqp=master
20:03 lue or just maintain distinct repos, which is what I do :)
20:03 TimToady the current build system assume you are just a user of the -gen things, not a developer
20:03 TimToady lue: which is another way of doing it by hand :P
20:03 Mouq lue: But maintaining distinct repos is mostly useful if you do lots of development
20:04 TimToady it's still sitting outside the purview of 'make'
20:04 Mouq lue: Actually, redact my last statement as being non-helpful here
20:05 TimToady .oO(good thing these guys aren't talking about anything interesting... :)
20:06 Mouq r: 'a  | b' ~~ /([<.before \S | \h <![\h|]> > $<pod_string_char>=\N]+) +% [ \h\h+ | \h+ '|' \h+ ]/;say $/;
20:06 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«「a  | b」␤ 0 => 「a」␤  pod_string_char => 「a」␤ 0 => 「| b」␤  pod_string_char => 「|」␤  pod_string_char => 「 」␤  pod_string_char => 「b」␤␤»
20:07 Mouq Ohhh
20:07 Mouq Debugging is so much harder in NQP ;_;
20:09 Mouq r: 'a  | b' ~~ /([<.before \S | \h <![\h|]> > $<pod_string_char>=\N]+) +% [ \h+ ['|' \h+]? ]/;say $/;
20:09 camelia rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: OUTPUT«「a  | b」␤ 0 => 「a」␤  pod_string_char => 「a」␤ 0 => 「b」␤  pod_string_char => 「b」␤␤»
20:09 Mouq \o/
20:09 TimToady mind you, I distracted myownself by deLTAifying the Unable to deduce sequence
20:16 TimToady ESTILLNODALEK
20:19 TimToady Don't you just hate it when there's just enough lag that the page doesn't update immediately, and then it updates while you're blinking, and it takes you far too long to realize that it did, in fact, update the screen?
20:20 mhasch must be a pretty dull page then
20:20 TimToady oh for the days when a screen update took longer than a blink :)
20:21 TimToady well, irc varies in that respect
20:23 mhasch \o/ finally, it worked. /me did manage to install perl6
20:25 TimToady \o/ too
20:27 colomon \/
20:27 colomon \o/
20:27 * colomon needs to repair or replace his MBP keyboard before he loses his head permanently.
20:29 * TimToady can only imagine that failure mode...
20:29 mhasch Next time, I will not run Configure.pl a second time without cleaning up first.
20:29 TimToady yeah, that's a gotcha
20:30 TimToady Configure and make are having a few marital difficulties
20:32 tgt joined #perl6
20:33 mhasch I wonder what Stuart Feldman would make of this... :-)
20:35 benabik joined #perl6
20:37 TimToady I think Stu would either say "Why aren't you using make for that?" or "Why *are* you using make for that?"
20:38 TimToady Using the right tool for the job can go wrong two different ways. :)
20:42 kivutar joined #perl6
20:44 myfree joined #perl6
20:45 TimToady did someone tweak SET_CAPS lately?  I'm getting a cannot find method
20:57 TimToady nevermind, it helps to keep track of your closing curlies when working in the setting
20:59 TimToady for anyone searching for this, I left out a curly, so the definition of my exception tried to eat the rest of the setting
21:00 timotimo that's the problem when you allow classes to be declared inside other classes :P
21:04 TimToady "Welcome to my Parlor class," said the Spider class to the Fly class.
21:08 geekosaur clever spider: augment class Spider...
21:08 geekosaur er, clever fly
21:12 kbaker joined #perl6
21:15 * timotimo is unsure what to do next
21:20 * TimToady is unsure what I did last
21:20 TimToady s/I/he/
21:21 Mouq Heh:
21:22 Mouq perl6 -e'=begin table␤this makes | me␤very  | sad␤=end table␤say $=pod[0].contents
21:22 Mouq "sad this makes me"
21:23 Mouq But that's much better than before
21:23 Mouq (pod-table branch, haven't pushed)
21:23 vendethiel yeah, yoda-style is better than no style :-)
21:23 Mouq s/contents/content
21:26 timotimo Mouq: i have no idea how you come up with these interesting failure cases :)
21:26 timotimo but anyway, i'm very glad that you're pushing this forward
21:26 timotimo especially since i've been letting it rot for so long ;)
21:39 tgt joined #perl6
21:42 timotimo i'm also glad that TimToady++ is working on hyper nodality and stuff
21:52 * TimToady is working on stuff today
21:53 perigrin joined #perl6
21:56 perigrin joined #perl6
22:05 timotimo that's fine
22:07 * timotimo has been working on nothing today
22:07 * TimToady just awsomized Unable to deduce sequence
22:07 TimToady instead of backlogging :)
22:08 TimToady > ./perl6 -e 'say 3,3,1 ... *'
22:08 TimToady ===SORRY!===
22:08 TimToady Unable to deduce arithmetic or geometric sequence from 3,3,1 (or did you really mean '..'?)
22:09 timotimo maybe the person meant 3, 3, (1 ... *) :P
22:10 TimToady maybe they did at that :)
22:10 timotimo but it's a very good idea to put the actual numbers there
22:11 timotimo i have to do some thinking soon to get "code model" things into qt creator
22:12 timotimo i'd love to embed a moarvm into the creator to do analysis, or maybe have an analysis tool that can be long-running and you feed it chunks of files that have recently changed
22:12 timotimo i think it'll probably really be necessary to keep info on the currently open files cached so that we can refresh parts of the code rather than all of it
22:12 timotimo that seems pretty tricky
22:15 timotimo if i could build a very coarse segmentation of "the whole file" and have dependencies between them and quick methods to offset things around and resize them easily, maybe that'd be something
22:15 timotimo like "lines one through 50 is a class, in that class the first 10, second 10 and the rest are methods"
22:15 timotimo "this method refers to these symbols from outside"
22:17 raydiak anyone have a clue why my account is useless when logged in to RT? I don't seem to have permission for...anything (viewing bugs, accessing the homepage, etc)
22:17 raydiak I can't even get to my own bugs, or bugs I can view when not logged in
22:18 timotimo i think you have to be given a few permissions, for example by [Coke]
22:18 raydiak seems terribly unfriendly to have new accounts have lesser permissions than anonyumous guest
22:21 raydiak FROGGS: re RT #121319 until I get my rt account fixed so I can put this info in the right place, heres the repo you requested: https://github.com/raydiak/precomp-export-fail
22:21 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121319
22:31 wooden joined #perl6
22:31 wooden joined #perl6
22:32 raydiak FROGGS: also just FYI I downloaded the tarball from RT and double-checked that it works fine with gnu tar on linux (same thing I used to create it) and with 7zip on windows...mayhaps theres a problem on your end?
22:34 timotimo full hard drive? :P
22:34 raydiak heh
22:37 raydiak FTP in ascii mode? random line noise? NSA packet tampering? we may never know :)
22:38 perigrin joined #perl6
22:39 perigrin joined #perl6
22:41 timotimo sun storms
22:41 TimToady son sturms
22:43 Mouq r: [].shift
22:44 camelia rakudo-jvm 2209b7: OUTPUT«Unhandled exception: Element shifted from empty list␤  in throw (gen/jvm/CORE.setting:10834)␤  in sink (gen/jvm/CORE.setting:12256)␤  in MAIN (gen/jvm/main.nqp:47)␤  in  (gen/jvm/main.nqp:41)␤  in  (gen/jvm/main.nqp)␤␤»
22:44 camelia ..rakudo-moar 2209b7: OUTPUT«Unhandled exception: Element shifted from empty list␤   at src/gen/m-CORE.setting:10834  (/home/p6eval/rakudo-inst-1/languages/perl​6/runtime/CORE.setting.moarvm:throw:129)␤ from src/gen/m-CORE.setting:12254  (/home/p6eval/rakudo-inst-1/languages/perl6/…»
22:44 camelia ..rakudo-parrot 2209b7: OUTPUT«Element shifted from empty list␤current instr.: 'throw' pc 414452 (src/gen/p-CORE.setting.pir:173722) (gen/parrot/CORE.setting:10854)␤called from Sub 'sink' pc 451607 (src/gen/p-CORE.setting.pir:187637) (gen/parrot/CORE.setting:12277)␤called from S…»
22:45 TimToady would be nice if we could consolidate those
22:48 timotimo you mean figure out it's the same exception and collapse them?
22:49 perigrin joined #perl6
22:51 TimToady I mean (I think) make the tracebacks look more like each other
22:51 perigrin joined #perl6
22:51 TimToady unless the user somehow indicates interest in vm-dependent details
22:52 TimToady of course, #if throws the line numbers off
22:52 TimToady or does it?
22:52 timotimo also the file names :)
22:53 TimToady those we can s/parrot/VM/ or some such
22:53 TimToady much like we did with the top-level with -e tmpfile
22:53 timotimo ah, hm.
22:53 lue except jvm puts its gen'd stuff in a different place than parrot or MVM
22:54 timotimo yeah, we'll have to consolidate those exact paths
22:54 timotimo otherwise p6: say $*VM is going to look funny :)
22:54 perigrin joined #perl6
22:54 rurban joined #perl6
22:54 TimToady just sayin'
22:55 hoverboard joined #perl6
22:55 TimToady r: say 3,3,1...4
22:55 camelia rakudo-moar 2209b7: OUTPUT«===SORRY!===␤Unable to deduce arithmetic or geometric sequence from 3,3,1 (or did you really mean '..'?)␤»
22:55 camelia ..rakudo-jvm 2209b7: OUTPUT«Unable to deduce arithmetic or geometric sequence from 3,3,1 (or did you really mean '..'?)␤  in method sink at gen/jvm/CORE.setting:12256␤  in block  at gen/jvm/CORE.setting:16289␤  in block  at gen/jvm/CORE.setting:7503␤  in block  at gen/jvm/CORE…»
22:55 camelia ..rakudo-parrot 2209b7: OUTPUT«Unable to deduce arithmetic or geometric sequence from 3,3,1 (or did you really mean '..'?)␤  in method sink at gen/parrot/CORE.setting:12277␤  in block  at gen/parrot/CORE.setting:16537␤  in any coro at gen/parrot/CORE.setting:7543␤  in method r…»
22:56 TimToady .tell pippo see http://irclog.perlgeek.de/​perl6/2014-03-01#i_8370406 which is for you :)
22:56 yoleaux TimToady: I'll pass your message to pippo.
22:57 TimToady maybe it should just replace those with <TRACEBACK>
23:01 perigrin joined #perl6
23:02 lue .oO( <camelia> rakudo-parrot c62279, rakudo-jvm c62279, rakudo-moar c62279: ERROR (use r!: if you really want to see error output )
23:02 timotimo timo for bed
23:02 lue ♞ timotimo o/
23:02 timotimo o/
23:02 TimToady Mouq: the & in <&test()> should not be necessary; it looks for a lexical of that name before it looks for a method
23:04 Mouq TimToady: So grammar Foo { method push { ... }; method TOP { <push()> } }; should call sub push?
23:04 TimToady but yes, it violates the need to return a cursor
23:05 TimToady if there is a sub push, or a 'my regex' or such
23:05 TimToady has to be a lexically scoped override, and has to return a cursor
23:05 TimToady 'my regex' automatically does that
23:06 TimToady your method push there would also have to return a cursor
23:08 * TimToady is still backlogging...
23:12 pippo joined #perl6
23:13 pippo TimToady: thank you very much for http://irclog.perlgeek.de/​perl6/2014-03-01#i_8370406
23:13 yoleaux 22:56Z <TimToady> pippo: see http://irclog.perlgeek.de/​perl6/2014-03-01#i_8370406 which is for you :)
23:13 pippo :-)
23:14 kaare_ joined #perl6
23:15 TimToady vendethiel: note that in http://irclog.perlgeek.de/​perl6/2014-03-01#i_8369338 it's the [op] reduce that's doing the flattening, not the |
23:15 vendethiel TimToady: I know, that's why I swapped to [] ;)
23:15 TimToady only list infix reducuctions refrain from flattening (well, and chain ops)
23:16 vendethiel is `so any` optimized ? or is it really just checking if any member is true and doing all the work for nothing ?
23:16 vendethiel (like, is it a special case ?)
23:17 pippo I meant what timotimo said. I.e. 3,3,(1...10). But on my perl6-m I had a segfault trying to do "say (3,3,1...4) <<+>> 1;"
23:17 vendethiel because I know if it itsn't optimized I'll have to go with a loop; until then :(
23:17 TimToady some simple ones are optimized in 'if', but not sure if the so function does that
23:17 pippo so I tested Camelia to see if it had the same behaviour.
23:18 vendethiel when I check `so any(@a) ...` I really want it to stop at the first one that's True
23:18 vendethiel no need to calculate all the following values
23:18 TimToady it only optmizes literals, I think
23:18 Mouq r: say so any True xx *
23:18 camelia rakudo-parrot 2209b7, rakudo-jvm 2209b7, rakudo-moar 2209b7: OUTPUT«True␤»
23:19 TimToady it probably only works right there because of the *
23:19 Mouq r: say so (any {rand.round} xx *)()
23:19 Mouq r: say so (any rand.round xx *)
23:19 vendethiel camelia ded :(
23:19 camelia rakudo-parrot 2209b7, rakudo-jvm 2209b7, rakudo-moar 2209b7: OUTPUT«(timeout)»
23:19 camelia rakudo-parrot 2209b7, rakudo-jvm 2209b7, rakudo-moar 2209b7: OUTPUT«True␤»
23:20 TimToady r: say so any 1..10000
23:20 camelia rakudo-parrot 2209b7, rakudo-jvm 2209b7, rakudo-moar 2209b7: OUTPUT«True␤»
23:20 TimToady r: say so any 1..10000000
23:20 camelia rakudo-parrot 2209b7, rakudo-jvm 2209b7, rakudo-moar 2209b7: OUTPUT«(timeout)»
23:21 TimToady looks like it's only lazy on known infinites
23:21 TimToady which I would consider a bug
23:21 vendethiel isperl6fastyet.com
23:22 vendethiel maybe in 5 years people will be saying "perl6doesntscale" instead of, err, "railsdoesntscale"
23:22 TimToady well, the design is, er, designed to scale in many ways
23:22 TimToady P6, that is
23:22 vendethiel good design is hard to get efficiently, though, I believe.
23:23 TimToady well, most languages become efficient by making the users worry about it :)
23:23 vendethiel languages aren't efficient, implementations are :p
23:24 TimToady well, most implementations become efficient by making the users worry about it :)
23:24 TimToady insofar as they only provide efficient primitives, and sweep the complexity under the carpet of the user
23:25 vendethiel (when is somebody coming to link SufficientlySmartCompiler ?)
23:26 TimToady right before we invoke Godwin's Law
23:27 TimToady .oO(Every day, in every way, we're getting better and better. --Hitler)
23:28 vendethiel (intelligent people saying intelligent things don't make them good people, though)
23:28 vendethiel (and :; http://c2.com/cgi/wiki?SufficientlySmartCompiler - a bit late, though)
23:59 berekuk joined #perl6

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

Perl 6 | Reference Documentation | Rakudo