Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-10-30

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:00 atta joined #perl6
00:00 sunnavy joined #perl6
00:00 rurban joined #perl6
00:03 FROGGS joined #perl6
00:04 Vlavv` joined #perl6
00:06 [Coke] https://rt.perl.org/Ticket/Display.html?id=120413
00:06 TimToady * doesn't mean "infinite", it means "arbitrarily large"
00:07 TimToady which in this case, as in the case of subscripts, is naturally limited
00:08 TimToady you probably aren't going to read an infinite number of elements from xx * either; it will generally be limited some other way :)
00:12 Psyche^ joined #perl6
00:13 [Coke] S02-types/mix.t has some dubious tests.
00:14 [Coke] https://github.com/perl6/roast/blob/master/S02-types/mix.t#L262
00:14 [Coke] unless roll is guaranteeing the spread of returned values.
00:15 colomon joined #perl6
00:15 timotimo i'm pretty sure there's a way to properly test such things
00:17 [Coke] https://github.com/perl6/roast/blob/master/S02-types/mix.t#L277 - those 2 tests fail on rj.
00:19 timotimo huh, so negative values?
00:20 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 100; say +@a.grep(* eq 'a'); say +@a.grep(* eq 'b');
00:20 camelia rakudo-jvm 882e33: OUTPUT«0␤100␤»
00:20 camelia ..rakudo-parrot c27c7d: OUTPUT«100␤0␤»
00:20 timotimo wait what
00:20 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 25; say @a.grep(* eq 'a').join("")
00:20 camelia rakudo-parrot c27c7d: OUTPUT«aaaaaaaaaaaaaaaaaaaaaaaaa␤»
00:20 camelia ..rakudo-jvm 882e33: OUTPUT«␤»
00:21 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.total
00:21 camelia rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«1␤»
00:22 timotimo r: say 1.rand
00:22 camelia rakudo-parrot c27c7d: OUTPUT«0.730592795272486␤»
00:22 camelia ..rakudo-jvm 882e33: OUTPUT«0.5370525054723231␤»
00:22 [Coke] timotimo: once you've golfed it, please open an RT. ;)
00:22 timotimo the thick plottens
00:23 [Coke] looks like mixhash might have the same issue
00:23 timotimo they derive the same method from Mixy
00:24 timotimo r: my @pairs = (hello => 100, goodbye => -100); my $rand = 5.rand; my $seen = 0; my $roll; for @pairs -> $pair { next if ( $seen += $pair.value ) <= $rand; $roll = $pair.key; last; }; say $rand; say $roll;
00:24 camelia rakudo-parrot c27c7d: OUTPUT«2.63166102625959␤hello␤»
00:24 camelia ..rakudo-jvm 882e33: OUTPUT«2.481465557745795␤hello␤»
00:24 timotimo r: my @pairs = (hello => -100, goodbye => 100); my $rand = 5.rand; my $seen = 0; my $roll; for @pairs -> $pair { next if ( $seen += $pair.value ) <= $rand; $roll = $pair.key; last; }; say $rand; say $roll;
00:24 camelia rakudo-parrot c27c7d: OUTPUT«1.59497233502165␤(Any)␤»
00:24 camelia ..rakudo-jvm 882e33: OUTPUT«4.354170603807108␤(Any)␤»
00:25 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 25; say @a.join("")
00:25 camelia rakudo-jvm 882e33: OUTPUT«bbbbbbbbbbbbbbbbbbbbbbbbb␤»
00:25 camelia ..rakudo-parrot c27c7d: OUTPUT«aaaaaaaaaaaaaaaaaaaaaaaaa␤»
00:25 timotimo ... huh
00:25 [Coke] r: my $ascii-chars = [~] chr(0)..chr(0xFF); say $ascii-chars.comb(/<:Punctuation>/).join
00:25 camelia rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«!"#%&'()*,-./:;?@[\]_{}¡«·»¿␤»
00:26 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.pairs.perl;
00:26 camelia rakudo-parrot c27c7d: OUTPUT«("a" => 100000000000, "b" => 1, "c" => -100000000000).list␤»
00:26 camelia ..rakudo-jvm 882e33: OUTPUT«("b" => 1, "a" => 100000000000, "c" => -100000000000).list␤»
00:26 timotimo oh, there's a b in the middle, didn't even see that
00:26 [Coke] ^^ that fails for me locally and on roast.
00:26 timotimo [Coke]: mumble mumble something something lue changed the test to fix the expectation
00:27 [Coke] er, s/fails/doesn't pass the spectest/
00:28 timotimo i'm not aware how negative values are supposed to work, to be honest
00:28 lue I will valiantly hold that ¶ and § *are* punctuation characters. (They surround the « )
00:28 [Coke] dammit, I just amex commercial email: "① Join ② Write a review ③ Get $5 credit"
00:29 timotimo the specs don't say anything about mixes and negative quantities, at least nothing that i found directly
00:29 lue (They surround the « in the test's generated list, I should say)
00:30 timotimo if negative values mean "never gets rolled" ...
00:30 [Coke] timotimo: spec or not, wierd that rj & rp disagree
00:30 timotimo then the negative values should be culled from the roll. and they should not contribute to the total that's used to figure out what number to roll
00:30 timotimo well, here's what happens:
00:30 timotimo the total is the sum of the values, which is 1
00:31 timotimo it rolls a number between 0 and the total, then looks through the list of pairs
00:31 timotimo the first one, summing up all seen values, that's bigger than the random number gets taken
00:31 rurban joined #perl6
00:31 [Coke] ¯\_(ツ)_/¯
00:31 benabik joined #perl6
00:31 timotimo but since the number is, wrongly, between 0 and 1 instead of -1000000000000000 and 1000000000000000000001, it will just take the first low number
00:32 timotimo ... er
00:32 timotimo well, i know that's not quite accurate, but you could add and subtract ones and multiply by -1 in different places in my description and eventually you'll find the truth
00:32 [Coke] lue: should emacs git skips go in teh project, or in your local git file? (I vote the latter, but not vehemently)
00:32 timotimo point is: the algorithm behaves erratically if negative values are in the mix.
00:33 [Coke] timotimo: but why? is there any parrot specific code anywhere?
00:33 [Coke] it's not failing on parrot, and is repeatably failing on the jvm.
00:33 timotimo i guess it's the hash that's used to store the data
00:33 [Coke] timotimo: ah, fair enough.
00:33 timotimo r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.pairs.perl;
00:33 camelia rakudo-parrot c27c7d: OUTPUT«("a" => 100000000000, "b" => 1, "c" => -100000000000).list␤»
00:33 camelia ..rakudo-jvm 882e33: OUTPUT«("b" => 1, "a" => 100000000000, "c" => -100000000000).list␤»
00:33 dalek rakudo/nom: e455e82 | jonathan++ | src/vm/jvm/core/Threading.pm:
00:33 dalek rakudo/nom: Flesh out Thread a little more; add $*THREAD.
00:33 dalek rakudo/nom:
00:33 dalek rakudo/nom: This provides support for giving threads names, getting a thread ID,
00:33 dalek rakudo/nom: provides a sensible stringification and enables $*THREAD as a way to
00:33 dalek rakudo/nom: get a Thread instance for the currently executing thread (including
00:33 dalek rakudo/nom: making it work on the initial thread, so that isn't a special case).
00:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e455e828cc
00:34 timotimo this is the trigger, the error stems from not having specced mixes well enough :P
00:34 dalek roast: 362acca | jonathan++ | S17-concurrency/thread.t:
00:34 dalek roast: Some initial tests for the Thread class.
00:34 dalek roast: review: https://github.com/perl6/roast/commit/362accab50
00:34 lue [Coke]: I always just put them in the project I'm working on. I *could* define it globally, but I haven't :) .
00:36 timotimo huh. we could totally have a sub "isn't" rather than "isnt"
00:36 [Coke] so save yourself the trouble for next time and put them in your file. :)
00:36 jnthn timotimo: I actually type isn't when first writing the tests :P
00:36 [Coke] r: sub isn't() { say "is so"}; isn't;
00:36 jnthn *typed
00:36 camelia rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«is so␤»
00:37 * [Coke] wanders off
00:39 dalek rakudo/nom: 78e4c21 | jonathan++ | src/vm/jvm/core/Threading.pm:
00:39 dalek rakudo/nom: Explain code's funkyness.
00:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/78e4c21c62
00:40 mattp_ joined #perl6
00:47 jnthn 'night, #perl6
00:48 timotimo r: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say "foo meep bar meep baz" ~~ /<$rex>/
00:48 camelia rakudo-jvm 882e33: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(\SELF, int $pos)␤:(\SELF, int $pos, Mu \$BIND)␤:(\SELF, int $pos, :delete(:$delete)!, *%other)␤:(\SELF, int $pos, :exists(:$exists)!, *%other)␤:(\SELF, int $pos, :kv(:$kv)!, *%ot…»
00:48 camelia ..rakudo-parrot c27c7d: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(\SELF, int $pos)␤:(\SELF, int $pos, Mu \$BIND)␤:(\SELF, int $pos, :delete(:$delete)!, *%other)␤:(\SELF, int $pos, :exists(:$exists)!, *%other)␤:(\SELF, int $pos, :kv(:$kv)!, *…»
00:50 timotimo r: my $foo = "hi"; my $pat = '$foo'; "hi" ~~ /<$pat>/
00:50 camelia rakudo-parrot c27c7d: OUTPUT«Nominal type check failed for parameter '$var'; expected Any but got NQPMu instead␤  in method INTERPOLATE at gen/parrot/CORE.setting:12135␤  in regex  at eval_0:1␤  in method ACCEPTS at gen/parrot/CORE.setting:12307␤  in method ACCEPTS at gen/pa…»
00:50 camelia ..rakudo-jvm 882e33: OUTPUT«Nominal type check failed for parameter '$var'␤  in method ACCEPTS at gen/jvm/CORE.setting:12277␤  in block  at gen/jvm/CORE.setting:12175␤  in block  at gen/jvm/CORE.setting:7216␤  in block  at gen/jvm/CORE.setting:7080␤  in method gimme at gen/j…»
00:50 timotimo well, that blew up in a different way the last time i tried it ...
01:23 diakopter timotimo: isn't it, like, early morning there? :)
01:24 timotimo errr, i should go
01:24 raiph joined #perl6
01:25 diakopter timotimo: eh?
01:28 ggoebel13 joined #perl6
01:29 nofks joined #perl6
01:33 ssutch joined #perl6
01:41 grondilu joined #perl6
01:42 grondilu rn:  constant %h = <foo bar>; say %h<foo>;
01:42 camelia niecza v24-98-g473bd20: OUTPUT«bar␤»
01:42 camelia ..rakudo-jvm 882e33: OUTPUT«postcircumfix:<{ }> not defined for type Parcel␤  in block  at /tmp/77bOoURBF_:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any …»
01:42 camelia ..rakudo-parrot 78e4c2: OUTPUT«postcircumfix:<{ }> not defined for type Parcel␤  in method gist at gen/parrot/CORE.setting:11956␤  in method gist at gen/parrot/CORE.setting:1014␤  in sub say at gen/parrot/CORE.setting:12856␤  in block  at /tmp/EkvCe1k94M:1␤  in any  at /tmp/…»
01:42 grondilu rn:  constant %h = hash <foo bar>; say %h<foo>;
01:42 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«bar␤»
01:42 grondilu I thought the conversion was implicit, same as with:
01:43 grondilu rn:  my %h = <foo bar>; say %h<foo>;
01:43 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«bar␤»
01:43 grondilu see? no need to use 'hash' here
01:44 BenGoldberg rn: constant h = hash <a b>; say h<a>;
01:44 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«b␤»
01:45 BenGoldberg rn: constant !h = hash <a b>; say !h<a>;
01:45 camelia rakudo-parrot 78e4c2: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8OPpioJVBlâ�¤Missing initializer on constant declarationâ�¤at /tmp/8OPpioJVBl:1â�¤------> [32mconstant [33mâ��[31m!h = hash <a b>; say !h<a>;[0mâ�¤    expecting any of:â�¤        statement lis…»
01:45 camelia ..rakudo-jvm 882e33: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IcCIcSQjrZâ�¤Missing initializer on constant declarationâ�¤at /tmp/IcCIcSQjrZ:1â�¤------> [32mconstant [33mâ��[31m!h = hash <a b>; say !h<a>;[0mâ�¤    expecting any of:â�¤        statement list…»
01:45 camelia ..niecza v24-98-g473bd20: OUTPUT«[31m===[0mSORRY![31m===[0m��Missing initializer on constant declaration at /tmp/dwmeiy39wu line 1:�------> [32mconstant [33m�[31m!h = hash <a b>; say !h<a>;[0m��Negation metaoperator not followed by valid infix at /tmp/dwmeiy39wu li…»
01:45 BenGoldberg rn: constant @h = hash <a b>; say @h<a>;
01:46 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«b␤»
01:46 camelia ..niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Cannot use hash access on an object of type List␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 359 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/AF2Gh9gT4N li…»
01:46 BenGoldberg rn: my \h = hash <a b>; say h<a>;
01:46 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«b␤»
02:11 Mouq rn: my term:<!h> = hash <a b>; say !h<a>;
02:11 Mouq rn: my \term:<!h> = hash <a b>; say !h<a>;
02:11 camelia niecza v24-98-g473bd20: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed my at /tmp/pZZxUL91cQ line 1:�------> [32mmy[33m�[31m term:<!h> = hash <a b>; say !h<a>;[0m��Parse failed��»
02:11 camelia ..rakudo-parrot 78e4c2: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'term:<!h>' is not declared�at /tmp/Ac5r0hplvp:1�------> [32mmy term:<!h>[33m�[31m = hash <a b>; say !h<a>;[0m�Malformed my�at /tmp/Ac5r0hplvp:1�------> [32mmy term:<![33m�[31mh> = hash <a b>; sa…»
02:11 camelia ..rakudo-jvm 882e33: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'term:<!h>' is not declared�at /tmp/p2jtM_YEqr:1�------> [32mmy term:<!h>[33m�[31m = hash <a b>; say !h<a>;[0m�Malformed my�at /tmp/p2jtM_YEqr:1�------> [32mmy term:<![33m�[31mh> = hash <a b>; say !…»
02:12 camelia niecza v24-98-g473bd20: OUTPUT«b␤»
02:12 camelia ..rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
02:12 Mouq :( That used to work on rakudo
02:12 Mouq r: my \term:<º> = {say 'alive'}; º()
02:13 camelia rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
02:32 araujo joined #perl6
02:34 johnny5_ joined #perl6
02:37 GlitchMr joined #perl6
02:39 retupmoca https://github.com/perl6/nqp/pull/147 <-- makes it easier for me to write my git-tracking gentoo ebuilds
02:42 PacoAir joined #perl6
02:57 colomon joined #perl6
03:02 rurban joined #perl6
03:14 araujo joined #perl6
03:18 colomon joined #perl6
03:36 johnny5_ joined #perl6
03:43 colomon joined #perl6
03:43 johnny5_ joined #perl6
04:03 rurban joined #perl6
04:20 jeffreykegler joined #perl6
04:47 GlitchMr joined #perl6
04:48 logie joined #perl6
04:53 TimToady n: r: my \term:<º> = {say 'alive'}; º()
04:53 camelia niecza v24-98-g473bd20: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'º' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_uni…»
04:54 TimToady nr: my \term:<º> = {say 'alive'}; (º)()
04:54 camelia niecza v24-98-g473bd20: OUTPUT«alive␤»
04:54 camelia ..rakudo-parrot 78e4c2: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
04:54 camelia ..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space␤  in  (gen/jvm/CORE.setting)␤  in  (gen/jvm/ModuleLoader.nqp:349)␤  in load_setting (gen/jvm/ModuleLoader.nqp:340)␤  in  (src/Perl6/World.nqp:304)␤  in load_setting (src/Perl6/World.nqp:300)␤  in  (src…»
04:54 TimToady nr: say 'º' ~~ /\w/;   # why º() doesn't work
04:55 camelia rakudo-parrot 78e4c2, niecza v24-98-g473bd20: OUTPUT«「º」␤␤»
04:55 camelia ..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space␤  in  (gen/jvm/CORE.setting)␤  in  (gen/jvm/ModuleLoader.nqp:349)␤  in load_setting (gen/jvm/ModuleLoader.nqp:340)␤  in  (src/Perl6/World.nqp:304)␤  in load_setting (src/Perl6/World.nqp:300)␤  in  (src…»
04:55 TimToady (other than the bug)
04:55 preflex_ joined #perl6
04:57 TimToady nr: my \term:<°> = {say 'alive'}; °();  # this should work because ° is not \w
04:57 diakopter hee
04:57 camelia niecza v24-98-g473bd20: OUTPUT«alive␤»
04:57 camelia ..rakudo-parrot 78e4c2: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
04:57 camelia ..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space␤  in  (gen/jvm/CORE.setting)␤  in  (gen/jvm/ModuleLoader.nqp:349)␤  in load_setting (gen/jvm/ModuleLoader.nqp:340)␤  in  (src/Perl6/World.nqp:304)␤  in load_setting (src/Perl6/World.nqp:300)␤  in  (src…»
04:57 TimToady (other than the bug :)
05:04 TimToady (the reason º() can't work is that 'º(' is a longer token than 'º' is
05:04 TimToady )
05:04 rurban joined #perl6
05:06 rurban1 joined #perl6
05:11 rurban joined #perl6
05:14 johnny5_ joined #perl6
05:18 SamuraiJack_ joined #perl6
05:24 johnny5_ joined #perl6
05:40 Vendethi_ joined #perl6
05:48 johnny5_ joined #perl6
06:02 dalek rakudo/nom: 8e9470c | moritz++ | src/Perl6/Grammar.nqp:
06:02 dalek rakudo/nom: revert accidentally commited work towards no-strict, Mouq++
06:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e9470c407
06:08 rindolf joined #perl6
06:17 darutoko joined #perl6
06:33 daniel-s__ joined #perl6
06:39 rurban joined #perl6
06:53 FROGGS joined #perl6
06:57 xenoterracide joined #perl6
06:57 dansamo joined #perl6
07:09 kaleem joined #perl6
07:19 ssutch joined #perl6
07:40 rurban joined #perl6
07:55 dalek nqp: f81e259 | (Andrew Egeler)++ | tools/build/ (5 files):
07:55 dalek nqp: Add DESTDIR support for JVM/Moar
07:55 dalek nqp:
07:55 dalek nqp: install-jvm-runner and install-moar-runner were previously not
07:55 dalek nqp: aware of DESTDIR. DESTDIR was also loaded into PREFIX instead
07:55 dalek nqp: of being used directly in *-install.
07:55 dalek nqp: review: https://github.com/perl6/nqp/commit/f81e259d1b
07:55 dalek nqp: 1168608 | moritz++ | tools/build/ (5 files):
07:55 dalek nqp: Merge pull request #147 from retupmoca/master
07:55 dalek nqp:
07:55 dalek nqp: Add DESTDIR support for JVM/Moar
07:55 dalek nqp: review: https://github.com/perl6/nqp/commit/1168608d99
08:04 zakharyas joined #perl6
08:13 lizmat joined #perl6
08:28 masak good moarning, #perl6
08:31 FROGGS morning
08:35 iSlug joined #perl6
08:41 rurban joined #perl6
08:43 lizmat good *, #perl6
08:44 lizmat trying to wake up after AmsterdamX meeting + barring afterwards
08:44 Vendethi_ joined #perl6
08:44 masak wow, .pm meeting *and* gymnastics!
08:44 masak :P
08:45 lizmat mostly of the wrist  :-)
08:46 masak very important muscles in that area
08:46 masak can also be used for calligraphy
08:46 lizmat or darts: http://www.youtube.com/watch?v=sHnBppccI0o
08:49 masak or employee slapping
08:51 FROGGS hehe
08:52 masak http://www.satirewire.com/news/032700/satire-slaphappy.shtml
08:55 FROGGS I need some lunch ideas for tomorrow, any suggestions? :o)
08:56 masak FROGGS: fry some vegetables in yummy sauces.
08:57 FROGGS hmm, vegetables doesn't work that for my kids... except potatoes of course
08:57 FROGGS I'd like it though
08:58 markov joined #perl6
08:58 FROGGS ahh, but I remember that I wanted to make a carrot+apple salad
09:00 FROGGS I think I do mashed potatoes and sausages to that
09:00 lizmat sounds like "stamppot" to me  :-)
09:00 lizmat or "stoemp" as they would say in Belgium
09:00 FROGGS no, not quite
09:01 FROGGS lizmat: more like that: http://www.seelenfarben.de/lb201305/kocht130530.htm
09:01 * masak .oO( is "stamppot" at all related to "adapot"? )
09:02 FROGGS but just that the mashed potatoes actually look tasty
09:03 FROGGS masak: I have to think about the old Tripod movie when I hear adapot
09:03 FROGGS (... which was pretty scary when I was a kid)
09:04 FROGGS uhh http://www.youtube.com/watch?v=kMirslevFmw
09:07 lizmat FROGGS: indeed, not at all like stamppot  :-)
09:07 FROGGS well, without other vegetables, you see *g*
09:08 jaffa4 joined #perl6
09:08 jaffa4 hi all
09:08 masak hi jaffa4
09:08 jaffa4 I tried to compile rakudo star. it crashes badly
09:08 masak :/
09:09 jaffa4 when I execute perl Configure.pl --gen-parrot
09:09 masak huh.
09:09 masak that early?
09:09 FROGGS jaffa4: no-paste/gist the output?
09:09 moritz jaffa4: how did it crash?
09:09 jaffa4 .Can't spawn ".\test_2328.exe": Inappropriate I/O control operation at lib/Parrot/Configure/Utils.p
09:09 jaffa4 exception code 0000005
09:10 jaffa4 exception code c0000005
09:10 jaffa4 fault Module Name :StackHash_0a9e
09:10 FROGGS okay
09:11 jaffa4 :\standalone\rakudo-star-2013.10\rakudo-star-2013.10\parrot\test_2328.exe<<<<<
09:11 FROGGS jaffa4: do you have ActivePerl or strawberryperl installed?
09:11 FROGGS (Perl 5 that is)
09:12 jaffa4 I have everything, perl 16_2 activeperl is active now in the path
09:13 FROGGS jaffa4: if you have another one, can you switch to it and test again?
09:13 FROGGS I don't know what else to suggest
09:14 FROGGS I installed a parrot 5.9.0 yesterday without problems (on a win7 x64)
09:14 JimmyZ_ I guess you should shutdown the antivir
09:14 JimmyZ_ antivirus
09:16 JimmyZ_ test_2328.exe may be consider as virus if you didn't shutdown it
09:16 FROGGS true
09:16 FROGGS jaffa4: but also, what linenumber follows: .Can't spawn ".\test_2328.exe": Inappropriate I/O control operation at lib/Parrot/Configure/Utils.p
09:18 JimmyZ_ It may be blocked by the anti-virus
09:18 jaffa4 it works withj Straberry
09:18 jaffa4 at lib/Parrot/Configure/Utils.pm line 88.
09:20 jaffa4 what is the state of Perl6 new implementation>
09:21 FROGGS jaffa4: please rephrase the question
09:21 jaffa4 There is new virtual machine to be made
09:21 jaffa4 for rakudo.
09:21 FROGGS jaffa4: ahh, yes, MoarVM
09:21 moritz nqp is bootstrapped on moarvm
09:21 moritz rakudo doesn't yet build on moarvm
09:21 moritz but it's being worked on
09:22 FROGGS it is not a new Perl6 implementation, because rakudo is the implementation, which is left almost untouched
09:22 jaffa4 new backend
09:22 JimmyZ_ new World
09:22 FROGGS rakudo compiles a few things of itself already though on MoarVM
09:22 moritz new world order
09:22 jaffa4 What is going to be better?
09:23 FROGGS jaffa4: for what task?
09:23 jaffa4 in the virtula mechine?
09:23 FROGGS jaffa4: what do you want to achieve?
09:23 FROGGS if you need to execute Perl6 of a coffee maker you want JVM backend
09:24 JimmyZ_ Everything.
09:24 FROGGS but in my dreams MoarVM will beat all other backend, but, well, dreams
09:24 jaffa4 on a coffee maker?
09:24 FROGGS JVM runs everywhere
09:24 * moritz doubts that most coffee makers will have enough RAM to run rakudo
09:24 FROGGS and if you want to run perl6 in your browser, you want to wait for the JavaScript backend
09:25 JimmyZ_ buy new RAM :P
09:25 FROGGS jaffa4: it really depends on the task
09:25 jaffa4 running an IDE?
09:25 moritz I guess the JVM will beat any other backend for long running programs in the short and mid term
09:25 jaffa4 or command line tool?
09:26 FROGGS atm parrot might be better for short scripts or one-liners
09:26 jaffa4 for distribution?
09:26 jaffa4 ..\..\..\..\3rdparty\dyncall\dyncallback\libdyncallback_s.a(dyncall_callback.o)(.text+0x333):dyncall_callback.c: undefined reference to `dcCallbackThunkEntry'
09:26 FROGGS for long running daemons the JVM is better
09:26 JimmyZ_ FROGGS: btw: #define add_entry missing MVMROOT
09:27 FROGGS JimmyZ_: in config.c.in? ohh...
09:27 jaffa4 I cannot compile again... see my last paste
09:27 JimmyZ_ FROGGS: yeah
09:27 JimmyZ_ root temp push will be better
09:27 FROGGS jaffa4: what windows version is that? and what C compiler?
09:27 FROGGS JimmyZ_: patch it :o)
09:28 jaffa4 gcc (GCC) 3.4.5 (mingw-vista special r3), wiin 7 64bit
09:28 FROGGS somebody else uses gcc on windows?
09:29 FROGGS damn it, must go now...
09:29 FROGGS bbi1h
09:30 FROGGS[mobile] joined #perl6
09:34 frdmn joined #perl6
09:39 Vendethi_ joined #perl6
09:42 rurban joined #perl6
09:44 dakkar joined #perl6
10:20 Vendethi_ joined #perl6
10:34 daxim joined #perl6
10:38 colomon joined #perl6
10:39 xenoterracide outside of source code reading is there a way to get a list of what I can do with the metaobject? e.g. something like Obj.^.^methods
10:42 masak r: class A { method foo {} }; say A.^methods
10:42 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
10:42 camelia ..rakudo-parrot 8e9470: OUTPUT«foo␤»
10:43 rurban joined #perl6
10:43 masak p: class A { method foo {} }; say A.HOW.^methods
10:43 camelia rakudo-parrot 8e9470: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at gen/parrot/CORE.setting:6730␤  in method gist at gen/parrot/CORE.setting:1014␤  in sub say at gen/parrot/CORE.setting:12856␤  in block  at /tmp/hvdqRGiKrd:1␤  in any  a…»
10:43 masak p: class A { method foo {} }; say .Str for A.HOW.^methods
10:43 camelia rakudo-parrot 8e9470: OUTPUT«No such method 'Str' for invocant of type 'NQPRoutine'␤  in block  at /tmp/zwDsfq7m1O:1␤  in any  at /tmp/zwDsfq7m1O:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/p…»
10:43 masak p: class A { method foo {} }; say .name for A.HOW.^methods
10:43 camelia rakudo-parrot 8e9470: OUTPUT«archetypes␤new␤new_type␤parameterize␤add_fallback␤compose␤roles␤role_typecheck_list␤concretization␤is_composed␤can␤setup_junction_fallback␤find_method_fallback␤has_fallbacks␤set_name␤name␤set_docs␤docs␤ver␤auth␤set…»
10:43 masak xenoterracide: like that?
10:44 rurban1 joined #perl6
10:46 spider-mario joined #perl6
10:48 rindolf joined #perl6
10:52 pdurbin left #perl6
11:04 lizmat p: class A { method foo {} }; say A.HOW.^methods>>.name
11:04 camelia rakudo-parrot 8e9470: OUTPUT«archetypes new new_type parameterize add_fallback compose roles role_typecheck_list concretization is_composed can setup_junction_fallback find_method_fallback has_fallbacks set_name name set_docs docs ver auth set_ver set_auth set_stash_type add_stash a…»
11:05 Ulti left #perl6
11:06 xenoterracide masak: yeah
11:06 lizmat mostly offline while on route to Salzburg&
11:14 masak lizmat: is Salzburg the result of two neighbor cities Säureburg and Baseburg that got too close together? :P
11:17 woolfy left #perl6
11:36 masak moritz: I'm doing some very intense iterative TDD development right now at $dayjob. I find 'git commit -a' to be very suitable for that.
11:37 masak (because I keep editing the same test file and implementation file, and it's kind of a closed system where no other files change)
11:38 fhelmberger joined #perl6
11:45 fhelmberger joined #perl6
11:45 rurban joined #perl6
11:48 dalek rakudo/nom: 1255967 | jonathan++ | src/vm/jvm/core/Threading.pm:
11:48 dalek rakudo/nom: Fix outstanding bug in scheduler.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1255967d6a
11:48 dalek rakudo/nom: d9e79fb | jonathan++ | src/vm/jvm/core/Threading.pm:
11:48 dalek rakudo/nom: Add Scheduler role; provide uncaught error model.
11:48 dalek rakudo/nom:
11:48 dalek rakudo/nom: Previously, unhandled exceptions in scheduled items could just vanish.
11:48 dalek rakudo/nom: Now they will not, and there is an API for setting a per-item handler
11:48 dalek rakudo/nom: as well as the default global fallback one. Since much of this can be
11:48 dalek rakudo/nom: done independent of an individual scheduler, this is mostly pulled out
11:48 dalek rakudo/nom: into a role.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9e79fbfcd
11:49 dalek roast: c4a73f6 | jonathan++ | S17-concurrency/scheduler.t:
11:49 dalek roast: Add some initial scheduler tests.
11:49 dalek roast: review: https://github.com/perl6/roast/commit/c4a73f644c
11:52 dansamo joined #perl6
11:58 Vendethi_ joined #perl6
12:02 telex joined #perl6
12:11 xinming joined #perl6
12:19 tipdbmp joined #perl6
12:30 skromnica joined #perl6
12:40 FROGGS joined #perl6
12:41 FROGGS jnthn: you are giving a talk about concurrency?
12:46 rurban joined #perl6
12:49 [Coke] masak,moritz: I almost -always- use git commit -a when I'm working. very very occasionally I'll use -p if I want to skip whitespace or debug changes.
12:50 [Coke] FROGGS++ (observing jnthn's tuits are sometimes talk shaped)
12:51 nwc10 FROGGS: http://act.useperl.at/apw2013/talk/5183
12:54 * [Coke] heads off to a day in the ColdFusion/SQL/XHTML mines.
13:01 FROGGS joined #perl6
13:01 masak [Coke]: I don't really like -a, and most of my workflows stay clear of it.
13:06 kaleem joined #perl6
13:07 ajr joined #perl6
13:08 arnsholt My use of commit -a varies
13:09 arnsholt Sometimes I've been focussed on one thing, in which case I'll often use -a
13:09 arnsholt But if I've been hacking on various things and need to partition stuff into several commits, I don't (obviously)
13:10 panchiniak joined #perl6
13:16 masak right.
13:17 arnsholt In the latter case add -p tends to crop up a fair bit as well =)
13:17 masak my threshold for "need to make sure I know what I'm committing" is probably much lower than other people's.
13:17 arnsholt Could be
13:18 arnsholt I usually do that with diff
13:20 pernatiy joined #perl6
13:23 masak right, me too.
13:23 masak I usually do status + diff + 'git commit dir1 dir2 ...'
13:24 hoelzro git-add -p all the way!
13:24 masak :)
13:28 jnap joined #perl6
13:32 pernatiy_ joined #perl6
13:34 arnsholt Yeah, that's pretty similar to my workflow as well
13:39 btyler joined #perl6
13:41 benabik joined #perl6
13:47 [particle] joined #perl6
13:54 bluescreen10 joined #perl6
14:03 rurban joined #perl6
14:05 Vendethi_ joined #perl6
14:14 jnthn FROGGS: How'd you guess... :)
14:22 pernatiy joined #perl6
14:33 FROGGS[mobile] jnthn: I am Trelawny's best boy :o)
14:38 Tom_____ joined #perl6
14:40 masak FROGGS[mobile]: that's a seriously scary notion... :)
14:40 FROGGS[mobile] masak: that is unintended I'd say
14:42 1JTAA6C59 joined #perl6
14:46 zakharyas joined #perl6
14:56 xinming joined #perl6
15:01 xinming joined #perl6
15:11 pernatiy_ joined #perl6
15:12 denis_boyun joined #perl6
15:16 Vendethi_ joined #perl6
15:18 denis_boyun joined #perl6
15:43 denis_boyun joined #perl6
15:44 wbill joined #perl6
15:45 minimus joined #perl6
15:59 kaare_ joined #perl6
16:02 pernatiy joined #perl6
16:06 masak mjd++ # http://perl.plover.com/yak/Moonpig/
16:10 diakopter rjbs++ # MoonPig
16:12 rjbs mjd++ moonpig++
16:13 rjbs We're actually just discussing Moonpig in IM, mjd and I.
16:14 logie joined #perl6
16:15 masak I'm glad to note that many of the hard-won lessons of those slides are also themes of our courses at $dayjob. :)
16:16 masak the "heartbeat" design is interesting.
16:18 tobyink joined #perl6
16:18 rjbs I forget whether, in those slides, heartbeat explosion is covered.
16:19 rjbs A ledger gets heartbeaten.  It sends it to all its components in turn.  Some of them (consumers) produce synthetic heartbeats across date ranges to catch up.
16:19 rjbs (Hm.  Did we end up with heartbeats for those, or distinct sub-events?  I don't recall.)
16:22 tobyink Are attributive parameters (S06) actually useful for much, other than initializers?
16:23 jnthn tobyink: That's where I typically use them. They're pretty nice there :)
16:25 tobyink I've ported most of the Perl 6 method signatures stuff to Perl 5 in https://metacpan.org/release/Kavorka but attributive parameters seem more effort than they're worth. I think in Moose/Mouse/Moo people tend to just rely on the default initialization.
16:26 fhelmberger joined #perl6
16:28 jnthn Yeah, they kinda make the object model and parameter handling intersect, and while in Perl 6 we have both under control at the language level, I guess in Perl 5 that's a more open-ended problem...
16:31 tobyink If you restrict it to working only in Moose classes, it's not technically a big problem. You just tie a scalar variable to the Moose::Meta::Attribute's get_value/set_value methods. A twigil can theoretically be handled (rafl has a module on github), but I'd probably stick with the "$" sigil.
16:34 nnunley joined #perl6
16:35 TimToady well, we've gotten burned before on things that are more ambiguous in p5 than in p6, like smartmatch vs types
16:36 TimToady if someone uses $attr in a signature, what do they really mean?  with the twigil the intent is clearer
16:37 tobyink I was thinking along the lines of ($self: $attr is attribute)
16:37 TimToady ah...well, that is almost longer than what it is replacing
16:38 tobyink And/or allowing ($self: $.attr) in the signature, but establishing a plain $attr variable in the scope of the sub.
16:38 nnunley joined #perl6
16:38 TimToady but then do you auto-assign or not?
16:39 fhelmberger_ joined #perl6
16:41 [Sno] joined #perl6
16:41 tobyink I don't know. I think the use cases for it in p5 are minimal, and the issues make it more effort than it's worth. My time is probably better spent on implementing return types or somesuch.
16:41 SamuraiJack_ joined #perl6
16:45 * TimToady probably agrees :)
16:46 dalek nqp: f72fb2b | (Tobias Leich)++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
16:46 dalek nqp: handle custom_args case by allowing any number of args
16:46 dalek nqp: review: https://github.com/perl6/nqp/commit/f72fb2b66b
16:46 tobyink Which brings me to another question. How do return types work in list context?
16:46 moritz tobyink: t
16:47 moritz sorry
16:47 moritz tobyink: Lists are also objects in Perl 6
16:47 moritz tobyink: so if a subroutine returns a list of things, its return type should better be List
16:47 pernatiy_ joined #perl6
16:48 moritz ♪ what a wonderful world ♫
16:48 tobyink So the return type would be something like List<Int>?
16:49 timotimo it's spelled List[Int] here, or List of Int, but probably you want Positional[Int] instead, so it will accept parcels, arrays and lists?
16:52 diakopter r: my Positional[Positional] @b; @b := [];
16:52 camelia rakudo-jvm 882e33: OUTPUT«Type check failed in binding; expected 'Positional[Positional[Positional]]' but got 'Array'␤  in block  at /tmp/J7YWQfpFku:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval a…»
16:52 camelia ..rakudo-parrot d9e79f: OUTPUT«Type check failed in binding; expected 'Positional[Positional[Positional]]' but got 'Array'␤  in block  at /tmp/B8yDFzFRcr:1␤  in any  at /tmp/B8yDFzFRcr:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.n…»
16:53 timotimo hmm. even if we get filename sanitation for the comparator, we'll still get different line numbers for things due to the conditional compilation infrastructure we have
16:53 moritz and what diakopter declares is an Array of Positional of Positional :-)
16:53 tobyink Hmmm... I'll think about how that would translate to p5.
16:53 timotimo i wonder if it makes sense to make that thing emit blank lines to match up line numbers between outputs?
16:53 timotimo r: my Positional[Positional] $b; $b := [];
16:54 moritz tobyink: probably to either declare a List return type, or to not apply a return type at all
16:54 camelia rakudo-jvm 882e33: OUTPUT«Type check failed in binding; expected 'Positional[Positional]' but got 'Array'␤  in block  at /tmp/bNEx_IvsKY:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/st…»
16:54 camelia ..rakudo-parrot d9e79f: OUTPUT«Type check failed in binding; expected 'Positional[Positional]' but got 'Array'␤  in block  at /tmp/oQ3yi9Ch1S:1␤  in any  at /tmp/oQ3yi9Ch1S:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  …»
16:54 timotimo hm. well. our constants are never typed, right?
16:54 moritz they aren't
16:55 arnsholt Not yet, IIRC
16:55 timotimo i'm wondering if and when i should start thinking about making that change ... there's stuff like turning <foo bar baz> into a Positional[Str] at compile time, but also there's the thing where <1/5> is supposed to be something like a RatStr
16:55 moritz rjbs: as someone who has to maintain the accounting & billing code at $work (mostly a single subroutine with 2.5k lines of tightly coupled Perl code), I really enjoy seing a sane design in that area
16:56 arnsholt Due to package variables not having containers or something along those lines
16:56 timotimo oops. i didn't mean "our constants" in monospaced font
16:56 timotimo i mean "the constants we create at compile time as a result of parsing"
16:56 timotimo my bad. perl is too much like english to be embedded into english without some kind of quoting :P
16:57 moritz giving those narrower types looks very dangerous
16:57 moritz my $x = [1, 2, 3]; $x.push: 'foo'; # BOOM!
16:57 timotimo ah, hm.
16:57 kaleem joined #perl6
16:57 rjbs moritz: I feel your pain.
16:57 timotimo so it should only happen for actual constants
16:58 rjbs moritz: We still have one legacy billing system in place, an old version of FreeSide.  Pain.
16:58 timotimo but that's hard to figure out. when is a <foo bar baz> just passed into a function and then introspected and when is it re-used to house some integers as well?
16:58 timotimo i suppose i should drop it for the time being.
16:59 timotimo ah, "allomorphic" is the word i was looking for for the other part of the questio
16:59 moritz timotimo: <foo bar baz> is a parcel (of non-containers), and thus immutable
16:59 panchiniak left #perl6
17:00 moritz rjbs: but you are replacing it, I hope?
17:00 TimToady tobyink: please note that the return model is very different in p6, since list context is lazily applied to the return value, not known (mostly) at compile time
17:00 TimToady there's no wantarray in P6
17:01 rjbs moritz: Hopefully.  It is much less painful than the old system we replaced already, so there is not as much pressure.
17:01 TimToady what's really returned is a parcel, which hasn't committed to list/scalar context yet
17:01 rjbs TimToady++ # no wantarray
17:02 cbk1090 joined #perl6
17:02 TimToady that being said, if a return type is declared, it can supply context sooner than that
17:03 TimToady such as moritz++'s suggested List return
17:04 cbk1090 TimToady, do you have a bit of time to help me with you XML module....? or maybe can point me to some example code.
17:04 cbk1090 s/you/your
17:04 TimToady goodness, that's ancient history
17:05 cbk1090 TimToady, sorry I like it
17:05 cbk1090 is there something better?
17:05 TimToady well, depends on the application
17:05 cbk1090 I'm using it for my database program I'm making
17:06 TimToady if you need to manage the whole tree, then my old module is okay; there are others like XML::Twig that just look for various subtrees to process
17:06 timotimo S02:4590 says the user may want to write a list of numbers with angle brackets (and i agree that it's a nice way to do it), but then S02:4595 speaks about using + or ~ as the prefix to force interpretation as a number. does that mean the user should +<< < 1 2 3 4 > if they want a list of numbers rather than strings in this case?
17:07 synopsebot Link: http://perlcabal.org/syn/S02.html#line_4590
17:07 * TimToady would have to reread the docs to remember all the APIs though...
17:07 timotimo (the links were off by one paragraph >_>)
17:07 ajr joined #perl6
17:07 cbk1090 I want to make a line like this: <record id="1" date="10/30/2013"><topic>some topic</topic><remarks>some text here</remarks></record>
17:07 TimToady timotimo: yes, a hyper would be appropriate for that
17:08 rindolf joined #perl6
17:08 * timotimo installs https://chrome.google.com/webstore/detail/show-anchors/nhppnhnadikeniijclnghjfblnojgige?utm_source=chrome-ntp-icon to better use the synopses
17:09 timotimo huh. that doesn't seem to work at all
17:09 TimToady cbk1090: unfortunately, I switched to using YAML more than a decade ago for most such things, and don't remember much (or actively forgot it :)
17:11 timotimo hum. i don't think hypers can be compile-time evaluated yet
17:11 TimToady well, they can be, but aren't
17:11 cbk1090 TimToady, ok no prob.  I'll keep plugging away at it. Thanks for providing it as a Module. :-)
17:12 TimToady (Tim Bray)++ put me up to it
17:12 [Coke] afternoon, sixers.
17:13 TimToady interestingly, doing XML and seeing the impedance mismatch between C structs and Perl hashes is part of what clued me into the need for representational polymorphism in P6
17:14 cbk1090 oh, well i just need it for a text based database.
17:14 TimToady it's probably okay for that, if you don't push it on performance
17:14 * moritz recommends base64-dumps of sqlite for text based databases
17:15 cbk1090 nothing fancy just a place where i can store my passwords and keep track of fuel cost, ext...
17:15 sftp_ joined #perl6
17:15 cbk1090 also planning on using same database as a way to publish a simple blog.
17:16 cbk1090 <topic>blog</blog><remarks>this would be like a blog entry record.</remarks>
17:16 cbk1090 <topic>blog</topic><remarks>this would be like a blog entry record.</remarks>
17:16 cbk1090 thats right
17:18 TimToady plugging in the expat parser to a suitable repr might be a good show of how polyrep is a win in p6
17:19 TimToady if someone is looking for a small project :)
17:20 arnsholt And it'll give us an XML parser, without having to wrap LibXML, which is kind of big
17:20 masak +1
17:26 jaffa4 when are you going to have Rakudo Star 10 for WIndows?
17:27 cbk1090 joined #perl6
17:27 masak whenever someone rolls an .msi, I guess.
17:27 masak moritz: did you know the trick described in this post? http://blog.plover.com/prog/intervals.html -- I didn't.
17:28 PerlJam "trick"?
17:28 PerlJam weird.   I just thought that's how you do it. (and that this was the first time MJD had run across the problem)
17:28 sftp joined #perl6
17:31 masak PerlJam: if I hadn't read that post, I would have implemented it like mjd did the first time around (but with all three cases, including the smaller-in-larger case)
17:32 FROGGS jaffa4: that is on my list for tonight/tomorrow
17:33 jaffa4 FROGGS:  I see, how are you going with perl5 on rakudo?
17:34 FROGGS jaffa4: stalled a bit atm, because spectesting takes about 50 minutes... my hopes go into moarvm backend and therefore shorter test cycles
17:36 TimToady well, you could fix things one test at a time, and then check for regressions when you go to bed :)
17:37 FROGGS jaffa4: and when jnthn++ has some time for me, there are some minor issues that need to be fixed in order to make it a proper module
17:38 jaffa4 FROGGS:  what is its state anyway?
17:38 FROGGS TimToady: the problem is that when I fix/implement one thing, the regressions pop up in very strange places... so I have to run a spectest almost every time
17:39 FROGGS jaffa4: it passes 4407 of around 40000 tests, so, it is already somewhat usable :o)
17:39 jaffa4 FROGGS: cannot you run them in parallel?
17:39 FROGGS one major problem is that it is missing the Perl5 ore modules
17:39 FROGGS core*
17:40 FROGGS jaffa4: I could, but this breaks some tests (just two or three)
17:40 TimToady it also kinda sounds like you've started to hit the point where the spec tests are forcing you to implement some of the insanity the same way p5 does it :)
17:40 FROGGS using four cores it takes about 20 minutes
17:40 ingy TimToady: ♥
17:40 FROGGS TimToady: exactly
17:41 jaffa4 How about distributed testing?
17:41 FROGGS did I mention that I *hate* indirect object syntax?
17:41 FROGGS jaffa4: I thought about it, but that's all
17:41 diakopter FROGGS: just lookahead a few.. :)
17:42 ingy TimToady: YAML*.pm is under heavy dev right now, so if you have any 10 years frustrations lemme know
17:43 TimToady mostly having to guess about Unicode, and usually guessing wrong
17:51 jeffreykegler joined #perl6
17:51 dalek nqp: d7151b3 | (Tobias Leich)++ | / (2 files):
17:51 dalek nqp: mapped nqp::getpid
17:51 dalek nqp: review: https://github.com/perl6/nqp/commit/d7151b3dff
17:52 tobyink joined #perl6
17:58 timotimo TimToady: do you have something to say about how negative values in a Mix should influence the selection of elements from the Mix?
17:59 TimToady erroneous, maybe
18:01 TimToady only Mixy[Unum] supports .roll ?
18:02 timotimo well, the current way it works is b0rked indeed. there's a spectest that seems to suggest negative means "will not be picked, ever"
18:04 timotimo Mixy is currently non-parametric, though
18:13 TimToady not that Unum exists either...
18:14 timotimo right. should .roll die if there's a negative number in the pairs? should there be a test case to check that it doesn't live?
18:15 dalek roast: aa0f747 | jonathan++ | S17-concurrency/promise.t:
18:15 dalek roast: Some initial tests for Promise.
18:15 dalek roast: review: https://github.com/perl6/roast/commit/aa0f7471a0
18:16 timotimo http://questhub.io/realm/perl/quest/52714c5150a92fc02600004d - you can cheer me on if you want :P (implement eqat and get it into master)
18:17 timotimo (hum, maybe dalek could report quests being created with perl6 as the tag in the perl realm? would that be interesting?)
18:19 masak timotimo: we could try it. maybe as a one-liner.
18:20 masak also, "go go go timotimo! \o/" :)
18:20 masak timotimo: something like <dalek> questhub: nqp: implement and use eqat op on all backends -- http://questhub.io/realm/perl/quest/52714c5150a92fc02600004d
18:21 timotimo the dalek information is in Mu, right?
18:21 timotimo how to set it up and stuff?
18:22 moritz speaking of which, the code generation for scanning regexes on the JVM still doesn't use index
18:23 moritz timotimo: I don't think so
18:23 Tom_ joined #perl6
18:25 moritz timotimo: I know it involves git://github.com/Infinoid/dalek-plugins.git somehow
18:27 timotimo i was refering to the documentation of the webhooks thing we've got for the commits
18:27 timotimo something similar should be doable for questhub, no?
18:28 retupmoca timotimo: are you talking about this: https://github.com/perl6/mu/blob/master/misc/dalek-push.txt
18:32 retupmoca ooh, nqp commit-bit
18:33 retupmoca it must only be rakudo that requires the paper signed?
18:35 jnthn retupmoca: Correct
18:35 * rjbs wonders when we'll be able to port Marc L.'s modules to perl 6.
18:40 lue hello world o/
18:41 FROGGS joined #perl6
18:45 wbill joined #perl6
18:47 * TimToady doesn't classify modules by who wrote them, which is probably an autistic failure mode :)
18:49 * TimToady doesn't much track actors names either: "the guy who played Boromir in the LotR"
18:50 rjbs Normally, I have no reason to classify them as such.  It's only when the person who wrote them has a personality that overshadows the code...
18:51 * TimToady doesn't know anyone like that :)
18:54 rjbs Best line from the Washignton Post in a while: "Two engineers with close ties to Google exploded in profanity"
18:55 TimToady I'd probably have heard any explosions from here, given how close I live to Google...
18:56 lue how are the Profanity city PD dealing with it?
18:58 retupmoca PCPD?
18:58 rjbs I hate that fucking place.
18:58 * TimToady utters a string of confanity
18:58 rjbs Unicode 7 needs more grawlix.
18:58 rjbs I think it's crazy that we have no "PLANET SATURN."
18:59 TimToady .u ♄
18:59 FROGGS ENOYOLEAUX
18:59 rjbs TimToady: Hey, buddy, you show me an Andy Capp where he said that while fighting and I'll drop my complaint.
18:59 lue .oO(I'm telling you,    say "⚂".char-name    would solve our problems.)
19:00 TimToady which reminds me, we need a consistent specced way to look up unicode props
19:01 geekosaur preflex: seen yoleaux
19:01 preflex yoleaux was last seen on #perl6 4 days, 23 hours, 39 minutes and 11 seconds ago, saying: 18:23Z <diakopter> Mouq: awesome work on stdsigspace Mouq++
19:01 geekosaur :(
19:01 lue .oO(Mouq's gotten a lot of accidental karma from people seen-ing yoleaux :P)
19:01 rjbs TimToady: Have you discussed/tackled the problem, yet, of properties on trans-Unicode codepoints?
19:02 TimToady we're still having enough trouble with the cis-Unicode codepoints
19:03 rjbs We just recently had a discussion about it.  It'll definitely be something to consider.
19:04 dmol joined #perl6
19:04 lue TimToady: my first thought is either .uni-info(:propname, :prop2) or a Codepoint object that has properties as methods. "ABCD".comb».Codepoint».cclass
19:06 TimToady we don't necessarily need another char type where integers will do
19:07 TimToady though methods do have their notational convenience, I'll admit
19:07 lue I was thinking the Codepoint object stores the unicode information (maybe even to has $.cclass visibility), but sub/methods on an integer (such as 0x2A03) would do just as fine.
19:09 TimToady methods might work better where hypers are wanted
19:11 * lue almost doesn't like the idea of a bunch of methods (thus the Codepoint object to put them in one place), but reminds himself that the adverb route has just as many name definitions.
19:27 fhelmberger joined #perl6
19:41 moritz masak: http://qandwhat.apps.runkite.com/i-failed-a-twitter-interview/ 2D version of t4 asked in an interview :-)
19:42 masak nice :)
19:44 masak skimming it, I don't think that solution generalizes to t4's 3D at all.
19:44 masak still very interesting, of course :)
19:47 fhelmberger joined #perl6
19:49 moritz agreed on both points
19:50 masak today's mini-challenge: write a nice p6 solution that passes all of the test cases at https://gist.github.com/igor47/7228586
19:50 masak I won't have time for it myself, but I wish I did.
19:51 sqirrel joined #perl6
19:54 fhelmberger joined #perl6
20:01 japhb__ jnthn: In designing a multi-level API (low-level operations, medium-level wrappers, high-level convenience), how do I structure the code so that I can make it as efficient as possible?  Right now I'm assuming all the levels (except maybe the very top) should be in the same file/comp_unit, written as modules with exported subs, using last-expression-value returns rather than return statements.
20:02 japhb__ Is that correct so far?  Do I still need to add 'is pure' for purely functional routines, or can that be intuited if all the ops within are pure?
20:02 masak japhb__: how important is performance?
20:02 japhb__ masak: As fast as Rakudo can possibly go.
20:02 tobyink joined #perl6
20:03 lue masak: please tell me this t4 doesn't have a "number of solvable boards" question to go along with it :)
20:03 japhb__ masak: Let's just say hand-coded C++ versions of this code are a performance bottleneck
20:04 masak lue: nope :)
20:04 masak japhb__: then (my point is) it sounds like you have a vested interest to measure decisions like the above.
20:05 masak lue: in fact, t4 is much less of a "hah! gotcha!" task this year than the previous two years.
20:05 masak lue: but still pretty subtle.
20:05 japhb__ masak: I'm trying to prune the decision space.  If jnthn knows from his optimizer work that a certain decision disables an entire class of optimizations, that prunes out a big chunk of a combinatorial space that would take me quite a while to explore if unpruned.
20:06 moritz japhb__: note that *only* constant folding considers 'is pure' right now
20:06 japhb__ What is necessary to do or avoid for inlining to work?
20:08 masak japhb__: ooc, are we talking Rakudo on the JVM?
20:08 masak if we are, then you're likely to get a lot of JIT for free.
20:09 japhb__ masak: I'll take JVM.  I'd love to be prepared for Moar.  (Meaning, not have to redesign the API to deal with a different set of requirements for optimization.)
20:09 japhb__ .oO( Write Once, Suck Less Everywhere )
20:10 lowpro30 joined #perl6
20:11 arnsholt Inlining and other optimiser decisions sounds like a thing to add a pragma for
20:12 lizmat joined #perl6
20:13 japhb__ arnsholt: How does that help?  I can certainly see a case for optionally turning them *off*, but generally you want the equivalent of -O2 to be the default, neh?
20:14 woolfy joined #perl6
20:16 arnsholt Not turning off, but tracing
20:16 arnsholt I was a bit unclear about that
20:16 arnsholt But logging the decisions made, so that it actually tells you what gets inlined and what doesn't
20:17 arnsholt So that people don't have to guess about this kind of thing =)
20:17 FROGGS jaffa4: you wanna test? http://froggs.de/perl6/rakudo-star-2013.10-RC0.msi
20:17 jaffa4 FROGGS:ok
20:18 FROGGS jaffa4: but rename your C:\rakudo before installing it
20:19 jaffa4 FROGGS: it does not let me choose directory
20:19 moritz because parrot isn't relocatable
20:20 japhb__ arnsholt: Oh yes, that would be very helpful.
20:21 denis_boyun__ joined #perl6
20:22 jaffa4 Failed to create directory 'blib/lib\Path/' with mode '0o777': mkdir failed: The system cannot find the path specified.
20:23 jaffa4 I tried to use panda
20:23 lue r: say $_ for 5^...1; # :(
20:23 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: ( no output )
20:24 FROGGS ==> Successfully installed NativeCall
20:24 moritz \o/ # empty range is empty
20:24 FROGGS jaffa4: it works on my box
20:24 jaffa4 FROGGS: I managed to nstall it but panda does not seem to work
20:24 jaffa4 good for you?
20:24 bluescreen10 joined #perl6
20:25 lue any idea why ^... doesn't work?
20:26 FROGGS Failed to remove the directory '.work\1383164610_1\lib': rmdir failed: The directory is not empty.
20:26 FROGGS -.-
20:26 fhelmberger joined #perl6
20:26 moritz lue: because the range is empty
20:26 moritz oh, it's a series
20:26 lue but...
20:26 moritz that's not good
20:27 moritz r: .say for 5...1
20:27 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5␤4␤3␤2␤1␤»
20:27 lue It's kinda critical for a cool-ish looking version of the Python gist masak mentioned :)
20:27 FROGGS lue: btw, your 2013.10 tar.gz lacks modules/file-find and modules/shell-command
20:27 jaffa4 panda install Text::Markov
20:27 jaffa4 Failed to create directory 'blib/lib\Text/' with mode '0o777': mkdir failed: The system cannot find the path specified.
20:28 masak waitwait, is ^... even an operator?
20:28 FROGGS C:\rakudo>panda install Text::Markov
20:28 FROGGS ==> Fetching Text::Markov
20:28 FROGGS ==> Building Text::Markov
20:28 masak I know ...^ is, but...
20:28 FROGGS but I am on WinXP currently
20:28 masak std: 5^...1
20:28 camelia std 8adbc60: OUTPUT«ok 00:01 122m␤»
20:28 FROGGS jaffa4: now I get the same error message like you
20:28 lue FROGGS: I have those two directories, so the makefile must've missed them :(
20:29 masak I'm wondering if that doesn't parse as 5 ^.. .1
20:29 FROGGS lue: can you zip those two for me? I wonder if the mkdir errors come from outdated shell-command
20:29 masak std: 5 ^... 1
20:29 camelia std 8adbc60: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus term at /tmp/0vx8OTR9RB line 1:�------> [32m5 ^..[33m�[31m. 1[0m�Parse failed�FAILED 00:01 122m�»
20:29 masak lue: see? bogus.
20:30 masak lue: serves you right for not using whitespace around your infix operators :)
20:30 lue masak: either give me a ^... or a ^.. that can do the apparently arcane magic of descending numbers.
20:30 lue masak: I already tried whitespace and knew of the concat error.
20:30 lue FROGGS: where would I upload the tarball?
20:30 moritz r: .say for [5...1][1..*]
20:30 FROGGS to a place of your choice
20:31 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«4␤3␤2␤1␤»
20:31 timotimo what's the current procedure to generate new bootstrap for parrot and jvm?
20:31 moritz lue: you can always use that :-)
20:31 FROGGS lue: or mail it to me :o)
20:31 moritz timotimo: aren't there make targets for that?
20:31 lue FROGGS: I don't have a good place to upload, so if you privmsg your email, that'd be good.
20:31 timotimo are there two now?
20:31 FROGGS timotimo: there are three
20:32 FROGGS make <[pmj]>-bootstrap-files
20:32 timotimo excellent
20:32 timotimo moarvm already has eqat_s, so no need to regenerate the bootstrap files there
20:33 woolfy joined #perl6
20:34 Rotwang joined #perl6
20:34 moritz why does that even need a bootstrap update?
20:34 masak lue: re "apparently arcane magic of descending numbers" -- you apparently have never felt the pain of a range that doesn't become empty when the endpoints are in the wrong order.
20:34 masak lue: just do 4...1 and be done with it.
20:34 moritz the old bootstrap files that don't use eqat_s should still work, no?
20:35 lue masak: that means an ugly (*ugly*) +@elems-1 that I really don't think I should have to do :/ (moritz's solutions seems good though)
20:36 FROGGS you only need to update bootstrap-files if you want to use eqat_s in nqp
20:36 masak lue: I like to write reverse ranges like this: `reverse 1 ..^ 5`
20:36 masak lue: very readable -- the word 'reverse' is even in there!
20:37 masak documentation as code.
20:37 FROGGS For 1 To 5 Do ' documentation as code
20:38 lue I kinda wish 1 R..^ 5 or R(1..^5) or [R] 1..^5 DWIMmed. (If you can't tell, I'm trying to prefer cooler-looking constructs here! :P)
20:39 masak lue: that's not what R means.
20:40 lue I know :) (then why do I remember a use of R that flipped a list...?)
20:40 timotimo moritz: yes, they should, but i'd like to use eqat in the nqp source code :)
20:40 masak but there's nothing to stop you from defining either of those crazy operators, I guess.
20:40 masak LTM will do the rest.
20:40 timotimo (actually not called eqat_s)
20:41 lue I'll workaround of course, but I'm still miffed that, for example, 5..1 doesn't work. I've never been able to understand that one, actually. (I'm also now miffed by the curious non-existence of ^... but that's another thing)
20:42 masak lue: until you understand that one, take it from people who have either felt the pain directly, or been able to extrapolate it from circumstantial evidence :)
20:42 cognominal joined #perl6
20:43 masak lue: you'll have to take up ^... with TimToady. I'm sure there's a very good reason.
20:43 timotimo lue: last time i tried to understand, it seemed like ".. is not supposed to be smart enough for that"
20:43 timotimo ... will do it for you, though
20:43 masak indeed.
20:43 lue Until I understand it, I will always say "die on 5..1" it's a bogus limitation :)
20:43 timotimo :)
20:43 lue s/it's/is/
20:43 moritz or you can just say 5 - 1 ... 1
20:44 masak yeah, infix:<..> means "range *counting up*". note how we also ditched the :by(2) idea, sticking all of the magic in infix:<...>
20:44 lue moritz: but -1 is for languages that don't have ^..^ ! :)
20:44 masak this is a *good thing*, and if you disagree, do try to keep your complainin' to a minimum. :)
20:44 masak std: 5..1
20:45 camelia std 8adbc60: OUTPUT«ok 00:01 122m␤»
20:45 masak could do with a compile-time warning on that one, I guess.
20:45 japhb__ r: say [R,] 1..^5
20:45 camelia rakudo-parrot d9e79f: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at gen/parrot/CORE.setting:16422␤  in sub  at gen/parrot/CORE.setting:16529␤  in block  at /tmp/MZz9SSn2al:1␤  in any  at /tmp/MZz9SSn2al:1␤  in any  at gen/parrot/stage2/N…»
20:45 camelia ..rakudo-jvm 882e33: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at /tmp/o_031j9iTU:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196…»
20:45 japhb__ awww
20:45 lue Well, at least I see how (apparently) descending simple lists is bad for .. , but I'll talk to TimToady tonight (if he'll be around) about ^...
20:45 lue r: .say for 1...5
20:45 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«1␤2␤3␤4␤5␤»
20:45 lue r: .say for 1...^5
20:45 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«1␤2␤3␤4␤»
20:45 lue r: .say for 1^...^5
20:45 camelia rakudo-jvm 882e33: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ixENlC94xYâ�¤Confusedâ�¤at /tmp/ixENlC94xY:1â�¤------> [32m.say for 1^...^[33mâ��[31m5[0mâ�¤    expecting any of:â�¤        dotty method or postfixâ�¤Â»
20:45 camelia ..rakudo-parrot d9e79f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SwcOzA_Buaâ�¤Confusedâ�¤at /tmp/SwcOzA_Bua:1â�¤------> [32m.say for 1^...^[33mâ��[31m5[0mâ�¤    expecting any of:â�¤        dotty method or postfixâ�¤Â»
20:46 masak lue: ISTR mjd has a good comment about it in a blog post somewhere.
20:47 masak lue: but basically it's about programmer expectations.
20:47 timotimo i wonder how much faster nqp::eqat is than nqp::index(...) == 0
20:47 masak lue: when a coder writes 1..$end in their code, she's *thinking* "from 1 *up to* $end"
20:48 timotimo for the cases it's used in, it probably doesn't change performance much
20:48 timotimo but it still seems cleaner to me :P
20:48 masak lue: she's not thinking "from 1 up to $end *or down to it if $end < 1*"
20:48 masak lue: so it's a kind of conservative application of the DWIM principle, actually.
20:48 * lue would like to think he'll get bit by it someday, but it won't happen in Perl 6 ;)
20:49 masak or, more precisely, it's the Principle of Least Surprise.
20:49 masak as in the DWIM you're proposing is not worth the WAT it introduces.
20:49 lue What doesn't help is that I see .. and I think "generate a sequence of consecutive integers from LHS to RHS"
20:49 FROGGS jaffa4 / lue: that didn't help :(
20:50 masak lue: this is why language design is interesting. your idea seems reasonable *on the surface*, but applied in an actual programming language, it's crap.
20:50 lue (and ... is for magical lists, like evens or %% 3)
20:50 masak lue: right.
20:51 masak lue: TimToady happens to be really, really good at anticipating the way features can come back and bite users. or the way features will interact.
20:51 ssutch joined #perl6
20:51 masak (and still, Perl 6 has changed quite a lot over the years due to things none of us could predict.)
20:51 lue r: sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1.5; say $_ for 5.1; # :D
20:52 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«1.5␤5.1␤»
20:52 timotimo ERROR: Unknown flag --version. USAGE: moar  /  just an outdated moarvm?
20:52 lue *headdesk*
20:52 lue *headdesk* x2
20:52 masak lue: go back to square "how does term parsing work".
20:52 lue *headdesk* x3
20:52 lue r: sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1 . 5; say $_ for 5 . 1; # :D
20:52 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
20:52 camelia ..rakudo-parrot d9e79f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2jO09VzhKa�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/2jO09VzhKa:1�------> [32m return $lhs...$rhs } }; say $_ for 1 . [33m�[31m5; say $_ for 5 . 1; # :…»
20:53 masak :)
20:53 lue (that try { } is a leftover)
20:53 lue Bad Perl6!
20:53 masak well, obviously you're trying to concatenate strings, you bad p5 user.
20:53 lue r: supersede sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1 . 5; say $_ for 5 . 1; # :D
20:54 camelia rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
20:54 camelia ..rakudo-parrot d9e79f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/aNkEHGiyHP�Cannot use 'supersede' with sub declaration�at /tmp/aNkEHGiyHP:1�------> [32mhs, $rhs) { try { return $lhs...$rhs } }[33m�[31m; say $_ for 1 . 5; say $_ for 5 . 1; # [0m� …»
20:54 FROGGS timotimo: we have --version since 2013.10
20:54 timotimo makes sense
20:55 masak lue: clearly tonight you are trying to be the unreasonable man on which progress depends.
20:56 lue I'm sure TimToady will enlighten as to why my DWIMs and WATs on .. are inverted tonight :)
20:56 masak I thought I explained it already. :)
20:57 Tene masak: I fail to imagine a case where I'd expect to rely on a range being zero when the end is lower than the start.
20:57 Tene Any handy intuition pumps?
20:57 jnthn japhb__: for performance: native int over Int is usually a win as you'll get operators inlined as well as the ops just being cheaper. For inlining, subs and multi-subs that are compile-time determinable will cut it, though they need to be simple. Inlining will work between compilation units; has to or we could never inline things from the setting. If creating lots of objects, write a custom BUILD rather than relying on the default thing.
20:58 BenGoldberg joined #perl6
20:58 masak Tene: I'll try to think of a real-enough-world case.
20:58 lue masak: you did, but I still can't imagine a specific case where I'd go "gee, sure is handy .. can't create a list of descending integers"
20:58 jnthn japhb__: Also try --optimize=3 but I know that it does at least one thing wrong that breaks spectests, even if compiling CORE.setting with it works out.
20:59 Tene lue: you're not completely anomalous; I'm with you so far.
20:59 masak lue: the feature is not that can't deliberately create them, the feature is that you can't *accidentally* create them.
20:59 lue 5 .. 1 :yes-i-bloody-mean-it    then :)
21:00 Tene :yes-i-bloody-mean-it is perhaps spelled .  ;)
21:00 lue 5 .. 1 . ?
21:01 lue :)
21:02 lizmat joined #perl6
21:02 lue (As a reminder, this discussion wouldn't've happened if ^... was a thing. It led to me wanting .. (and by extension ^..) to do what ... does and ^... should be doing)
21:03 masak lue: what list do you expect '10, 9, 8 ^... 5' to result in?
21:04 lue The same one ... generates, but without the 10. Clearly :P .
21:04 jaffa4 FROGGS: what will happen?
21:04 * lue resorted to a ..^ list and then reversing the populated array, in any case.
21:05 timotimo i can kind of see wanting to leave out the starting value for some kinds of sequences
21:05 timotimo but i can't think of an example
21:05 Util masak: I gave some thought to that last week; 10, 9, 8 ^... 5 should produce 9,8,7,6,5; the 10 is just extra info fed to the sequence predictor routine.
21:06 masak ok, so we should have the full set of ... ...^ ^... ^...^ ?
21:06 Util Yes. Least suprise after one learns of .. ^.. ..^ ^..^
21:07 masak Util: what about 1, 2, 3 ... 10, 20, 30 ^... 100 ?
21:07 FROGGS jaffa4: well, one (like me) has to debug it
21:07 Util We have ^... now
21:07 masak no, we don't.
21:07 Util I mean ...^  - typo
21:08 lue masak: I want to say 1, 2, 3 ... 10, 20, 30 ^... 100 leaves out the 1 . But if ... does that kind of magic, we almost should have another operator that lets me do exclude-first descending numbers, without all the debug hell adding ... variants apparently would cause ;D
21:09 masak r: .say for 1, 2, 3 ... 10, 20, 30 ... 100
21:09 benabik joined #perl6
21:09 camelia rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
21:09 camelia ..rakudo-parrot d9e79f: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, Mu $b)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in sub infix:<...> at gen/parrot/CORE.setting:16290␤  in block  at /tmp/jMWIUYqdbt:1…»
21:09 masak huh.
21:10 * masak thought that was straight out of S03
21:10 lue n: .say for 1, 2, 3 ... 10, 20, 30 ... 100
21:10 camelia niecza v24-98-g473bd20: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤20␤30␤40␤50␤60␤70␤80␤90␤100␤»
21:10 lue masak: niecza++
21:10 jnthn masak: Precedence, maybe?
21:10 masak yeah.
21:11 masak jnthn: but niecza gets it right.
21:11 jnthn yes, that's a little confusing :)
21:11 * masak submits rakudobug
21:12 lue my attempt: https://gist.github.com/lue/7240356
21:13 Util My full thought from last week was that the ... design is broken w.r.t. huffmanizing. When the sequence back-end derives a code block of { $_ + some_constant } or {$_ * some_constant} then it knows that the sequence is heading toward +Inf or -Inf. In that (most common) circumstance, 1, 3, 5 ... 12 should either stop at 11, or at 13, or warn, or die; *anything* but infinitely loop.
21:14 woolfy joined #perl6
21:14 Util if someone writes 1, 3, 5 ... 12 , then they *never* mean 1, 3, 5 ... *
21:14 Util Landmine
21:15 arnsholt Oooh, looks like I've found a way to do CStr on JVM
21:15 timotimo Util: i disagree. we should not just say "oh they probably mean * > 12"
21:15 FROGGS arnsholt: that sounds good, ehh?
21:16 arnsholt Yeah, it's about time I do some more hacking on the NativeCall stuff
21:16 arnsholt Even though CStr is a part of the API I really can't wait to kill =)
21:16 FROGGS arnsholt: yeah, the fans wanna have it :o)
21:17 masak Util: I'm trying very hard not to trigger my "halting problem" reflex. of course we could catch the simple cases, yes.
21:17 FROGGS (NativeCall, not CStr)
21:17 lue timotimo: but "they probably mean *" is also wrong, and worse IMO
21:17 lue I would go with a die in that case, because at that point the programmer can't sequences right.
21:18 timotimo hm. if we have one of the simpler sequences, we can probably just analytically see if the endpoint is in the sequence and carp if not
21:18 Util masak: the simple cases will be the most common, I am sure.
21:18 FROGGS well, you could eject the cd drive very hard and hope it hurts him/her
21:18 masak Util: agreed.
21:18 timotimo but only in the case where we have only numbers involved
21:19 * masak .oO( Warning: the sequence is infinite, due to Fermat's Last Theorem )
21:19 FROGGS and again, X::Insulting would help
21:20 lue timotimo: die if $cur-gen-number > $endpoint
21:20 Util Sometimes we want to code something like http://rosettacode.org/wiki/Hailstone_sequence , which jumps around, but most will be simple (and recognizable) "progres toward +-Inf"
21:21 lue .oO(Dying on unsatisfactory endpoints would make ... more consistent with .. anyhow.)
21:21 * lue &
21:21 timotimo Util: i already implemented the hailstone sequence with the ... operator and it was beautiful
21:21 masak Tene: in Perl 5, `for my $index (0..$max) { send_nuclear_warhead($city[$index]) }`
21:22 masak Tene: if 0..$max produces a non-empty range full of decreasing negative numbers, and $city[$index] indexes from the end, then... global thermonuclear war.
21:23 Util It does not even indicate critical user dumbness. 2, { $_ + $interval } ... $endpoint , where the two variables are defined much earlier, is easily vulnerable to maintanence programmer error.
21:24 masak Tene: in Perl 6, the corresponding code dies at runtime -- unless your array is of a special (unimplemented) S09 type that allows index wraparound. but the point still stands -- when a reader sees 0..$max, the "static gestalt" (or whatever) of that expression is "0 upto $max"
21:25 Util timotimo: Yes, quite beautiful, and the thing that shaped my mind *away* from the idea that all ... should be specced as ever-increasing-or-ever-decreasing for safety. I would hate to lose that Hailstone ability, but just changin the spec to say that trailing codeblock is manditory for non-simple cases gives us the best of both worlds.
21:26 timotimo ... is not only for numbers
21:26 timotimo traverse a graph by following ".parent" pointers, for example
21:26 Util timotimo: Good point.
21:26 timotimo my @path = ($end, *.parent ... $beginning).reverse
21:27 Util FYI: p6g -e '.say for 1, 3, 5, 7 ... 12;' freezes with *no* output for me.
21:27 masak Util: that's a problem with for loops, though.
21:27 timotimo right. use map instead and it will work
21:27 Util masak: noted. Thanks!
21:29 * lue proposes the en dash (–) for index ranges and .. for what he wants :P
21:30 timotimo hah, with -j3 it seems the makefile will do all the steps like /usr/bin/perl -MExtUtils::Command -e cp gen/jvm/stage2/nqpmo.jar .
21:30 timotimo three times in a row
21:32 timotimo <spam>
21:32 dalek nqp/eqat_op_rebased: 0b129b2 | (Timo Paulssen)++ | src/vm/ (4 files):
21:32 dalek nqp/eqat_op_rebased: add nqp::eqat to jvm and parrot.
21:32 dalek nqp/eqat_op_rebased: review: https://github.com/perl6/nqp/commit/0b129b2207
21:32 dalek nqp/eqat_op_rebased: de1e094 | (Timo Paulssen)++ | src/vm/parrot/ops/nqp.ops:
21:32 dalek nqp/eqat_op_rebased: special case same-encoding strings, length-1 needles.
21:32 timotimo </spam>
21:32 timotimo ... didn't intend for it to be kicked :(
21:32 dalek joined #perl6
21:33 timotimo i'd like to merge that into master now, i consider it done.
21:33 timotimo am i missing something obvious? like, should i create tests?
21:33 japhb__ Tene: I'm backlogged, so not sure if anyone has mentioned this, but you want reversed ranges to become empty because of algorithms that involve pointer or index crossing.
21:34 masak japhb__: could you elaborate "pointer or index crossing"?
21:34 masak anyway, it sounds like my nuclear example.
21:35 jnthn japhb__: I'm robustering (hopefully) the concurrency stuff these days. Also adding tests. :)
21:36 jnthn japhb__: Promise is getting a fairly big refactor but it's largely "on the inside" so I'm hopefully it'll not regress anything you're doing.
21:36 Lorn joined #perl6
21:36 japhb__ masak: Any number of algorithms (of which quicksort is probably the most well known), that involve starting at opposite ends of an array or subarray, and moving the ends towards each other until the "right" one is to the left of the "left" one.
21:37 jnthn Binary search is an even simpler example than quicksort, I guess...
21:37 japhb__ jnthn: Very happy to hear that inlining works across comp units.  That makes for way less ugly for me.
21:37 jnthn japhb__: I have dreams of making the optimizer have a mode where it explains what it did/didn't do to help us better understand these things.
21:37 japhb__ jnthn: Once you head to bed, I'll recompile rakudo-jvm and see if you broke my code.  ;-)
21:38 jnthn OK. The earth-shattering Promise refactor may or may not land tonight. :)
21:38 japhb__ jnthn: Yeah, arnsholt mentioned that idea earlier, and I'm all in favor.
21:38 japhb__ I'm using Promise pretty close to the way you used it in your talk.
21:38 jnthn I'm in favor, I'm just under-provisioned and over-assigned ;)
21:39 jnthn japhb__: Are you mostly creating them with async { ... }
21:39 jnthn japhb__: Are using Promise.new(...) explicitly?
21:39 jnthn I think my talk uses were all async { ... }
21:39 [particle] joined #perl6
21:39 jnthn s:2nd/Are/Or/
21:40 japhb__ My very first use was 'sub async_qx($cmd,...)' which runs a qx in a separate thread, returning promises.  And then a program which needs to shell out to a lot of slow things turned into a sub make_promises() which returned a hash with all values being async_qx() calls ... and then just pulling out the results in the order I wanted.
21:41 jnthn The main thing I'm doing is detangling the synchronization primtive nature of Promise from specific uses of them.
21:41 jnthn And also moving timing related stuff into the scheduler where it belongs
21:41 woolfy joined #perl6
21:42 mathw joined #perl6
21:42 masak japhb__: oh, lovely example. yes, my visual intuition is of little gauge arrows marking the ends of the range, and when they pass each other, the range blinks out of existence.
21:42 jnthn The main thing that's changed is Promise.new(:code({ ... })) is gonna be gone.
21:42 japhb__ jnthn: I'm using the idiom: sub async_qx { ... my $p = Promise.new; ... async { ... $p.keep($result) ... }; $p }
21:42 jnthn japhb__: Oh, that's fine.
21:43 * lizmat wonders whether we wouldn't need some syntactic sugar for Promise.new
21:43 jnthn There will also be a way to get a "keeper" object from a Promise that lets you encapsulate the right to keep/break it, but it's optional
21:44 lizmat .oO( cold induced ramblings from the lobby of a hotel, somewhere in Germany )
21:44 jnthn lizmat: Maybe... :)
21:44 jnthn lizmat: promise() # :P
21:44 Timbus joined #perl6
21:45 [Coke] timotimo: please document the eqat op.
21:46 [Coke] oh, I checked in the wrong branch.
21:47 lizmat jnthn: was more thinking something like <>
21:47 timotimo the documentation is already there in that branch :)
21:47 timotimo (you documented it, even)
21:47 [Coke] timotimo++
21:48 lue .oO(If you used UInt ranges, you wouldn't need to worry about negative indices.)
21:48 [Coke] me--
21:48 japhb__ jnthn++ # Iterating an already pretty decent API because it wasn't good enough.
21:48 [Coke] lizmat: hio
21:48 lizmat [Coke] o/
21:48 timotimo huh, something seems to give build trouble in rakudo/eqat_op (rebased)
21:48 lizmat .oO( there's nothing like PDD )
21:49 lue masak: I'll talk with TimToady later today to get some insight on *why* descending range is designly bad (like you mentioned earlier), but until then I'll disagree with your (and most others') definition of the .. operator :)
21:50 dalek specs: 3150289 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
21:50 dalek specs: Add PDD
21:50 dalek specs: review: https://github.com/perl6/specs/commit/3150289f13
21:50 timotimo Error while compiling op bind: Method 'type' not found for invocant of class 'NQPMu' - that error doesn't ring a bell to me
21:51 BenGoldberg rn: .say for 1, 3, 5, 7 ... * > 12
21:51 camelia rakudo-parrot d9e79f, niecza v24-98-g473bd20: OUTPUT«1␤3␤5␤7␤9␤11␤13␤»
21:51 camelia ..rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
21:51 japhb__ lue: Did you disagree with my example of ranges used to implement index-crossing algorithms?
21:52 japhb__ Gah, somebody hand that JVM some heap space.
21:52 lizmat .oO( heap heap hurray )
21:53 lue Not really, but I don't think .. should be considered $rhs <= $lhs checker. Again, it's because I see .. as a "consecutive integer list generator", and nothing more.
21:53 BenGoldberg .oO( heap... heap... heeaaaachooo! )
21:53 masak lue: and you do that because you've never shot yourself in the foot with your proposed semantics.
21:53 wbill_ joined #perl6
21:54 masak lue: and you haven't done that because Perl (and Python, and Ruby...) chose the sensible default.
21:54 lue [ I certainly don't see it as just the "array range operator". – would evoke those sentiments from me. Not to mention, I think an array range operator should allow reverse traversal :) ]
21:54 BenGoldberg r: say 13, 11, 9 ... 1
21:55 camelia rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
21:55 camelia ..rakudo-parrot d9e79f: OUTPUT«13 11 9 7 5 3 1␤»
21:55 woolfy left #perl6
21:55 lue masak: like I said, I won't ever find out how bad it is in Perl 6 because you won't let me :) . I'll have to turn to C++ for that stuff. (I could use ..., but it doesn't have the full set of variants .. offers, which in this case I needed one of.)
21:55 timotimo why does it err out in the *grammar*?!
21:55 FROGGS timotimo: what if $needle is null here? https://github.com/perl6/nqp/commit/d8b49df973659699c14f2fdd50dab644c4aa1bd0#diff-900522366d019758be5b6ddbd59b29f1R2000
21:55 FROGGS then nqp::istype might fail, right?
21:55 timotimo oh?
21:56 diakopter well, that's fine
21:56 timotimo i haven't thought of that
21:56 diakopter nulls are ok
21:57 FROGGS nqp-p: my $n := nqp::null(); say(nqp::istype($n, QAST::Block))
21:57 camelia nqp-parrot: OUTPUT«0␤»
21:57 lue masak: And I semi-agree with the idea that not all of the ..^ ^.. ^..^ forms make sense in ... . Which is why it's infuriating there's no Perl6y way to generate an exclude-first descending list of consecutive integers.
21:57 FROGGS nqp-p: my $n := nqp::null_s(); say(nqp::istype($n, QAST::Block))
21:57 camelia nqp-parrot: OUTPUT«0␤»
21:57 FROGGS k
21:58 timotimo no commit i added in that range changed something with "type" in it
21:58 BenGoldberg n: say 13, 11, 9 ... 13
21:58 camelia niecza v24-98-g473bd20: OUTPUT«13␤»
21:59 BenGoldberg n: say 13, 11, 9 ... 11
21:59 camelia niecza v24-98-g473bd20: OUTPUT«13 11␤»
21:59 BenGoldberg Why exactly do you need an exclude-first descending list?  Surely you can simply write the actual first element?
21:59 TimToady lue: what do you think $x ~~ $min .. $max should do if $min happens to be greater than $max?  Null ranges are very useful
22:00 timotimo that's a good point i hadn't considered
22:00 TimToady degenerate cases must degenerate, not guess a 50/50 WAT vs DWIM
22:00 masak TimToady++
22:00 masak yes, a very good point.
22:00 * lue suddenly remembers masak's words: <masak> lue: TimToady happens to be really, really good at anticipating the way features can come back and bite users. or the way features will interact.
22:00 TimToady as for ^... the problem is that the left side is a list, not a single value
22:01 TimToady the end is tested as a single value, but the initialize isn't
22:01 TimToady what would 1,3,5 ^... 7 mean?
22:01 lue .oO(Apparently descending integers are one of those "hard things possible" things. Bah.)
22:01 TimToady also, you don't have to write +@elems-1, since @elems-1 means the same thing
22:02 lue TimToady: 1, 3, 5 ^... 7 becomes 3,5,7 obviously :)
22:03 masak 'night, #perl6
22:03 lue r: sub infix:<–>($lhs, $rhs) { return $lhs...$rhs }; say $_ for 1–5
22:03 lue ♞ masak o/
22:03 camelia rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
22:03 camelia ..rakudo-parrot d9e79f: OUTPUT«1␤2␤3␤4␤5␤»
22:03 lizmat night masak and #perl6
22:03 timotimo r-j: say "what is going on?"
22:03 xenoterracide joined #perl6
22:03 camelia rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space␤  in  (src/Perl6/Grammar.nqp)␤  in  (src/vm/jvm/ModuleLoader.nqp:62)␤  in  (src/vm/jvm/ModuleLoader.nqp:52)␤  in load_module␤  in ␤␤»
22:04 lue I suppose I'm just dumbfounded that the difficulty of list generation rises sharply between ascending consecutive integers and descending consecutive integers (with/without excluding the start/endpoint)
22:05 BenGoldberg n: sub infix:<!> { $^a ... $^b }; .say for 1!5
22:05 camelia niecza v24-98-g473bd20: OUTPUT«[31m===[0mSORRY![31m===[0m��Negation metaoperator not followed by valid infix at /tmp/AsK4dQqZAX line 1:�------> [32mb infix:<!> { $^a ... $^b }; .say for 1![33m�[31m5[0m��Parse failed��»
22:05 BenGoldberg n: sub infix:<_> { $^a ... $^b }; .say for 1 _ 5
22:05 camelia niecza v24-98-g473bd20: OUTPUT«1␤2␤3␤4␤5␤»
22:05 BenGoldberg n: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 1 _ 5
22:06 camelia niecza v24-98-g473bd20: OUTPUT«(timeout)»
22:06 TimToady I suppose we could define LIST ^... END to call (LIST ... END)[1..*] or so
22:06 BenGoldberg n: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 5 _ 1
22:06 camelia niecza v24-98-g473bd20: OUTPUT«5 4 3 2 1␤»
22:06 timotimo there's a unicode character with three dots going from the upper left to the lower right
22:06 timotimo that sounds like the perfect character for a "descending integer list" operatotr
22:06 lue I realize there are (apparently) design decisions going against what I like to see, but I'll eternally disagree with it :)
22:07 TimToady um, I just agreed with you that ^... could work
22:07 diakopter r-j: say 3
22:07 camelia rakudo-jvm 882e33: OUTPUT«3␤»
22:07 lue TimToady: I know, I was talking more about .. than anything else.
22:07 BenGoldberg r-j: say 'alive?';
22:07 TimToady that's not going to change, because .. is about intervals, not integers
22:07 camelia rakudo-jvm 882e33: OUTPUT«alive?␤»
22:08 BenGoldberg r: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 5 _ 1
22:08 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5 4 3 2 1␤»
22:08 lue r: sub infix:<⋱>($lhs, $rhs) { return $lhs...$rhs }; say $_ for 5⋱1 # timotimo++
22:08 timotimo oh, intervals. that explains the decision behind it perfectly actually
22:08 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5␤4␤3␤2␤1␤»
22:09 TimToady timotimo: that's why I said it :)
22:09 BenGoldberg sub infix:<^⋱>($lhs, $rhs) { return $lhs-1...$rhs }; say $_ for 5^⋱1
22:10 BenGoldberg rn: sub infix:<^⋱>($lhs, $rhs) { return $lhs-1...$rhs }; say $_ for 5^⋱1
22:10 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«4␤3␤2␤1␤»
22:10 lue TimToady: Yeah, it makes a lot more sense using the word "interval". (grumblegrumblereverseintervalsgrumblegrumble)^W :)
22:11 lue Also, I want to think some would disagree with ^... ~~ (LIST)[1..*], but I don't see another as-sensible interpretation.
22:11 TimToady if I was hard-hearted, I wouldn't even let you use 1 .. 5 to mean 1 ... 5 :)
22:12 TimToady now I'm wondering how much we'll see ^... * abused to mean [1..*]
22:13 * lue kinda wants to see ⋱/^⋱/⋱^/^⋱^ in Perl 6 now, if only to placate stubborn people like me :D
22:14 TimToady well, we'll have to get rid of ... then and replace it with ⋰
22:15 timotimo not quite, ... can do any direction
22:15 timotimo including zigzag
22:15 timotimo which is totally a direction.
22:16 TimToady then we'd have to decide what ⋮ means
22:16 TimToady not to mention ⋯
22:17 lue Math uses all those crazy kinds of ellipses for a reason, why not the Champion of Unicode™? :)
22:17 * TimToady read that as "Chameleon"
22:18 lue ... would be the only ASCII equivalent to whatever unicode ellipsis takes the role of current ... (iow, exactly the same)
22:18 TimToady howsomever, those character aren't used to mean that in math, which is a strike against them :)
22:18 lue Just because we don't have a reason to use ⋱ for matrices, doesn't mean we can't use them at all :)
22:19 TimToady anyway, you should be happy with ^... and agree with me that the others are module-worthy bloat :)
22:19 * TimToady dangles a watch in front of lue pendulously and says "You're getting sleepy...sleepy...sleepy..."
22:20 lue TimToady: I was thinking the unicode ellipses should be in a (R* supplied) module anyway :)
22:20 TimToady or was that sleep^...sleepy^...sleepy^...
22:20 lue →⌚←
22:21 * lue doesn't have curved arrow compose keys. He thinks.
22:21 japhb__ jnthn: re: "For inlining, subs and multi-subs that are compile-time determinable will cut it, though they need to be simple." , what does "compile-time determinable" mean in this context, and what are the limits of "simple"?
22:22 japhb__ Also, why is the default BUILD slow?  Is it completely generic, not type-specialized?
22:22 japhb__ (I thought the generic part was BUILDALL, but it has been a *long* time since I looked at that stuff)
22:22 timotimo the default BUILD goes through a list of "operations" to perform
22:23 jnthn japhb__: Well, it is BUILDALL
22:23 jnthn japhb__: But if you have your own BUILD method the build plan is just "call that"
22:23 jnthn japhb__: Not saying it'll be slower forever, just saing how it is now
22:23 japhb__ Oh, OK, I see.
22:23 jnthn Things should/can be faster thanks to the new/bless changes, though I dunno if anybody updated new yet to be more efficient
22:24 jnthn About inlining, the rules are that it needs to determine that the types of the arguments being passed are going to always match the signature.
22:24 timotimo multi method new(*%attrinit) { self.bless(|%attrinit); }
22:25 jnthn And it isn't yet especially smart.
22:25 jnthn timotimo: yeah, we can do better than that :)
22:25 jnthn multi method new(|) { nqp::invokewithcapture(nqp::findmethod(self, 'bless'), nqp::usecapture()) } # or something like this
22:25 * timotimo doesn't know how. just duplicate bless?
22:25 timotimo oh, mhm
22:26 jnthn uh, wait
22:26 jnthn *% instead of |
22:26 jnthn Otherwise we permit positionals.
22:29 japhb__ So to guarantee that the inliner knows types of arguments will always match, I just need to explicitly type the arguments at the caller site compatibly with either Any (if the params of the callee are untyped) or the actual type of the param.  And type my return values, for expressions involving nested calls.  Right?
22:30 dalek roast: d81e6df | jonathan++ | S17-concurrency/scheduler.t:
22:30 dalek roast: Tests for timing related scheduler methods.
22:30 dalek roast: review: https://github.com/perl6/roast/commit/d81e6df785
22:30 dalek roast: 1f89cf1 | jonathan++ | S17-concurrency/promise.t:
22:30 dalek roast: Test for Promise.sleep.
22:30 dalek roast: review: https://github.com/perl6/roast/commit/1f89cf14f9
22:31 japhb__ r: my int64 $native64 = 40; my int32 $native32 = 2; say $native64 + $native32;  # Will this be able to inline using multi infix:<+>(int, int)?
22:32 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«42␤»
22:32 dalek rakudo/nom: 17e9c13 | jonathan++ | src/vm/jvm/core/Threading.pm:
22:32 dalek rakudo/nom: Re-order to better convey dependencies.
22:32 dalek rakudo/nom:
22:32 dalek rakudo/nom: Note that due to $*SCHEDULER this isn't a hard dependency yet, but it
22:32 dalek rakudo/nom: could need to become one.
22:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/17e9c1386c
22:32 dalek rakudo/nom: dcf8e14 | jonathan++ | src/vm/jvm/core/Threading.pm:
22:32 dalek rakudo/nom: Use schedule_with_catch in Promise.
22:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcf8e1440a
22:32 dalek rakudo/nom: 91a1b0c | jonathan++ | src/vm/jvm/core/Threading.pm:
22:32 dalek rakudo/nom: Add schedule_in, schedule_every to scheduler.
22:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/91a1b0c694
22:32 jnthn japhb__: Should do
22:33 jnthn And yes, it looks at "returns" when making inlining decisoins too
22:33 japhb__ Is int defined to be platform-native, or int64, or something like the C "at least 64 bits, but maybe more" kind of thing?
22:33 jnthn Platform native, but on JVM you can rely on it being 64
22:34 japhb__ And Moar too?
22:34 jnthn yes
22:34 japhb__ Yay, I get to introduce headaches in my future self!
22:37 diakopter :)
22:41 timotimo jnthn: i'm not sure why the code you pasted, the invokewithcapture stuff, is any better than the code rakudo generates for the self.bless(|%attrinit) case. could we easily do better automatically?
22:41 timotimo probably only if we can prove the hash hasn't been modified or something
22:41 japhb__ If inlining works across comp_units, does that mean that the QAST for a sub is never thrown away?
22:42 jnthn japhb__: Right. But note that the other side of this is that only some simple subs are inlinale too
22:42 timotimo .o(is that why our ram usage is so big?)
22:43 timotimo because some nodes have an $/ attached to them?
22:43 jnthn japhb__: The restrictions essentially mean that only relativley small subs get inlining data stored
22:43 jnthn japhb__: Which is generally the right choice anyway
22:43 jnthn timotimo: I think it goes to some effort to trip that out.
22:43 jnthn *strip
22:43 timotimo OK
22:44 timotimo where do i have to look to figure that out?
22:44 dalek specs: 766f608 | larry++ | S03-operators.pod:
22:44 dalek specs: Allow ^... form just for lue++
22:44 dalek specs: review: https://github.com/perl6/specs/commit/766f608bd9
22:44 dalek specs: b2f2915 | larry++ | S03-operators.pod:
22:44 dalek specs: Mention ^...^ too
22:44 dalek specs: review: https://github.com/perl6/specs/commit/b2f2915076
22:44 lue :D
22:45 TimToady who shall we get to implement it, hmm....
22:46 * diakopter throws it at LUE
22:46 lue uh, I uh, need to sign the CLA first. We must maintain the integrity of TPF's copyright ownership on every single line of code!
22:47 japhb__ jnthn: OK, fair enough.
22:49 timotimo my CLA should be in the hands of the right person soon :3
22:50 jnthn ^...^ - the cat whose nose is exactly between its eyes
22:50 timotimo ah, i should have come up with a benchmark and measurements for object creation speed before building this
22:51 lue jnthn: a happy person straining to keep his mouth shut (lest he shout joyous excitement for a quarter-hour).
22:51 jnthn nmake
22:51 jnthn um
22:51 jnthn :)
22:52 diakopter hee
22:52 diakopter /NOLOGO
22:52 timotimo i'm getting some "no subtests run" in my spectests on jvm o_O
22:52 * timotimo tries again with only one TEST_JOB
22:52 diakopter I had to kill the java eval server on host07
22:52 japhb__ Next question: How do I make a 'method at_pos() is rw' for a VMArray, so that I can write to a Buf?  Is it something as simple as 'nqp::setelems(self, $i) unless nqp::existspos(self, $i); nqp::atpos(self, $i)'?
22:53 japhb__ Hmmm, I guess I have to nqp::decont(self) first ...
22:55 japhb__ Hmmm, I guess not -- the code in Buf.pm seems to only decont in some cases, not others.
22:59 * TimToady wonders how soon till someone asks for ^^... and ...^^ to exclude two values...
22:59 Tene timotimo: If you'd prefer to stop wondering, I could ask for it whenever you like.
22:59 Tene TimToady:
22:59 TimToady which would actualy work if ^ were a meta-operator :)
23:00 timotimo jnthn: do spectests still run for you on jvm? with current rakudo and some local changes i get "no subtests run" for all tests after 22 test files or so
23:00 timotimo could it be something like that "getting a bootinterop object will get us into trouble" thing again?
23:01 TimToady with a metaop, we could say 'foo' ^xx * to exclude the first 'foo'  :)
23:01 TimToady or 'foo' xx^ * to exclude the last one
23:01 diakopter what would 'foo' ^xx^ 1 do
23:02 TimToady apply the infix-meta-circumfix:<^ ^> operator to xx
23:02 TimToady and XOR everthing in the list
23:03 TimToady or was that the x^^x operator, I forget...
23:03 lue I like the sound of metaop ^ so far, but I suspect some nasty things around that syntax corner.
23:04 TimToady yes, like preventing ^ff^ from working, and confusing the parsing of ^^
23:04 diakopter lue: it's an event horizon in actuaity
23:04 minimus joined #perl6
23:04 lue instead of ^^...^^ there could be ^...^ :downto(2) :upto(2) or something :)
23:05 lue .oO(iffy, diffy, fiddly, excludy)
23:06 lue r: sub infix:<RR>($a, $b) { $a + $b }; say 2 RR 3
23:06 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5␤»
23:07 timotimo hm, what kind of code would profit from the new .new method that's hopefully faster?
23:08 timotimo how many builtin objects have their own new method, i wonder
23:09 jnthn Any code with ojbects that uses the default constructor, I guess
23:09 diakopter r: Mu.new
23:09 camelia rakudo-parrot d9e79f, rakudo-jvm 882e33: ( no output )
23:09 japhb__ timotimo: Did you figure out the jvm spectest problem?
23:10 timotimo no
23:10 jnthn japhb__: The "make Buf writable" problem is the same as the "make native arrays work" and "make int $x is rw as a parameter work" problem...
23:11 japhb__ jnthn: Care to expand that just a bit?  :-)
23:11 jnthn japhb__: The problem, at its core, is that when you have an array of objects what you really have is Array of Scalar of Object. When we return the Scalar, it is thus assignable
23:12 jnthn japhb__: A Buf otoh is compact and just a load of integers
23:12 jnthn japhb__: There's no container in sight
23:12 timotimo .o(create a new proxy instance for each access!)
23:12 * japhb__ wonders if I'm stuck doing all mutations on an Array, and then having a .serialize() method in my API that just does { Buf.new(@.array) }
23:12 jnthn timotimo: Well, it is another kind of container at least...
23:13 jnthn japhb__: Well, the ugly workaround is to drop to nqp:: ops :)
23:13 japhb__ Hmmm, there is that.
23:13 jnthn nqp::bindpos_i(...) should work on a buf.
23:14 japhb__ Does bindpos autoextend, or do you need to setelems first?  And does setelems preserve the elements that are at lower indices than the new elems and nuke those above?
23:15 timotimo i think: autoextends, nukes elements above new element number
23:16 japhb__ timotimo: I'm wondering about doing setelems(10), setelems(5), setelems(10):  How many copies happened, and how many VMArrays are now garbage?
23:16 timotimo well, calling Mu.new a few times doesn't see a dramatic improvement in performance
23:17 timotimo at least on parrot, we never shrink arrays
23:17 timotimo that's how qrpa is implemented
23:17 jnthn japhb__: auto-extend
23:19 japhb__ jnthn: Is adding *simple* types (just a single class name, no parametric roles or where clauses) ever a performance *loss*?
23:20 jnthn japhb__: In what context?
23:20 jnthn japhb__: As in, are type constraints likely to slow you down?
23:20 jnthn Most likely not, though. The type checks are done against Mu/Any anyways
23:21 jnthn And you'll hit the type cache for simple types always.
23:21 japhb__ For sub params and returns on one end, and argument and result types on the other end.
23:21 japhb__ Ah, good.  Then I feel better about more strictly typing things in the API.
23:21 jnthn Yeah, for sub params we're already looking for Any by default anyway
23:21 jnthn Because we need that to know if we must auto-thread a junction.
23:22 japhb__ (Might get a win from the optimizer, but won't lose because I'm now missing a fast path)
23:22 jnthn (which is implemented by noticing binding failed, and seeing a junction was to blame)
23:22 japhb__ Gotcha.
23:22 jnthn No, you *used* to get a loss way back
23:22 jnthn Not since 6model/nom landed
23:22 japhb__ Thanks for taking the time for all these questions today.  :-)
23:22 jnthn np :)
23:23 japhb__ Under what circumstances do int/Int and str/Str autocoerce?  And what does that do to the optimizer?
23:24 japhb__ (I note that we special case int/int for a lot of infix ops, so I assume it's a win to stop the autocoercer there.)
23:25 timotimo yeah, boxing wastes time :(
23:27 japhb__ My mental model is that you can only avoid all boxing if the arg type is native and the param type is the same native, or the returns type is native and the result type is the same native.  In any other combo, you'll box (and potentially unbox again on the other side)
23:29 * timotimo is about to find out if the new new method improves performance
23:30 timotimo hm, yes, a tiny bit in my probably totally rubbish benchmark
23:30 timotimo time ./perl6 -e 'class Foo { has Int $.a; has Str $.b; }; for ^50000 { Foo.new(:a(1), :b<foo>) }'
23:30 timotimo took 13.55 seconds before, takes 13.3 seconds after
23:31 japhb__ Is there any difference between (--> T) and () returns T ?
23:31 japhb__ (Meaning, does the optimizer see those as different?)
23:31 timotimo no, they should be identical
23:33 japhb__ Good, because I like having the returns type in the signature.  It's one of the things I actually liked about Haskell's syntax.
23:33 TimToady I think --> accepts more things by spec right now, whereas returns only accepts a type
23:34 TimToady but nobody implement --> Nil yet
23:34 TimToady or --> True
23:34 dalek roast: 53799ac | jonathan++ | S17-concurrency/promise.t:
23:34 dalek roast: Tests for Promise.then.
23:34 dalek roast: review: https://github.com/perl6/roast/commit/53799ac0c0
23:34 TimToady std: sub foo ($a --> True) { $a.foo }
23:35 camelia std 8adbc60: OUTPUT«ok 00:01 126m␤»
23:35 TimToady std: sub foo ($a) returns True { $a.foo }
23:35 camelia std 8adbc60: OUTPUT«ok 00:01 126m␤»
23:35 timotimo should that check that $a.foo eq True?
23:35 TimToady std: my True sub foo ($a) { $a.foo }
23:35 camelia std 8adbc60: OUTPUT«ok 00:01 126m␤»
23:35 timotimo er, eqv or something
23:35 TimToady hmm
23:36 TimToady no, it should just return True, and put the final statement into sink context
23:36 timotimo OK
23:37 japhb__ r: sub foo ($a --> Nil) { }
23:37 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: ( no output )
23:37 TimToady S06:691
23:37 synopsebot Link: http://perlcabal.org/syn/S06.html#line_691
23:38 japhb__ r: sub foo ($a --> Nil) { 42; };  my \a := foo(); say a.WHAT; say a;
23:38 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' requires arguments (line 1)␤    Expected: :($a)␤»
23:38 japhb__ r: sub foo ($a --> Nil) { 42; };  my \a := foo(12); say a.WHAT; say a;
23:38 camelia rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int'␤  in block  at /tmp/nTMN2eXD6Z:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp…»
23:38 camelia ..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int'␤  in block  at /tmp/44wJszXHBy:1␤  in any  at /tmp/44wJszXHBy:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfile…»
23:38 japhb__ So yeah, rakudobug still.
23:38 TimToady Nil is going to be confusing since it's currently implemented as (also) a type
23:39 TimToady std: my 42 sub foo ($a) { $a.foo }
23:39 camelia std 8adbc60: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed my at /tmp/qCTaEuUIKa line 1:â�¤------> [32mmy [33mâ��[31m42 sub foo ($a) { $a.foo }[0mâ�¤    expecting any of:â�¤     nameâ�¤   scoped declaratorâ�¤Parse failedâ�¤FAILED 00:01 120mâ�¤Â»
23:39 japhb__ r: sub foo ($a --> True) { 42; };  my \a := foo(12); say a.WHAT; say a;
23:39 TimToady std: sub foo ($a --> 42) { $a.foo }
23:39 camelia rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Int'␤  in block  at /tmp/f3W2EdkXyg:1␤  in any  at /tmp/f3W2EdkXyg:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfil…»
23:39 camelia ..rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Int'␤  in block  at /tmp/5s44lBDHAa:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nq…»
23:39 camelia std 8adbc60: OUTPUT«ok 00:01 126m␤»
23:40 TimToady std: sub foo ($a) returns 42 { $a.foo }
23:40 camelia std 8adbc60: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid type name at /tmp/U9iGnY767E line 1:â�¤------> [32msub foo ($a) returns [33mâ��[31m42 { $a.foo }[0mâ�¤    expecting typenameâ�¤Parse failedâ�¤FAILED 00:01 122mâ�¤Â»
23:40 TimToady yes, --> is special for fixed return values
23:40 japhb__ r: sub foo ($a --> Nil) { };  my \a := foo(12); say a.WHAT; say a;
23:40 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«Nil␤Nil␤»
23:40 japhb__ r: sub foo ($a --> True) { };  my \a := foo(12); say a.WHAT; say a;
23:40 camelia rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any'␤  in block  at /tmp/u7i40ufUOE:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nq…»
23:40 camelia ..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any'␤  in sub foo at /tmp/T13MYdokYo:1␤  in block  at /tmp/T13MYdokYo:1␤  in any  at /tmp/T13MYdokYo:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage…»
23:40 TimToady Nil only *appears* to do the right thing
23:41 japhb__ r: sub foo ($a is copy --> Nil) { repeat while $a > 0 { $a--; } };  my \a := foo(12); say a.WHAT; say a;
23:41 camelia rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Any' but got 'Bool'␤  in block  at /tmp/AotaN_hPf0:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nq…»
23:41 camelia ..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Any' but got 'Bool'␤  in sub foo at /tmp/Eki5_UCjlA:1␤  in block  at /tmp/Eki5_UCjlA:1␤  in any  at /tmp/Eki5_UCjlA:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage…»
23:42 japhb__ Yeah, clearly so.
23:42 TimToady it should neither be expecting an Any nor getting a Bool
23:43 TimToady that looks suspiciously like P5 semantics returning the result of >
23:46 japhb__ nodnod
23:48 stevan_ joined #perl6
23:50 benabik joined #perl6
23:52 BenGoldberg How odd:
23:52 BenGoldberg r: sub foo ($a --> True) { True };  my \a := foo(12); say a.WHAT; say a;
23:52 camelia rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Bool'␤  in block  at /tmp/rCasMGmpyL:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.n…»
23:52 camelia ..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Bool'␤  in block  at /tmp/5Sjmr3WHY4:1␤  in any  at /tmp/5Sjmr3WHY4:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfi…»
23:53 BenGoldberg Expected Bool but got Bool?
23:55 jnthn Most likely it only knows how to cope with a type object there right now
23:55 japhb__ r: my $buf = buf8.new(); nqp::bindpos_i($buf, 0, 42); say $buf[0];
23:55 camelia rakudo-parrot 91a1b0: OUTPUT«42␤»
23:55 camelia ..rakudo-jvm 882e33: OUTPUT«java.lang.RuntimeException: This type does not support positional operations␤  in block  at /tmp/SxLCjGJSC0:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage…»
23:55 japhb__ Damn you, JVM!  :-/
23:56 BenGoldberg r: sub foo ($a --> Bool) { True };  my \a := foo(12); say a.WHAT; say a;
23:56 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«(Bool)␤True␤»
23:56 BenGoldberg r: sub foo ($a --> Bool) {};  my \a := foo(12); say a.WHAT; say a;
23:56 jnthn japhb__: Try my $buf := ...
23:56 camelia rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any'␤  in block  at /tmp/A9fl1IiEjp:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nq…»
23:56 camelia ..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any'␤  in sub foo at /tmp/vKsBYctYq0:1␤  in block  at /tmp/vKsBYctYq0:1␤  in any  at /tmp/vKsBYctYq0:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage…»
23:56 japhb__ r: my $buf := buf8.new(); nqp::bindpos_i($buf, 0, 42); say $buf[0];
23:56 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«42␤»
23:56 japhb__ Wha...?
23:57 japhb__ r: nqp::bindpos_i(buf8.new(), 0, 42); say "alive";
23:57 camelia rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«alive␤»
23:57 BenGoldberg r: my $buf := buf8.new(); say $buf[0];
23:58 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
23:58 camelia ..rakudo-parrot 91a1b0: OUTPUT«VMArray: index out of bounds␤  in method at_pos at gen/parrot/CORE.setting:5016␤  in method at_pos at gen/parrot/CORE.setting:1654␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2322␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.settin…»
23:58 jnthn japhb__: Well, you get kinda used to Rakudo sneaking the deconts into the right places often enough for you that you don't notice how much they're needed ;)
23:58 japhb__ jnthn: So why does r-j want the binding, but r-p does not care?
23:58 jnthn japhb__: I guess r-p is doing a decont on that operation, and r-j isn't.
23:58 jnthn And nothing in spectest actually hits it either way so far
23:58 japhb__ heh, gotcha.
23:58 jnthn And it's a grey area being an nqp:: op...
23:58 japhb__ sure
23:59 dalek roast: 4623a73 | jonathan++ | S17-concurrency/promise.t:
23:59 dalek roast: Tests for Promise.allof and Promise.anyof.
23:59 dalek roast: review: https://github.com/perl6/roast/commit/4623a7379a
23:59 BenGoldberg r: my $buf := buf8.new(); ++$buf[0];
23:59 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
23:59 camelia ..rakudo-parrot 91a1b0: OUTPUT«VMArray: index out of bounds␤  in method at_pos at gen/parrot/CORE.setting:5016␤  in method at_pos at gen/parrot/CORE.setting:1654␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2322␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.settin…»
23:59 BenGoldberg What does the jvm timeout?
23:59 BenGoldberg Err, Why?

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

Perl 6 | Reference Documentation | Rakudo