Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-05-10

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:07 tmtwd joined #perl6
00:15 tmtwd whoami
00:22 rurban joined #perl6
00:47 takesako____ joined #perl6
00:54 rurban joined #perl6
01:05 Su-Shee_ joined #perl6
01:20 klapperl_ joined #perl6
01:30 FROGGS joined #perl6
01:34 Sqirrel joined #perl6
01:43 raiph joined #perl6
01:51 kurahaupo joined #perl6
01:56 dalek nqp: 5f942fc | (Andrew Egeler)++ | src/vm/parrot/6model/reprs/CStruct.c:
01:56 dalek nqp: Serialize CStruct on parrot
01:56 dalek nqp: review: https://github.com/perl6/nqp/commit/5f942fcb4f
01:56 dalek nqp: 948999a | (Andrew Egeler)++ | src/vm/parrot/6model/reprs/CArray.c:
01:56 dalek nqp: Fix memory corruption on CArray resize
01:56 dalek nqp: review: https://github.com/perl6/nqp/commit/948999afd4
02:14 btyler joined #perl6
02:21 plobsing joined #perl6
02:34 berekuk joined #perl6
02:45 retupmoca r: say $_ for 1,2,3; say "{$_}" for 1,2,3
02:45 camelia rakudo-parrot 698d20: OUTPUT«1␤2␤3␤1␤2␤3␤»
02:45 camelia ..rakudo-{jvm,moar} 698d20: OUTPUT«1␤2␤3␤␤␤␤»
02:45 retupmoca I think parrot is correct on that one
02:51 retupmoca p: say Date.new; say Date.new.succ;
02:51 camelia rakudo-parrot 698d20: OUTPUT«2014-12-24␤4015-24006-23␤»
02:51 retupmoca m: say Date.new; say Date.new.succ;
02:51 camelia rakudo-moar 698d20: OUTPUT«2014-12-24␤2014-12-25␤»
02:53 retupmoca o.O parrot obviously doesn't understand dates
03:20 skids joined #perl6
03:23 takesako____ joined #perl6
03:24 rurban joined #perl6
03:33 anaeem1_ joined #perl6
03:36 Alula joined #perl6
04:03 nick___ joined #perl6
04:08 btyler joined #perl6
04:25 rurban joined #perl6
04:54 anaeem1 joined #perl6
05:01 bjz joined #perl6
05:04 stux joined #perl6
05:29 rurban joined #perl6
05:54 anaeem1_ joined #perl6
06:20 telex joined #perl6
06:24 Sqirrel joined #perl6
06:32 rurban joined #perl6
06:44 Woodi good morning everyone :)
06:44 Woodi r: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a += %b;
06:44 camelia rakudo-moar 698d20: OUTPUT«Odd number of elements found where hash expected␤  in method STORE at src/gen/m-CORE.setting:9340␤  in block  at src/gen/m-CORE.setting:17119␤  in block  at /tmp/tmpfile:1␤␤»
06:44 camelia ..rakudo-parrot 698d20: OUTPUT«Odd number of elements found where hash expected␤  in method STORE at gen/parrot/CORE.setting:9302␤  in block  at gen/parrot/CORE.setting:17316␤  in block  at /tmp/tmpfile:1␤␤»
06:44 camelia ..rakudo-jvm 698d20: OUTPUT«Odd number of elements found where hash expected␤  in method STORE at gen/jvm/CORE.setting:9281␤  in block  at gen/jvm/CORE.setting:17059␤  in block  at /tmp/tmpfile:1␤␤»
06:44 Sqirrel joined #perl6
06:45 Woodi is maybe some shortcut to sum hashes ?
06:53 virtualsue joined #perl6
06:53 darutoko joined #perl6
06:56 Timbus m: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; say (%a (+) %b).hash
06:56 camelia rakudo-moar 698d20: OUTPUT«("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
06:58 Woodi \o/ thanx Timbus++ :)
07:01 Woodi m: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a = (%a (+) %b).hash; say %a
07:01 camelia rakudo-moar 698d20: OUTPUT«("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
07:03 Timbus m: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>;  for %a.kv -> $k, $v is rw { $v += %b{$k}//0 }; say %a
07:03 camelia rakudo-moar 698d20: OUTPUT«("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
07:06 Woodi .kv is why I wanted "just" PerlScript :)  but I needed to do such merge in loop and second loop looked ugly...
07:33 rurban joined #perl6
07:34 baest_ joined #perl6
07:34 bjz_ joined #perl6
07:34 takesako_____ joined #perl6
07:36 eternaleye_ joined #perl6
07:50 FROGGS I dunno if + should ever do more that numeric addition.... if you make it sum hashes, than somebody also wants it to concat strings
07:50 berekuk joined #perl6
07:50 FROGGS so, hash + hash should only return the sum of the number of keys
07:53 Woodi I didn't thinked about it :) but short syntax for merging/sum hashes would be convenient
07:55 FROGGS m: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; say %(%a (+) %b) # that is short enough for me
07:55 camelia rakudo-moar 698d20: OUTPUT«("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
07:57 FROGGS std: my (%a, %b); %a (+=) %b # I wonder if this should be allowed... TimToady?
07:57 camelia std ec3d853: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/TXVgCyiubl line 1:â�¤------> [32mmy (%a, %b); %a [33mâ��[31m(+=) %b # I wonder if this should be all[0mâ�¤    expecting any of:â�¤      feed_separatorâ�¤ infix or meta-infixâ�¤    infixed functionâ�¤       statement modifie…»
07:57 Woodi it's works for me. note: it's Bag and that new types are very new features
07:59 Woodi btw PATRICIA trees are sometimes better then hashes, maybe we can have them too ?
08:03 FROGGS Woodi: that sounds like an awesome thing for modules.perl6.org :o)
08:04 FROGGS even if that means that it will went into core, it is a good place to prototype it
08:04 masak good mornin', #perl6
08:04 lizmat mood gornin', #perl6!
08:05 FROGGS o/ :o)
08:05 lizmat FROGGS masak Woodi o/
08:05 lizmat Woodi: if you're using hashes like that, you probably should use Bag's  :-)
08:06 lizmat Bags have the added feature that you can haz objects as keys without them being stringified
08:07 lizmat r: class A {}; (A.new => 1).Bag.say
08:07 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«bag(A.new())␤»
08:07 lizmat r: class A {}; (A.new => 1).hash.say # alas, A.new is gone
08:07 camelia rakudo-parrot 698d20: OUTPUT«("A<7818003069261027125>" => 1).hash␤»
08:07 camelia ..rakudo-jvm 698d20: OUTPUT«("A<496755591>" => 1).hash␤»
08:07 camelia ..rakudo-moar 698d20: OUTPUT«("A<139845920269608>" => 1).hash␤»
08:09 nnunley joined #perl6
08:10 Woodi lizmat: as I was trying to say: I have no idea what to expects from that new types :) except Sets of course :) but S32 already opened !
08:10 Woodi I thinked hashes could have object as keys too...
08:10 Woodi ah, but with ~...
08:10 lizmat only if you specify them like : my %h{Any}
08:11 lizmat with .hash you only get stringified keys
08:22 * Woodi is still thinking %a +=h %b is common case...
08:25 moritz m: my %a = a => 1; my %b = b => 2; %a ,= %b; say %a.perl
08:25 camelia rakudo-moar 698d20: OUTPUT«("a" => 1, "b" => 2).hash␤»
08:25 FROGGS ohh!
08:25 FROGGS moritz++
08:26 Woodi r: my Sethash $a = <a 1 b 2 c 3 d 4>; my SetHash $b = <b 2 c 1>; $a += $b;
08:26 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Type 'Sethash' is not declared. Did you mean any of these?â�¤    SetHashâ�¤    Stashâ�¤â�¤at /tmp/tmpfile:1â�¤------> [32mmy Sethash[33mâ��[31m $a = <a 1 b 2 c 3 d 4>; my SetHash $b =[0mâ�¤Malformed myâ�¤at…»
08:26 Woodi r: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a ,= %b;
08:26 camelia rakudo-{parrot,jvm,moar} 698d20: ( no output )
08:26 Woodi r: my %a= <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a ,= %b; say %a
08:26 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«("a" => "1", "b" => "2", "c" => "1", "d" => "4").hash␤»
08:26 FROGGS m: my SetHash $a = <a 1 b 2 c 3 d 4>; my SetHash $b = <b 2 c 1>; $a += $b;
08:26 camelia rakudo-moar 698d20: OUTPUT«Type check failed in assignment to '$a'; expected 'SetHash' but got 'Parcel'␤  in block  at /tmp/I7KIPB8S8A:1␤␤»
08:27 lizmat FROGGS, Woodi : you probably want BagHash instead of SetHash
08:28 Woodi a bit a mess we have with that types :)
08:28 lizmat m: my $a = <a a b b c>.Bag; $a (+)= <b b c c>.Bag; say $a  # would have expected this to work
08:28 camelia rakudo-moar 698d20: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/E2ZKwnJFmxâ�¤Two terms in a rowâ�¤at /tmp/E2ZKwnJFmx:1â�¤------> [32mmy $a = <a a b b c>.Bag; $a [33mâ��[31m(+)= <b b c c>.Bag; say $a  # would have[0mâ�¤    expecting any of:â�¤        postfix…»
08:29 virtualsue joined #perl6
08:29 clkaoud joined #perl6
08:29 pnu joined #perl6
08:29 flussence joined #perl6
08:29 _sri joined #perl6
08:29 lizmat m: my $a = <a a b b c>.Bag; $a = $a (+) <b b c c>.Bag; say $a
08:29 camelia rakudo-moar 698d20: OUTPUT«bag(a(2), b(4), c(3))␤»
08:30 lizmat guess we need to add set operators to some list that allow = postfix?
08:30 Woodi r: my BagHash $a = <a 1 b 2 c 3 d 4>; my BagHash $b = <b 2 c 1>; BagHash $c = $a + $b; say $c
08:30 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32m 4>; my BagHash $b = <b 2 c 1>; BagHash [33mâ��[31m$c = $a + $b; say $c[0mâ�¤    expecting any of:â�¤        postfix…»
08:31 Woodi r: my BagHash $a = <a 1 b 2 c 3 d 4>; my BagHash $b = <b 2 c 1>; BagHash $c = $a (+) $b; say $c
08:31 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32m 4>; my BagHash $b = <b 2 c 1>; BagHash [33mâ��[31m$c = $a (+) $b; say $c[0mâ�¤    expecting any of:â�¤        postfix…»
08:31 lizmat Woodi: my missing with $c
08:32 Woodi r: my BagHash $a = <a 1 b 2 c 3 d 4>; my BagHash $b = <b 2 c 1>; my BagHash $c = $a (+) $b; say $c
08:32 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«Type check failed in assignment to '$a'; expected 'BagHash' but got 'Parcel'␤  in block  at /tmp/tmpfile:1␤␤»
08:32 Woodi r: my BagHash $a = <a 1 b 2 c 3 d 4>; my BagHash $b = <b 2 c 1>; my BagHash $c = $a + $b; say $c
08:32 camelia rakudo-{parrot,jvm,moar} 698d20: OUTPUT«Type check failed in assignment to '$a'; expected 'BagHash' but got 'Parcel'␤  in block  at /tmp/tmpfile:1␤␤»
08:33 Woodi anyone blogged about XxYy types maybe ? :)
08:35 lizmat I did, for the advent, if I remember correcly
08:35 Woodi ook
08:36 lizmat hmmm... one could argue that the result of (+) of two BagHashes should also be a BagHash, and not a Bag
08:44 skids joined #perl6
08:57 bjz joined #perl6
09:01 moritz then you depart from p6's principle that operators should coerce to the type they operate on
09:01 moritz though there's precedence
09:01 moritz + on two Ints vs on two Rats
09:09 kivutar joined #perl6
09:31 rindolf joined #perl6
09:31 daniel-s joined #perl6
09:32 molaf joined #perl6
09:35 rurban joined #perl6
09:36 virtualsue joined #perl6
09:36 clkaoud joined #perl6
09:36 pnu joined #perl6
09:36 flussence joined #perl6
09:36 _sri joined #perl6
09:38 dalek rakudo/nom: 71411c9 | (Elizabeth Mattijsen)++ | src/core/signals.pm:
09:38 dalek rakudo/nom: Make sure we send Signal to executed code
09:38 dalek rakudo/nom:
09:38 dalek rakudo/nom: Rather than just the int that we got from the OS
09:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/71411c93d7
09:46 FROGGS jnthn: I need your support :/ https://gist.github.com/FROGGS/a80aabefe5e39fb553b4
09:46 FROGGS jnthn: I am rethrowing wrongish it seems, but I don't know why because I rethrow like I create the ex in the first place in "last FOO"
09:53 dmol joined #perl6
09:55 FROGGS hmmm, I think I should have a close look ad handlerDynamic()
09:57 nnunley joined #perl6
10:00 jnthn FROGGS: Just underneath where you added the label checkis:
10:00 jnthn # Wraps a handler with code to set/clear the current handler.
10:00 jnthn I wonder if the clear needs to happen first
10:00 nwc10 good almost-UGT-violation, jnthn
10:00 jnthn But not convinced it's that...
10:01 jnthn o/ nwc10
10:01 dalek specs: f47db42 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
10:01 dalek specs: Spec signal() and some POSIX signals cleanup
10:01 dalek specs: review: https://github.com/perl6/specs/commit/f47db42d36
10:03 lizmat jnthn: is there an equivalent of "kill -l" under Win ?
10:04 baest joined #perl6
10:05 FROGGS hmmmm
10:05 jnthn lizmat: Not afaik
10:05 jnthn I mean, there's a taskkill program but it's not really about signals in any way...Windows doesn't do signals really. libuv emulates a few.
10:06 jnthn (As in, turns other Windows things into signal-y things)
10:07 lizmat ah, ok...  hmmm...  so qx/kill -1 $*PID/ to test signalI() functionality, is not going to work
10:07 lizmat reliably anyway
10:07 lizmat would libuv support kill() ?
10:08 FROGGS jnthn: the unwind_check happens within the catch of the delemit_handler
10:08 jnthn Not sure it does
10:08 Woodi lizmat: http://msdn.microsoft.com/en-us/library/xdkz3x12.aspx
10:09 lizmat can we fudge tests depending on OS ?
10:10 jnthn Not sure about fudge, but you check OS in a test.
10:10 lizmat I assume you mean $*OS right>
10:10 jnthn And you've got a plan *; then you don't even need to emit skips I guess.
10:10 jnthn Right
10:11 lizmat hmmm... that appears to be a Str atm
10:12 jnthn FROGGS: if (vmex.payload.hashCode() == where) {
10:12 FROGGS yes?
10:13 jnthn I'm not sure if hashCode is stable over an object's lifetime...
10:13 vendethiel lizmat: taskkill /F /PID N ?
10:14 FROGGS jnthn: but that is what nqp::where does... and I was thinking it will never move... :/
10:14 FROGGS okay, I'll keep in mind that I have to keep the label object, and not its address
10:14 lizmat vendethiel++  will put that in the MSWin32 case
10:15 lizmat $*OS doesn't seem specced
10:15 jnthn FROGGS: Was gonna say..
10:15 jnthn $il.append(JAST::PushIVal.new( :value($label ?? nqp::where($label.value) !! 0) ));
10:15 jnthn That could potentially we doing a wval thingy instead
10:16 jnthn FROGGS: What is making me curious, though, is we never seem to event hit the outer exception ahdnler at all
10:17 jnthn That is, I'd expect we'd see another call to _is_same_label
10:17 FROGGS jnthn: me too, that is why I look closer at handlerDynamic
10:18 jnthn yeah. Get it to dump out what it actually puts into the unwindexception, maybe
10:19 lizmat perl6: say $*OS   # not a lot of consistency  :-(
10:19 jnthn FROGGS: oooh
10:19 camelia rakudo-{parrot,moar} 698d20: OUTPUT«linux␤»
10:19 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unix␤»
10:19 camelia ..rakudo-jvm 698d20: OUTPUT«Linux␤»
10:19 jnthn FROGGS: One important thing you might want to know...
10:19 jnthn FROGGS: There's a single unwindException per thread
10:19 jnthn public UnwindException unwinder;
10:19 jnthn in ThreadContext
10:19 jnthn Which is re-used
10:20 FROGGS ohhh, I am setting the result in one case.... so I need to clear it in other cases I guess
10:20 jnthn Well, also that clearup code I mentioned earlier
10:21 jnthn oh, maybe not...
10:21 jnthn But anyway, that could be your problem
10:26 FROGGS but as I said, the unwind_check is being put into the catch of the delimit handler, so this happens first, no?
10:31 denis_boyun_ joined #perl6
10:35 itz2 joined #perl6
10:35 itz2 https://twitter.com/bin3ry/status/465071985681506304/photo/1
10:37 FROGGS nice :o)
10:40 dalek rakudo/nom: c5ac807 | (Elizabeth Mattijsen)++ | src/core/signals.pm:
10:40 dalek rakudo/nom: Make sure we do each given signal once
10:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5ac80766a
10:47 Rotwang joined #perl6
10:49 FROGGS jnthn: in invokes the same handler again
10:50 jnthn FROGGS: So, that bit of logic that places us outside of the handled region I mentioend might fix that...
10:52 jnthn Wow, Perl ukulele :)
10:59 nnunley joined #perl6
11:05 virtualsue joined #perl6
11:05 clkaoud joined #perl6
11:05 pnu joined #perl6
11:05 flussence joined #perl6
11:05 _sri joined #perl6
11:22 lizmat I'm seeing all sorts of OS related information spread out in several IO modules, and test-files
11:23 lizmat and $*OS just being s atring
11:24 lizmat would it be a plan to make $*OS a bit smarter and e.g. add a method "is-win" , "FSTYPE" etc
11:24 lizmat .name -> .gist / .Str so the current behaviour would still work
11:24 lizmat does that make sense?  Or am I too soon?  or do I need to spec first?
11:27 jnthn lizmat: I think S02 does specify various other special vars like $*DISTRO and $*KERNEL that might be worth considering into this
11:27 colomon wow, Perl 6 stickers?!!
11:28 lizmat colomon: we'll be taking them to YAPC::NA
11:28 lizmat otherwise, if you want any, please contact woolfy
11:29 colomon will do.  ;)
11:30 lizmat perl6: say $VM<name>
11:30 camelia rakudo-jvm 71411c: OUTPUT«(timeout)»
11:30 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $VM is not predeclared at /tmp/tmpfile line 1:â�¤------> [32msay [33mâ��[31m$VM<name>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) …»
11:30 camelia ..rakudo-{parrot,moar} 71411c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '$VM' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32msay $VM<name>[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:31 lizmat perl6: say $*VM<name>  # sigh
11:31 camelia rakudo-moar 71411c: OUTPUT«moar␤»
11:31 camelia ..rakudo-jvm 71411c: OUTPUT«jvm␤»
11:31 camelia ..rakudo-parrot 71411c: OUTPUT«parrot␤»
11:31 camelia ..niecza v24-109-g48a8de3: OUTPUT«(Any)␤»
11:38 dalek specs: 1cba1e7 | (Elizabeth Mattijsen)++ | S02-bits.pod:
11:38 dalek specs: Fix straggling META.info reference
11:38 dalek specs: review: https://github.com/perl6/specs/commit/1cba1e7516
11:39 FROGGS jnthn: I think I understand now
11:42 lizmat afk for a few hours&
11:44 kaare_ joined #perl6
12:05 colomon m: my @a = 1..10; say @a.pairs
12:05 camelia rakudo-moar c5ac80: OUTPUT«0 => 1 1 => 2 2 => 3 3 => 4 4 => 5 5 => 6 6 => 7 7 => 8 8 => 9 9 => 10␤»
12:10 virtualsue joined #perl6
12:20 FROGGS nice... all nqp's pass the labels test...
12:20 jnthn \o/
12:20 jnthn FROGGS++
12:22 FROGGS in theory perl6-j should already be fine, and perl6-p needs the nqp::handle adjustments in the pir block in MapIter.reify
12:22 FROGGS but spectests first :o)
12:23 FROGGS ewww
12:23 rurban joined #perl6
12:23 FROGGS its lets an exception slip when building Perl6::Pod
12:23 FROGGS it*
12:24 new6er joined #perl6
12:34 dalek nqp/loop_labels: f44aaab | (Tobias Leich)++ | src/vm/jvm/ (3 files):
12:34 dalek nqp/loop_labels: add loop labels support for jvm backend
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/f44aaabf69
12:34 dalek nqp/loop_labels: 18d11f7 | (Tobias Leich)++ | t/nqp/84-loop-labels.t:
12:34 dalek nqp/loop_labels: add test for labeled for loop
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/18d11f74f6
12:34 dalek nqp/loop_labels: 9dd4604 | (Andrew Egeler)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
12:34 dalek nqp/loop_labels: Add write barrier to JVM push ops
12:34 dalek nqp/loop_labels:
12:34 dalek nqp/loop_labels: This was done on moarvm a while back, and fixes a precompilation issue.
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/9dd4604449
12:34 dalek nqp/loop_labels: 5f942fc | (Andrew Egeler)++ | src/vm/parrot/6model/reprs/CStruct.c:
12:34 dalek nqp/loop_labels: Serialize CStruct on parrot
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/5f942fcb4f
12:34 dalek nqp/loop_labels: 948999a | (Andrew Egeler)++ | src/vm/parrot/6model/reprs/CArray.c:
12:34 dalek nqp/loop_labels: Fix memory corruption on CArray resize
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/948999afd4
12:34 dalek nqp/loop_labels: 63910f6 | (Tobias Leich)++ | src/vm/ (3 files):
12:34 dalek nqp/loop_labels: Merge branch 'master' of github.com:perl6/nqp into loop_labels
12:34 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/63910f6cb9
12:35 dalek Heuristic branch merge: pushed 18 commits to rakudo/loop_labels_test by FROGGS
12:38 masak FROGGS++
12:41 FROGGS we're not quite there yet
12:45 new6er left #perl6
12:45 anaeem1_ joined #perl6
13:16 masak m: class B { ... }; class A { method foo(B) { "A.foo(B)" } }; class B is A { method foo(A) { "B.foo(A)" } }; my $b = B.new; say $b.foo(A)
13:16 camelia rakudo-moar c5ac80: OUTPUT«B.foo(A)␤»
13:17 masak why is it again that this favors B.foo(A), and doesn't result in a dispatch ambiguity?
13:18 masak oh, I didn't declare them proto, for one thing.
13:18 jnthn masak: Did you mean to write "multi"?
13:18 masak um, multi.
13:18 * masak tries again
13:18 masak m: class B { ... }; class A { multi method foo(B) { "A.foo(B)" } }; class B is A { multi method foo(A) { "B.foo(A)" } }; my $b = B.new; say $b.foo(A)
13:18 jnthn You're just getting normal method dispatch behavior there :)
13:18 camelia rakudo-moar c5ac80: OUTPUT«B.foo(A)␤»
13:18 masak ok, question repeated. :)
13:19 FROGGS you are calling foo(A), so the foo(A) is narrower than foo(B)
13:19 FROGGS m: class B { ... }; class A { multi method foo(B) { "A.foo(B)" } }; class B is A { multi method foo(A) { "B.foo(A)" } }; my $b = B.new; say $b.foo(B)
13:19 camelia rakudo-moar c5ac80: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:(A: B, *%_)␤:(B: A, *%_)␤  in block  at /tmp/pkM9YolUOD:1␤␤»
13:20 jnthn Yeah, but the invocant type should play into it also...
13:20 masak FROGGS++
13:20 jnthn ah, right
13:20 masak right.
13:20 jnthn Yeah, the other candidate doesn't even count. :)
13:20 masak ok, everything's fine.
13:21 masak I think I'm in love with Perl 6's multi dispatch.
13:23 FROGGS ohh yes, I love it too
13:23 FROGGS it is totally DWIM and very flexible
13:24 FROGGS even moar with the power of the signatures
13:25 jnthn m: say 5.20 / 5.84
13:25 camelia rakudo-moar c5ac80: OUTPUT«0.890411␤»
13:26 dalek nqp/loop_labels: 5e3e216 | (Tobias Leich)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ExceptionHandling.java:
13:26 dalek nqp/loop_labels: add accidently removed comments
13:26 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/5e3e21632a
13:26 masak I do wish I could use signatures for destructuring, though.
13:26 masak hoping to write a language extension for that sometime.
13:26 jnthn You...can't?
13:27 jnthn r: class A { has $.b; has $.c }; my (:$b, :$c) := A.new(b => 1, c => 2); say $b; say $c;
13:27 camelia rakudo-jvm c5ac80: OUTPUT«(timeout)»
13:27 camelia ..rakudo-{parrot,moar} c5ac80: OUTPUT«1␤2␤»
13:27 jnthn bah, shoulda m: :)
13:28 jnthn Granted, you should not do that on any hot path as it's heavily unoptimized.
13:29 masak m: my %struct = name => "Gabriel", addr => ["Pearly Gates", "1", "Heaven"]; my (:$name, :addr([$l1, $l2, $l3])) = %struct; say $name; .say for $l1, $l2, $l3
13:29 camelia rakudo-moar c5ac80: OUTPUT«"name" => "Gabriel"␤(Mu)␤(Mu)␤(Mu)␤»
13:29 masak :/
13:29 masak jnthn: like that.
13:30 masak jnthn: but (more crucially), if done in a 'when' expression, the variables should be available inside the block.
13:31 jnthn m: my %struct = name => "Gabriel", addr => ["Pearly Gates", "1", "Heaven"]; my (:$name, :addr($) [$l1, $l2, $l3]) := %struct; say $name; .say for $l1, $l2, $l3 # maybe
13:31 camelia rakudo-moar c5ac80: OUTPUT«Gabriel␤Pearly Gates␤1␤Heaven␤»
13:32 jnthn Just gotta use sub-sig syntax correct, and remember to bind :P
13:32 masak ooh
13:32 masak \o/
13:32 masak well, that takes care of use case 1.
13:32 masak the syntax is kinda wonky, but fine.
13:32 jnthn About when, I think something is spec'd there wrt sig matching, but not sure I remember implementing it.
13:32 masak oki
13:33 masak anyway, jnthn++
14:09 benabik joined #perl6
14:19 skids joined #perl6
14:22 virtualsue joined #perl6
14:23 daniel-s_ joined #perl6
14:31 dalek nqp/loop_labels: 50cae66 | (Tobias Leich)++ | src/vm/jvm/ (3 files):
14:31 dalek nqp/loop_labels: fix regressions by adding exception category for labels
14:31 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/50cae66d4d
14:35 skids joined #perl6
14:42 masak r: package Foo; say "alive"
14:42 camelia rakudo-{parrot,jvm,moar} c5ac80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style package block like "package Foo { ... }", or "module Foo; ...".�at /tmp/tmpfi…»
14:42 skids Darn. Actions.nqp line 5543 looked like the perfect explanation for the 0x0123456789abcdef bug, but I changed that to ".0" and no dice.
14:43 skids Still looks fishy, maybe there is another copy of that lying around.
14:43 skids r: 0x123456789abcdef.base(16).say
14:43 camelia rakudo-moar c5ac80: OUTPUT«123456789ABCDF0␤»
14:43 camelia ..rakudo-{parrot,jvm} c5ac80: OUTPUT«123456789ABCDEF␤»
14:44 skids see it is adding a zero.
14:44 skids r: Int("0x0123456789abcdef").base(16).say # but not here.
14:44 camelia rakudo-{parrot,jvm,moar} c5ac80: OUTPUT«123456789ABCDEF␤»
14:46 skids r: 0x00020000000000001.base(16).say; 0x00020000000000000.base(16).say; # and only above this boundary.
14:46 camelia rakudo-{parrot,jvm} c5ac80: OUTPUT«20000000000001␤20000000000000␤»
14:46 camelia ..rakudo-moar c5ac80: OUTPUT«20000000000000␤20000000000000␤»
14:46 skids oh.
14:46 skids hmm.
14:48 skids and under this boundary: r: 0x10020000000000001.perl.say;
14:49 skids well, anyway there sure are a lot of different codepaths for parsing code/text into Numeric.
14:49 logie_ joined #perl6
15:01 SamuraiJack_ joined #perl6
15:06 dalek rakudo/loop_labels_test: 96e3bdc | (Tobias Leich)++ | src/core/Any.pm:
15:06 dalek rakudo/loop_labels_test: unbreak build caused by a partial fine branch merge
15:06 dalek rakudo/loop_labels_test: review: https://github.com/rakudo/rakudo/commit/96e3bdca48
15:15 dalek nqp/loop_labels: 748ef15 | (Tobias Leich)++ | src/vm/jvm/QAST/Compiler.nqp:
15:15 dalek nqp/loop_labels: add nqp constant for CONTROL_LABELED
15:15 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/748ef15901
15:16 timotimo could more people try building their moarvm with --optimize=3?
15:17 retupmoca timotimo: it worked fine for me last week or so
15:18 timotimo i wonder if it's the gcc version?
15:30 flussence r: printf('%x', 0x123456789abcdef +& 0xFFFF_FFFF)
15:30 camelia rakudo-moar c5ac80: OUTPUT«89abcdf0»
15:30 camelia ..rakudo-{parrot,jvm} c5ac80: OUTPUT«89abcdef»
15:31 flussence r: printf('%x', 0x123456789abcdef +& 0xFFFF_FFFF_0000_0000)
15:31 camelia rakudo-{parrot,jvm,moar} c5ac80: OUTPUT«123456700000000»
15:41 skids r: say nqp::atpos(nqp::radix_I(16, "0123456789abcdef", 0, 2, Int),0).base(16); # this codepath seems to be clean
15:41 camelia rakudo-{parrot,jvm,moar} c5ac80: OUTPUT«123456789ABCDEF␤»
15:43 skids Oh, it isn't adding a zero.  It is clobbering a nybble.
15:43 skids flussence++
15:45 flussence seems like a weird range to have an off-by-one in...
15:46 flussence r-m: say 0x00020000000000000..0x00020000000000005 X+& 0xFFFF_FFFF
15:46 flussence r: say 0x00020000000000000..0x00020000000000005 X+& 0xFFFF_FFFF
15:47 camelia rakudo-moar c5ac80: OUTPUT«(timeout)»
15:47 camelia rakudo-{parrot,moar} c5ac80: OUTPUT«(timeout)»
15:47 camelia ..rakudo-jvm c5ac80: OUTPUT«0 1 2 3 4 5␤»
15:47 flussence r-m: say 0x00020000000000000..0x00020000000000005
15:47 camelia rakudo-moar c5ac80: OUTPUT«9007199254740992..9007199254740996␤»
15:47 flussence r-m: say 0x00020000000000000...0x00020000000000005
15:47 camelia rakudo-moar c5ac80: OUTPUT«9007199254740992 9007199254740993 9007199254740994 9007199254740995 9007199254740996␤»
15:48 flussence r-m: say 0x00020000000000000...0x00020000000000005 X+& 0xFFFF_FFFF
15:48 camelia rakudo-moar c5ac80: OUTPUT«(timeout)»
15:48 flussence r-m: say $_ +& 0xFFFF_FFFF for 0x00020000000000000...0x00020000000000005
15:48 camelia rakudo-moar c5ac80: OUTPUT«0␤1␤2␤3␤4␤»
15:49 guru joined #perl6
15:49 flussence r-m: for 0x00020000000000000..0x00020000000000005 { say $_; say $_ +& 0xFFFF_FFFF }
15:49 camelia rakudo-moar c5ac80: OUTPUT«(timeout)9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992␤0␤9007199254740992…»
15:50 flussence oh I get it... that number problem is making the range iterator horribly confused...
15:50 flussence r-m: for 0x00020000000000000...0x00020000000000005 { say $_; say $_ +& 0xFFFF_FFFF }
15:50 camelia rakudo-moar c5ac80: OUTPUT«9007199254740992␤0␤9007199254740993␤1␤9007199254740994␤2␤9007199254740995␤3␤9007199254740996␤4␤»
15:51 flussence r-m: for 0x00020000000000000...0x00020000000000005 { say ($_, $_ +& 0xFFFF_FFFF)».fmt('%x') }
15:51 camelia rakudo-moar c5ac80: OUTPUT«20000000000000 0␤20000000000001 1␤20000000000002 2␤20000000000003 3␤20000000000004 4␤»
15:52 flussence ...but not the sequence op, for some reason.
15:52 spider-mario joined #perl6
15:53 flussence r-m: for 0x123456789abcdef...0x123456789abcdff { say ($_, $_ +& 0xFFFF_FFFF)».fmt('%x') }
15:53 camelia rakudo-moar c5ac80: OUTPUT«123456789abcdf0 89abcdf0␤123456789abcdf1 89abcdf1␤123456789abcdf2 89abcdf2␤123456789abcdf3 89abcdf3␤123456789abcdf4 89abcdf4␤123456789abcdf5 89abcdf5␤123456789abcdf6 89abcdf6␤123456789abcdf7 89abcdf7␤123456789abcdf8 89abcdf8␤123456789abcd…»
15:53 flussence r-m: for 0x123456789abcdef..0x123456789abcdff { say ($_, $_ +& 0xFFFF_FFFF)».fmt('%x') }
15:53 flussence r-p: for 0x123456789abcdef..0x123456789abcdff { say ($_, $_ +& 0xFFFF_FFFF)».fmt('%x') }
15:54 camelia rakudo-moar c5ac80: OUTPUT«(timeout)123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤1234…»
15:54 camelia rakudo-parrot c5ac80: OUTPUT«(timeout)123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤123456789abcdf0 89abcdf0␤12…»
15:54 flussence r-j: for 0x123456789abcdef..0x123456789abcdff { say ($_, $_ +& 0xFFFF_FFFF)».fmt('%x') }
15:54 camelia rakudo-jvm c5ac80: OUTPUT«123456789abcdef 89abcdef␤123456789abcdf0 89abcdf0␤123456789abcdf1 89abcdf1␤123456789abcdf2 89abcdf2␤123456789abcdf3 89abcdf3␤123456789abcdf4 89abcdf4␤123456789abcdf5 89abcdf5␤123456789abcdf6 89abcdf6␤123456789abcdf7 89abcdf7␤123456789abcdf…»
15:55 flussence r: say 0x123456789abcdef.succ
15:55 camelia rakudo-{parrot,jvm} c5ac80: OUTPUT«81985529216486896␤»
15:55 camelia ..rakudo-moar c5ac80: OUTPUT«81985529216486897␤»
15:55 flussence r: say 0x123456789abcdef.succ.succ
15:55 camelia rakudo-moar c5ac80: OUTPUT«81985529216486898␤»
15:55 camelia ..rakudo-{parrot,jvm} c5ac80: OUTPUT«81985529216486897␤»
15:55 flussence r: say 0x123456789abcdf0.succ
15:56 camelia rakudo-{parrot,jvm,moar} c5ac80: OUTPUT«81985529216486897␤»
15:56 flussence bignum scary.
15:57 * flussence goes back to his nice sane html regexing...
15:57 skids Yeah who needs numbers anymore :-)
16:16 araujo joined #perl6
16:16 araujo joined #perl6
16:32 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; say %a »+« %b
16:32 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
16:32 TimToady that should likely suppress those warnings
16:35 TimToady it should probably just copy over values that are in only one hash or the other
16:37 clkaoud joined #perl6
16:37 pnu joined #perl6
16:37 flussence joined #perl6
16:37 _sri joined #perl6
16:41 colomon +1
16:42 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a »+=« %b; say %a
16:42 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 1, "b" => 4, "c" => 4, "d" => 4).hash␤»
16:42 thou joined #perl6
16:42 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a »+«= %b; say %a
16:42 camelia rakudo-moar c5ac80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OvaiRAfr97�Preceding context expects a term, but found infix = instead�at /tmp/OvaiRAfr97:1�------> [32mb 2 c 3 d 4>; my %b = <b 2 c 1>; %a »+«=[33m�[31m %b; say %a[0m�»
16:43 TimToady ah, yes, rakudo don't parse assignops correctly yet
16:43 TimToady n: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1>; %a »+«= %b; say %a
16:43 camelia niecza v24-109-g48a8de3: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 301 (Any.Numeric @ 8) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niec…»
16:44 colomon which of the two forms is correct?  »+«= vs »+=«
16:44 TimToady niecza++ does but has even more verbose warnings
16:44 TimToady they are both correct :)
16:50 daniel-s_ joined #perl6
16:50 zakharyas joined #perl6
16:57 colomon There's more than one way, eh?
16:59 xinming joined #perl6
17:02 TimToady they mean different things, but achieve the same result, assuming standard hash semantics
17:05 TimToady well, maybe not, now that I think about it more
17:05 anaeem1 joined #perl6
17:06 TimToady there's nothing in »+=« that will make sure the keys of the right side will end up in the left side's hash
17:06 TimToady unless the hyper somehow notices it's a mutating operator
17:10 TimToady I guess if it's careful to iterate the right hash'es keys, autoviv will work on the left side appropriately
17:12 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1 e 5>; %a »+=« %b; say %a
17:12 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 1, "b" => 4, "c" => 4, "d" => 4, "e" => 5).hash␤»
17:13 TimToady ha, works already, somehow
17:14 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1 e 5>; %a »R[+=]« %b; say %b
17:14 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤("a" => 1, "b" => 4, "c" => 4, "d" => 4, "e" => 5).hash␤»
17:15 TimToady and works with a reversed op even, but that's why we get the warning, because it's always calling the 2-arg form (which is what allows autoviv, I guess)
17:16 TimToady so the correct thing is to suppress the warning, not introspect the args to try to figure out which ones are there vs never there vs maybe there through autoviv
17:16 denis_boyun_ joined #perl6
17:16 TimToady introspecting is once again a code smell
17:18 * lizmat wishes warnings worked more like "is DEPRECATED"
17:19 lizmat instead of just mumbling, keeping the into until the end and then show where they happened (and how many times)
17:19 lizmat *info
17:27 btyler joined #perl6
17:28 dalek nqp/lexopts: c9e9e90 | jnthn++ | src/vm/moar/stage0/ (11 files):
17:28 dalek nqp/lexopts: Update stage0 for MoarVM.
17:28 dalek nqp/lexopts:
17:28 dalek nqp/lexopts: The previous bootstrap contained mis-generated code that upset a more
17:28 dalek nqp/lexopts: aggressive spesh. Furthermore, the generated code is far better these
17:28 dalek nqp/lexopts: days. Between spesh and the better stage0 (meaning we build stage 1
17:28 dalek nqp/lexopts: faster), the NQP build is now down to 41s (from around 50s) for me.
17:28 dalek nqp/lexopts: review: https://github.com/perl6/nqp/commit/c9e9e90990
17:29 lizmat jnthn++
17:31 jnthn Faster NQP builds for all. Once that merges... :)
17:31 masak the above discussion about »+=« reminds me of https://rt.perl.org/Ticket/Display.html?id=118223
17:31 masak r: my %l = foo => 1, bar => 2; my %r = bar => 3, baz => 4; say %l >>+<< %r
17:31 camelia rakudo-{jvm,moar} c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("bar" => 5, "baz" => 4, "foo" => 1).hash␤»
17:31 camelia ..rakudo-parrot c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤("bar" => 5, "baz" => 4, "foo" => 1).hash␤»
17:32 masak shouldn't warn.
17:33 timotimo jnthn: ŷay! \o/
17:33 lizmat masak jnthn : looking into it now
17:34 lizmat but short of implementing "no warnings" I don't really see an easy fix yet
17:34 lizmat I see some optimizations
17:36 daniel-s_ joined #perl6
17:38 hoverboard joined #perl6
17:41 firnsy joined #perl6
17:41 firnsy joined #perl6
17:42 btyler_ joined #perl6
17:43 tadzik aww yiss
17:46 TimToady lizmat: well, you need something like a CONTROL that traps warnings dynamically, since the code in question is handed to you by reference
17:48 TimToady alternately, we need some way for warn to know its context and refrain from warning in the first place
17:50 * lizmat tries to grok CONTROL better
17:51 TimToady but HOP basically requires dynamic scoping for indirect function control, since you don't have textual control of the, er, text
17:51 TimToady the only other alternative is to parameterize everything
17:52 TimToady and when you need to parameterize everything, that usually is a design smell that you need dynamic scoping instead
17:56 FROGGS ohh
17:56 FROGGS jnthn++
17:57 masak m: say lines>>.comb.grep("a".."z").Bag.format("%s: %s")
17:57 MikeFair_ joined #perl6
17:57 camelia rakudo-moar c5ac80: OUTPUT«No such method 'format' for invocant of type 'Bag'␤  in block  at /tmp/1CVFQCnVST:1␤␤»
17:57 masak requested: .format on Bag objects.
17:58 masak m: say lines>>.comb.grep("a".."z").Bag.Hash.format("%s: %s")
17:58 camelia rakudo-moar c5ac80: OUTPUT«No such method 'Hash' for invocant of type 'Bag'␤  in block  at /tmp/4S2S9dbKOr:1␤␤»
17:58 masak hm.
17:58 TimToady lizmat: otoh, I can argue myself out of doing by warning supression, since that doesn't fix the case of »*=« wanting to default to multiplying by 1 rather than 0
17:59 TimToady so some degree of introspection is probably required in hypers
18:00 TimToady we really need to be able to ask an operator which argument or arguments it expects to be rw
18:00 * colomon wonders if there is overlap with the Bag operators here...
18:01 TimToady yes, but a Bag only does +=, not *=
18:01 masak m: .say for lines>>.comb.grep("a".."z").Bag.pairs
18:01 camelia rakudo-moar c5ac80: OUTPUT«"h" => 103␤"e" => 150␤"r" => 71␤"w" => 23␤"t" => 95␤"m" => 44␤"n" => 84␤"c" => 18␤"a" => 67␤"o" => 81␤"u" => 23␤"f" => 12␤"s" => 51␤"i" => 55␤"y" => 25␤"d" => 56␤"l" => 55␤"v" => 18␤"p" => 11␤"g" => 10␤"z" => 1␤"k"…»
18:01 masak ok, that works.
18:01 masak m: .say for lines>>.comb.grep("a".."z").Bag.pairs.sort
18:01 camelia rakudo-moar c5ac80: OUTPUT«"a" => 67␤"b" => 17␤"c" => 18␤"d" => 56␤"e" => 150␤"f" => 12␤"g" => 10␤"h" => 103␤"i" => 55␤"k" => 8␤"l" => 55␤"m" => 44␤"n" => 84␤"o" => 81␤"p" => 11␤"r" => 71␤"s" => 51␤"t" => 95␤"u" => 23␤"v" => 18␤"w" => 23␤"x"…»
18:02 masak \o/
18:03 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1 e 5>; %a »*=« %b; say %a
18:03 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 0, "b" => 4, "c" => 3, "d" => 0, "e" => 5).hash␤»
18:04 TimToady see, those 0's are probably wrong
18:04 timotimo retupmoca: thanks :)
18:05 masak timotimo: yes, those 0s are wrong.
18:05 masak er, TimToady*
18:06 TimToady but we can't just default undefineds to the identity element, or be break autoviv
18:06 TimToady s/be/we/
18:07 TimToady so we really need to know which args are being modified
18:07 masak oh, I meant they're wrong because »*=« should only act on keys that are in both hashes, not at-least-one.
18:08 masak «*=» should act on all possible keys.
18:08 TimToady no, that would be «*=» instead, according to spec
18:08 masak oh, ok.
18:09 timotimo does/should that factor in "is default"?
18:09 TimToady that should be invisible to the hyper
18:09 TimToady you fetch from the hash, and it gives you a value
18:09 TimToady you don't care if it was the default
18:09 lizmat but the * is the problem there, not the *=, right?
18:10 lizmat m: my %a = <a 1>; my %b = <b 2>; say %a »*« %b
18:10 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 0, "b" => 0).hash␤»
18:10 TimToady which is why that case should probably just copy over such values
18:11 TimToady much as reduce on a single arg just copies it, on the assumpion that applying the identity would end up with result
18:11 lizmat would that then be special cased for &infix:<*> ?
18:11 lizmat how would that work for a custom op "foo"
18:11 TimToady it's a special case for hypers
18:11 TimToady the op doesn't have to care
18:12 lizmat but suppose an op "foo" has a multiplcative component
18:12 lizmat then %a >>foo<<  %b would do the wrong thing
18:13 TimToady m: my %a = <a 1 b 2 c 3 d 4>; my %b = <b 2 c 1 e 5>; %a «*=« %b; say %a
18:13 camelia rakudo-moar c5ac80: OUTPUT«("a" => "1", "b" => 4, "c" => 3, "d" => "4", "e" => 5).hash␤»
18:13 lizmat because hyper wouldn't know to copy the value if one of the sides is missing
18:13 TimToady I guess using «« is a workaround
18:14 TimToady lizmat: I don't understand your objection, can you give an example
18:15 TimToady note that «« doesn't warn either
18:16 lizmat m: sub infix:<foo> { $^a * $^b }; my %a=<a 1>; my %b = <b 2>; say %a >>foo<< %b
18:16 camelia rakudo-moar c5ac80: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤("a" => 0, "b" => 0).hash␤»
18:16 lizmat if we special case infix:<*> to copy if one side is missing, it wouldn't know how to do that with "foo" as an operator
18:17 TimToady I never said to special-case *
18:17 TimToady I said to special-case hyper
18:17 TimToady if one side is missing, it would just copy the other side
18:17 lizmat ah, in that way, regardless of op
18:17 TimToady (except that doesn't work well with autoviv)
18:17 TimToady since it wouldn't trigger the = part of the op
18:18 lizmat hmmm.....
18:18 TimToady m: sub infix:<foo> { $^a * $^b }; my %a=<a 1>; my %b = <b 2>; %a <<foo=<< %b; say %a
18:18 camelia rakudo-moar c5ac80: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub infix:<foo> at /tmp/36S8cT_EtP:1␤  in block  at src/gen/m-CORE.setting:17119␤  in sub hyper at src/gen/m-CORE.setting:17365␤  in sub hyper at src/gen/m-CORE.setting:17474␤  in…»
18:19 TimToady hmm, that's maybe another bug
18:19 lizmat possibly  :-)  looks like
18:20 TimToady m: sub infix:<foo> { $^a * $^b }; my %a=<a 1>; my %b = <b 2>; %a «foo=« %b; say %a
18:20 camelia rakudo-moar c5ac80: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in sub infix:<foo> at /tmp/sbwdG2o9ck:1␤  in block  at src/gen/m-CORE.setting:17119␤  in sub hyper at src/gen/m-CORE.setting:17365␤  in sub hyper at src/gen/m-CORE.setting:17474␤  in…»
18:20 TimToady something is trying to look up the identity value, I think
18:20 TimToady m: multi infix:<foo> () { 1 }; multi infix:<foo> { $^a * $^b }; my %a=<a 1>; my %b = <b 2>; %a «foo=« %b; say %a
18:20 camelia rakudo-moar c5ac80: OUTPUT«("a" => "1", "b" => 2).hash␤»
18:21 TimToady yup
18:21 masak m: sub MAIN($year = Date.today.year) { sub last-day-of-month($month) { my $d = Date.new($year, $month, 1); $d.clone(:day($d.days-in-month)) }; say last-day-of-month($_) for 1..12 }
18:21 camelia rakudo-moar c5ac80: OUTPUT«2014-01-31␤2014-02-28␤2014-03-31␤2014-04-30␤2014-05-31␤2014-06-30␤2014-07-31␤2014-08-31␤2014-09-30␤2014-10-31␤2014-11-30␤2014-12-31␤»
18:21 masak can anyone think of a nicer, more idiomatic way to implement last-day-of-month?
18:21 masak specifically, does it really have to be two statements like that?
18:22 lizmat well, the last day of the month is one day before the first day of the next month
18:22 TimToady add one month, change to 1, back up one day
18:22 masak not sure we have "add one month" :)
18:22 anaeem1 joined #perl6
18:22 masak oh wait, we have .delta :P
18:23 TimToady yeah, somebody implemented that once upon a time, I FORGET WHO!!!
18:23 masak :P
18:23 masak m: sub MAIN($year = Date.today.year) { sub last-day-of-month($month) { Date.new($year, $month, 1).delta(1, month).delta(-1, day) }; say last-day-of-month($_) for 1..12 }
18:23 camelia rakudo-moar c5ac80: OUTPUT«2014-01-31␤2014-02-28␤2014-03-31␤2014-04-30␤2014-05-31␤2014-06-30␤2014-07-31␤2014-08-31␤2014-09-30␤2014-10-31␤2014-11-30␤2014-12-31␤»
18:23 masak delta++
18:23 dalek rakudo/nom: aff2a66 | (Elizabeth Mattijsen)++ | src/core/metaops.pm:
18:23 dalek rakudo/nom: Move tests outside of loops for better performance
18:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aff2a6618e
18:24 * TimToady still kinda hates that API
18:24 lizmat jnthn: ^^^ does it make sense to make this type of optimization
18:24 lizmat or is that something that will be optimized automagically in the future ?
18:24 FROGGS TimToady: is there a DateTime API out there taht you don't hate?
18:25 FROGGS DateTime always sucks
18:25 lizmat fwiw, I agree DateTime sucks  :-)
18:26 TimToady I'd rather have N different deltas than to have weird constants that use up namespace without provided any other value
18:26 FROGGS I mean, drolsky++ did a great job, but there are so many absurdities you must take are of that make it hard to create a nice API
18:26 TimToady .add-month(1) is better than .delta(1,month)
18:27 FROGGS yeah, days => 1 as in P5 is slightly nicer I think
18:27 masak still not too late to change.
18:28 TimToady well, .delta(month => 1) would be better than the current form, I think
18:28 lizmat .delta( :day )  # one day
18:28 FROGGS True
18:28 TimToady smelly
18:28 FROGGS :P
18:28 masak yeah.
18:28 TimToady .add-day
18:28 masak .add-days ?
18:28 jnthn lizmat: Probably worth it for the time being
18:28 TimToady I'd make it singular so that the default of 1 makes more sense
18:29 jnthn lizmat: Maybe one day we'll be able to auto-opt it, but it's not trivial and won't happen soon
18:29 lizmat jnthn; I also timed %k{a.keys} = ()
18:29 lizmat but that was twice as slow (at least)
18:29 lizmat I guess because it's building the result list
18:30 lizmat %keys{a.keys} = ()
18:30 lizmat wouldn't need the result list
18:30 masak I suggest .add and .subtract (just like CPAN's DateTime), and then day => 1 and days => 1 both work.
18:30 lizmat since this is the core setting, I couldn't use Set  :-)
18:30 masak all unknown keys give an error.
18:31 TimToady not sure add/subtract is the best refacter of delta
18:31 TimToady it's like reinventing signs
18:31 TimToady but if we did, .later/.earlier might make more sense
18:32 TimToady or some other more time-oriented metaphor
18:32 FROGGS I like later/earlier somehow
18:33 TimToady .forward/.back
18:33 TimToady but that's backwardly huffmanized, perhaps
18:33 * TimToady wonders what's the opposte of "ago"...
18:33 lizmat If we're talking about dates, wouldn't a "string" like object like "2014-05-10" become a datetime object automatically?
18:34 lizmat or something like "2014y05m10d" ?
18:34 TimToady not by itself it won't
18:35 TimToady you need some context to indicate that the string is meant as a date.  Just looking like a date is insufficient
18:35 TimToady it's fine if a function wants to interpret a string that way, but a bare string shouldn't
18:36 FROGGS we have Str.path... so Str.date feels right, but I don't like ending up with a thousand methods on Cool
18:36 lizmat how about "0D20140510"
18:36 FROGGS but it would be nice if it was short
18:36 FROGGS lizmat: that is still a string
18:36 TimToady Introspection of Strings Considered Harmful
18:36 lizmat m: say 0d12345.WHAT,
18:36 daniel-s_ joined #perl6
18:36 camelia rakudo-moar c5ac80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MWrCtt_BTfâ�¤Two terms in a rowâ�¤at /tmp/MWrCtt_BTf:1â�¤------> [32msay 0d12345.WHAT,[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix sto…»
18:37 FROGGS ahh
18:37 FROGGS hmmm
18:37 lizmat 0D prefix indicates a Date
18:37 FROGGS I dunno
18:37 FROGGS weird :o)
18:38 masak sounds like something a module would do, not core.
18:38 FROGGS a datetime literal... I mean, the idea is nice
18:38 dalek specs: 337f433 | masak++ | S32-setting-library/Temporal.pod:
18:38 dalek specs: [S32/Temporal] retire TimeUnit enum and .delta
18:38 dalek specs:
18:38 dalek specs: Use strings in .truncate-to instead.
18:38 dalek specs:
18:38 dalek specs: .delta now becomes .later and .earlier, and they expect string keys as named
18:38 dalek specs: arguments.
18:38 dalek specs: review: https://github.com/perl6/specs/commit/337f433398
18:38 masak kudos to whoever updates Rakudo to follow the above change :)
18:38 masak hint: not so hard.
18:39 FROGGS we have version literals that are like \d.\d.\d, we could also parse \d-\d-\d[T\d:\d:\d]
18:39 lizmat nonono
18:39 TimToady m: say 1.2.3
18:39 camelia rakudo-moar c5ac80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KO5aMMqosEâ�¤Confusedâ�¤at /tmp/KO5aMMqosE:1â�¤------> [32msay 1.2.[33mâ��[31m3[0mâ�¤    expecting any of:â�¤        postfixâ�¤        dotty method or postfixâ�¤Â»
18:39 FROGGS leading v, yeah
18:39 TimToady std: say 1.2.3
18:39 camelia std ec3d853: OUTPUT«[31m===[0mSORRY![31m===[0m�Number contains two decimal points (missing 'v' for version number?) at /tmp/T101xqeoFz line 1:�------> [32msay 1.2[33m�[31m.3[0m�Check failed�FAILED 00:01 122m�»
18:39 lizmat I think version literals are not a good model
18:39 TimToady the rakudo message is LTA
18:40 FROGGS lizmat: but that is the most similar thing we have
18:40 lizmat true
18:40 FROGGS and I like consistency
18:41 FROGGS in P5 I have a dt() sub that understands some datetime strings and epoch and returns a DateTime object
18:41 FROGGS I use that everywhere and it is enough...
18:41 TimToady std: say d2014-05-10
18:41 Crazylemon64 joined #perl6
18:41 camelia std ec3d853: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤ 'd2014' used at line 1â�¤Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o5 if you mean that at /tmp/7AFDeyre_M line 1:â�¤------> [32msay d2014-05[33mâ��[31m-10[0mâ�¤â€¦Â»
18:42 bjz joined #perl6
18:42 TimToady well, specific dates seem like an unlikely thing to want to hardcode into a program
18:42 FROGGS problem is that you sometimes want/need to specify the timezone as well
18:42 FROGGS not at all
18:42 FROGGS I calculate fees at $work, and there are a lot of hardcoded datetimes in there
18:43 FROGGS like where the bosses decide that something gets handled differently from a given date
18:43 TimToady seems like something that would make a program go obsolete rather quickly
18:43 lizmat like 20% VAT before d2014-01-01 and 21% after
18:43 TimToady not sure it's worth the huffman cost
18:44 lizmat well, in a business like Booking.com, pretty much everything revolves around dates
18:44 FROGGS sure, I dunno if it is important enough to have that, or just nice now
18:44 TimToady well, modules will happen, once we actually have a compiler that can derive slangs
18:44 lizmat anybody doing any logging: dates
18:45 TimToady or it'd be a pretty trivial macro once we have is-parsed
18:45 btyler_ date literals seem like an invitation to put something in code that should probably live in a database of some sort
18:45 btyler_ not that perl has ever been in the business of laying down laws like that :) just a feeling
18:45 lizmat btyler_: you underestmate the about of ad-hoc processing of logs that occur in companies
18:45 lizmat *amount
18:45 btyler_ that's fair
18:46 btyler_ was thinking about it from a business logic point of view, log processing is a good counterexample
18:46 lizmat and we don't want Hadoop to take that all  :-)
18:46 masak I agree that literal dates in core don't carry their weight enough to bother.
18:46 TimToady a date comparison routine could certainly upgrade strings to date
18:46 FROGGS especially in one-liners a date(time) literal would make sense, aye
18:47 masak even one-liners could load a module.
18:47 FROGGS but but... it is extra typing :P
18:47 FROGGS not saying it has to be in core though
18:48 TimToady .oO(autoloading any language tweaks that recognize the current syntax error...)
18:48 TimToady "Oh, hey, you just wrote some COBOL, I'll switch to that for you."
18:49 lizmat TimToady: regarding $*OS, is that a keeper or should that be deprecated in favour of $*DISTRO ?
18:49 dalek rakudo-star-daily: dc31b7b | coke++ | log/ (5 files):
18:49 dalek rakudo-star-daily: today (automated commit)
18:49 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/dc31b7b280
18:49 dalek perl6-roast-data: 5b09b57 | coke++ | / (6 files):
18:49 dalek perl6-roast-data: today (automated commit)
18:49 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/5b09b5752e
18:49 dalek perl6-roast-data: 3bf8de5 | coke++ | / (6 files):
18:49 dalek perl6-roast-data: today (automated commit)
18:49 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3bf8de5ecb
18:49 TimToady "This looks like both Fortran and Python. I'll just run it both ways for you."
18:49 FROGGS *g*
18:50 lizmat the only mention in the spec is in S32/IO:836
18:50 vendethiel was it VB that had a syntax for date S?
18:50 TimToady $*OS is a zombie, it just keeps coming back after we kill it
18:50 FROGGS lizmat: https://ethercalc.org/wrwsbhvuim
18:50 vendethiel #01/01/2014#
18:50 TimToady either you want $*KERNEL or you want $*DISTRO, generally
18:51 FROGGS lizmat: last time TimToady admitted that we might are allowed to keep $*OS for some reason... but $*KERNEL was preferred I think
18:52 lizmat vendethiel: if we do that, please let us stick to YYYY-MM-DD
18:52 vendethiel please don't, though :P
18:52 lizmat because your format is ambiguous as to MM-DD-YYYY or DD-MM-YYYY
18:52 btyler_ "day month or month day? arrrgh!"
18:52 FROGGS vendethiel: we will stick to YYYY-MM-DD! :P
18:52 vendethiel I'm french, so it's always dd/mm/yyyy here.
18:53 vendethiel not the bad one with day in the middle
18:53 TimToady the only thing $*OS has going for it is its brevity
18:53 lizmat well, that me be logical in some way, but no wrt to e.g. sorting :-)
18:53 lizmat well, $*OS could be short for $*KERNEL.name ?
18:53 tadzik new game ready to test at https://github.com/tadzik/steroids
18:53 tadzik this time it needs SDL2_ttf too
18:54 rurban joined #perl6
18:54 btyler_ tadzik: somehow your Makefile was categorized as R, heh
18:54 FROGGS tadzik: sounds like you need Alien::SDL2 :o)
18:54 tadzik heheh
18:54 tadzik oh, btw, makefiles are a mess
18:55 btyler_ I really wish github would let authors just correct the language detection. I have several repos that github thinks are 2/3rds COBOL because some files have a .cob extension
18:55 tadzik since you need to run both
18:55 tadzik and I forgot to update the firsst one
18:55 tadzik ok all good now
18:55 TimToady lizmat: it's still not what people usually thing of when you say "OS", so it'll confuse people that think it should mean $*DISTRO.name, or something nebulous between distro and kernel
18:56 lizmat so, deprecate $*OS ?
18:56 TimToady like that portion of your distro that came from GNU, which is the part properly called GNU/Linux, but that's neither the distro nor the kernel
18:57 FROGGS TimToady: it would be the kernal.auth in my book: https://ethercalc.org/wrwsbhvuim
18:57 TimToady gah, that's a commodore spelling
18:58 TimToady avoiding that misspelling is a good reason to shorten it to $*KERN, while teaching people the correct spelling is a good reason to keep it $*KERNEL  :)
18:58 FROGGS this list was intended to be a start to sort things out... but I was the only editor, so.... :/
18:59 FROGGS ohh, that is what you mean :o)
19:00 masak m: say Date("2014-05-10")
19:00 camelia rakudo-moar c5ac80: OUTPUT«Cannot find method 'Date'␤  in block  at /tmp/Higo_XFrZW:1␤␤»
19:00 TimToady I'm sure that Linus would pitch a complete fit if you told him that GNU was the auth of his kernel
19:00 masak m: say Date.new("2014-05-10")
19:00 camelia rakudo-moar c5ac80: OUTPUT«2014-05-10␤»
19:00 lizmat afk for a few hours for some mindless entertainment: http://en.wikipedia.org/wiki/Eurovision_Song_Contest_2014
19:01 masak oh, that's today?
19:01 TimToady the GNU part of GNU/Linux is only the add-ons outside the kernel
19:01 TimToady the part that $*KERNEL is specifically meant to exclude, because those things are added by the $*DISTRO
19:02 * tadzik sees the polish song participating and cringes a little
19:02 TimToady or perhaps by the $*VM
19:06 TimToady $*ARCH < $*KERNEL < $*DISTRO < $*VM  # more or less
19:07 TimToady assuming we can include $*VM as part of a $*DISTRO, even if it wasn't originally supplied on the .iso  :)
19:07 TimToady presumably the $*DISTRO gave you the means of installing the $*VM
19:07 clkaoud joined #perl6
19:07 pnu joined #perl6
19:07 flussence joined #perl6
19:07 _sri joined #perl6
19:07 TimToady we may get other layers in that stack eventually, given virtualization of kernels
19:08 TimToady though anything called "virtual" is introducing a feedback loop of some sort
19:09 TimToady so a VM is trying to pretend to be the root of a new $*ARCH, in a way
19:10 TimToady and the VM will have its own kernel and utilities built on its architecture, so maybe we need something a bit more recursive here
19:11 rurban joined #perl6
19:12 btyler_ tadzik: trying to get space invaders going...makefile needed tweaking to include SDL2_ttf so sdlwrapper would compile; now Steroids::Colour seems to be missing?
19:12 TimToady so $*ARCH on a vm might say "JVM" but there's some way to get to $*JVM.native-arch
19:13 * TimToady suspects we will only get more layers of machine emulation in the future
19:14 tadzik btyler_: hmm
19:14 tadzik btyler_: makefile-sdlwrapper should be fine
19:14 tadzik the other makefile was just updated 20 minutes aog
19:14 tadzik after I said "ready for testing", sorry :)
19:14 plobsing joined #perl6
19:18 btyler_ tadzik: Configure.pl seems to want to work on Makefile, rather than makefile.sdlwrapper (which contains some paths from your machine). anyways, that's a super easy tweak. where can I grab steroids::colour?
19:18 Khisanth joined #perl6
19:18 tadzik oh, I didn't commit it! Stupid me
19:18 tadzik Configure.pl may be outdated, yeah :/
19:19 tadzik btyler_: fixed, thansk :)
19:19 tadzik just pull
19:19 rindolf Hi all.
19:19 rindolf Happy Saturday.
19:21 btyler_ tadzik: is there also an assets/font.ttf waiting to be pushed? :)
19:21 molaf joined #perl6
19:23 TimToady so, obviously openbsd, netbsd, freebsd, etc are diffierent distros, but are they different kernels?
19:23 TimToady at what point does the species known as 'bsd kernel' turn into multiple species?
19:24 TimToady or maybe those are different kernels now, with multiple distros on top of each of those?
19:24 TimToady Linnean hierarchies don't deal all that well with evolutionary branching...
19:26 TimToady one might posit that the kernel is most like the actual genome, but distros are in the business horizontal gene transfer
19:26 TimToady but all these analogies break down sooner or later in the face of reality
19:27 TimToady the taxonomy of execution contexts is not a solved problem, sigh...
19:28 FROGGS I dunno, that is why I tried to make up that list and put in real values...
19:29 tadzik btyler_: oh, of course :O
19:29 tadzik btyler_: it should all be there now :o
19:30 nwc10 TimToady: I don't know either. and Debian/kfreebsd messes it all up further
19:30 nwc10 I tend to think of the *BSDs as rabbits, because they seem to be breedng like ...
19:32 clkaoud joined #perl6
19:32 pnu joined #perl6
19:32 flussence joined #perl6
19:32 _sri joined #perl6
19:32 btyler_ tadzik: yay! got it working :) good stuff
19:33 btyler_ explosions look excellent, and it runs very smoothly
19:35 tadzik smoothly? Neat :D
19:35 tadzik btyler_: if you have an xbox controller, it should work too
19:35 btyler_ oh! sadly no, but that's awesome
19:35 tadzik not on the menu though :D I need to update that
19:36 anaeem1 joined #perl6
19:36 colomon url?
19:37 * colomon has been playing a good bit of Galaga '88 lately....
19:37 btyler_ a few things I had to tweak to get it going: configure.pl needed -lSDL2_ttf added to line 31; $*VM<config><dll> for OSX includes "lib" in the name, so after the %s subst the makefile produces sdlwrapperlib.dylib (and, of course, lib/Steroids/SDL.pm is looking for sdlwrapper.dylib)
19:38 tadzik colomon: https://github.com/tadzik/steroids
19:38 tadzik btyler_: yeah, Configure.pl is a bit rusty, I need to update it
19:38 tadzik thanks for playtesting :)
19:38 btyler_ and (this is just me being a newb, I'm sure), SpaceInvaders sets blib/lib as the lib location, but the repo just has a /lib; I just tweaked the 'use lib' line in spaceInvaders, but I suspect there's a way I'm supposed to turn lib into blib/lib :)
19:40 btyler_ I've been really enjoying the various steroids-based games, really exciting to see how concise and straightforward the game logic is
19:41 molaf_ joined #perl6
19:43 TimToady btyler_: perhaps there are some graphical RosettaCode entries that you're ready to write now :)
19:45 tadzik btyler_: makefile should generate blib/lib for you
19:45 tadzik precompile all the things
19:46 btyler_ TimToady: what kind of entries? I always thought the idea with RC was to avoid problems that likely required substantial external libs
19:47 TimToady well, most language require external libs for a lot more than Perl does, so external libs are fine
19:48 TimToady http://rosettacode.org/wiki/Image_noise is an example of something that's really an animation sort of task
19:50 colomon tadzik: SDL_image.h ?
19:50 btyler_ hm, neat. heh, looks like some of the entries are pretty thin wrappers around openGL
19:51 TimToady most of the languages pull in libraries for that tsk
19:51 TimToady task too
19:52 TimToady only languages that try to enforce a particular graphical context are exempt, like basic, icon, and such
19:52 TimToady most language know better than to try to do thta
19:52 tadzik colomon: what abou tit?
19:52 TimToady that too
19:52 tadzik oh, may need sdl2-image installed
19:52 colomon tadzik: that would probably be it
19:54 clkaoud joined #perl6
19:54 pnu joined #perl6
19:54 flussence joined #perl6
19:54 _sri joined #perl6
19:56 nwc10 where should I look to find out which dynamic vars are implemented, such as $*OS ?
19:56 colomon tadzik: SDL_ttf?
19:56 tadzik colomon: yeah, that too :)
19:57 daniel-s_ joined #perl6
19:57 moritz m: say PROCESS::.keys
19:58 camelia rakudo-moar aff2a6: OUTPUT«$FATAL &cwd &chdir $IN $OUT $ERR $INITTIME $TZ @ARGS $ARGFILES %ENV $VM $PERL %CUSTOM_LIB @INC $CWD $OS $OSVER $PID $EXECUTABLE $EXECUTABLE_NAME $PROGRAM_NAME $TMPDIR $THREAD $SCHEDULER␤»
19:58 moritz nwc10: ^^
19:59 nwc10 mmm, bother. that's just going to say "linux"
19:59 nwc10 and "moarvm"
19:59 nwc10 I was rather hoping to show the architecture
20:00 colomon tadzik: library not found for -lrt?
20:01 nwc10 OK. This will do:
20:01 nwc10 $ ./perl6-m -e 'shell("uname -a")'
20:01 nwc10 Linux gcc1-power7.osuosl.org 3.8.8-202.fc18.ppc64p7 #1 SMP Thu Apr 18 14:11:12 MST 2013 ppc64 ppc64 ppc64 GNU/Linux
20:01 nwc10 running spectests
20:02 tadzik colomon: lrt? That doesn't ring a bell. What happens if you remove it?
20:02 colomon it's librt, realtime stuff?
20:02 tadzik I don't recall using it :)
20:02 tadzik ah
20:03 tadzik it's probably from Linux makefile
20:03 tadzik I should really fix Configure.pl :<
20:03 colomon looks like it builds with it removed.
20:03 nwc10 jnthn: patches for dancing bears coming soon.
20:03 pecastro joined #perl6
20:04 colomon argh, Cannot locate native library './sdlwrapper.dylib'
20:04 colomon because the makefile generates a .so instead
20:05 btyler_ colomon: look for "sdlwrapperlib.dylib" in that dir
20:05 btyler_ rename it sdlwrapper.dylib --> success
20:05 colomon no such file
20:06 nwc10 logistics/location fail. There is no tonic here, and whilst at home the whisky isn't fantastic, it is a better choice than here
20:07 btyler_ colomon: oh...did 'make' finish successfully?
20:07 jnthn nwc10: Oh, I've got a nice big bottle of Yeti to drink here :)
20:07 colomon yes?
20:08 colomon or no?
20:09 btyler_ colomon: bizarre. osx 10.9.2 here on latest moar/nqp/rakudo, makefile spat out sdlwrapperlib.dylib, changing makefile or renaming (to ditch the 'lib' suffix) got lib/Steroids/SDL to find it
20:09 btyler_ ls
20:09 btyler_ erg, ww
20:10 colomon I can see -o sdlwrapperlib.dylib in the Makefile
20:10 colomon okay, I touched sdlwrapper.c and now I get the error load and clear.
20:11 daniel-s__ joined #perl6
20:13 colomon I had to add -lSDL2_ttf to the Makefile
20:14 colomon Cannot locate native library './sdlwrapper.dylib'
20:15 colomon grrrr
20:18 tadzik :o
20:18 tadzik I'll goan fix that Configure.pl
20:19 pippo joined #perl6
20:22 colomon it's right there, I cannot imagine why it cannot find it.
20:22 daniel-s__ joined #perl6
20:24 guru joined #perl6
20:24 rurban joined #perl6
20:24 hoverboard joined #perl6
20:26 _sri joined #perl6
20:26 flussence joined #perl6
20:26 clkaoud joined #perl6
20:26 pnu joined #perl6
20:33 dotslashb joined #perl6
20:36 dwarring joined #perl6
20:38 * jnthn just did a patch to optimize out unused %_ using the var stuff in the optimizer
20:39 nwc10 faster dancing bears?
20:39 daniel-s__ joined #perl6
20:39 jnthn Saves the Hash allocation
20:39 jnthn And in theory the low level hash alloc and op to fetch it too
20:39 jnthn Still need to check that spesh's unused detection spots that and kills it
20:41 SevenWolf joined #perl6
20:46 daniel-s__ joined #perl6
20:53 Crazylemon64 joined #perl6
21:01 jnthn hah, with adding some missing :pure it does :)
21:10 colomon joined #perl6
21:19 FROGGS jnthn: another percent faster? :o)
21:20 jnthn Takes off some more of the GC pressure.
21:20 jnthn It's not actually a huge win, though...
21:20 jnthn If the GC sucked more it'd be easier to get wins by reducing allocation... :P
21:20 FROGGS hehe
21:21 * jnthn sees what the latest profile tells him
21:24 jnthn darn, p6decontrv is costly...
21:25 rurban joined #perl6
21:31 timotimo aye, the low-level allocation is a pointer bump and a little thing
21:31 timotimo decont return value?
21:31 jnthn Yeah, but really it's "if it has an rw container take it away and put an ro one there instead"
21:32 jnthn Meaning it allocates that ro container
21:32 jnthn Which is actually down to flattening.
21:33 jnthn I think I once only bothered to do it on non-Iterable things
21:33 jnthn But then itemized Parcel got sad
21:33 jnthn 'cus Parcel ain't Iterable
21:36 dalek rakudo/nom: b2b6b19 | jnthn++ | src/Perl6/ (2 files):
21:36 dalek rakudo/nom: Optimize out %_ when unused.
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2b6b19ac7
21:37 jnthn I should probably try it again including Parcel in the check
21:37 jnthn Or even better
21:37 jnthn Should do away with the C op entirely
21:37 jnthn So that spesh can make the checks cheaper.
21:44 timotimo that sounds like a good idea
21:46 FROGGS java.lang.ClassCastException: __P6opaque__72 cannot be cast to org.perl6.nqp.sixmodel.reprs.VMExceptionInstance
21:46 FROGGS I am throwing from rakudo... do I need to decont there?
21:47 jnthn Uh..hm
21:47 jnthn I doubt it
21:47 jnthn Where are you getting the thing you're trying to cast?
21:47 FROGGS well, I am creating it this way: my Mu $ex := nqp::newexception();
21:47 FROGGS so no decont needed
21:48 FROGGS in a handler made by nqp::handle
21:48 FROGGS ahh, perhaps it is the payload / the label
21:48 FROGGS hmmm, that does not make much sense either
21:48 jnthn yeah...the payload will typically be a P6opaque
21:49 FROGGS but it is unlikely that I want to cast that to a VMEx
21:49 jnthn Yeah
21:50 daniel-s__ joined #perl6
21:54 rurban joined #perl6
21:56 xenoterracide__ joined #perl6
22:05 rurban joined #perl6
22:05 FROGGS gnight all
22:10 jnthn 'night, FROGGS++
22:10 SHODAN joined #perl6
22:12 xenoterracide__ joined #perl6
22:17 dalek nqp/lexopts: 03349b2 | (Stéphane Payrard)++ | src/QRegex/Cursor.nqp:
22:17 dalek nqp/lexopts: Fixing --target=parse on nqp
22:17 dalek nqp/lexopts:
22:17 dalek nqp/lexopts: Was working fine on rakudo
22:17 dalek nqp/lexopts: review: https://github.com/perl6/nqp/commit/03349b24bc
22:17 rurban joined #perl6
22:17 dalek joined #perl6
22:20 masak m: (1, 2, 3).permutations
22:20 camelia rakudo-moar aff2a6: ( no output )
22:20 masak m: say (1, 2, 3).permutations.perl
22:20 camelia rakudo-moar aff2a6: OUTPUT«([1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]).list␤»
22:31 daniel-s__ joined #perl6
22:41 dalek rakudo/nom: ccddd17 | jnthn++ | src/vm/moar/ops/perl6_ops.c:
22:41 dalek rakudo/nom: Avoid unrequired container allocs in p6decontrv.
22:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ccddd17f85
22:43 masak 'night, #perl6
22:52 lizmat well, that was close  :-)
22:55 * jnthn didn't watch it, but heard Austria won and Poland resorted to striptease...
22:56 hoverboard joined #perl6
22:58 lizmat yes, Poland was, what shall I say, blond airheads?
22:59 lizmat jnthn: I just pulled and ran a spectest
22:59 lizmat so far, no immediately gains to be seen
22:59 lizmat one failure, and 2 todo's passing
22:59 jnthn Yeah, you probably need something a bit longer running than spectests for that.
23:00 lizmat not ok 6 - :(:a($x), :b($y)) ~~ :(:a(:b(:c($x))))
23:00 lizmat in S03-smartmatch/signature-signature.t
23:01 jnthn hmm
23:01 jnthn I didn't see that fail here...
23:01 jnthn (As in, just re-checked my last spectest output with latest matches and that file passed)
23:01 lizmat going back 1 commit, see the result then
23:04 lizmat seems to be the %_ commit
23:04 lizmat double checking
23:06 lizmat yup, reverting to aff2a6618ee3d746a4d4f5bdfa91854f54f0f91d makes the pb go away
23:06 jnthn *sigh*
23:07 jnthn I really don't fancy losing that opt.
23:07 lizmat well, maybe the test is bogus (it feels pretty weird to me, anyway)
23:07 * jnthn wonders how on earth it realtes to that test
23:08 jnthn No matter how many times I run it here, I can't get it to fail
23:10 lizmat odd
23:11 lizmat well, I guess we have to wait for a roast from [Coke]  then
23:11 jnthn *nod*
23:11 lizmat m: say :(:a($x), :b($y)) ~~ :(:a(:b(:c($x))))
23:11 camelia rakudo-moar b2b6b1: OUTPUT«True␤»
23:11 jnthn I'm also running with spesh_trace, but that's not meant to make behavior differences...
23:11 lizmat $ perl6 -e 'say :(:a($x), :b($y)) ~~ :(:a(:b(:c($x))))'
23:11 lizmat False
23:12 jnthn uh
23:12 jnthn I get it to say False too
23:12 jnthn But the tests passes?!
23:13 lizmat hmmm.. it is supposed to be False , I see now in the test
23:13 jnthn oh...
23:13 jnthn uh, so why does evalbot get it here as true...
23:13 jnthn m: say :(:a($x), :b($y)) ~~ :(:a(:b(:c($x))))
23:13 camelia rakudo-moar b2b6b1: OUTPUT«True␤»
23:13 jnthn m: say :(:a($x), :b($y)) ~~ :(:a(:b(:c($x)))) for ^20
23:13 camelia rakudo-moar b2b6b1: OUTPUT«False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤False␤True␤False␤False␤False␤False␤False␤False␤False␤»
23:13 jnthn o.O
23:15 lizmat seems like an artefact in the test
23:15 lizmat if I make it the *only* test in the list, it passes
23:16 lizmat ok 1 - :(:a($x), :b($y)) ~~ :(:a(:b(:c($x))))
23:16 jnthn OK. I think that given we're getting unstable behavior from it here on channel too, we might conclude it's not that particular patch...
23:18 rurban joined #perl6
23:19 lizmat If I leave in the last 4 tests, it fails
23:19 lizmat there *is* one test in there for *%_
23:20 lizmat :(:$x, Int :$y, Cool :$z, *%_),            :(*%_),                     False,
23:20 lizmat m: say :(*%_) ~~ :(:x($x), Int :y($y), Cool :z($z), *%_)
23:20 camelia rakudo-moar b2b6b1: OUTPUT«False␤»
23:21 lizmat https://gist.github.com/lizmat/f8f7377b36849a473013
23:22 lizmat is the diff of the test file that is needed to make it fail
23:23 lizmat taking out the line with ":(:$x, Int :$y, Cool :$z, *%_),            :(*%_)," makes it pass again
23:23 lizmat so it seems to be related to :(*%_)
23:23 jnthn I'm unconvinced.
23:24 jnthn The patch you reverted was the one about p6decontrv, not *%_?
23:24 jnthn Also, the nature of the *%_ thing I did wouldn't give unstable behavior, more likely explosive behavior 'cus it'd removed something.
23:24 lizmat I first reverted ccddd17f8538343247623fd076882ca3643c0995 and the pb was still there
23:25 lizmat I then reverted b2b6b19ac74509ff30aee7ef74a1ca142bfe5a81 and the problem went away
23:25 jnthn Hmm
23:26 jnthn But then, why do I not see the issue here...
23:26 lizmat all the tests around the *%_ test are supposed to be False
23:26 lizmat so if they are false for the *wrong* reason, we wouldn't see it
23:27 lizmat I just noticed another test with *%_
23:27 lizmat if I activate that one, and disable the other one, it also fails the test
23:28 jnthn Weird
23:28 lizmat hmmm....  other combinations also fail
23:28 lizmat seems I'm too tired for this now
23:28 jnthn Yeah. Thing is, I think I've seen that test fail randomly in the past too...
23:28 jnthn *nod*
23:28 jnthn We had one other sparodic failure in first.t for a while under spesh
23:29 jnthn During the last days work I've fixed the odd thing that could potentially have caused metastable behavior. I'm running on spesh_trace here, which has those fixes. So maybe it's something around that...
23:29 jnthn Hard to know.
23:29 lizmat ok, let's wait for those changes to merge and see what gives afterwards, ok?
23:30 jnthn Works for me
23:30 jnthn We've got a spesh slot corruption issue to resolve before it can merge, it seems.
23:30 lizmat for me as well... :-)   so gnight jnthn and #perl6!
23:30 jnthn 'night, lizmat
23:31 BenGoldberg joined #perl6
23:59 xragnar_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo