Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-19

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:01 jnap joined #perl6
00:03 berekuk joined #perl6
00:07 stevan_ joined #perl6
00:21 BenGoldberg joined #perl6
00:22 raydiak r: my @foo = 1,2; say (|@foo).perl;
00:22 camelia rakudo-parrot 051aa6, rakudo-jvm 051aa6, rakudo-moar 051aa6: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
00:22 raydiak why is that wrong?
00:23 jnthn What were you expecting it to do?
00:23 jnthn afaik, | only makes sense in the context of a call
00:23 raydiak ah, that explains it then, n/m
00:24 raydiak thanks jnthn++
00:25 BenGoldberg If I wanted to do this:
00:25 BenGoldberg r: my @foo = 1,2; say [+|] @foo
00:25 camelia rakudo-parrot 051aa6, rakudo-jvm 051aa6, rakudo-moar 051aa6: OUTPUT«3␤»
00:25 jnthn ...cute...
00:25 BenGoldberg Using a method instead of a prefix, how would I do it?
00:26 BenGoldberg r: my @foo = 1,2; say @foo.[+|]; # doesn't work
00:26 camelia rakudo-parrot 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gGaQRYLm3N�Preceding context expects a term, but found infix +| instead�at /tmp/gGaQRYLm3N:1�------> [32mmy @foo = 1,2; say @foo.[+|[33m�[31m]; # doesn't work[0m�»
00:26 jnthn .reduce, I think.
00:26 camelia ..rakudo-jvm 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tc9rjCt4Ao�Preceding context expects a term, but found infix +| instead�at /tmp/tc9rjCt4Ao:1�------> [32mmy @foo = 1,2; say @foo.[+|[33m�[31m]; # doesn't work[0m�»
00:26 camelia ..rakudo-moar 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uUt65LY7x7�Preceding context expects a term, but found infix +| instead�at /tmp/uUt65LY7x7:1�------> [32mmy @foo = 1,2; say @foo.[+|[33m�[31m]; # doesn't work[0m�»
00:26 BenGoldberg r: my @foo = 1,2; say @foo.reduce([+|]);
00:26 camelia rakudo-moar 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int␤  in method reduce at src/gen/m-CORE.setting:8045␤  in block  at /tmp/OqOx8pZsuT:1␤␤»
00:26 camelia ..rakudo-parrot 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int instead␤  in method reduce at gen/parrot/CORE.setting:8063␤  in block  at /tmp/StkK1WkOCs:1␤␤»
00:26 camelia ..rakudo-jvm 051aa6: OUTPUT«Nominal type check failed for parameter '&with'␤  in method reduce at gen/jvm/CORE.setting:8050␤  in block  at /tmp/0LKB4kDqAx:1␤␤»
00:27 BenGoldberg r: my @foo = 1,2; say @foo.reduce(with:&infix::<+|>);
00:27 camelia rakudo-jvm 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4Qpsimb6NG�Preceding context expects a term, but found infix +| instead�at /tmp/4Qpsimb6NG:1�------> [32m = 1,2; say @foo.reduce(with:&infix::<+|[33m�[31m>);[0m�»
00:27 camelia ..rakudo-parrot 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gKfE12hhd2�Preceding context expects a term, but found infix +| instead�at /tmp/gKfE12hhd2:1�------> [32m = 1,2; say @foo.reduce(with:&infix::<+|[33m�[31m>);[0m�»
00:27 camelia ..rakudo-moar 051aa6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vVmA7DR2dE�Preceding context expects a term, but found infix +| instead�at /tmp/vVmA7DR2dE:1�------> [32m = 1,2; say @foo.reduce(with:&infix::<+|[33m�[31m>);[0m�»
00:27 clsn r: my @foo=1,2; say @foo.reduce(&infix:<+>)
00:28 camelia rakudo-parrot 051aa6, rakudo-jvm 051aa6, rakudo-moar 051aa6: OUTPUT«3␤»
00:28 BenGoldberg Ahh
00:28 jnthn r: my @foo=1,2; say @foo.reduce([+])
00:28 camelia rakudo-parrot 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int instead␤  in method reduce at gen/parrot/CORE.setting:8063␤  in block  at /tmp/ZrhiVSPgCE:1␤␤»
00:28 camelia ..rakudo-moar 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int␤  in method reduce at src/gen/m-CORE.setting:8045␤  in block  at /tmp/EJ0hhw818D:1␤␤»
00:28 camelia ..rakudo-jvm 051aa6: OUTPUT«Nominal type check failed for parameter '&with'␤  in method reduce at gen/jvm/CORE.setting:8050␤  in block  at /tmp/ZrTKKN8gJ9:1␤␤»
00:28 jnthn oops
00:28 jnthn r: my @foo=1,2; say @foo.reduce(&[+])
00:28 camelia rakudo-parrot 051aa6, rakudo-jvm 051aa6, rakudo-moar 051aa6: OUTPUT«3␤»
00:28 jnthn There's also that shortcut.
00:29 BenGoldberg r: my @foo = 1,2; say @foo.reduce([+|]);
00:29 camelia rakudo-jvm 051aa6: OUTPUT«Nominal type check failed for parameter '&with'␤  in method reduce at gen/jvm/CORE.setting:8050␤  in block  at /tmp/Hu7_XYbivq:1␤␤»
00:29 camelia ..rakudo-moar 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int␤  in method reduce at src/gen/m-CORE.setting:8045␤  in block  at /tmp/nO7ZskkYiM:1␤␤»
00:29 camelia ..rakudo-parrot 051aa6: OUTPUT«Nominal type check failed for parameter '&with'; expected Callable but got Int instead␤  in method reduce at gen/parrot/CORE.setting:8063␤  in block  at /tmp/rkTi5N7Gvm:1␤␤»
00:29 BenGoldberg r: my @foo = 1,2; say @foo.reduce(&[+|]);
00:29 camelia rakudo-parrot 051aa6, rakudo-jvm 051aa6, rakudo-moar 051aa6: OUTPUT«3␤»
00:29 BenGoldberg :)
00:29 jnthn ah, yes, I lost the | :)
00:32 raydiak always happy to incite an outburst of nonsense :) just copied it out of a call and expected it to work without really considering it
00:32 rylinaux joined #perl6
00:42 colomon joined #perl6
00:42 psch ttps://github.com/rakudo/rakudo/pull/237 and https://github.com/perl6/roast/pull/36 feedback and improvements very welcome
00:42 psch https://github.com/rakudo/rakudo/pull/237 # missed the h for some reason
00:43 mtk joined #perl6
00:44 jnthn Time for some rest...'night
00:44 psch gnight jnthn
01:02 jnap joined #perl6
01:04 [Sno] joined #perl6
01:13 jnap joined #perl6
01:28 xfix joined #perl6
01:29 jeffreykegler left #perl6
01:40 mtj_ joined #perl6
01:47 rjbs hoo boy.
01:51 colomon o/
01:52 psch gnight #perl6 o/
01:53 colomon \o
02:17 odoacre joined #perl6
02:31 raiph anyone interested in LINQ and P6: http://wiki.perl6.org/@linq
02:45 kst` joined #perl6
03:40 atroxaper joined #perl6
03:48 jeffreykegler joined #perl6
03:53 thou joined #perl6
04:03 clsn n: :(::T, T) ~~ :(Str, Str)
04:03 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��GLOBAL::T does not name any package at /tmp/HxJdORiNWV line 1:�------> [32m:(::T[33m�[31m, T) ~~ :(Str, Str)[0m��A type must be provided at /tmp/HxJdORiNWV line 1:�------> [32m:(::T[33m�[31m, T) ~…»
04:04 Mouq joined #perl6
04:09 preflex joined #perl6
04:13 jnap joined #perl6
04:16 jeffreykegler left #perl6
04:29 bjz joined #perl6
04:40 araujo joined #perl6
05:14 jnap joined #perl6
06:14 jnap joined #perl6
06:19 SamuraiJack joined #perl6
06:56 darutoko joined #perl6
07:03 wooden joined #perl6
07:04 berekuk joined #perl6
07:07 berekuk_ joined #perl6
07:13 bjz_ joined #perl6
07:15 jnap joined #perl6
07:23 [particle]1 joined #perl6
07:24 Shozan joined #perl6
07:26 rjbs joined #perl6
07:26 prammer joined #perl6
07:26 lizmat joined #perl6
07:26 lue joined #perl6
07:26 bjz joined #perl6
07:46 rindolf joined #perl6
08:16 jnap joined #perl6
08:34 hummeleBop joined #perl6
09:02 stevan_ joined #perl6
09:03 rindolf joined #perl6
09:17 jnap joined #perl6
09:19 moritz does anybody know of a website which compares the numbers of modules available for different languages?
09:19 moritz I know I've seen such a thing, but can't find it right now
09:19 moritz my google-foo is weak
09:20 raydiak moritz: maybe this one? http://modulecounts.com/
09:22 moritz raydiak: thanks, exactly what I was looking for
09:25 dmol joined #perl6
09:26 raydiak moritz: glad it helped; expected it to be a spam site with a domain that obvious
09:43 masak good modulecount, #perl6
09:43 diakopter good welcomecount, masak
09:43 moritz good masakcount, 1
09:44 masak hahacount, 42
10:05 dalek roast: 0791cdf | (Tobias Leich)++ | S05-mass/properties-general.t:
10:05 dalek roast: align tests about Khmer characters with latest unicode spec
10:05 dalek roast: review: https://github.com/perl6/roast/commit/0791cdfd50
10:06 FROGGS a lot of work :o(
10:07 FROGGS and many other tests to check too
10:07 FROGGS ohh no, many is more like "two"
10:08 moritz two tests, or two test files?
10:12 FROGGS two test groups, aka three related tests, twice
10:13 moritz better than two test files, which could be up to 2k tests :-)
10:16 FROGGS true :o)
10:18 jnap joined #perl6
10:32 araujo joined #perl6
10:34 spider-mario joined #perl6
11:01 berekuk joined #perl6
11:18 jnap joined #perl6
11:25 Rotwang joined #perl6
11:27 dalek roast: 17aa506 | (Tobias Leich)++ | S05-mass/properties-general.t:
11:27 dalek roast: align with unicode >6.1 about <:Other>
11:27 dalek roast: review: https://github.com/perl6/roast/commit/17aa506203
11:28 grondilu joined #perl6
11:31 grondilu parrot is still the fastest for summing large amount of numbers
11:31 grondilu r: say [+] rand xx 10000
11:32 camelia rakudo-jvm 912342, rakudo-moar 912342: OUTPUT«(timeout)»
11:32 camelia ..rakudo-parrot 912342: OUTPUT«4955.63684252641␤»
11:32 * grondilu wonders why
11:39 jnthn grondilu: Looking.
11:40 FROGGS r: say [+] 1 xx 10000
11:40 camelia rakudo-jvm 912342, rakudo-moar 912342: OUTPUT«(timeout)»
11:40 camelia ..rakudo-parrot 912342: OUTPUT«10000␤»
11:41 FROGGS k, it is not rand :o)
11:42 jnthn No, and it's not that it's hitting the sig bind slow path either.
11:42 jnthn In fact, the only common things that do so are subst and match
11:46 colomon r: say [+] 1..10000
11:46 camelia rakudo-parrot 912342, rakudo-jvm 912342, rakudo-moar 912342: OUTPUT«50005000␤»
11:46 colomon r: say [+] (1..10000).reverse
11:46 camelia rakudo-parrot 912342, rakudo-jvm 912342, rakudo-moar 912342: OUTPUT«50005000␤»
11:47 colomon xx issue?
11:47 jnthn Yeah
11:47 jnthn Sampling profile is revealing.
11:48 jnthn Moar's gather/take has the same issue as the JVM one, it's just that Moar doesn't stack overflow.
11:49 colomon r: say [+] (1..10000).map({ rand })
11:49 camelia rakudo-moar 912342: OUTPUT«5041.570714␤»
11:49 camelia ..rakudo-jvm 912342: OUTPUT«5010.793634118431␤»
11:49 camelia ..rakudo-parrot 912342: OUTPUT«4986.20241091392␤»
11:50 grondilu xx it is then
11:51 denis_boyun joined #perl6
11:52 jnthn gather/take in general, I think
11:52 jnthn But there's something else going on too.
11:58 colomon explain more, please?
12:01 * colomon is looking suspiciously at ListIter
12:01 * colomon just realized there is a GatherIter
12:01 jnthn colomon: Well, gather/take accidentally introduces an extra stack frame each time we invoke it.
12:02 * colomon was thinking it was intentional
12:02 grondilu Pfew, just tested the same thing in P5: "for (1..10000) { $s += rand }; say $s;".  It ran on 0.016s.  I know that P5 is fast, but I'm still a bit worried by the size of the gap with P6
12:04 jnthn grondilu: No, that's *not* the same thing.
12:05 grondilu indeed, just realized it
12:05 grondilu my $s; for 1..10000 { $s += rand }; say $s;  runs much faster
12:05 jnthn C:\consulting\rakudo>timecmd perl6-m -e "my $s; for 1..10000 { $s += rand }"
12:05 jnthn command took 0:0:0.57 (0.57s tota
12:06 jnthn Which is a tenth of the time.
12:06 jnthn [+] is hitting a couple of slow things, though.
12:06 jnthn Spending lots of time in places it shouldn't be.
12:08 grondilu it seems that "reduce *+*, ..." is faster
12:09 * grondilu checked again
12:10 grondilu yeah, reduce *+*, @numbers is about five times faster than [+] @numbers
12:20 LLamaRider joined #perl6
12:25 Jimes joined #perl6
12:25 Jimes hi guys
12:25 Jimes perl6: say "Hello"
12:26 camelia rakudo-parrot 912342, rakudo-jvm 912342, rakudo-moar 912342, niecza v24-109-g48a8de3: OUTPUT«Hello␤»
12:26 Jimes can anyone please tell what is the origin of the docs published at docs.perl6.org?
12:26 Jimes is it up-to-date or not? is it based on synopses/apocal..s?
12:27 moritz Jimes: it's on github, perl6/doc
12:27 Jimes this URL http://doc.perl6.org
12:27 moritz Jimes: and it's neither totally up-to-date or hopelessly outdated
12:27 moritz Jimes: and it's based on the implemented subset of the synopses
12:28 Jimes i see lots of "1 or 2 years ago" on that github :)
12:28 moritz sadly the script that generates the .html files has bitrotted a bit
12:28 Jimes should i better consult other documents while reading this? it looks like a nice documentation (much easier to read than Apo/Syn)
12:31 moritz Jimes: if something is unclear, just ask here
12:31 Jimes ok thank you :)
12:34 dalek doc: f1820bd | moritz++ | / (5 files):
12:34 dalek doc: eval is now EVAL
12:34 dalek doc: review: https://github.com/perl6/doc/commit/f1820bd474
12:38 dalek roast: 587aec0 | jnthn++ | S02-types/ (2 files):
12:38 dalek roast: Make tests more robust to Windows line endings.
12:38 dalek roast: review: https://github.com/perl6/roast/commit/587aec0069
12:41 dalek doc: a94bbe0 | moritz++ | htmlify.pl:
12:41 dalek doc: Update htmlify.pl to match current Rakudo (WIP)
12:41 dalek doc: review: https://github.com/perl6/doc/commit/a94bbe06ba
12:42 huf joined #perl6
12:43 moritz does anybody have any experience wrt memory consumption on rakudo-p vs. rakudo-m?
12:43 daniel-s_ joined #perl6
12:50 * colomon wishes again there was something like "time" which allowed you to easily and quickly check the memory usage of a program under linux
12:50 moritz camelia: where do you want it?
12:51 moritz erm, I meant colomon :-)
12:52 colomon well, preferably on all my machines?
12:54 berekuk joined #perl6
12:58 grondilu well, you can use top, can't you?
12:59 grondilu t's not exactly like time, though.
12:59 grondilu or maybe ps
13:08 grondilu maybe try this:  coproc do-my-stuff ; while ps h -o rssize $COPROC_PID; do : ; done
13:09 LLamaRider joined #perl6
13:11 colomon grondilu: you can use top if you sit there watching it.  which is kind of like time, if by time you mean using a stopwatch.  ;)
13:11 grondilu thus my suggestion with ps
13:12 grondilu you can store the rssize evolution in time in a file:
13:12 grondilu coproc do-my-stuff ; while ps h -o rssize $COPROC_PID; do : ; done > do-my-stuff.memory-usage
13:13 grondilu hang on, I can do better
13:15 grondilu coproc perl6-m -e 'say [+] rand xx 1000' ; while rssize="$(ps h -o rssize $COPROC_PID)"; do echo "$(date +%N);$rssize" ; done
13:20 jnap joined #perl6
13:22 grondilu with a graph:
13:22 grondilu coproc perl6-m -e 'say [+] rand xx 1000' ; while rssize="$(ps h -o rssize $COPROC_PID)"; do echo "$(date +%s%N) $rssize" ; done |gnuplot -p -e "plot '-'"
13:25 * masak .oO( is a "coproc" the dual of a proc? )
13:26 grondilu masak: $ help coproc
13:27 masak wow, it really is a co-process :)
13:27 woolfy joined #perl6
13:35 mtk joined #perl6
13:37 dalek rakudo/nom: 37c956f | jnthn++ | src/Perl6/ (2 files):
13:37 dalek rakudo/nom: Fix various closure-related issues.
13:37 dalek rakudo/nom:
13:37 dalek rakudo/nom: In these places we wrongly fell back on auto-close, which is slow and
13:37 dalek rakudo/nom: wrong.
13:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/37c956ff50
13:41 moritz do we have anything in core for generating temporary files?
13:41 moritz p: say IO::Path.tmpdir
13:41 camelia rakudo-parrot 912342: OUTPUT«No such method 'tmpdir' for invocant of type 'IO::Path'␤  in block  at /tmp/55zxOH8rI6:1␤␤»
13:41 moritz p: say IO::Spec.tmpdir
13:41 camelia rakudo-parrot 912342: OUTPUT«/tmp␤»
13:43 SamuraiJack joined #perl6
13:44 moritz fwiw it seems that open :p (pipe) has regressed in rakudo
13:44 jnthn p: say $*TMPDIR
13:44 preflex jnthn: you have 3 new messages. '/msg preflex messages' to read them.
13:44 camelia rakudo-parrot 912342: OUTPUT«IO::Path</tmp>␤»
13:45 moritz htmlify in p6/doc does this: my $pipe = open "dot -T$format -o$file", :w, :p;
13:45 moritz and it tries to execute ./dot
13:47 masak that... sounds wrong.
13:53 jnthn That sounds broken...
13:57 berekuk joined #perl6
13:57 grondilu std: sub f(\x where x > 1) { say x };  f(7);
13:57 camelia std 09dda5b: OUTPUT«ok 00:01 128m␤»
13:57 grondilu r: sub f(\x where x > 1) { say x };  f(7);
13:57 camelia rakudo-moar 912342: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0K6A4BjAb3�Preceding context expects a term, but found infix > instead�at /tmp/0K6A4BjAb3:1�------> [32msub f(\x where x >[33m�[31m 1) { say x };  f(7);[0m�»
13:57 camelia ..rakudo-jvm 912342: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Lp8a55TyZJ�Preceding context expects a term, but found infix > instead�at /tmp/Lp8a55TyZJ:1�------> [32msub f(\x where x >[33m�[31m 1) { say x };  f(7);[0m�»
13:57 camelia ..rakudo-parrot 912342: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kTdGyPbToB�Preceding context expects a term, but found infix > instead�at /tmp/kTdGyPbToB:1�------> [32msub f(\x where x >[33m�[31m 1) { say x };  f(7);[0m�»
13:58 grondilu n: sub f(\x where x > 1) { say x };  f(7);
13:58 camelia niecza v24-109-g48a8de3: OUTPUT«7␤»
13:58 moritz p: sub f($x where $x > 1) { say $x }; f 7
13:58 camelia rakudo-parrot 912342: OUTPUT«7␤»
13:58 moritz it seems it parses the x as a sub call
13:59 moritz which is why it expects a term afterwards
14:04 moritz it seems htmlify hasn't bitrotted as much as I feared
14:04 moritz and so far it's below 1GB of memory usage, which is also better than what I feared
14:06 dalek doc: 59eff62 | moritz++ | lib/Perl6/Documentable/Registry.pm:
14:06 dalek doc: avoid deprecated .exists method
14:06 dalek doc: review: https://github.com/perl6/doc/commit/59eff62134
14:06 dalek doc: f4856f2 | moritz++ | lib/Perl6/TypeGraph/Viz.pm:
14:06 dalek doc: work around broken open :p (pipe) feature in rakudo
14:06 dalek doc: review: https://github.com/perl6/doc/commit/f4856f253d
14:09 colomon grondilu++
14:13 moritz p: my @a = 1, 2, 3; say ($@a, ).elems
14:13 camelia rakudo-parrot 912342: OUTPUT«1␤»
14:14 moritz p: my @a = 1, 2, 3; my @b = $@a, 4, 5; say @b.perl
14:15 camelia rakudo-parrot 912342: OUTPUT«Array.new([1, 2, 3], 4, 5)␤»
14:20 jnap joined #perl6
14:37 atroxaper joined #perl6
14:39 eiro hello
14:40 FROGGS hi eiro
14:40 eiro jnthn, back to school? srly ?
14:41 colomon woah, say [+] rand xx 10000; actually crashes with a stack overflow on JVM.  :(
14:41 tadzik hey hey eiro!
14:41 eiro tadzik, \o/ wasup ?
14:41 grondilu we now have three implementation of the gamma function:  http://rosettacode.org/wiki/Gamma_function  Pick the one you want to put in the core if you want to :)
14:41 jnthn eiro: ?
14:44 jnap joined #perl6
14:44 eiro jnthn, filey school since 40mn
14:45 tadzik eiro: fun times :) Still struggling to finish my studies. How are things?
14:45 jnthn eiro: wtf :)
14:46 jnthn eiro: bah, talk about clickign the wrong thing
14:48 moritz p: my @a = 1, 2; my @b = 4, 5; say (@a, @b).tree
14:48 camelia rakudo-parrot 37c956: OUTPUT«1 2 4 5␤»
14:48 moritz p: my @a = 1, 2; my @b = 4, 5; say (@a, @b).tree.perl
14:48 camelia rakudo-parrot 37c956: OUTPUT«LoL.new([1, 2], [4, 5])␤»
14:50 moritz p: my @a = 1, 2; my @b = 4, 5; my @c = (@a, @b).tree; say @c.perl
14:50 camelia rakudo-parrot 37c956: OUTPUT«Array.new([1, 2], [4, 5])␤»
14:50 moritz so .tree only itemiizes the inner containers, but not the parcel it was called on?
14:50 moritz p: my @a = 1, 2; my @b = 4, 5; my @c = (@a, @b).tree; say @c.elems
14:50 camelia rakudo-parrot 37c956: OUTPUT«2␤»
14:50 eiro tadzik, wow .. still student? courage! everything's fine there: familly, friends and collegues make me really happy. my only sadness is about work: i feel i'm not a computer engineer now ... just an overpayed hotliner
14:51 eiro jnthn, ok :) i was wondering if you want to finish your phd
14:54 pecastro joined #perl6
14:55 johnmilton joined #perl6
15:00 moritz r: say (<a b c> Z <D E F>).tree.perl
15:00 camelia rakudo-parrot 37c956, rakudo-jvm 37c956, rakudo-moar 37c956: OUTPUT«(["a", "D"], ["b", "E"], ["c", "F"]).list␤»
15:02 moritz p: my $x = (<a b c> Z <D E F>); say $x.list.elems; say $x.flat.elems; say $x.tree.elems
15:02 camelia rakudo-parrot 37c956: OUTPUT«3␤6␤3␤»
15:02 tadzik eiro: is it called something like "deliveries"? We have that team at work too, and they sometimes complain that their work is something between hardcore bugfixing and customer support, something writing 1 line of code a week
15:02 yogan joined #perl6
15:05 tadzik some find it challenging, some frustrating, I guess it can be both :/
15:09 dalek doc: ca83c5c | moritz++ | lib/containers.pod:
15:09 dalek doc: elaborate on item vs. list vs. flattening
15:09 dalek doc: review: https://github.com/perl6/doc/commit/ca83c5c029
15:10 moritz hoelzro: iirc you asked about flattening the other day. The commit above should explain it
15:10 moritz any feedback (not just from hoelzro) on those docs is very welcome.
15:10 kivutar joined #perl6
15:11 timotimo "as if the was no" <- should read there
15:12 dalek doc: 44f2b0b | moritz++ | lib/containers.pod:
15:12 dalek doc: fix typo, timotimo++
15:12 dalek doc: review: https://github.com/perl6/doc/commit/44f2b0b5fa
15:13 timotimo i think it would be nice to mention much earlier what [...] causes to happen and how Array.new relates to that
15:14 dalek doc: b2e7ebf | moritz++ | lib/containers.pod:
15:14 dalek doc: explicit mention what [] and Array.new do
15:14 dalek doc: review: https://github.com/perl6/doc/commit/b2e7ebfe96
15:15 moritz timotimo++
15:15 timotimo that looks good :)
15:15 moritz it's not really early; I don't know how to do that without restructuring the whole article
15:15 masak oh heiro! :)
15:15 eiro tadzik, no deliveries at all: "primary mission" is to provide support and documentation and support for users. engineering is case of spare times. we have more than 40k users and i manage 4 applications: there is no spare time
15:15 eiro it was a trap!
15:15 eiro masak, \o/
15:16 masak eiro: is it eating your soul? maybe look for something else?
15:16 eiro at least, my collegues are awesome
15:16 masak that's something.
15:16 masak I've had that kind of job.
15:16 timotimo moritz: i feel like for the example (@left Z @right).tree there's brackets missing around it, or perhaps not?
15:18 moritz timotimo: no, I don't want to create an itemized array
15:18 timotimo ah, of course
15:19 moritz IMHO it should be documented for all Positional methods whether they flatten or not
15:20 eiro masak, i looked for something else: but IT in elsass sucks in many ways and the very rare interesting jobs are always reserved. my best chance to have something good is to stay at university and try to get a position as research assistant engineer
15:20 moritz which kinda makes me wish we had a way to put that information in the signature
15:20 eiro (for astrophysics or biology for example)
15:20 moritz eiro: moving is not an option?
15:20 moritz p: my $x = 0; say (<a b c> Z (1, 2, 3)).map({ $x++; $_ }); say $x
15:20 camelia rakudo-parrot 37c956: OUTPUT«a 1 b 2 c 3␤6␤»
15:21 moritz .map flattens.
15:21 moritz p: say (<a b c> Z (1, 2, 3))[0].perl
15:21 camelia rakudo-parrot 37c956: OUTPUT«("a", 1)␤»
15:21 eiro moritz, i had teleworked and it lead me to depression (even if the job itself and the firm was all i ever dreamed)
15:21 tadzik eiro: yeah, good colleagues and good environment are awesome to have, even if work is not always very interesting
15:22 eiro and my familly is not ready to move (my wife is teacher and very bond to its college)
15:22 * colomon just hit that ugly moment when he actually has to implement the ugly core to make his beautiful abstraction work
15:22 moritz p: say (<a b c> Z (1, 2, 3)).elems
15:22 camelia rakudo-parrot 37c956: OUTPUT«3␤»
15:23 eiro tadzik, that's why i keep beeing happy: everything but my work is really nice in my live
15:23 moritz how do lists work in p6 pod?
15:23 * moritz forgot
15:24 eiro i have to stop complaining and code more on my free time :)
15:24 tadzik moritz: just elems
15:24 tadzik =item foo, =item bar
15:24 tadzik nothing around them
15:24 tadzik ...or so I remember :-)
15:25 zakharyas joined #perl6
15:29 masak <eiro> i have to stop complaining and code more on my free time :)
15:29 masak eiro: you and me both...
15:31 eiro masak, sure but you are still coding. i'm just complaining :)
15:33 dalek doc: 9c28c71 | moritz++ | lib/containers.pod:
15:33 dalek doc: Add some more examples about what flattens and what does not
15:33 dalek doc: review: https://github.com/perl6/doc/commit/9c28c71185
15:34 moritz tadzik: takk
15:34 masak eiro: coding... but not enough Perl 6. :/
15:35 timotimo moritz: either "the whole point of tree is not to flatten" or "to not flatten" (something about split infinitives or something)
15:35 dalek doc: c6c9e23 | moritz++ | lib/containers.pod:
15:35 dalek doc: grammaro, timotimo++
15:35 dalek doc: review: https://github.com/perl6/doc/commit/c6c9e23960
15:36 masak the whole discussion about split infinitives is so silly.
15:36 moritz timotimo: thanks; I've chosen the latter, it seems to put more emphasis on the negation
15:36 eiro so i am. i write perl5 code. sometims python one
15:36 masak aye.
15:36 masak moritz++
15:37 * moritz has fun with some p5 projects in his free time
15:40 masak I should use more p5 in my spare time, too. it's a great language.
15:40 masak I also want to look into Rust.
15:40 eiro so do i: https://github.com/eiro/app-atombomb/blob/master/bin/atombomb
15:41 eiro (which will be an excellent exercice to write perl6 code: rewrite it in perl6
15:41 eiro clojure and rust are clearly something i would like to try
15:42 * bjz does most of his programming work in Rust, but thinks perl6 looks neat
15:43 eiro i was reading the code of moarvm last month, wondering why write it in C (rust or go must be easier ?)
15:43 * bjz likes linguistic abstraction ^_^
15:43 eiro bjz, is rust stable enought for production ?
15:44 bjz eiro: some crazies are using it for production I think - you'd have to ask on irc.mozilla.org #rust
15:44 moritz "some crazies are using it for production" -- that sounds about the same as Perl 6 :-)
15:45 eiro yep :) i have some perl6 scripts there
15:45 jnthn eiro: C is still something of a sweet spot for doing things like MoarVM.
15:45 bjz eiro: it's pretty good, we don't have many show-stopping bugs (we have a build bot), but the syntax/semantics are still shifting - much less than they used to though. things are very much crystalizing
15:46 jnthn eiro: Compiles pretty much everywhere and has good tooling are two notables, but also the ability to screw with memory however you like is rather useful when implementing stuff like GCs.
15:46 bjz moritz: how is perl6 going?
15:47 bjz jnthn: good thing about Rust is it should fill those niches well - but the tooling is still lacking
15:47 eiro jnthn, sure but i imagine that write moarvm in C is more much work than in go or rust
15:48 eiro to finally deal with same problems (concurrency, garbage collection, ...)
15:48 bjz jnthn: does the VM use address-of gotos?
15:48 bjz jnthn: I heard the Erlang VM does
15:49 eiro there was a post on hackernews about someone who uses the opensource parts of chrome as C runtime.
15:49 moritz bjz: well, we are having fun with MoarVM, and a slowly growing module ecosystem
15:49 jnthn bjz: Can use computed goto where it's available, yes.
15:49 moritz we just need more speed, docs and a killer app.
15:50 moritz who doesn't? :-)
15:50 bjz jnthn: apparently address-of gotos are really good for implementing vms for dynamic langs - but it's something Rust doesn't have. dunno if there are alternatives though.
15:50 bjz moritz: awesome
15:50 eiro you all guys are my stars! when i see the work accomplished last years, it still amaze me!
15:50 timotimo MoarVM seems to be providing "more speed" already, which makes me very happy
15:51 jnthn bjz: Yeah, they can be useful.
15:51 bjz moritz: where does MoarVM fit in with Rakudo?
15:52 bjz ohh: https://github.com/moarvm/moarvm
15:52 eiro is parrot still needed to build nqp/moarvm ?
15:52 timotimo no :)
15:52 timotimo i need to revise that readme again
15:52 eiro wow: awesome! i have to update my installation script!
15:52 tadzik eiro: try rakudobrew :)
15:53 tadzik it even supports moarvm since yesterday or so
15:54 tadzik ok, since Now, if you look at the commits
15:54 berekuk joined #perl6
15:55 thou joined #perl6
15:55 bjz moritz: one thing that has been super useful for the Rust community is the 'This Week in Rust' posts. Is there anything like that for Perl6 out there?
15:55 * bjz is curious to look at the latest work
15:55 timotimo GlitchMr used to build weekly perl6 changes posts on his blog
15:56 jnthn eiro: Much more work? That's hard to say. I *know* C, its tooling, its semantics, and how to design stuff so it can be implemented in C. I'd have been starting from zero on all those with anything else. Not to mention there's more C hackers around to contribute...
15:56 ajr joined #perl6
15:57 jnthn eiro: I'm not saying it couldn't have been done well in Go or Rust, but I'm not at all sure we'd be this far along if I'd taken that path...
15:58 Psyche^ joined #perl6
16:00 bjz jnthn: yes.  MoarVM looks like a considerable undertaking to say the least
16:02 * clsn finds a bug in his Signature matching code.  Oops.
16:02 timotimo clsn: you brought shame upon your whole family! time for sepukku!
16:02 timotimo we don't allow people to commit code with any bugs in them!
16:03 bjz timotimo: do you have a link to those post btw?
16:03 * bjz is curious
16:03 jnthn timotimo: Oh noes, I guess I should leave too? :P
16:03 bjz jnthn: A couple of years ago Rust was a very different beast - much uglier and unpolished. would never have contemplated writing a project in it. And Go? I would be very skeptical about writing a VM in Go. Sounds like C was the best choice.
16:03 arnsholt If we don't allow bugs, what about build-breaking commits? O=)
16:04 odoacre joined #perl6
16:04 bjz Is Perl6 pretty stable now? Is it just the speed issue you guys are working on?
16:05 timotimo mildly stable
16:05 timotimo the stableness is very unevenly distributed
16:05 bjz ahh yes
16:05 bjz sounds familiar
16:05 bjz :P
16:05 timotimo we refer to parts of the specification that are "solid", "slushy" or "liquid" ;)
16:05 bjz heh
16:05 bjz awesome
16:05 grondilu but usually when you don't do fancy or not-yet-implemented stuff, it works fine.
16:06 rindolf joined #perl6
16:06 grondilu I actually haven't encountered a bug for a while.
16:07 bjz timotimo: https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-14#language-feature-freeze-for-10
16:07 bjz timotimo: :P
16:07 timotimo bjz: GlitchMr took down his blog :(
16:07 bjz oh :(
16:07 timotimo i often hit bugs, but i'm specifically looking for them :P
16:07 bjz ICEs? :D
16:08 bjz (internal compiler errors)
16:08 bjz oh wait
16:08 bjz prel isn't compiled
16:08 bjz heh
16:08 bjz s/prel/perl6/
16:08 timotimo perl6 is compiled, though
16:08 bjz jitted?
16:08 timotimo on the JVM, yes
16:09 timotimo on MoarVM, some time later this or early next year
16:09 timotimo perhaps
16:09 timotimo no promises
16:09 timotimo but on all backends of rakudo, it's also AOT'ed
16:09 * timotimo afk for a bit
16:12 jnthn Does somebody have an example of some gather/take code they know explodes the stack on JVM?
16:12 BenGoldberg joined #perl6
16:13 * jnthn can likely create one, though...
16:14 eiro tadzik, i'll check rakudobrew. i was using: https://github.com/eiro/labo/blob/master/rakudo_install
16:14 jnthn j: say [+] 1..10000
16:14 camelia rakudo-jvm 37c956: OUTPUT«50005000␤»
16:14 eiro oh crap ... redundant work:
16:14 jnthn j: say [+] rand xx 10000
16:14 eiro i switch to your script
16:14 camelia rakudo-jvm 37c956: ( no output )
16:15 eiro jnthn, thanks for explainations about "why C"
16:15 molaf_ joined #perl6
16:19 grondilu j: say [+] gather take rand for ^10000
16:19 camelia rakudo-jvm 37c956: ( no output )
16:20 grondilu j: say .[.end] given gather take rand for ^10000
16:20 camelia rakudo-jvm 37c956: ( no output )
16:21 denis_boyun joined #perl6
16:21 jnthn grondilu: Turns out the "say [+] rand xx 10000" does it
16:21 grondilu yeah but I thought you might want something more explicit
16:22 jnthn nah, that will do
16:22 jnthn But thanks :)
16:22 * jnthn compiles attempt 1 of N at fixing this...
16:22 * jnthn wonders how big N will be... :S
16:24 jnthn wtf, I think it worked first time
16:25 jnthn And gather.t still passes
16:26 kivutar joined #perl6
16:26 timotimo wtf
16:28 colomon jnthn++
16:30 dalek nqp: 8055d65 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (2 files):
16:30 dalek nqp: Enable invoking reset with a continuation.
16:30 dalek nqp:
16:30 dalek nqp: If given a continuation instead of a coderef, then it tags the stack
16:30 dalek nqp: and resumes the continuation as the very next thing. This will enable
16:30 dalek nqp: fixing Rakudo on JVM's gather/take stack overflow issues.
16:30 dalek nqp: review: https://github.com/perl6/nqp/commit/8055d65708
16:30 jnthn So, how hard will the corresponding Moar patch be...
16:30 * timotimo assumes "not very hard"
16:31 timotimo to increase the suspense for me, i'll be AFK for a bit now :P
16:32 wooden joined #perl6
16:32 wooden joined #perl6
16:33 jnthn I'm not sure anything to do with implementing continuations can be described as "not very hard" :P
16:35 arnsholt I find continuations a bit mind-bending as a concept, so implementing them is probably even harder =)
16:36 masak depends how bent your mind already is... :P
16:36 arnsholt =D
16:36 masak I find for most of these things, bending the mind is a once-only cost. or at least it gets easier over time.
16:36 arnsholt Oh, definitely
16:37 jnthn True. I couldn't have got the JVM fix right first try if I hadn't done the continuations on Moar within the last few weeks.
16:37 arnsholt My mind is mostly bent there to get continuations (I think), but not quite there
16:42 lue joined #perl6
16:43 araujo joined #perl6
16:45 jnthn spectest on Rakudo JVM with the fix looking good
16:45 colomon \o/
16:45 jnthn Next to build a Rakudo with my first pass at the fix on Moar
16:45 colomon \o/ \o/
16:46 jnthn btw, even for things that didn't stack overflow, gather/take was kinda horrible on JVM before this
16:47 jnthn So hopefully this helps performance on a few things.
16:47 * jnthn guesses this was probably the most annoying of the Rakudo JVM bugs.
16:50 colomon even with the relatively small amount of p6 playing around I've done in the last month, I hit the stack overflow thing more than once.
16:53 timotimo yeah, you run into lazy lists quite frequently
16:53 jnthn Promising news: with my attempted fix on Moar, Rakudo builds, sanity tests, does "say [+] rand xx 10000" faster than on Parrot and passes gather.t.
16:53 jnthn timotimo: Well, map is lazy, but doesn't hit the bug
16:53 jnthn timotimo: It's specifically gather/take
16:53 jnthn spectest on MoarVM underway.
16:53 * clsn fixes his bug and pushes, so it's added to the pull request.
16:53 colomon in fact, it was leading me to rewriting things using map instead of gather/take.  :)
16:55 hoelzro moritz++ # docs
16:55 hoelzro evening perl 6ers!
16:56 colomon hoelzro: not quite noon here.  ;)
16:56 hoelzro good * 6ers, then =)
16:56 colomon \o
17:00 timotimo hey hoe
17:02 lue joined #perl6
17:03 moritz hoelzro: do they make sense to you?
17:03 hoelzro timotimo: hey tim =P
17:03 hoelzro moritz: yes, that cleared a few things up
17:04 moritz \o/
17:05 dalek nqp: eef5867 | jnthn++ | tools/build/MOAR_REVISION:
17:05 dalek nqp: Bump to a MoarVM with continuation improvements.
17:05 dalek nqp: review: https://github.com/perl6/nqp/commit/eef5867de7
17:06 dalek rakudo/nom: 7b540cc | jnthn++ | tools/build/NQP_REVISION:
17:06 dalek rakudo/nom: Get NQP with JVM/Moar continuation improvements.
17:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b540cc973
17:06 dalek rakudo/nom: 8c054a4 | jnthn++ | src/core/GatherIter.pm:
17:06 dalek rakudo/nom: Fix GatherIter not to add a frame every take.
17:06 dalek rakudo/nom:
17:06 dalek rakudo/nom: Fixes the typical case of StackOverflowException on the JVM, and leads
17:06 dalek rakudo/nom: to far better gather/take performance on both MoarVM and JVM.
17:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8c054a42ae
17:08 timotimo this makes me happy ^
17:09 nwc10 does parrot do gather/take?
17:10 eiro tadzik, https://github.com/tadzik/rakudobrew/blob/master/bin/rakudobrew#L8
17:10 jnthn nwc10: Yes, implemented using coroutines
17:10 jnthn nwc10: Its implementation is at least partly a PIR hack. :)
17:10 eiro i want it to be an env variable. will you accept a patch?
17:11 nwc10 whereas JVM and MoarVM implementations are using continuations? And a less hacky design?
17:11 jnthn Well, nqp:: ops instead :)
17:12 jnthn It's a bit cleaner, to me at least.
17:13 tadzik eiro: sure
17:16 eiro tadzik, thanks :)
17:23 eiro tadzik, no lib used, just 5.10. this is about being easy to install, right ?
17:24 tadzik eiro: what do you mean?
17:27 eiro tadzik, the only use you do are pragmas (strict, warnings, 5.010) is this just because you haven't felt the need of loading something else?
17:28 tadzik eiro: I didn't feel a strong need for anything else, and I think the more dependency-free it is, the better :)
17:28 eiro (rewriting slurp instead of using File::Slurp for exemple)
17:28 tadzik oh, I did that? :)
17:28 eiro yep
17:28 colomon jnthn: for what it's worth, say [+] 1 xx 10000; runs in .971s on parrot, 1.200s on Moar, and 6.2s on jvm.  (The last crashed before your patch.)
17:28 tadzik oh, indeed
17:29 tadzik yeah, I probably wanted it dependency free
17:29 eiro and write_file <=> spurt
17:29 eiro tadzik, app::fatpacker aware, right ?
17:29 tadzik eiro: yeah
17:30 moritz p: 4.sqr
17:30 camelia rakudo-parrot 37c956: OUTPUT«No such method 'sqr' for invocant of type 'Int'␤  in block  at /tmp/2uZuNY5h7f:1␤␤»
17:30 moritz p: sqr 4
17:30 camelia rakudo-parrot 37c956: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GZb86Q2MOA�Undeclared routine:�    sqr used at line 1. Did you mean '&sqrt'?��»
17:30 BenGoldberg p: sqrt 4
17:30 camelia rakudo-parrot 37c956: ( no output )
17:30 BenGoldberg p: say sqrt 4
17:30 camelia rakudo-parrot 37c956: OUTPUT«2␤»
17:30 BenGoldberg p: say sqrt 2
17:30 camelia rakudo-parrot 37c956: OUTPUT«1.4142135623731␤»
17:30 berekuk joined #perl6
17:30 jnthn colomon: Curious, I got Moar a bit faster. Was that on latest, though?
17:30 BenGoldberg p6: say sqrt 2
17:30 camelia rakudo-moar 37c956: OUTPUT«1.414214␤»
17:30 camelia ..rakudo-parrot 37c956: OUTPUT«1.4142135623731␤»
17:30 camelia ..rakudo-jvm 37c956, niecza v24-109-g48a8de3: OUTPUT«1.4142135623730951␤»
17:30 eiro ok then :)
17:30 colomon jnthn: This is perl6 version 2013.12-313-g8c054a4 built on MoarVM version 2013.10-393-gc417239
17:30 BenGoldberg Why does moar output lots fewer digits?
17:31 colomon jnthn++ # shaved 5 seconds off both moar and jvm (pre-crash) timings.
17:31 colomon (pre-crash -- time it ran until it crashed)
17:32 BenGoldberg p6: say 2.sqrt.fmt "%10f"
17:32 camelia rakudo-parrot 37c956: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Kj8CNCkgLa�Two terms in a row�at /tmp/Kj8CNCkgLa:1�------> [32msay 2.sqrt.fmt [33m�[31m"%10f"[0m�    expecting any of:�        method arguments�        postfix�        infix st…»
17:32 camelia ..rakudo-jvm 37c956: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PCg6WDnxtK�Two terms in a row�at /tmp/PCg6WDnxtK:1�------> [32msay 2.sqrt.fmt [33m�[31m"%10f"[0m�    expecting any of:�        method arguments�        postfix�        infix stopp…»
17:32 camelia ..rakudo-moar 37c956: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Q10wGKOqTO�Two terms in a row�at /tmp/Q10wGKOqTO:1�------> [32msay 2.sqrt.fmt [33m�[31m"%10f"[0m�    expecting any of:�        method arguments�        postfix�        infix stop…»
17:32 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row (method call requires colon or parens to take arguments) at /tmp/jm4DOZNbZl line 1:�------> [32msay 2.sqrt.fmt [33m�[31m"%10f"[0m��Parse failed��»
17:32 moritz BenGoldberg: needs colon after the method name
17:32 diakopter need a colon
17:33 diakopter p6: say 2.sqrt.fmt: "%10f"
17:33 camelia rakudo-parrot 37c956, rakudo-jvm 37c956, rakudo-moar 37c956, niecza v24-109-g48a8de3: OUTPUT«  1.414214␤»
17:33 BenGoldberg p6: say 2.sqrt.fmt("%.10f")
17:33 camelia rakudo-parrot 37c956, rakudo-jvm 37c956, rakudo-moar 37c956, niecza v24-109-g48a8de3: OUTPUT«1.4142135624␤»
17:33 BenGoldberg p6: say 2.sqrt.fmt("%.20f")
17:33 camelia rakudo-jvm 37c956: OUTPUT«1.4.142135623730951E19␤»
17:33 camelia ..rakudo-moar 37c956: OUTPUT«1.09223372036854775808␤»
17:33 camelia ..rakudo-parrot 37c956: OUTPUT«1.004.142135623731e+19␤»
17:33 camelia ..niecza v24-109-g48a8de3: OUTPUT«1.41421356237310000000␤»
17:33 diakopter wat
17:33 BenGoldberg Huh?
17:33 BenGoldberg 1.4.14????
17:34 diakopter 1.09??
17:34 moritz looks like a fmt/sprintf bug
17:34 diakopter 1.004.14?
17:34 diakopter wow
17:35 geekosaur I like that E19/e+19 at the end of those too
17:35 geekosaur (which might be a hint as to what's going on...)
17:35 BenGoldberg It's nice, I suppose that jvm and parrot are both wrong in basically the same way
17:36 colomon yeah, those are badly broken.  (except niecza)
17:36 diakopter m: say 2.sqrt.fmt("%.40f")
17:36 camelia rakudo-moar 37c956: OUTPUT«1.0000000000000000303786028427003666890752␤»
17:36 * colomon is probably at fault
17:36 diakopter m: say 2.sqrt.fmt("%.1f")
17:36 camelia rakudo-moar 37c956: OUTPUT«1.4␤»
17:36 diakopter m: say 2.sqrt.fmt("%.5f")
17:36 camelia rakudo-moar 37c956: OUTPUT«1.41421␤»
17:36 diakopter m: say 2.sqrt.fmt("%.9f")
17:36 camelia rakudo-moar 37c956: OUTPUT«1.414213562␤»
17:37 diakopter m: say 2.sqrt.fmt("%.10f")
17:37 camelia rakudo-moar 37c956: OUTPUT«1.4142135624␤»
17:37 BenGoldberg p6: 2.sqrt.fmt("%.15f").say
17:37 camelia rakudo-parrot 37c956, niecza v24-109-g48a8de3: OUTPUT«1.414213562373100␤»
17:37 camelia ..rakudo-jvm 37c956, rakudo-moar 37c956: OUTPUT«1.414213562373095␤»
17:37 BenGoldberg p6: 2.sqrt.fmt("%.13f").say
17:37 camelia rakudo-parrot 37c956, rakudo-jvm 37c956, rakudo-moar 37c956, niecza v24-109-g48a8de3: OUTPUT«1.4142135623731␤»
17:37 BenGoldberg p6: 2.sqrt.fmt("%.14f").say
17:38 camelia rakudo-parrot 37c956, rakudo-jvm 37c956, rakudo-moar 37c956, niecza v24-109-g48a8de3: OUTPUT«1.41421356237310␤»
17:38 diakopter 19 breaks moar
17:38 diakopter 18 is fine
17:39 BenGoldberg At 15, are digits being gotten wrong, or are parrot and niecza merely rounding differently from jvm and moar?
17:42 raiph joined #perl6
17:43 jnap joined #perl6
17:43 colomon BenGoldberg: almost certainly it's in issue in sprintf's rounding in moar and jvm.
17:44 moritz does it try to multiply the float by a big number and then extract digits from that?
17:44 moritz if yes, it might explain the bogus E19 at the end
17:44 raiph bjz, timotimo: glitchmr changed his github id: http://xfix.github.io/
17:48 raiph bjz: is http://irclog.perlgeek.de/perl6/2014-01-19/summary (and other days) at all helpful?
17:49 bjz raiph: cheers
17:49 bjz raiph: the advent calendar is also nice reading
17:49 bjz it seems :)
17:49 xfix Yeah, I don't have have time work on my blog anymore :-(. Sorry for not informing.
17:49 ajr joined #perl6
17:49 xfix The xfix.github.io is an archive.
17:50 xfix I've lots of things to do in school.
17:50 diakopter daaaaang rakudo-moar builds so fast
17:53 colomon is someone adding these floating point mistakes to roast?
18:00 ajr_ joined #perl6
18:04 tadzik eh, bailador tests still fail when it's precompiled
18:05 timotimo d'oh :(
18:06 benabik joined #perl6
18:11 japhb colomon: ISTR you adding the ones that I'd found a few weeks ago.
18:12 colomon japhb: but these are fresh, so far as I know.
18:12 stevan_ joined #perl6
18:13 ajr joined #perl6
18:14 raiph xfix++ # having -Ofun with p6; helping others to; prioritizing school
18:16 btyler joined #perl6
18:19 jeffreykegler joined #perl6
18:19 japhb colomon: Yep, I just figured "right next to where you put the ones I found" would be a good place for these.  :-)
18:20 tadzik wow, github is superfast at forking these days
18:20 colomon japhb: ah, yeah, it's probably reasonable
18:22 berekuk joined #perl6
18:25 FROGGS can somebody tell how hard it might be to create mod_perl6 for apache?
18:27 BenGoldberg Harder than implementing FastCGI, probably ;)
18:27 raiph .oO ( easier than last time? )
18:28 FROGGS I mean, I'd need such a Perl6Handler to run Perl 6 besides Perl (besides PHP), right?
18:28 raiph http://www.smashing.org/jeff/node/21
18:28 raiph ( mod_perl6 )
18:28 FROGGS ohh
18:29 timotimo i'd prefer fastcgi or psgi if i were you
18:29 timotimo or if i were anybody really
18:29 tadzik . o O ( Good to have more QA than ":qa" )
18:33 raiph FROGGS: mod_perl6 built atop mod_parrot; i imagine it's hopelessly bitrotted and may well be wrong approach for 2014
18:33 kivutar joined #perl6
18:33 BenGoldberg I don't think that psgi will work without perl5... of course you can have both perl5 and perl6 loaded in once process
18:34 dalek nqp: 795b83b | jnthn++ | src/vm/moar/QAST/QAST (2 files):
18:34 dalek nqp: Better void context conveyance.
18:34 dalek nqp: review: https://github.com/perl6/nqp/commit/795b83b2bf
18:34 dalek rakudo/nom: 17400f0 | jnthn++ | src/core/GatherIter.pm:
18:34 dalek rakudo/nom: Micro-optimize GatherIter.
18:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/17400f03a2
18:34 FROGGS raiph: possibly
18:34 FROGGS BenGoldberg: why not?
18:34 BenGoldberg How would plack deal with a perl6 program?
18:35 tadzik well, plack is perl 5, but there are working PSGI tools for Perl 6
18:35 tadzik I fixed just half an hour ago :P
18:35 BenGoldberg Oh, nevermind then ;)
18:37 tadzik whoa, mokudo builds in about 2/3 of yesterday's time :)
18:38 timotimo building mokudo hardly even stresses the binder, for example
18:38 timotimo that's very cool
18:39 dalek roast: de89abd | jnthn++ | / (3 files):
18:39 dalek roast: Unfudge passing TODOs for JVM.
18:39 dalek roast:
18:39 dalek roast: Which we get thanks to fixing things in Rakudo that similarly affected
18:39 dalek roast: Moar.
18:39 dalek roast: review: https://github.com/perl6/roast/commit/de89abdf7f
18:42 raiph moritz: "To place a non-Array into an array variable" what about calling @vars "Positional variables" (and %vars "Associative variables")
18:43 dalek rakudo/nom: 706bc15 | jnthn++ | docs/ChangeLog:
18:43 dalek rakudo/nom: Some more ChangeLog entries.
18:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/706bc1591c
18:43 timotimo parrot's stage parse is at 99 seconds for me now, btw :)
18:44 jnap joined #perl6
18:44 jnthn timotimo: What's the Moar and JVM times, ooc?
18:45 timotimo gimme a minute (at least)
18:45 jnthn :)
18:45 jnthn bbi10
18:46 colomon jnthn: for me, jvm is 63s, moar is 75s, parrot is 84s
18:48 peteretep joined #perl6
18:48 peteretep Any public estimate on when Rakudo for the JVM will be available?
18:48 timotimo rakudo for the jvm is already available, just not Rakudo Star
18:49 FROGGS rakudo itself is available since april 2013 or so I think
18:49 FROGGS rakudo@jvm I mean
18:49 timotimo 76 seconds for stage parse on moarvm
18:50 FROGGS May 2013 actually
18:50 rindolf joined #perl6
18:51 colomon it didn't merge with nom until June, did it?
18:51 colomon seems like it was a big deal at YAPC::NA, and sorear++ did some furious hacking to make some corners of it work there
18:52 FROGGS jnthn++'s blog post said that the may release "will" contain the jvm backend
18:52 FROGGS I'd say that speaks for being in nom
18:52 FROGGS hmmm
18:52 tadzik FROGGS: there's something wrong with moar's dir()
18:52 FROGGS well, w/e, it is in there by now :o)
18:52 FROGGS tadzik: do tell
18:52 tadzik see https://gist.github.com/tadzik/8509235
18:53 tadzik it gives back paths that are too relative :P
18:53 tadzik I tried to fix it, but settings compilation blows up
18:53 BinGOs being too relative is incest
18:53 FROGGS I am unable to read your shell's output
18:53 FROGGS ahh, I see it
18:53 tadzik see lines 6, 7, then 13 and 14
18:54 tadzik I should have a separate prompt for gisting stuff :)
18:54 FROGGS :o)
18:56 raiph peteretep: do you mean having the JVM backend in Rakudo Star rather than just the compiler? (in which case, I'd say eta is next 2-3 months)
19:02 FROGGS tadzik: I am currently testing a patch
19:02 tadzik \o/
19:02 FROGGS wow, 65s for moar's stage parse
19:03 FROGGS compared to 55s jvm and 118 parrot
19:03 colomon FROGGS: interesting, you got faster than me for moar and jvm and slower for parrot.
19:04 FROGGS colomon: I am curious... what are your timings?
19:04 colomon FROGGS:  for me, jvm is 63s, moar is 75s, parrot is 84s
19:04 FROGGS it has been jvm < moar < parrot for me for quite a while
19:04 colomon same here
19:05 FROGGS k
19:05 colomon but weirdly different magnitudes
19:05 FROGGS but yeah, that is weird
19:05 * moritz has 59s jvm < 71s moarvm < 131s parrot
19:05 btyler might be worth specifying if you're using oracle or openjdk java
19:05 FROGGS openjdk
19:05 moritz same here
19:05 FROGGS my moar is -O1 -g3
19:05 colomon why is my parrot so much faster than everyone else's?
19:06 moritz my moar is 'Configure.pl' without extra args
19:06 moritz colomon: you have a fast-track parrot. Why don't you share it? :-)
19:06 jnthn Well, the orderings are consistent even if the magnitudes are curious :)
19:06 timotimo i give --optimize=1 to moarvm
19:06 FROGGS -O1 is the default
19:06 FROGGS -g3 is what I have extra
19:06 timotimo what exactly would i have to do to help make it able to -O2 and -O3? something about aliasing and stuff?
19:07 raiph moritz++ # containers doc
19:07 raiph moritz: "What flattens, what doesn't?" is a bullet point not heading; mistake?
19:07 BenGoldberg p6: use v7; say 'What?!'
19:07 camelia rakudo-parrot 8c054a, rakudo-jvm 8c054a, rakudo-moar 8c054a, niecza v24-109-g48a8de3: OUTPUT«What?!␤»
19:07 FROGGS timotimo: BOOTSTRAP.pm explodes for me under -O3
19:07 timotimo yeah
19:07 FROGGS dunno why though, the error might have changed
19:08 dalek doc: 57b9dd3 | moritz++ | lib/containers.pod:
19:08 dalek doc: Fix heading, raiph++
19:08 dalek doc: review: https://github.com/perl6/doc/commit/57b9dd3c4f
19:08 jnthn One way is to see what -02 adds, then add them one by one to see if you can work out which is to blame.
19:08 timotimo will have a timing for jvm stage parse soon
19:10 kivutar joined #perl6
19:12 timotimo 66s for stage parse on jvm
19:19 dalek nqp: b171719 | (Timo Paulssen)++ | src/vm/parrot/QAST/Operations.nqp:
19:19 dalek nqp: remove a duplicated bindattr_s
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/b1717196e0
19:20 dalek rakudo-star-daily: 5476d46 | coke++ | log/ (5 files):
19:20 dalek rakudo-star-daily: today (automated commit)
19:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/5476d46a51
19:20 dalek perl6-roast-data: e2ece0c | coke++ | / (6 files):
19:20 dalek perl6-roast-data: today (automated commit)
19:20 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e2ece0c7eb
19:20 [Coke] (that was yesterday's today)
19:26 dalek rakudo/nom: 5c0d9db | (Tobias Leich)++ | src/core/IO.pm:
19:26 dalek rakudo/nom: prepend path in dir() when needed
19:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5c0d9db4cc
19:27 FROGGS tadzik: ^^
19:28 tadzik \'
19:28 tadzik \o/
19:30 raydiak what specifically is an "aggregate operation", as in "Cannot do aggregate operation on a type object"?
19:34 berekuk joined #perl6
19:35 dalek perl6-roast-data: d9e7b16 | coke++ | bin/rakudo.moar.sh:
19:35 dalek perl6-roast-data: Don't need master, rakudo is tracking vers.
19:35 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d9e7b16ec7
19:35 grondilu r: say (1 - 1e-16).Num.fmt("%.12f")
19:35 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.000000000000␤»
19:36 grondilu n: say (1 - 1e-16).fmt("%.12f")
19:36 camelia niecza v24-109-g48a8de3: OUTPUT«1.000000000000␤»
19:36 grondilu r: say (1 - 1e-8).fmt("%.12f")
19:36 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.999999990000␤»
19:36 grondilu r: say (1 - 1e-12).fmt("%.12f")
19:36 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.999999999999␤»
19:36 grondilu r: say (1 - 1e-15).fmt("%.12f")
19:36 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.000000000000␤»
19:36 grondilu r: say (1 - 1e-14).fmt("%.12f")
19:36 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.000000000000␤»
19:37 grondilu r: say (1 - 1e-13).fmt("%.12f")
19:37 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.000000000000␤»
19:37 grondilu r: say (1 - 1e-12).fmt("%.12f")
19:37 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.999999999999␤»
19:37 grondilu r: say (1 - 1e-7).fmt("%.6f")
19:38 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.000000␤»
19:38 grondilu r: say (1 - .01).fmt("%.1f")
19:38 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.0␤»
19:38 grondilu r: say (1 - .1).fmt("%.0f")
19:38 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.␤»
19:39 grondilu I bet this bug has not been detected
19:40 grondilu r: say 0.9.fmt("%.0f")
19:40 camelia rakudo-parrot 706bc1, rakudo-jvm 706bc1, rakudo-moar 706bc1: OUTPUT«0.␤»
19:40 grondilu eval: printf "%.0f", .9
19:40 [Coke] Suggest we change r: to output r-p: r-j: r-m, to avoid multiline output on short stuff.
19:41 spider-mario joined #perl6
19:43 btyler 13:42:57 [~/prog/6perl/rakudo] btyler$ ./perl6-m -e "say 'hi OSX 10.9 :)'"
19:43 btyler hi OSX 10.9 :)
19:44 benabik btyler: You fix the link problems?
19:44 btyler unfortunately I'm not at all sure how the makefile gets created. the only change needed is to remove the "install_name" flag from line 291
19:44 btyler ^ yep
19:44 btyler well, 'fix'. more like 'random walk until something worked'
19:44 jnap joined #perl6
19:45 btyler so there might be something broken as a result, but r-m compiled and it seems to run ok. I'll run the tests now
19:46 btyler 'make test' is all good
19:47 FROGGS btyler++ # \o/
19:47 colomon btyler++
19:47 benabik I think Moar's build system needs to be altered to keep install_name from ending up in the config, sadly.
19:48 jeffreykegler left #perl6
19:48 benabik I suppose Rakudo could s/// it out of the LDFLAGS, but that seems... less optimal.
19:50 benabik `nqp-m --show-config | grep install_name`: moar::ldshared=-dynamiclib -install_name $(PREFIX)/lib/libmoar.dylib
19:53 FROGGS let's just remove that option from ldshared, and make another variable moarshared, and use that in the makefile too
19:55 benabik FROGGS: +1, in the middle of doing that.
19:55 Mouq joined #perl6
19:55 FROGGS assum day that is :o)
20:02 jnthn ooh, yay...OSX fix too \o/
20:04 benabik Hm.  Well that both worked and didn't.
20:05 tadzik FROGGS: ok, that's better, but one thing is off: it returns .. as one of the files, but only when checking in something else than "."
20:05 FROGGS tadzik: can you make a ticket? I will look at later but it is likely I forget
20:05 tadzik FROGGS: sure
20:06 benabik I no longer have -install_name /usr/local/lib/libmoar.dylib, but it still doesn't compiler.
20:06 benabik Probably because there's not -lmoar
20:07 tadzik FROGGS: on RT?
20:07 benabik Yeah, if I add -lmoar, then it succeeds.
20:07 benabik btyler: I assume you removed -install_name, but left the $(PREFIX)/lib/libmoar.dylib ?
20:07 btyler benabik: I left the path there for -dynamiclib
20:07 btyler yes
20:08 btyler but as I said, this was the result of random walk, I don't profess to much understanding here
20:08 FROGGS tadzik: yeah
20:09 tadzik or I'll just try to fix it :P
20:10 benabik Heh.  Rakudo's configure already has a "remove a flag from ldshared" for windows.
20:11 FROGGS tadzik: sure, go ahead :o)
20:11 benabik Can someone tell me what M_LDFLAGS ends up being in Linux?
20:11 benabik I don't see how libmoar gets added to the link calls on any platform.
20:15 FROGGS rakudo/Makefile:992:M_LDFLAGS =  -O1 -g3 -Wl,-rpath,$(PREFIX)/lib  -O1 -lm -lpthread -lrt -ldl
20:15 FROGGS benabik: ^^
20:15 benabik Okay, so no reference to libmoar there...
20:17 japhb jnthn: How do you change the number of items passing through a Supply.map({})?  It looks from the implementation that the result of the map block is just captured and passed on as a single unit.  But I want to send 0..N separate items from the map for each incoming item from the parent Supply.
20:18 jnthn japhb: It's 1 to 1 at the moment, I'm afraid.
20:18 japhb Gah.  Any workaround?
20:19 jnthn japhb: I can't immediately think of one, sorry.
20:19 tadzik grr, why cannqp::nextfiledir
20:19 japhb Does the map block have any way to see the sub-supply it is being used to create?
20:19 japhb Dang.
20:19 tadzik * why can't nqp::nextfiledir return the same thing on every backend
20:19 japhb Well crap, that's going to require a redesign.  :-/
20:21 jnthn japhb: ohh
20:21 jnthn japhb: You can implement it on terms of "on"
20:21 benabik FROGGS: Can you gist your whole Rakudo Makefile from Linux?  I'm having problems seeing why it even compiles there...
20:22 FROGGS tadzik: we could prefix the path in moar already just to strip it again in rakudo... but this is not very heap this way
20:22 jnthn on -> $res { $input_supply => sub ($val) { $res.more($_) for 1..10; } };
20:22 FROGGS benabik: https://gist.github.com/FROGGS/8a8efadd9b0d1c69f2f3
20:22 tadzik FROGGS: or strip it in JVm in the first place
20:22 benabik FROGGS++
20:23 tadzik FROGGS: https://gist.github.com/tadzik/8510514 this is stupid, but makes File::Find tests pass :)
20:23 japhb jnthn: Oooh, thanks!
20:23 FROGGS tadzik: I always having a bad feeling about that... what if one of the paths contain "../" or otehr weird stuff? our substr-"magic" just will make it worse
20:23 jnthn japhb: The on meta-combinator can actually be used to define map and grep too :)
20:23 jnthn japhb: It's a bit overkill for them, though.
20:23 japhb Excellent to know I have that escape hatch, though.
20:24 japhb That was going to get ugly.
20:24 jnthn Yes, it is a quite powerful construct.
20:24 araujo joined #perl6
20:24 jnthn I pondered things in that area for O(weeks) before I came up with it...
20:25 benabik FROGGS: And that compiles a rakudo-moar successfully?  I don't see a single -lmoar or libmoar.so reference in there.
20:25 tadzik ok, File::Find and Shell::Command both work on Moar now, but JSON::Tiny dies with: Object conflict detected during deserialization. (Probable attempt to load two modules that cannot be loaded together).
20:26 jnthn tadzik: bah, that NYI...
20:26 tadzik bah
20:26 FROGGS benabik: yes, it does
20:26 benabik >.<
20:26 FROGGS benabik: the perl6-m runner does invoke moar directly
20:27 FROGGS the moar binary*
20:27 benabik I think Linux's linker doesn't check that unreferenced symbols exist when you're compiling a shared library.
20:27 benabik Or somethin.g
20:27 FROGGS tadzik: that is the same error that breaks v5 :o)
20:27 jnthn benabik: It must be that, yeah...
20:28 dalek roast: f344578 | coke++ | integration/weird-errors.t:
20:28 dalek roast: add test for RT #116268
20:28 dalek roast: review: https://github.com/perl6/roast/commit/f344578a65
20:28 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=116268
20:29 FROGGS benabik: yeah, it does not care it seems: gcc  -shared -fPIC -O1 -g3 -Wl,-rpath,/home/froggs/dev/rakudo/../nqp/install/lib  -O1 -lm -lpthread -lrt -ldl -o dynext/libperl6_ops_moar.so dynext/perl6_ops.o dynext/container.o
20:30 benabik So the question is...  Do I just hack in a -lmoar in Rakudo's Configure when $^O eq 'darwin'?
20:31 benabik Or should it be generated by moar somehow and then propagated through the config?
20:31 jnthn benabik: hack that works > broken build
20:32 jnthn benabik: Feel free to hack it for now if you don't see an obvious better thing to do, and open a ticket.
20:32 jnthn benabik: Passing some flag through for "what to link against" is probably a good thing, though.
20:32 benabik jnthn: It looks like @moarimplib@ is a similar hack for Win32
20:33 jnthn benabik: Yeah, I think it is
20:33 * benabik adds a -lmoar there for OS X and appears to get a build.
20:34 jnthn \o/
20:36 btyler woo
20:41 dalek rakudo/nom: 29a51f0 | coke++ | t/spectest.data:
20:41 dalek rakudo/nom: Fix braino.
20:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/29a51f0d71
20:42 raiph joined #perl6
20:45 jnap joined #perl6
20:50 timotimo tee hee, fix braino
20:50 timotimo that amuses me
20:54 benabik PR#238 + MoarVM master should fix OS X build.
20:57 eiro is --backend=moar in rakudo-star, yet ?
20:58 benabik Oh hey, I can probably bump MOAR_REVISION myself.
20:58 jnthn eiro: No
20:58 jnthn eiro: That'll take a bit more time.
20:59 dalek nqp: f0baba2 | benabik++ | tools/build/MOAR_REVISION:
20:59 dalek nqp: Bump MOAR_REVISION for OS X build fix
20:59 dalek nqp: review: https://github.com/perl6/nqp/commit/f0baba2779
21:01 btyler nice, benabik++
21:01 benabik Pull request updated with NQP_REVISION bump.  Also removed a (hopefully) unneeded Windows tweak, which somebody should actually test.
21:02 eiro ohhh ... that's why my script doesn't work this the parameters from rakudobrew
21:02 eiro thanks for reply
21:02 eiro 'night all
21:11 masak 'night, eiro.
21:13 arnsholt Looks like binding attributes in CStructs on JVM works, FSVO of works
21:13 arnsholt Need to implement reading them as well to check that the right values get bound =)
21:14 timotimo heh :)
21:16 FROGGS arnsholt++
21:17 masak arnsholt++
21:17 jnthn arnsholt__
21:17 jnthn uh :)
21:17 jnthn arnsholt++
21:17 timotimo __arnsholt__ does python now? :)
21:18 * masak guesses jnthn was just typing in the dark :P
21:20 dalek nqp/moar_hint_precalc: 9594cf8 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
21:20 dalek nqp/moar_hint_precalc: introduce nqp::hintfor on moarvm
21:20 dalek nqp/moar_hint_precalc: review: https://github.com/perl6/nqp/commit/9594cf87cb
21:20 timotimo jnthn: this is lacking the bootstrap files update, but you can check out the code after updating from origin/master
21:23 timotimo huh, wait, that's no tthe right commit
21:27 dalek nqp/moar_hint_precalc: 8a654d1 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
21:27 dalek nqp/moar_hint_precalc: use nqp::hintfor getattr/bindattr at compile time
21:27 dalek nqp/moar_hint_precalc: review: https://github.com/perl6/nqp/commit/8a654d1167
21:27 timotimo that's the one i meant
21:29 colomon joined #perl6
21:37 beastd joined #perl6
21:40 thou joined #perl6
21:46 jnap joined #perl6
22:00 diakopter joined #perl6
22:00 kaare_ joined #perl6
22:11 stevan_ joined #perl6
22:11 raiph joined #perl6
22:17 benabik So amusing to run parallel make.  My perl6-m SETTING compile seems to go start, mast, classfile, jar while my perl6-p is start, parse, syntaxcheck, ast, optimize, mast, mbc.
22:17 benabik Java parse 200, Parrot 527, Moar 163.  Win.
22:18 xenoterracide joined #perl6
22:20 jnthn Whoa...JVM usually wins...
22:21 benabik Either the OS X JVM isn't as fast, or maybe it just had less to fight with.  I'm running parallel on a 2 core laptop with a not terribly fast drive.
22:41 benabik Hm.  m-install was missing a lot of DESTDIR.
22:47 jnap joined #perl6
22:47 raiph joined #perl6
22:49 japhb r: my $a := Supply.new; my $b := Supply.new; on -> $res { $a => sub ($val) { $res.more($val) } }; $b.tap({$_.perl.say}); $a.more($_) for 1..10;
22:49 camelia rakudo-moar 29a51f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/F28HVellbw�Undeclared name:�    Supply used at line 1�Undeclared routine:�    on used at line 1��»
22:49 camelia ..rakudo-jvm 29a51f: ( no output )
22:49 camelia ..rakudo-parrot 29a51f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DiuJm4KFdR�Undeclared name:�    Supply used at line 1�Undeclared routine:�    on used at line 1��»
22:49 japhb j: my $a := Supply.new; my $b := Supply.new; on -> $res { $a => sub ($val) { $res.more($val) } }; $b.tap({$_.perl.say}); $a.more($_) for 1..10;
22:49 camelia rakudo-jvm 29a51f: ( no output )
22:49 japhb jnthn: What am I doing wrong here ^^
22:52 jnthn How does $b ever get values?
22:52 jnthn j: my $a := Supply.new; my $b := on -> $res { $a => sub ($val) { $res.more($val) } }; $b.tap({$_.perl.say}); $a.more($_) for 1..10;
22:52 camelia rakudo-jvm 29a51f: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
22:52 jnthn j: my $a := Supply.new; my $b := on -> $res { $a => sub ($val) { $res.more($val) xx 5 } }; $b.tap({$_.perl.say}); $a.more($_) for 1..10;
22:52 camelia rakudo-jvm 29a51f: OUTPUT«1␤1␤1␤1␤1␤2␤2␤2␤2␤2␤3␤3␤3␤3␤3␤4␤4␤4␤4␤4␤5␤5␤5␤5␤5␤6␤6␤6␤6␤6␤7␤7␤7␤7␤7␤8␤8␤8␤8␤8␤9␤9␤9␤9␤9␤10␤10␤10␤10␤10␤»
22:54 * japhb smacks his forehead
22:55 japhb That's why a second pair of eyes makes all the difference
22:56 jnthn japhb: To clarify on: it's actually an actor pattern like construct. It lets you specify things to do for each of a set of supplies that may push values at you, but encapsulates some synchronization to make sure you're only ever in one of the closures at once.
23:02 jeffreykegler joined #perl6
23:07 japhb jnthn: Yeah, I recognized that from the docs, but there were enough places where on was the last part of a function (thus returning the result of the on), that I forgot I needed to assign it to something.  ;-)
23:08 jnthn ah, yes :)
23:21 japhb jnthn: Can you tell if a Supply has been closed, as with Channel.closed?
23:22 pippo joined #perl6
23:22 pippo o/ perl6
23:22 japhb o/ piip
23:22 japhb er
23:22 japhb o/ pippo
23:23 pippo :-))
23:23 pippo m: my @a = 1..10; say @a[*-1]
23:23 camelia rakudo-moar 29a51f: OUTPUT«10␤»
23:23 pippo r: my @a = 1..10; say @a[*-1]
23:23 dalek nqp: 4fcbf08 | (Timo Paulssen)++ | src/vm/moar/stage0/ (11 files):
23:23 dalek nqp: update stage0 to get nqp::hintfor
23:23 dalek nqp: review: https://github.com/perl6/nqp/commit/4fcbf087a8
23:23 camelia rakudo-parrot 29a51f, rakudo-jvm 29a51f, rakudo-moar 29a51f: OUTPUT«10␤»
23:23 jnthn japhb: There's not a good "untap" callback just yet...
23:24 jnthn japhb: You can only really do it by introspection and I don't know if it cascades properly...
23:24 japhb OK, darn
23:25 pippo jnthn++ for having fixed the gather/take problem!
23:26 raiph joined #perl6
23:26 jnthn japhb: Yes, 'fraid you're pushing the limits of something I really need to do some more work on...
23:26 japhb Well good, that's part of the point.  :-)
23:27 jnthn I'll have to have another stint on concurrency things soon :)
23:29 timotimo .o( like concurrency support on moarvm for example? :3 )
23:29 japhb \o/
23:29 * japhb will be very happy to stop taking a ribbing about the startup time of his concurrent scripts
23:31 jnthn timotimo: I really want to have that in place by the March release of Rakudo. It's *possible* I'll make it by the Feb one.
23:32 japhb Oh that would be very cool.
23:32 timotimo wowza
23:32 timotimo didn't expect that
23:32 jnthn I do need to actually dig into some $dayjob things this next week, though...nice as it has been to pretend I don't have one for a bunch of this month :)
23:32 benabik Nice to finally run perl6-m.  'say 1' takes -j 13s, -p 2s, and -m 0.8s.
23:33 benabik Moar++
23:33 japhb jnthn: As a data point, I'm already regularly doing 16 concurrent tasks.  Will probably need to start increasing my thread pools soon to prevent blocking.
23:34 japhb But async I/O would greatly reduce that, since most of those tasks are blocked on input from external processes.
23:34 timotimo hm, there's some async io already in place, maybe i can try to make more?
23:34 raydiak japhb: do you have some working examples I might have a peek at? I've been wandering around lost in p6 concurrency land for the past several days
23:34 timotimo what exactly are you missing?
23:35 japhb raydiak: Erm.  I think I could help you with some stuff, but I dunno how much is safe to post right now.
23:35 japhb When I get this Net::IRC::Bot code working well, that should be a decent example.
23:37 japhb timotimo: Mostly I need to be able to pull data from multiple handles/sockets, handing off to further processing each time one of them finishes reading all data and closes.
23:38 timotimo ah, yeah
23:38 dalek nqp: ec396db | (Tobias Leich)++ | tools/build/MOAR_REVISION:
23:38 dalek nqp: bump moar rev to get unicode fixes
23:38 dalek nqp: review: https://github.com/perl6/nqp/commit/ec396db843
23:39 japhb (For my slow-IO program, that is.  For Net::IRC::Bot, it would be nice to just not be using so many tasks waiting on I/O, as I set it up to respond slowly to multiple requests at once by spawning a pile of tasks.)
23:39 timotimo let me have a look at java's nio stuff
23:39 dalek rakudo/nom: 0bdc766 | (Tobias Leich)++ | tools/build/NQP_REVISION:
23:39 dalek rakudo/nom: bump nqp/moar rev to get unicode fixes
23:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0bdc766b5e
23:39 raydiak japhb: no worries, was just looking for something to study other than S17
23:41 japhb Read jnthn++'s latest concurrency slide deck, too.
23:41 raydiak link?
23:41 japhb And the source is pretty key for understanding how things work.
23:41 jnthn At some point, I should also try to fill out the docs.perl6.org material on concurrency stuff.
23:42 japhb raydiak: http://jnthn.net/papers/2013-npw-conc.pdf is the most recent, I believe
23:42 jnthn yes, that's the recentest. :)
23:42 japhb ++jnthn for that.  But one of us might beat you to it if you're as overloaded as it seems.
23:43 jnthn My $dayjob work is going to involve teaching parallel/concurrent/async programming a bunch this year, it seems.
23:43 japhb \o/
23:43 jnthn japhb: Well, I'm always overlaoded and happy to be beaten to anything.
23:43 japhb I bet!
23:43 jnthn japhb: At some point it'll probably be easier to write docs than field quetions, though ;)
23:43 jnthn Though, if there are enough answerers then... :)
23:43 japhb True ...
23:43 * japhb is working on that ....
23:44 raydiak thanks for the pointers...have bookmarked the slides
23:44 pippo night #perl6!
23:44 pippo left #perl6
23:45 raydiak and I will start reading the source more...not used it being something that I can reasonably easily decypher, so it hadn't even occured to me
23:46 jnthn japhb: It's worth grabbing today's JVM updates if you didn't already, btw. Anything that does gather/take will be faster.
23:46 japhb raydiak: It's actually pretty easy to read,  Ithink
23:47 raydiak japhb: it has to be, compared to p5
23:47 japhb jnthn: Yeah, I will.  I was waiting for you to go to sleep (and thus not be doing more optimizing for the day) before starting the big recompile run.  ;-)
23:47 jnthn Oh, I'm done for the day, I think :)
23:47 jnthn Got quite a lot done these last few days... :)
23:47 timotimo japhb: oh, you need to work with sockets, eh?
23:47 timotimo hm, that's probably a bit tougher
23:47 jnap joined #perl6
23:49 japhb timotimo: Sockets and pipes are the big ones.  Yes, I have some network filesystems to deal with, so those could be slowish too, I suppose.
23:49 * timotimo doesn't know where and how to hook the asyncness into the socket stuff
23:49 timotimo for network filesystems, you can already IO::Async::File.slurp and .lines
23:49 jnthn Well, it needs an API design as well as an implementation, I guess. Though doing something basic to start off with may be a good start...
23:49 * timotimo is not sure how that interacts with thread pools, though
23:50 japhb timotimo: Yeah, I forgot that one was actually available (haven't happen to have needed to deal with the NFS stuff async yet, though.)
23:50 timotimo right.
23:50 timotimo jnthn: how much sense would an async spurt make?
23:50 jnthn timotimo: Quite a bit.
23:51 timotimo for the existing IO::Async::File
23:51 timotimo i could try to implement that to familiarize myself with the stuff
23:51 jnthn timotimo: Returns a Promise that is kept or broken when the thing is done.
23:52 timotimo that was my thought as well
23:52 japhb Gah, it's errors like this that make me go >.< :  Type check failed in assignment to '$!buffer'; expected 'Buf[uint8]' but got 'Str'
23:52 japhb I'll have to trace all the code to figure out if I mixed up encoded and decoded data, or Rakudo did.
23:52 timotimo inside the jvm-level code, all i have to do is implement a method "spurtasync" that takes 2 closures, one for success, one for failure
23:52 timotimo and those would then keep or break the promise
23:52 jnthn timotimo: Sounds right
23:53 jnthn japhb: Well, it's rather reluctant to auto-coerce...
23:53 jnthn r: say "abc".encode('utf-8').Str
23:53 camelia rakudo-parrot 29a51f, rakudo-jvm 29a51f, rakudo-moar 29a51f: OUTPUT«abc␤»
23:54 japhb jnthn: Oh, I wasn't complaining the error message was *wrong*, just that it will take time to find the culprit.
23:54 jnthn I wonder if we should allow that...
23:54 jnthn Or require .decode
23:54 jnthn Thing is that .encode('utf-8') returns something that knows its encoding.
23:54 jnthn So it can safely .Str
23:54 jnthn r: Buf.new(65, 66, 67).Str
23:55 camelia rakudo-moar 29a51f: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/m-CORE.setting:5102␤  in method Str at src/gen/m-CORE.setting:1019␤  in block  at /tmp/6VeG4xuBjH:1␤␤»
23:55 camelia ..rakudo-jvm 29a51f: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at gen/jvm/CORE.setting:5102␤  in method Str at gen/jvm/CORE.setting:1019␤  in block  at /tmp/R2G8HMaNtF:1␤␤»
23:55 camelia ..rakudo-parrot 29a51f: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at gen/parrot/CORE.setting:5106␤  in method Str at gen/parrot/CORE.setting:1022␤  in block  at /tmp/X8GOGyy77p:1␤␤»
23:55 jnthn That's what happens typically
23:55 japhb nodnod
23:55 jnthn OK, time for some rest.
23:56 jnthn 'night, all
23:56 FROGGS gnight!
23:56 timotimo 'night jnthn
23:56 japhb o/ jnthn
23:57 timotimo was about to ask if i could just pass a String to the method or if i'd have to manually unbox
23:57 timotimo i probably do
23:57 japhb .oO( Good night, jnthn. Good work. Sleep well. I'll most likely kill you in the morning. )

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

Perl 6 | Reference Documentation | Rakudo