Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-10-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 soh_cah_toa yeah, parrot needs a good `git gc`
00:00 [Coke] it is teh awesome. (now that I'm coming at it from git-think instead of svn-think)
00:00 sorear benabik: I wonder if git gc would improve that.
00:00 [Coke] soh_cah_toa: can you do that on the server side?
00:00 benabik sorear: That's post-gc.
00:00 sorear ah.
00:00 soh_cah_toa [Coke]: i think so. i can't imagine why not
00:00 [Coke] ask dukeleto, I'm sure he'll hook you up.
00:01 flussence [Coke]: I've used it too, but it doesn't seem to play nice with our ridiculously outdated servers hosting the svn repos... it got corrupted after a few commits one time and I had to fix the metadata by hand. Not fun
00:04 diakopter [Coke]: http://trac.parrot.org/parrot/ticket/2196
00:10 [Coke] flussence: I'm using it against svn 1.4 at work.
00:10 [Coke] diakopter++
00:11 flussence I don't remember what ours is offhand, but it predates fsfs
00:11 diakopter [Coke]: it might be a cygwin/Win7 local problem
00:14 diakopter [Coke]: did a rebaseall; trying again
00:20 jlaire I used to get errors like that with cygwin/Win7
00:21 jlaire it broke after some cygwin update failed, iirc
00:21 jlaire I just tried building rakudo with --gen-parrot on cygwin and got a weird error, pasting..
00:21 [Coke] rakudo: enum A <b cq>; enum A <b  d>; print d; print q
00:21 p6eval rakudo ebd4d8: OUTPUT«d»
00:21 [Coke] rakudo: enum A <b q>; enum A <b  d>; print d; print q
00:21 p6eval rakudo ebd4d8: OUTPUT«d»
00:23 [Coke] rakudo: my %h; sub h { say "srsly wtf" }; enum Foo %h;
00:23 p6eval rakudo ebd4d8: OUTPUT«Could not find sub &Foo␤  in block <anon> at /tmp/vKPCKgfUY8:1␤  in <anon> at /tmp/vKPCKgfUY8:1␤␤»
00:23 diakopter [Coke]: didn't help :(
00:23 jlaire I got this error: https://gist.github.com/5e37af95acebab9d3941
00:23 [Coke] rakudo: "/etc/services".IO.WHAT.say # bug?
00:23 p6eval rakudo ebd4d8: OUTPUT«Cannot access attributes in a type object␤  in method print at src/gen/CORE.setting:5038␤  in method say at src/gen/CORE.setting:5046␤  in block <anon> at /tmp/AHHucfspN8:1␤  in <anon> at /tmp/AHHucfspN8:1␤␤»
00:24 jlaire seems to be at the same point as your error
00:24 diakopter jlaire: yeah
00:24 [Coke] rakudo: NaN.Rat.print
00:24 p6eval rakudo ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Rat'␤  in block <anon> at /tmp/IeHlMZa5uE:1␤  in <anon> at /tmp/IeHlMZa5uE:1␤␤»
00:25 [Coke] rakudo: NaN.Rat.say
00:25 p6eval rakudo ebd4d8: OUTPUT«-9.22337203685478e+18␤»
00:25 [Coke] rakudo: say ~<a b>.[^10]
00:26 p6eval rakudo ebd4d8: OUTPUT«a b␤»
00:27 [Coke] rakudo: say &print does Callable
00:27 p6eval rakudo ebd4d8: OUTPUT«print␤»
00:28 [Coke] rakudo: sub foo {}; say &foo does Callable
00:28 p6eval rakudo ebd4d8: OUTPUT«foo␤»
00:30 * [Coke] wonders when rt.perl.org will update to rt4.
00:31 [Coke] phenny: ask moritz if RT #77220 is closable.
00:31 phenny [Coke]: I'll pass that on when moritz is around.
00:33 diakopter jlaire: open a ticket I guess; email tickets@parrot.org
00:35 [Coke] rakudo: class A { multi method a() { }; multi method a() { } }
00:35 p6eval rakudo ebd4d8:  ( no output )
00:36 [Coke] perl6: _~*.A
00:36 p6eval niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        '_' used at line 1â�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) â�¤  at /…
00:36 p6eval ..rakudo ebd4d8:  ( no output )
00:36 p6eval ..pugs: OUTPUT«*** No such subroutine: "&_"␤    at /tmp/f9HF46XuIf line 1, column 1 - line 2, column 1␤»
00:36 [Coke] std: _~*.A
00:36 p6eval std 8b331d2: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    '_' used at line 1â�¤Check failedâ�¤FAILED 00:01 120mâ�¤Â»
00:37 [Coke] std, rakudo: 01
00:37 [Coke] std: 01
00:37 [Coke] rakudo: 01
00:37 p6eval std 8b331d2: OUTPUT«Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that at /tmp/caCAh2Lkb5 line 1:â�¤------> [32m01[33mâ��[31m<EOL>[0mâ�¤ok 00:01 118mâ�¤Â»
00:37 p6eval rakudo ebd4d8:  ( no output )
00:37 sorear [Coke]: Rakudo is lazy about undefined names
00:37 sorear perl6: if 0 { moo; }
00:38 [Coke] rakudo: say "a" ~~ m:nth(Mu)/a/
00:38 p6eval pugs, rakudo ebd4d8:  ( no output )
00:38 p6eval ..niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'moo' used at line 1â�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) â�¤ …
00:38 p6eval rakudo ebd4d8: OUTPUT«=> <a>␤␤»
00:38 [Coke] sorear: I'm just testing snippets from tickets.
00:42 [Coke] rakudo: my %foo XX= 1;
00:43 [Coke] evalbot?
00:45 [Coke] $ ./perl6 -e 'multi a (Str $a, Str $b) { [+$a, +$b] }; multi a (Array $a,$b where "+") { [+] @($a) }; say ("1", "2", "+").reduce: &a;'
00:45 [Coke] can only reduce with arity 2 for now
00:45 [Coke] gah.
00:45 [Coke] in method reduce at src/gen/CORE.setting:4207
00:45 [Coke] sorry
00:45 [Coke] in method reduce at src/gen/CORE.setting:1029
00:45 [Coke] rakudo: multi sub postfiz:<!>($a) { [*] 1..$a }
00:45 p6eval rakudo ebd4d8:  ( no output )
00:53 * [Coke] thinks 24 tickets is a nice round number.
00:53 benabik [Coke]: In octal, sure.
00:54 [Coke] ugh. the tests needed report doesn't tell you how many tickets it found.
00:55 [Coke] Everything's rounder in octal.
00:55 [Coke] 39 tickets closable with tests.
00:58 arnsholt [Coke]: I want a big birthday party for my thirty-second =)
01:05 preflex_ joined #perl6
01:16 whiteknight joined #perl6
01:23 packetknife joined #perl6
01:40 colomon [Coke]++
01:57 dalek niecza/serialize: 8579c2d | sorear++ | / (4 files):
01:57 dalek niecza/serialize: Implement method definition, stubbing of packages
01:57 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/8579c2d435
02:02 packetkn_ joined #perl6
03:30 drbean joined #perl6
03:39 drbean joined #perl6
03:40 drbean left #perl6
04:14 envi joined #perl6
04:23 bbkr_ joined #perl6
04:25 butterflykisser joined #perl6
04:27 kmwallio joined #perl6
04:53 Sarten-X joined #perl6
05:04 mberends joined #perl6
05:20 tokuhiro_ joined #perl6
05:23 molaf joined #perl6
05:45 birdwindupbird joined #perl6
05:47 alvis joined #perl6
05:48 kaare_ joined #perl6
05:53 daniel-s joined #perl6
06:02 moritz good morning
06:02 phenny moritz: 00:31Z <[Coke]> ask moritz if RT #77220 is closable.
06:02 moritz \o/ < 800 tickets!!
06:03 mberends \o/
06:03 mberends guten moritz morgen
06:04 sorear good morning moritz
06:05 cotto joined #perl6
06:11 moritz rakudo: sub foo { say "bar" }; my $x = 'foo'; ::$x()
06:11 p6eval rakudo ebd4d8: OUTPUT«===SORRY!===␤Cannot look up empty name␤»
06:15 packetknife joined #perl6
06:30 wamba joined #perl6
06:36 kfo joined #perl6
06:41 * sorear sleep
06:52 russellw left #perl6
07:03 espadrine joined #perl6
07:12 y3llow_ joined #perl6
07:43 MayDaniel joined #perl6
07:58 masak joined #perl6
07:58 masak goot mornink, #perl6.
07:59 masak < 800 !? wow!
07:59 masak [Coke]++ moritz++
08:00 masak still, it's at 797. I just need to find three bugs... :P
08:06 eiro :))
08:15 hanekomu joined #perl6
08:29 tokuhiro_ joined #perl6
08:31 tokuhiro_ joined #perl6
08:37 masak here's another way to implement permutations, courtesy of D. E. Knuth:
08:37 masak nom: sub ix($n) { !$n && [0] || map { [$^a, @^b] }, (0..$n X [ix $n-1]) }; sub perms(@a) { map { my $c = +@a; splice my @p, @^i[--$c], 0, $_ for reverse @a; [@p] }, ix @a-1 }; .join.say for perms <a b c>
08:37 p6eval nom ebd4d8: OUTPUT«Could not find sub &splice␤  in block <anon> at /tmp/wbpfmhnxhp:1␤  in method reify at src/gen/CORE.setting:3747␤  in method reify at src/gen/CORE.setting:3652␤  in method reify at src/gen/CORE.setting:3652␤  in method gimme at src/gen/CORE.setting:3989␤  in method ea…
08:37 masak oops.
08:37 moritz nom: 'foo' ~~ /\w+/; $/.print
08:37 masak b: sub ix($n) { !$n && [0] || map { [$^a, @^b] }, (0..$n X [ix $n-1]) }; sub perms(@a) { map { my $c = +@a; splice my @p, @^i[--$c], 0, $_ for reverse @a; [@p] }, ix @a-1 }; .join.say for perms <a b c>
08:37 p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Match'␤  in block <anon> at /tmp/84VOgEB0cY:1␤  in <anon> at /tmp/84VOgEB0cY:1␤␤»
08:37 p6eval b 1b7dd1: OUTPUT«abc␤acb␤bac␤cab␤bca␤cba␤»
08:37 * masak submits rakudobug about missing 'splice'
08:37 moritz nom: 1.print
08:37 p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Int'␤  in block <anon> at /tmp/LxVuLTY_fS:1␤  in <anon> at /tmp/LxVuLTY_fS:1␤␤»
08:38 moritz it's curious that so far, nobody has complained about a missing Any.print or Mu.print :-)
08:38 moritz nom: say 'foo' ~~ /<print>+/
08:38 p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Cursor'␤  in regex <anon> at /tmp/E5Vz9au7CZ:1␤  in method ACCEPTS at src/gen/CORE.setting:6244␤  in block <anon> at /tmp/E5Vz9au7CZ:1␤  in <anon> at /tmp/E5Vz9au7CZ:1␤␤»
08:38 masak moritz: well, two things: 'say' is commoner than 'print', and 'print' is commoner than '.print' :)
08:40 moritz nom: print 1, 2, 3
08:40 p6eval nom ebd4d8: OUTPUT«123»
08:40 moritz nom: say 1, 2, 3
08:40 p6eval nom ebd4d8: OUTPUT«123␤»
08:40 moritz nom: say (1, 2, 3)
08:40 p6eval nom ebd4d8: OUTPUT«1 2 3␤»
08:40 nebuchadnezzar joined #perl6
08:41 masak nom: say "nebuchadnezzar".comb.sort.join
08:41 p6eval nom ebd4d8: OUTPUT«aabcdeehnnruzz␤»
08:42 nebuchadnezzar hello
08:42 masak ehllo :)
08:42 nebuchadnezzar erf, you are more up to date than me
08:42 masak how so?
08:43 nebuchadnezzar the difference between helo and EHLO ;-)
08:43 masak actually, I was just giving you an alphabetically sorted greeting :P
08:44 nebuchadnezzar masak: ha ok
08:45 nebuchadnezzar updates done, back to work!
08:45 nebuchadnezzar see you
08:47 masak o/
08:48 masak b: 42.print
08:48 p6eval b 1b7dd1: OUTPUT«42»
08:48 masak nom: 42.print
08:48 p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Int'␤  in block <anon> at /tmp/MpLbDODRFu:1␤  in <anon> at /tmp/MpLbDODRFu:1␤␤»
08:48 * masak submits rakudobug about missint .print
08:48 masak ...crediting moritz++ with the find.
08:53 moritz rakudo: sub foo { "OH NOES" }; constant foo = 5; say foo
08:53 p6eval rakudo ebd4d8: OUTPUT«5␤»
08:53 moritz rakudo: sub foo { "OH NOES" }; constant foo = 5; say foo()
08:53 p6eval rakudo ebd4d8: OUTPUT«OH NOES␤»
08:53 moritz rakudo: constant foo = 5; sub foo { "OH NOES" }; say foo
08:53 p6eval rakudo ebd4d8: OUTPUT«5␤»
08:53 moritz rakudo: constant foo = 5; sub foo { "OH NOES" }; say foo()
08:53 p6eval rakudo ebd4d8: OUTPUT«OH NOES␤»
08:53 masak hm :)
08:53 moritz std: constant foo = 5; sub foo { "OH NOES" }; say foo()
08:53 p6eval std 8b331d2: OUTPUT«ok 00:01 121m␤»
08:53 masak looks good to me.
08:53 moritz masak: yes, another closable ticket :-)
08:53 masak dang! :P
08:56 masak perl6: my $a = 1; $a **= 2; say $a
08:56 p6eval pugs, rakudo ebd4d8, niecza v10-18-g5be99bf: OUTPUT«1␤»
08:56 masak oh wait :)
08:56 masak perl6: my $a = 2; $a **= 2; say $a
08:56 p6eval pugs, rakudo ebd4d8, niecza v10-18-g5be99bf: OUTPUT«4␤»
08:57 masak perl6: my $a = 2; for ^16 { say $a; $a **= 2 }
08:57 p6eval niecza v10-18-g5be99bf: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤18446744073709551616␤340282366920938463463374607431768211456␤115792089237316195423570985008687907853269984665640564039457584007913129639936␤1340780792994259709957402499820584612747936582059239337772356144372176403007354697680187…
08:57 p6eval ..rakudo ebd4d8: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤»…
08:57 p6eval ..pugs: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤18446744073709551616␤340282366920938463463374607431768211456␤115792089237316195423570985008687907853269984665640564039457584007913129639936␤1340780792994259709957402499820584612747936582059239337772356144372176403007354697680187429816690342769003…
08:57 masak niecza++ pugs++ rakudo--
08:59 dalek roast: 6875b22 | moritz++ | S04-declarations/constant.t:
08:59 dalek roast: constants and subs of the same name (RT #69522)
08:59 dalek roast: review: https://github.com/perl6/roast/commit/6875b2252a
08:59 dalek roast: 55356a5 | moritz++ | S06-signature/slurpy-params.t:
08:59 dalek roast: remove outdated test
08:59 dalek roast: review: https://github.com/perl6/roast/commit/55356a5eda
09:03 snarkyboojum karma rakudo
09:03 aloha rakudo has karma of 25.
09:03 masak nom: class A { role B {} }; A::B.new; say "alive"
09:03 p6eval nom ebd4d8: OUTPUT«alive␤»
09:03 snarkyboojum surely that should be higher :)
09:03 masak nom: role A { role B {} }; A::B.new; say "alive"
09:03 p6eval nom ebd4d8: OUTPUT«Could not find symbol 'A::&B'␤  in sub die at src/gen/CORE.setting:416␤  in block <anon> at /tmp/2v9vPOjw0d:1␤  in <anon> at /tmp/2v9vPOjw0d:1␤␤»
09:03 * masak submits rakudobug
09:03 snarkyboojum karma std
09:03 aloha std has karma of 5.
09:03 snarkyboojum karma niecza
09:03 aloha niecza has karma of 37.
09:03 snarkyboojum :O
09:03 masak niecza++
09:04 snarkyboojum hehe
09:04 snarkyboojum std++ # for rocking, generally
09:05 snarkyboojum rakudo++ # for being my current Perl 6 implementation of choice :D
09:06 masak having used Niecza actively for the past few weeks, I sincerely believe it should be more people's implementation of choice.
09:07 masak the missing features aren't as many as you'd think, and the bug turnaround is fantastic! :)
09:08 flussence I've been trying to make Text::Wrap work in it, it supports the one bit of regex I needed to make the code less horrible :D
09:10 mberends joined #perl6
09:11 flussence (it also currently outputs nothing but \n characters there... I'll have to figure that one out)
09:11 snarkyboojum masak: Niecza rocks, but everytime I've tried to use it in anger it's missing stuff I expect to have, more so than Rakudo
09:11 snarkyboojum perhaps that's changing :)
09:12 masak I think so.
09:12 masak just look at http://perl6.org/compilers/features :)
09:12 snarkyboojum the list of features comparison certainly shows it's close
09:12 snarkyboojum yeah that
09:13 snarkyboojum and sorear++ is very responsive - no doubt about it, and scarily prolific :)
09:13 masak close in some places, tied in some, more advanced in others.
09:15 * mberends has a Niecza Notepad under construction :)
09:15 snarkyboojum yeah.. looking at that high level list, it's definitely catching up :)
09:15 masak mberends: wow!
09:16 snarkyboojum pity I can't run gtk niecza stuff on my mac :|
09:19 tadzik good morning
09:19 mberends snarkyboojum: colomon++ does, maybe he can help you
09:20 snarkyboojum mberends: really! I thought it flat out wasn't supported
09:21 mberends snarkyboojum: bbkr++ as well
09:22 snarkyboojum maybe I should try harder at some point :)
09:22 dalek rakudo/nom: fb48457 | moritz++ | src/core/ (2 files):
09:22 dalek rakudo/nom: restrain IO.print and say to defined invocants; add a Mu.print
09:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb4845759f
09:24 mberends snarkyboojum: yes, definitely worth the effort :)
09:24 MayDaniel joined #perl6
09:25 snarkyboojum colomon: so…. :)
09:25 dalek roast: a7cc650 | moritz++ | S03-junctions/autothreading.t:
09:25 dalek roast: autothreading over named params (RT #69863)
09:25 dalek roast: review: https://github.com/perl6/roast/commit/a7cc650a85
09:26 moritz rakudo: 'a' ~~ /a/; say ($/.orig).rindex('a', 1)
09:26 p6eval rakudo ebd4d8: OUTPUT«substring not found␤  in method rindex at src/gen/CORE.setting:1544␤  in block <anon> at /tmp/LFU_1b9s_x:1␤  in <anon> at /tmp/LFU_1b9s_x:1␤␤»
09:26 moritz rakudo: 'a' ~~ /a/; say ($/.orig).rindex('a')
09:26 p6eval rakudo ebd4d8: OUTPUT«0␤»
09:27 orafu joined #perl6
09:29 dalek roast: 01db9ce | moritz++ | S05-match/capturing-contexts.t:
09:29 dalek roast: correct and unfudge tests for RT #70003
09:29 dalek roast: review: https://github.com/perl6/roast/commit/01db9ceb90
09:30 moritz nom: say 'aa' ~~ /(.)$1/
09:30 p6eval nom ebd4d8: OUTPUT«=> <a>␤ 0 => <a>␤␤»
09:30 moritz this... shouldn't match
09:30 moritz nom: my $a; say so  'aaa' ~~ /$a/
09:30 p6eval nom ebd4d8: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤Bool::True␤»
09:30 moritz RONG
09:38 * masak submits rakudobug
09:38 masak awesomest presentation I've seen in quite a while: http://www.jamisbuck.org/presentations/rubyconf2011/index.html
09:39 masak this guy is more into labyrinth-making algorithms than I am!
09:39 * masak slightly jealous :)
09:39 tadzik oh, this one is nice
09:39 masak yes! very good use of medium.
09:40 masak I should draw by hand and scan more. the result can be very nice.
09:40 masak and then integrated JS in the presentation is really nice, too.
09:40 snarkyboojum mberends: can't find any reference to colomon++ getting gtk and Niecza going on OS X - he's doing lots of trig stuff it seems - help me out? :D
09:42 masak moritz: ooc, how do you expect an undefined interpolated value to match?
09:43 masak moritz: always fail?
09:46 mberends snarkyboojum: all I know is colomon uses OS X all the time, and he has run all the Niecza Gtk examples. Furthermore, he's planning to do some bitmap graphics himself. I'll do a little search. http://irclog.perlgeek.de/perl6/2011-09-28#i_4494221
09:46 snarkyboojum mberends: great - cheers - will quiz him when he's around
09:50 mberends snarkyboojum: don't say you never found these: http://mjhutchinson.com/journal/2010/01/25/integrating_gtk_application_mac http://gtk-osx.sourceforge.net/ http://live.gnome.org/GTK%2B/OSX/Integration
09:51 snarkyboojum mberends: I must have stopped when I came across a page which said "OS X not supported". Lazy me ;)
09:51 mberends snarkyboojum: that might have been an *old* page. Those still keep turning up :)
09:52 snarkyboojum mberends: yeah, I'm normally more thorough :) Thanks for the links.. will check it out
09:52 pernatiy joined #perl6
09:53 moritz masak: always fail
09:54 moritz masak: we had a long discussion about that some months or years ago
09:55 moritz rakudo: "foo" ~ my $a = "bar"
09:55 p6eval rakudo ebd4d8: OUTPUT«Use of uninitialized value in string context␤Cannot assign to a non-container␤  in block <anon> at /tmp/9JKRw8W1SH:1␤  in <anon> at /tmp/9JKRw8W1SH:1␤␤»
09:57 snarkyboojum mberends: oh that's right, it's all coming back to me. It had something to do with the monodevelop site taking me in circles when trying to d/l the GTK# package for OS X :D
10:01 mishin joined #perl6
10:04 snarkyboojum masak: ah - yes, saw that preso the other day, thought of your algorithmic endeavours :)
10:06 masak it's nice to see others set the bar high :)
10:10 moritz rakudo: class A {}; class B {}; subset C of A & B; say C ~~ A; say B ~~ C
10:10 p6eval rakudo fb4845: OUTPUT«Type check failed in assignment to '$v'; expected 'Mu' but got 'C'␤  in method REIFY at src/gen/CORE.setting:4366␤  in method reify at src/gen/CORE.setting:3653␤  in method reify at src/gen/CORE.setting:3653␤  in method gimme at src/gen/CORE.setting:3990␤  in metho…
10:11 moritz rakudo: class A {}; class B {}; subset C of A where B; say C ~~ A; say B ~~ C
10:11 p6eval rakudo fb4845: OUTPUT«Bool::True␤Bool::False␤»
10:16 moritz nom: role A { has $.x }; say A("foo").x
10:16 p6eval nom fb4845: OUTPUT«Could not find sub &A␤  in block <anon> at /tmp/gQW_FNtTIA:1␤  in <anon> at /tmp/gQW_FNtTIA:1␤␤»
10:16 moritz jnthn: that form is missing in nom, and used quite a bit in the traits tests
10:18 dalek roast: 3f79756 | moritz++ | S14-traits/routines.t:
10:18 dalek roast: port a few trait tests to the new spec
10:18 dalek roast: review: https://github.com/perl6/roast/commit/3f797566aa
10:21 masak moritz: "that form"? you mean there's wording in the spec allowing explicitly for calling a constructor with one positional argument if the class only has one public attribute?
10:22 moritz masak: s/class/role/
10:25 moritz rakudo: ({nextsame})()
10:25 p6eval rakudo fb4845: OUTPUT«No dispatcher in scope␤  in block <anon> at /tmp/UJdC84qM1y:1␤  in block <anon> at /tmp/UJdC84qM1y:1␤  in <anon> at /tmp/UJdC84qM1y:1␤␤»
10:27 masak moritz: oh, right.
10:27 masak for some reason, I buy that much more easily.
10:27 * masak submits rakudobug
10:38 whiteknight joined #perl6
10:43 ingy o/
10:59 masak \o
11:08 tokuhir__ joined #perl6
11:18 tadzik oh, can we merge this funny branch of nqp and target Parrot HEAD now?
11:18 moritz yep
11:18 tadzik I'll try it
11:19 moritz it's not hard, it merges cleanly :-)
11:20 tadzik nice :) I'll just see if the Parrot master is clean on spectest and such
11:22 moritz rakudo: grammar Integer { rule TOP { x } }; Integer.parse("x")
11:22 p6eval rakudo fb4845:  ( no output )
11:22 tadzik hmm, doesn't merge cleanly for me
11:23 moritz rakudo: grammar Integer { rule TOP { x } }; say Integer.parse("x")
11:23 p6eval rakudo fb4845: OUTPUT«=> <x>␤␤»
11:23 moritz tadzik: are you nqp/master ?
11:23 tadzik moritz: yep
11:23 tadzik are you sure you're up to date?
11:33 arthur-_ joined #perl6
11:36 Psyche^ joined #perl6
11:38 masak ok, I'm off to the grocery store. but when I come back, my plan is to sit down with the macros branch and do the last bits of work to implement D1. and then I'll push it out to the world.
11:38 tadzik oh oh
11:38 masak in my opinion, once it does D1, it can already be merged with the nom branch -- and then you can all play with macros :)
11:39 masak &
11:41 dalek nqp: a430d8d | tadzik++ | / (10 files):
11:41 dalek nqp: Merge branch 'kill-useless-defaults'
11:41 dalek nqp:
11:41 dalek nqp: Conflicts:
11:41 dalek nqp: src/PAST/NQP.pir
11:41 dalek nqp: tools/build/PARROT_REVISION
11:41 dalek nqp: review: https://github.com/perl6/nqp/commit/a430d8d8be
11:43 dalek rakudo: d4cb879 | tadzik++ | tools/build/NQP_REVISION:
11:43 dalek rakudo: Bump NQP_REVISION
11:43 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/d4cb8793c5
11:43 tadzik gah, I fell into rakudo-master trap again
11:43 buubot_backup joined #perl6
11:44 dalek rakudo/nom: 4880cea | tadzik++ | tools/build/NQP_REVISION:
11:44 dalek rakudo/nom: Bump NQP_REVISION
11:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4880cea9fe
11:45 tadzik rakudo/master should not be on github, right?
11:47 moritz huh, rakudo/master doesn't even have a NQP_REVISION, I thought?
11:47 moritz tadzik: ah, I've done the merge previously (and undid it) in my local repo, so it had the conflict resolution recorded already
11:48 tadzik maybe I accidentally created rakudo/master as a child of nom some time ago, and now accidentally pushed it
11:48 tadzik there should be no master on github, si?
11:49 * moritz 'si'nks so :-)
11:49 tadzik a'right, I'll remove it
11:49 tadzik sink!
11:49 tadzik done
12:09 colomon snarkyboojum: I don't know if I have any useful insights on getting the Niecza Gtk stuff to run on OS X, it Just Worked right out of the box for me.
12:16 woosley joined #perl6
12:16 woosley left #perl6
12:19 moritz the insight is "Just Duckin' Foo it!" :-)
12:21 snarkyboojum colomon: ah - ok. I get errors complaining about not being able to find glibsharpglue dlls or some such
12:22 colomon how did you install mono?
12:22 snarkyboojum colomon: binary package/installer off the website
12:22 colomon yeah, okay, that's what I did too.  hmm.
12:22 snarkyboojum colomon: weird - which version?
12:22 im2ee joined #perl6
12:23 colomon snarkyboojum: Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 09:14:01 MDT 2011)
12:23 snarkyboojum colomon: ah ok - I have Mono JIT compiler version 2.10.5 (tarball Mon Aug 22 20:38:08 EDT 2011)
12:24 colomon I have a hard time imagining they just removed Gtk support between versions...
12:24 GlitchMr joined #perl6
12:26 moritz maybe there are different packages? like "full" and "bare" or so?
12:27 snarkyboojum colomon: I'm trying to run mberends' old gtk example mono run/Niecza.exe calculator.pl
12:27 snarkyboojum colomon: sane invocation?
12:28 snarkyboojum no idea about this stuff :D esp publickeytokens and culture crapola :)
12:29 colomon snarkyboojum: I don't have that script, but I've been running things like so:
12:29 colomon mono run/Niecza.exe examples/gtk1.pl
12:29 jnthn afternoon, #perl6
12:29 phenny jnthn: 30 Sep 23:10Z <[Coke]> tell jnthn I need some guidance on RT67364 - it refers to a 2 year old irc log, says there are examples, I don't see any. You are namedropped.
12:29 snarkyboojum colomon: ok - that doesn't work for me either
12:29 snarkyboojum same issue
12:30 snarkyboojum meh - should be easier than spending a few hours trying to get it to work :)
12:30 im2ee hello! :)
12:30 colomon snarkyboojum: what's the exact error message?  that will let me see where the library in question lives on my machine....
12:33 snarkyboojum colomon: something like this https://gist.github.com/1256005
12:34 jnthn phenny: tell [Coke] It appears that the issue being discussed was resolved a different way (required named parameters). And I know that works (we use it in the setting, for one). Overall, traits are much more robust in nom, so I think we can safely close that one.
12:34 phenny jnthn: I'll pass that on when [Coke] is around.
12:35 colomon snarkyboojum: I may be getting that from a MacPorts install
12:35 snarkyboojum colomon: sorry... getting what?
12:35 snarkyboojum colomon: which version of os x?
12:36 colomon glibsharpglue-2
12:36 dalek roast: 84330f5 | moritz++ | S05-grammar/parse_and_parsefile.t:
12:36 dalek roast: correct and unfudge parse_and_parsefile.t
12:36 dalek roast: review: https://github.com/perl6/roast/commit/84330f51f0
12:37 colomon OS X 10.6.8
12:37 dalek rakudo/nom: 5a38367 | moritz++ | / (2 files):
12:37 dalek rakudo/nom: implement Grammar.parsefile, run a test for it
12:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a38367c26
12:37 snarkyboojum colomon: Mmm.. 10.7.1 here
12:37 snarkyboojum colomon: LD_LIBRARY_PATH set?
12:39 colomon I don't believe so.
12:39 snarkyboojum colomon: fun :)
12:42 snarkyboojum colomon: seems people have had similar issues between versions of mono, albeit several versions ago..
12:43 snarkyboojum who knows - shouldn't be this hard anyway :)
12:46 klavs joined #perl6
12:50 jnthn moritz: Are you sure A("foo").x is not spec fossil? The traits tests are *old*.
12:50 jnthn I know that $x does SomeRole("foo") should work
12:50 jnthn But had always considered that one a special syntactic form.
12:51 moritz jnthn: I'm only sure about the role form, which nom is missing so far
12:54 klavs hey guys! i am new to perl. how can i read binary data from binary file?
12:55 jnthn moritz: Yeah, I know that bit is still to do.
12:55 jnthn Maybe I look at it today. We'll see. :)
12:55 jnthn ugh :(
12:55 jnthn Parrot build fails for me :(
12:56 jnthn src/runcore/subprof.c(152) : error C2054: expected '(' to follow 'inline'
12:57 mberends klavs: this channel is for developing a new version of perl. Try #perlhelp or #perl
12:57 klavs thanks
13:01 downtown joined #perl6
13:03 downtown a
13:05 jnthn ugh, github's down agan.
13:05 jnthn *again
13:13 downtown joined #perl6
13:23 masak they should invent a way to distribute the version control over all users, circumventing the need for something central altogether...
13:23 masak :P
13:23 jnthn We could call it distributed version control!
13:24 * masak .oO( distracted version control )
13:24 masak im2ee: hi, how's the Perl 6 going?
13:25 im2ee hi masak. I'm training now - so, good at all. :)
13:26 masak yay
13:27 * masak imagines im2ee running on a treadmill, coding Perl 6
13:28 * flussence imagines gittokenring.com
13:29 masak THE TOKEN MUST NEVER STOP
13:29 im2ee_ joined #perl6
13:29 im2ee_ masak, i mean that i'm writing some code! :)
13:29 im2ee_ hah
13:29 masak im2ee_: yes, I know. :P
13:30 masak im2ee_: and good for you!
13:30 masak remember that sharing makes the learning go faster!
13:31 flussence (hm, that could be a workable idea. Instead of everything going through one site, it just redirects you to project members' git servers in a round robin)
13:31 masak flussence: patent it!
13:32 flussence nah, I'll just be lazy and let someone else make it, then people can point to this as prior art if they try :)
13:32 * masak .oO( "I call it... the gittyloop." )
13:39 im2ee_ How to clear out an array? :)
13:40 jnthn @array = ();
13:41 masak im2ee_: but chances are you don't need to, and could write it in a better way. :)
13:42 masak put differently, clearing out an array is a bit of a code smell. just ever so slightly.
13:43 im2ee_ Ehh, right (why i'm not thinking :D ? ). Thanks jnthn.
13:43 im2ee_ masak, which better way?
13:45 f00li5h joined #perl6
13:46 masak im2ee_: arrays are made for putting things in them. if you're clearing the array, you're doing the *opposite* of what it was meant for. just saying that's not ideal -- without seeing the code I can not suggest a better way. :)
13:46 masak and the use case may indeed be entirely legitimate, too. it depends.
13:57 masak im2ee_: generally, I've been settling on a style of coding where I don't "overwrite" values in variables. filling up an array is nice, but if I need to take away values, I always consider whether I don't actually need a new array instead.
13:58 masak im2ee_: it's sort of moving towards a functional programming thinking.
14:03 masak im2ee_: does that make sense?
14:09 im2ee_ Yes. :) Thank You masak++
14:10 GlitchMr joined #perl6
14:11 alvis joined #perl6
14:11 masak greetings, GlitchMr and alvis.
14:11 im2ee_ nom: if defined($s) { say 1; }
14:11 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/TTutkhKj5o:1)␤»
14:11 GlitchMr Hi
14:11 im2ee_ How to check this?
14:12 GlitchMr nom: say 1 if defined $s
14:12 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/BxYKs5j04H:1)␤»
14:12 GlitchMr ...
14:12 mauke check what?
14:12 GlitchMr nom: say 1 if defined my $s
14:12 p6eval nom 5a3836:  ( no output )
14:12 GlitchMr nom: my $s = undef; say 1 if defined $s
14:12 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤     Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤  Nil as an empty list,␤  !*.defined as a matcher or method,␤     Any:U as a type constraint␤     or
14:12 p6eval ..fa…
14:12 GlitchMr ..fa?
14:13 GlitchMr But I'm not sure if Perl 6 even has defined
14:13 GlitchMr nom: say defined 1
14:13 p6eval nom 5a3836: OUTPUT«Bool::True␤»
14:13 GlitchMr ...
14:13 im2ee_ mauke, check that there is defined a variable.
14:13 GlitchMr nom: no warnings; say 1 unless defined $s
14:13 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/pD3nqAK_cN:1)␤»
14:14 GlitchMr nom: no warnings; no strict; say 1 unless defined $s
14:14 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/WDkbMSg5Gt:1)␤»
14:14 GlitchMr ....
14:14 mauke im2ee_: why?
14:14 mauke im2ee_: and what do you mean by "defined"?
14:14 GlitchMr http://perldoc.perl.org/functions/defined.html
14:14 mauke that's perl5
14:14 im2ee_ method execute ( Str $str? )
14:15 im2ee_ i want to check if there is $str in arguments.
14:15 GlitchMr nom: my $nom; say defined $nom;
14:15 p6eval nom 5a3836: OUTPUT«Bool::False␤»
14:16 GlitchMr If your program uses not defined values for design, there is something wrong.
14:16 flussence nom: sub a(:$a = Mu, :$b = Mu) { say $b.defined }; a(); a(:b)
14:16 p6eval nom 5a3836: OUTPUT«Bool::False␤Bool::True␤»
14:16 GlitchMr rakudo: say $]
14:16 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$]"␤»
14:17 GlitchMr rakudo: say $$
14:17 im2ee Ok, i'll use multi :)
14:17 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$$"␤»
14:17 GlitchMr > $]
14:17 GlitchMr Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at line 1, near "\n"
14:17 GlitchMr ...
14:17 GlitchMr It's like that for me...
14:19 mauke perl6: sub foo(Str $str) { $str }; foo 2
14:19 masak im2ee: 'defined($s)' works fine, but (1) you still have to declare $s beforehand with 'my', and (2) there's no real difference between an undefined value passed in and no value passed in.
14:19 p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: Nominal type check failed in binding Str $str in MAIN foo; got Int, needed Str␤  at /tmp/OKx6yEOhYU line 0 (MAIN foo @ 0) ␤  at /tmp/OKx6yEOhYU line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C102…
14:19 p6eval ..rakudo 5a3836: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤  in sub foo at /tmp/ZVbytFZGgN:1␤  in block <anon> at /tmp/ZVbytFZGgN:1␤  in <anon> at /tmp/ZVbytFZGgN:1␤␤»
14:19 p6eval ..pugs:  ( no output )
14:20 mauke perl6: sub foo(Str $str = 2) { $str }; foo "asdf"
14:20 p6eval pugs, rakudo 5a3836, niecza v10-18-g5be99bf:  ( no output )
14:20 im2ee Ok, clear. Have another question.
14:20 masak shoot :)
14:21 im2ee $str .= ';' unless $str ~~ /;$/;
14:21 im2ee Quoted method name requires parenthesized arguments at line 15, near " unless $s"
14:21 im2ee What is wrong?
14:21 masak im2ee: it's '~='
14:21 masak not '.='
14:21 GlitchMr rakudo: say $*PERL_VERSION
14:21 im2ee Ah.. right
14:21 p6eval rakudo 5a3836: OUTPUT«Dynamic variable $*PERL_VERSION not found␤  in sub DYNAMIC at src/gen/CORE.setting:239␤  in block <anon> at /tmp/XOyICBVDYx:1␤  in <anon> at /tmp/XOyICBVDYx:1␤␤»
14:21 im2ee sorry ..
14:21 GlitchMr ...
14:21 masak im2ee: recall that the dot has been appropriated for method calls, not string concat :)
14:21 masak im2ee: also, don't apologise :)
14:22 mauke aw, it was a sad day when perl6 switched away from _
14:22 masak mauke: not for me :D
14:23 GlitchMr rakudo: say <arrays are <nice forever>>.perl
14:23 p6eval rakudo 5a3836: OUTPUT«Bool::True␤»
14:23 GlitchMr Nice. I'll use it in my obfuscated program... :P
14:23 masak o.O
14:23 GlitchMr ok, not exactly
14:23 masak oh!
14:24 masak it parses as say (<arrays are <nice forever> > .perl)
14:25 GlitchMr rakudo: say ().perl
14:25 p6eval rakudo 5a3836: OUTPUT«()␤»
14:25 GlitchMr Makes sense
14:25 masak rakudo: say ().perl.perl
14:25 p6eval rakudo 5a3836: OUTPUT«"()"␤»
14:26 masak rakudo: say ().perl.perl.perl
14:26 p6eval rakudo 5a3836: OUTPUT«"\"()\""␤»
14:26 GlitchMr rakudo: say ("Word").perl.perl.perl.perl.perl
14:26 p6eval rakudo 5a3836: OUTPUT«"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"Word\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""␤»
14:26 GlitchMr Escaping is fun!
14:26 masak each run of backslashes are 2 ** $N - 1 in number.
14:26 GlitchMr ~2+3
14:26 GlitchMr rakudo: say ~2+3
14:26 p6eval rakudo 5a3836: OUTPUT«5␤»
14:26 GlitchMr how?
14:27 masak GlitchMr: (~2) + 3
14:27 GlitchMr So...
14:27 masak prefix ops are loose, but not that loose :)
14:27 GlitchMr rakudo: say "2"+3
14:27 p6eval rakudo 5a3836: OUTPUT«5␤»
14:27 GlitchMr ...
14:27 masak aye.
14:27 masak Perl reaches into your string and numifies it for you.
14:28 GlitchMr $php -r "print '2'+3;"
14:28 GlitchMr 5
14:28 GlitchMr ...
14:28 masak PHP does, too, it seems.
14:28 GlitchMr $ perl -e "print '2'+3"
14:28 GlitchMr 5
14:28 GlitchMr ...
14:28 GlitchMr Actually, it makes sense...
14:29 GlitchMr For JS it's 23... but that's expected as + is overloaded...
14:31 masak GlitchMr: IIRC, it depends on whether you do "2" = 3 or 3 + "2" in JS.
14:31 masak and by the way, + is overloaded in Perl 6 too, and it still doesn't suck :)
14:32 masak it does different things for Int, Num, and Rat, for example.
14:32 masak but the idea is the same: numeric addition.
14:32 GlitchMr But those types are numeric...
14:32 GlitchMr So technically they do this same thing, just on barely changed types.
14:33 GlitchMr > (0.1+0.2)*10/3-1
14:33 GlitchMr 0
14:33 GlitchMr > 0.1/100000000000000000000000
14:33 GlitchMr -6.27417313425164e-10
14:33 GlitchMr -6.27417313425164e-10 O_o
14:34 GlitchMr (yeah, I know, floats...)
14:35 masak nom: say 0.1 / 100000000000000000000000
14:35 p6eval nom 5a3836: OUTPUT«Inf␤»
14:35 moritz nom: say  (0.1+0.2)*10/3-1
14:35 masak that's way off :)
14:35 p6eval nom 5a3836: OUTPUT«0␤»
14:35 GlitchMr INFINITY O_o
14:35 GlitchMr No, seriously. How it is infinity...
14:36 GlitchMr nom: ?1?'i know':'the Perl 6 is using ?? and !! :P'
14:36 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near "'i know':'"␤»
14:37 GlitchMr rakudo: ?1?'i know':'the Perl 6 is using ?? and !! :P'
14:37 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near "'i know':'"␤»
14:37 GlitchMr niecza: ?1?'i know':'the Perl 6 is using ?? and !! :P'
14:37 p6eval niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/_M7KFjJene line 1:�------> [32m?1?[33m�[31m'i know':'the Perl 6 is using ?? and !! [0m��Parse failed��»
14:37 GlitchMr ... so nearly every compiler detects ?: usage...
14:37 GlitchMr Weird...
14:38 GlitchMr Is detection of ?: part of Perl 6 or what?
14:38 masak GlitchMr: fwiw, 'nom:' and 'rakudo:' go to the same implementation.
14:38 masak GlitchMr: you could say that it's part of Perl 6, yes.
14:38 masak we try to be good with error messages.
14:39 masak we have this concept of "Awesome Error Message", so when they're Less Than Awesome, we submit bug reports about it.
14:39 GlitchMr niecza: print $]
14:39 p6eval niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Non-declarative sigil is missing its name at /tmp/VnWfFhUj_d line 1:â�¤------> [32mprint [33mâ��[31m$][0mâ�¤â�¤Use of uninitialized value in string contextâ�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) …
14:40 moritz std: $]
14:40 p6eval std 8b331d2: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at /tmp/ErufzgESb1 line 1:�------> [32m$][33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 119m�»
14:40 GlitchMr std: $*PERL_VERSION
14:40 p6eval std 8b331d2: OUTPUT«ok 00:01 119m␤»
14:40 GlitchMr std: say $*PERL_VERSION
14:40 p6eval std 8b331d2: OUTPUT«ok 00:01 120m␤»
14:40 moritz GlitchMr: std only does syntax checking
14:41 GlitchMr Oh, I see
14:41 GlitchMr niecza: print $*PERL_VERSION
14:41 p6eval niecza v10-18-g5be99bf: OUTPUT«Any()»
14:41 dalek roast: 0629400 | moritz++ | S05-grammar/parse_and_parsefile.t:
14:41 dalek roast: unfudge a test for rakudo
14:41 dalek roast: review: https://github.com/perl6/roast/commit/0629400d62
14:41 GlitchMr niecza: use v5.14
14:41 p6eval niecza v10-18-g5be99bf:  ( no output )
14:42 GlitchMr I'm not sure if "use v5.14" should be accepted. Those languages have extremally different syntax...
14:43 mberends GlitchMr: correct. Niecza probably just ignored the version number anyway.
14:43 moritz it should not be accepted, unless the compiler knows how to provide perl 5.14 semantics
14:43 GlitchMr niecza: use v7.23
14:43 p6eval niecza v10-18-g5be99bf:  ( no output )
14:43 GlitchMr rakudo: use v7.23
14:43 p6eval rakudo 5a3836:  ( no output )
14:43 GlitchMr rakudo: print use v7.23
14:43 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Confused at line 1, near "print use "␤»
14:43 GlitchMr Makes sense...
14:44 masak 'use' statements are special.
14:45 masak in particular, they're not sub calls or anything like that.
14:45 GlitchMr > import this
14:45 GlitchMr P
14:45 GlitchMr ... what is import and why it's accepted.
14:45 moritz well, Perl is not Python :-)
14:45 masak fwiw, I think implementations should warn for any other version than 'use v6'.
14:46 daniel-s joined #perl6
14:46 GlitchMr I was testing. But why "import" is accepted. What processing instruction it is (if it's processing instruction...)?
14:46 GlitchMr > import z::z
14:46 GlitchMr _block85
14:46 GlitchMr ...
14:47 GlitchMr What?
14:47 moritz GlitchMr: see S11
14:47 moritz (nope, should not return a block)
14:48 GlitchMr I could only get this once. Trying to run this again does nothing...
14:48 GlitchMr Unless I will exit from interpreter and run it again...
14:48 masak that's because importing something a second time is a no-op.
14:48 moritz but why does it succeed importing z::z
14:49 masak nom: import z::z
14:49 p6eval nom 5a3836: OUTPUT«===SORRY!===␤Could not find module z::z to import symbols from at line 1, near ""␤»
14:49 masak I have no idea.
14:49 GlitchMr rakudo: import z::z
14:49 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Could not find module z::z to import symbols from at line 1, near ""␤»
14:49 GlitchMr Maybe I have old version
14:50 GlitchMr $ perl6 --version
14:50 GlitchMr This is Rakudo Perl 6, version 2011.04 built on parrot 3.3.0
14:50 GlitchMr Copyright 2008-2011, The Perl Foundation
14:50 moritz tadzik: I get lots of failures here on the new nom and rakudo... you too?
14:51 GlitchMr This is newest Windows build I've found...
14:51 moritz rakudo: say 6 >== 2
14:51 p6eval rakudo 5a3836: OUTPUT«Cannot assign to a non-container␤  in block <anon> at /tmp/cX5OYjJk91:1␤  in <anon> at /tmp/cX5OYjJk91:1␤␤»
14:52 moritz GlitchMr: yep, old
14:52 moritz GlitchMr: build from source if you want something newer
14:52 GlitchMr I don't know how :(.
14:52 GlitchMr I never programmed in C++...
14:53 GlitchMr All those "unsigned long long"s confuse me...
14:53 GlitchMr int me(){}...
14:53 moritz why would you look at them, just for building rakudo?
14:54 moritz nom: "foo".new
14:54 p6eval nom 5a3836:  ( no output )
14:54 moritz nom: say "foo".new.WHAT
14:54 p6eval nom 5a3836: OUTPUT«Str()␤»
14:55 moritz nom: say "foo".new.chars
14:55 p6eval nom 5a3836: OUTPUT«0␤»
14:55 GlitchMr niecza.exe crashes when I run it...
14:55 GlitchMr Oh, I see... I was supposed to extract whole archive, not just run directory...
14:56 GlitchMr niecza> 6>==2
14:56 GlitchMr ←[31m===←[0mSORRY!←[31m===←[0m
14:56 GlitchMr Arrows...
14:56 moritz ANSI color codes
14:57 moritz which your terminal doesn't understand
14:57 GlitchMr cmd.exe
14:57 moritz maybe sorear++ could disable them on win32?
14:57 GlitchMr niecza> 2=<2
14:57 GlitchMr System.IndexOutOfRangeException: Indeks wykraczał poza granice tablicy.
14:57 GlitchMr ...?
14:57 tadzik moritz: don't think so, will recheck
14:57 GlitchMr (I find it weird that error descriptions are in user's language)
14:58 GlitchMr niecza: 2=<2
14:58 p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename un…
15:00 GlitchMr niecza> my @array = ()
15:00 GlitchMr Potential difficulties:
15:00 GlitchMr @array is declared but not used at (eval) line 1:
15:00 GlitchMr ...?
15:01 benabik GlitchMr: You're finding all kinda of interesting errors, aren'y you?
15:01 benabik *aren't
15:01 mberends GlitchMr: I get that all the time. You should use @array after you've declared it.
15:01 GlitchMr niecza: $@
15:01 p6eval niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Non-declarative sigil is missing its name at /tmp/EsXBPWZ9SS line 1:â�¤------> [32m<BOL>[33mâ��[31m$@[0mâ�¤â�¤Use of uninitialized value in string contextâ�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) â�¤â€¦
15:02 benabik That should probably be a "$@ is perl 5" type of error.
15:02 GlitchMr After I run it, I get insane long list
15:03 masak benabik: agreed.
15:03 masak GlitchMr: that's the stacktrace. sorry about that. :/
15:03 masak we're working on ways to avoid showing long stacktraces to people.
15:03 benabik STD does have a special_variable:sym<$@> rule…  Doesn't niecza use STD?
15:04 masak it uses its own version of it.
15:04 masak std: $@
15:04 p6eval std 8b331d2: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $@ variable as eval error; in Perl 6 please use $! at /tmp/ElCDn_VT5g line 1:�------> [32m$@[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 119m�»
15:04 GlitchMr niecza> 99999999999999999**9999999999999999999
15:04 GlitchMr ^C
15:05 GlitchMr One of reasons why I had to filter ** while I was making IRC bot which made calculations in Python...
15:05 benabik GlitchMr: p6eval just has a timeout.
15:05 benabik niecza: 99999999999999999**9999999999999999999
15:05 GlitchMr Makes sense...
15:06 p6eval niecza v10-18-g5be99bf: OUTPUT«(timeout)»
15:06 GlitchMr niecza> -1 mod 12
15:06 GlitchMr 11
15:06 GlitchMr Thanks :).
15:06 GlitchMr It always annoyed me to get -1 as result...
15:06 benabik !!!
15:07 benabik That's awesome.  I had to write a custom mod function for Haskell when I was in Crypto.
15:07 GlitchMr I like this part of Perl 6.
15:08 GlitchMr Why so many programming languages return -1...
15:08 moritz nom: use Test; plan 1; is 'soemthing'.new(), ''
15:08 p6eval nom 5a3836: OUTPUT«(signal SEGV)1..1␤»
15:08 benabik It depends on what meaning you use for mod/%
15:09 GlitchMr I never had need to have -1 :P.
15:09 dalek roast: 24f09e8 | moritz++ | S02-literals/string-interpolation.t:
15:09 dalek roast: test for RT #73144, "string".new
15:09 dalek roast: review: https://github.com/perl6/roast/commit/24f09e8298
15:09 GlitchMr That behavior makes more sense...
15:09 moritz rakudo: say index("uuúuúuùù", "úuù")
15:09 p6eval rakudo 5a3836: OUTPUT«4␤»
15:09 benabik -N mod M can be -(N mod M)…  I think that's useful for something.
15:10 GlitchMr niecza: 1.5%0.5
15:10 p6eval niecza v10-18-g5be99bf:  ( no output )
15:10 GlitchMr ^ it's error for me...
15:10 GlitchMr niecza> 1.5 mod 0.5
15:10 GlitchMr System.DivideByZeroException: Nastąpiła próba podzielenia przez zero.
15:10 GlitchMr Weird...
15:10 moritz perl6: say 1.5 % 0.5
15:10 p6eval niecza v10-18-g5be99bf: OUTPUT«0/1␤»
15:10 p6eval ..pugs, rakudo 5a3836: OUTPUT«0␤»
15:10 benabik I think the -1 result is so N == (N/M + N%M)
15:10 moritz GlitchMr: mod is not the same as %
15:10 GlitchMr Oh right
15:10 moritz iirc mod is for integers
15:10 GlitchMr niecza: 1.5 mod 0.5
15:11 p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.DivideByZeroException: Division by zero␤  at Niecza.BigInteger.DivRem (BigInteger dividend, BigInteger divisor, Niecza.BigInteger& remainder) [0x00000] in <filename unknown>:0 ␤  at Builtins.divop (Int32 opc, Niecza.Variable a1…
15:11 GlitchMr I forgot that Perl uses @ for arrays.
15:11 benabik nom: say -1 mod 12; say -1 % 12
15:11 p6eval nom 5a3836: OUTPUT«-1␤11␤»
15:11 GlitchMr % for hashes*
15:11 GlitchMr lol
15:11 GlitchMr Oh, I see. There is both mod and %.
15:11 benabik Really?  mod gives -1 and % gives 11?  Really?
15:12 * moritz hopes not really
15:12 benabik nom: say -1 % 12; say -1 mod 12
15:12 p6eval nom 5a3836: OUTPUT«11␤-1␤»
15:12 GlitchMr nom: say 3.5 % 2.25; say 3.5 mod 2.25
15:12 p6eval nom 5a3836: OUTPUT«1.25␤No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in sub infix:<div> at src/gen/CORE.setting:1960␤  in sub infix:<mod> at src/gen/CORE.setting:2163␤  in block <anon> at /tmp/EgW0nDqgsT:1␤  in <anon> at…
15:12 dalek roast: 44ff863 | moritz++ | S32-str/index.t:
15:12 dalek roast: test or index() with non-ASCII chars, #73122
15:12 dalek roast: review: https://github.com/perl6/roast/commit/44ff863e68
15:12 benabik moritz: That is, in fact, what nom appears to do.
15:13 moritz perl6: say -1 mod 9
15:13 p6eval niecza v10-18-g5be99bf: OUTPUT«8␤»
15:13 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "mod"␤    expecting operator, ":" or ","␤    at /tmp/yvb2dlmnRY line 1, column 8␤»
15:13 p6eval ..rakudo 5a3836: OUTPUT«-1␤»
15:13 * moritz thinks that warrants a rakudobug
15:13 moritz where's masak when you need him? :-)
15:13 GlitchMr niecza: say 3.5 % 2.25; say 3.5 mod 2.25
15:13 p6eval niecza v10-18-g5be99bf: OUTPUT«5/4␤1␤»
15:13 benabik perl6: say -1 mod 9
15:13 GlitchMr rakudo: say 3.5 % 2.25; say 3.5 mod 2.25
15:13 p6eval niecza v10-18-g5be99bf: OUTPUT«8␤»
15:13 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "mod"␤    expecting operator, ":" or ","␤    at /tmp/39XBK8dein line 1, column 8␤»
15:13 p6eval ..rakudo 5a3836: OUTPUT«-1␤»
15:13 p6eval rakudo 5a3836: OUTPUT«1.25␤No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in sub infix:<div> at src/gen/CORE.setting:1960␤  in sub infix:<mod> at src/gen/CORE.setting:2163␤  in block <anon> at /tmp/lo1ItEFNIp:1␤  in <anon>…
15:14 GlitchMr 8[NULL]nothing O_o
15:14 GlitchMr Oh, I see.
15:14 GlitchMr > 3.5 mod 2.25
15:14 GlitchMr No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:
15:14 GlitchMr :(Int $a, Int $b)
15:14 GlitchMr Makes sense...
15:14 GlitchMr But then, even 3.0 mod 2.0 fails...
15:15 GlitchMr (it doesn't make sense to fail there...)
15:15 moritz nom: Block()
15:15 p6eval nom 5a3836: OUTPUT«Could not find sub &Block␤  in block <anon> at /tmp/btztce6OIZ:1␤  in <anon> at /tmp/btztce6OIZ:1␤␤»
15:15 moritz GlitchMr: those are not integers
15:15 moritz nom: Block.()
15:15 p6eval nom 5a3836: OUTPUT«Cannot access attributes in a type object␤  in block <anon> at /tmp/cVNK76AUUs:1␤  in <anon> at /tmp/cVNK76AUUs:1␤␤»
15:15 GlitchMr Yeah, but...
15:15 GlitchMr > 3/1 mod 1
15:15 GlitchMr No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:
15:15 GlitchMr :(Int $a, Int $b)
15:15 moritz GlitchMr: but Rat objects that happen to hold what would fit into an integer
15:15 GlitchMr This could be activated even accidentally...
15:16 TimToady P5 would just coerce 'em
15:16 moritz not sure about mod, but I think the spec is pretty cleare that div works on Int only
15:16 moritz or has that changed in the mean time?
15:16 TimToady div works on two of the same type in P6
15:17 TimToady but we could probably have a Cool,Cool version
15:18 TimToady though you shouldn't 100% believe anything I say before coffee
15:19 GlitchMr niecza: 'a'x2
15:19 p6eval niecza v10-18-g5be99bf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Whitespace is required between alphanumeric tokens at /tmp/7UvwOvwh9L line 1:â�¤------> [32m'a'x[33mâ��[31m2[0mâ�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) â�¤  a…
15:19 GlitchMr niecza: 'a' x 2
15:19 p6eval niecza v10-18-g5be99bf:  ( no output )
15:19 GlitchMr niecza: say 2 x 2
15:19 p6eval niecza v10-18-g5be99bf: OUTPUT«22␤»
15:19 GlitchMr :)
15:20 moritz nom: my @a = (1,2) Z (3,4); say @a.perl
15:20 p6eval nom 5a3836: OUTPUT«Array.new(1, 3, 2, 4)␤»
15:20 moritz nom: say ( (1,2) Z (3,4) ).perl;
15:20 p6eval nom 5a3836: OUTPUT«((1, 3), (2, 4)).list␤»
15:21 am0c joined #perl6
15:21 TimToady superstitious parens
15:21 masak TimToady: a Cool,Cool version seems counter to the "same type" idea.
15:21 TimToady nom: say ( 1, 2 Z 3, 4 ).perl
15:21 p6eval nom 5a3836: OUTPUT«((1, 3), (2, 4)).list␤»
15:21 GlitchMr niecza: say 0x1F xor 0x42
15:21 p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.Exception: Unable to find lexical &infix:<xor> in mainline␤  at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤  at Niecza.CLR…
15:22 GlitchMr rakudo: say 0x1F xor 0x42
15:22 p6eval rakudo 5a3836: OUTPUT«31␤»
15:22 GlitchMr ...
15:22 TimToady o_O
15:22 GlitchMr I think it's pretty normal usage...
15:23 GlitchMr Unless I don't understand "xor"...
15:23 TimToady that should be false
15:23 TimToady it looks like it's doing it bitwise
15:23 TimToady doing an or
15:23 GlitchMr $ php -r "print 0x1F xor 0x42;"
15:23 GlitchMr 31
15:23 TimToady rakudo: say 0x1f +^ 0x42
15:23 p6eval rakudo 5a3836: OUTPUT«93␤»
15:23 GlitchMr But for me it's logical to do it bitwise...
15:24 TimToady oh, precedence
15:24 GlitchMr But +^ also makes sense...
15:24 TimToady xor is looser than say
15:24 * masak submits rakudobug
15:24 TimToady no bug
15:24 masak no?
15:24 TimToady say (0x1f xor 0x42)
15:24 masak oh!
15:24 TimToady mon: say (0x1f xor 0x42)
15:24 masak I see.
15:24 * moritz submits masakbug
15:24 TimToady gah
15:25 moritz nom: say (0x1f xor 0x42)
15:25 p6eval nom 5a3836: OUTPUT«Nil␤»
15:25 masak TimToady: here, have some coffee ;)
15:25 TimToady ta
15:25 moritz nom: say (<a b> X <c d> X < e f>).join(',')
15:25 p6eval nom 5a3836: OUTPUT«a,c,e,a,c,f,a,d,e,a,d,f,b,c,e,b,c,f,b,d,e,b,d,f␤»
15:26 GlitchMr I just don't understand Perl 6...
15:26 moritz GlitchMr: have you tried reading some docs?
15:26 TimToady GlitchMr: nobody understands it completely :)
15:26 GlitchMr Not really...
15:26 TimToady so we're all on the learning curve
15:26 moritz GlitchMr: well, that would be a good first step
15:27 GlitchMr Unless you mean Perl 5 docs...
15:27 moritz nope
15:27 masak that only helps so much :)
15:27 TimToady if you prefer to learn from examples, try rosettacode.org
15:27 masak indeed.
15:27 TimToady it will show some comparisons of Perl 5 and Perl 6 ways of doing things
15:27 GlitchMr Yeah, I think I did some PHP examples there...
15:27 TimToady (or any other language you already know)
15:27 GlitchMr But I will look for Perl 6 languages...
15:28 masak I may also recommend the series of blog posts starting here: http://strangelyconsistent.org/blog/june-1-2011-input-and-output
15:28 dalek roast: 4eccfcc | moritz++ | S03-metaops/cross.t:
15:28 dalek roast: tests cross with three lists
15:28 dalek roast: review: https://github.com/perl6/roast/commit/4eccfccffe
15:28 TimToady warning, some of the examples are showing off more than instructive :)
15:28 hanekomu joined #perl6
15:28 GlitchMr prompt "> "
15:28 GlitchMr Nice :).
15:28 GlitchMr I didn't knew it
15:29 moritz rakudo: say [1,2] X~ <a b>
15:29 p6eval rakudo 5a3836: OUTPUT«1a 1b 2a 2b␤»
15:29 moritz still RONG
15:29 GlitchMr $ perl
15:29 GlitchMr print ":)"
15:29 GlitchMr ^D
15:29 GlitchMr :)
15:29 GlitchMr I love this trick... :)
15:30 TimToady moritz: why do you think it's RONG?
15:30 GlitchMr But I'm happy that Perl 6 (at least niecza and rakudo) has something like irb...
15:30 TimToady oh, flattening [], nm
15:31 Chillance joined #perl6
15:31 * TimToady drinks more coffee, and is glad it's not KoolAid®
15:31 cooper joined #perl6
15:32 GlitchMr > ?0???0!!?1
15:32 GlitchMr Bool::True
15:32 GlitchMr I think I could make it better...
15:32 GlitchMr !0
15:32 GlitchMr ... maybe...
15:32 moritz nom: say so Whatever
15:32 p6eval nom 5a3836: OUTPUT«Bool::False␤»
15:33 GlitchMr > say so "Whatever"
15:33 GlitchMr Bool::True
15:33 GlitchMr What is "so" doing?
15:33 moritz the same as ?
15:33 TimToady it's lo precedence like and and xor and not
15:33 GlitchMr OK, what is Whatever...
15:34 moritz a type
15:34 GlitchMr of what?
15:34 GlitchMr whatever?
15:34 moritz right
15:34 TimToady a type that means 'you figure it out'
15:34 TimToady it's an inside out curry, when used on operators
15:34 GlitchMr > Whatever+2
15:34 GlitchMr Use of uninitialized value in numeric context
15:34 moritz like all type objects
15:34 GlitchMr Oh, I see... it's everything... useful in multi subs...
15:35 GlitchMr I think...
15:35 TimToady you need to use the singleton object, named "*"
15:35 moritz nom: say * + 2
15:35 p6eval nom 5a3836: OUTPUT«_block1010␤»
15:35 TimToady nom: say (*+2)(3)
15:35 p6eval nom 5a3836: OUTPUT«5␤»
15:35 GlitchMr > my $dialog = prompt "> "
15:35 GlitchMr > aaa
15:35 GlitchMr > $dialog
15:35 GlitchMr aaa
15:35 TimToady nom: .say for 0, 1, *+* ... *
15:35 GlitchMr I guess I'm doing it correctly...
15:35 p6eval nom 5a3836: OUTPUT«(timeout)0␤1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤14930352␤24157817␤39088169␤63245986␤102334155␤165580141␤267914296␤433494437␤701408733…
15:36 dalek roast: 875886c | moritz++ | S03-metaops/cross.t:
15:36 dalek roast: test for RT #74072, [] should not flatten in cross meta op
15:36 dalek roast: review: https://github.com/perl6/roast/commit/875886c73e
15:37 TimToady nom: say [1,2] Z~ <a b>
15:37 p6eval nom 5a3836: OUTPUT«1a 2b␤»
15:37 TimToady moritz: same issue
15:37 GlitchMr niecza: say (0..Inf)[Inf]
15:37 p6eval niecza v10-18-g5be99bf: OUTPUT«0␤»
15:38 masak huh.
15:38 GlitchMr rakudo: say (0..Inf)[Inf]
15:38 p6eval rakudo 5a3836: OUTPUT«Nil␤»
15:38 GlitchMr Kind of makes sense
15:38 masak huh huh.
15:38 GlitchMr nom: say (0..Inf)[Inf]
15:38 p6eval nom 5a3836: OUTPUT«Nil␤»
15:38 GlitchMr 000000000000000000000000000
15:38 TimToady perl6: say (0 ... Inf)[Inf]
15:38 p6eval pugs: OUTPUT«*** ␤    Unexpected "Inf"␤    expecting operator or ")"␤    at /tmp/HYJWeilZ8w line 1, column 12␤»
15:38 p6eval ..rakudo 5a3836: OUTPUT«Nil␤»
15:38 p6eval ..niecza v10-18-g5be99bf: OUTPUT«0␤»
15:39 TimToady perl6: say (0 ... *)[Inf]
15:39 p6eval pugs: OUTPUT«*** ␤    Unexpected "["␤    at /tmp/r8BW1WnibA line 1, column 14␤»
15:39 p6eval ..rakudo 5a3836: OUTPUT«Nil␤»
15:39 p6eval ..niecza v10-18-g5be99bf: OUTPUT«0␤»
15:39 TimToady pugs: say (0 .. *)[Inf]
15:39 p6eval pugs: OUTPUT«0␤»
15:40 TimToady huh
15:40 TimToady perl6: say Inf.Int
15:40 p6eval niecza v10-18-g5be99bf: OUTPUT«1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460941194530829520850057688381506823424628814739131105408272371633505…
15:40 p6eval ..pugs: OUTPUT«*** No such method in class Num: "&Int"␤    at /tmp/xBQ8qjupNm line 1, column 5 - line 2, column 1␤»
15:40 p6eval ..rakudo 5a3836: OUTPUT«-9223372036854775808␤»
15:41 TimToady 'course, Int is specced to support Inf directly...
15:41 dalek roast: 82eb8fc | moritz++ | S14-roles/composition.t:
15:41 dalek roast: subs from the setting should be available in methods composed from a role (RT #74078)
15:41 dalek roast: review: https://github.com/perl6/roast/commit/82eb8fc5b4
15:41 TimToady but it's supposed to be out of band, not MAXINT
15:41 moritz TimToady: does Int also support NaN?
15:42 TimToady wouldn't it have to be NaI :P
15:42 tokuhiro_ joined #perl6
15:42 moritz masak: you'll be happy to hear that https://rt.perl.org/rt3/Ticket/Display.html?id=74078 is now resolved
15:42 * masak looks
15:43 masak indeed. \o/
15:43 TimToady I don't know that Int needs NaN too badly, but that could just be ignorance
15:43 dalek niecza: d2c05c8 | mberends++ | examples/notepad.pl:
15:43 dalek niecza: [examples/notepad.pl] small GUI text editor on Windows.Forms, not Gtk
15:43 dalek niecza: review: https://github.com/sorear/niecza/commit/d2c05c8c67
15:43 moritz down to 783 open rakudo tickets
15:44 masak TimToady: Int not having NaN would resolve a lot of questions and simplify the design in places.
15:44 masak TimToady: but it feels easier to say that Int doesn't have NaN than to say that it doesn't have Inf... :/
15:44 TimToady I'm probably fine with that
15:45 masak perl6: say Inf ~~ Num; say Inf ~~ Int
15:45 p6eval rakudo 5a3836, niecza v10-18-g5be99bf: OUTPUT«Bool::True␤Bool::False␤»
15:45 p6eval ..pugs: OUTPUT«1␤␤»
15:45 masak yeah.
15:45 masak that's the basic problem.
15:46 moritz rakudo: sub foo(%hash? is copy) {}; foo
15:46 p6eval rakudo 5a3836:  ( no output )
15:46 TimToady well, the basic problem is that infinity is more of a concept than a value, so arguably is more like a junction than an Any
15:49 dalek roast: 4a42b2e | moritz++ | S06-traits/is-copy.t:
15:49 dalek roast: test "is copy" on an optional hash parameter, RT #74454
15:49 dalek roast: review: https://github.com/perl6/roast/commit/4a42b2ed5c
15:49 moritz class A { say (method foo { 23 }).WHAT };
15:49 moritz rakudo: class A { say (method foo { 23 }).WHAT };
15:49 p6eval rakudo 5a3836: OUTPUT«Method()␤»
15:49 moritz \o/
15:50 moritz another closable ticket... after tests
15:50 masak \o/
15:51 masak suddenly there seems to be a lot of interest in decreasing the RT count. guess it has something to do with this nom thing people keep talking about.
15:53 TimToady perl6: say <arrays are <nice forever>>.perl
15:53 p6eval rakudo 5a3836: OUTPUT«Bool::True␤»
15:53 p6eval ..pugs, niecza v10-18-g5be99bf: OUTPUT«("arrays", "are", "<nice", "forever>")␤»
15:53 TimToady that one's a rakudobug
15:54 masak oh!
15:54 * masak submits it
15:55 TimToady brackets are always supposed to count depth
15:55 TimToady even when it makes little sense, like here :)
15:55 TimToady otoh
15:56 TimToady perl6: say <My <em> tag is awesome.>.perl
15:56 p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Confused at line 1, near "say <My <e"␤»
15:56 p6eval ..pugs, niecza v10-18-g5be99bf: OUTPUT«("My", "<em>", "tag", "is", "awesome.")␤»
15:57 masak right. that's another symptom of the same bug.
15:59 jnthn rakudo: class A { say (method foo { 23 }).WHAT }; say A.foo # checking
15:59 p6eval rakudo 5a3836: OUTPUT«Method()␤23␤»
15:59 jnthn \o/
15:59 TimToady yay!
16:02 jnthn Well, the current meta-object is just in a contextual in nom.
16:02 jnthn And method installation is totally orthogonal to lexical installation.
16:03 masak I... I should hope so! :P
16:03 jnthn Well, aside from the method being lexically inside a class body ;)
16:04 TimToady me likes orthogonal declarators, even if they're not orthodox :)
16:04 TimToady er, /me
16:04 TimToady :)
16:05 jnthn oh wow, we got below 800 tickets?!
16:05 masak and decreasing!
16:05 jnthn moritz++, [Coke]++, tadzik++, (whoever else helped)++
16:05 TimToady we're trying to fix that
16:05 jnthn :P
16:06 masak yeah, this is a worrying trend.
16:06 jnthn You know, there used to be a time when the RT queue was small enough that I could keep it in my head. :P
16:06 masak how small are we talking about here? :P
16:06 mberends jnthn: you were probably more bigheaded then :)
16:07 * masak : insulting compiler implementors since 2008 :P
16:07 jnthn I think I started struggling beyond the 150 tickets point, and when it broke 250 it just got too much for that :P
16:07 ingy hi TimToady
16:07 jnthn I used to review the whole queue each Rakudo day back then, and it didn't take crazily long :)
16:07 masak jnthn: meanwhile, the rest of us tend to be able to keep ~7 things in our head without overflow :P
16:08 jnthn masak: I think my brane worked better back then. Or, well, differently at least. :P
16:08 masak heh :)
16:09 TimToady it can be proven from the bug count trajectory that your brane was better at adding bugs back then than at removing them :P
16:10 TimToady so I like this brane better
16:10 jnthn :P
16:11 jnthn Let's try and keep it going down, even if masak++ has other plans :P
16:11 ingy TimToady: I was just wondering if you saw my msgs. No hurry for an answer.
16:11 TimToady yes, still thinking, vaguely
16:11 TimToady that sort of thing has to stew in the backbrane
16:12 jnthn phenny: tell mls_ the use of the "inline" keyword in src/runcore/subprof.c (I think this is your thingy, sorry if not) makes me compiler cry very loudly and refuse to build Parrot. Just removing it fixed things, but probably there's a better way.
16:12 phenny jnthn: I'll pass that on when mls_ is around.
16:13 ingy TimToady: OK. I have this working in pegex.pgx: grammar: <rule_definition>+ %%% .<comment>*
16:13 ingy that's my basic use case
16:14 * ingy goes off to add %grammar and %extends declarations to pegex
16:14 TimToady most languages don't count comments as separators, but as whitespace
16:14 dalek rakudo/nom: 464fb9f | jnthn++ | src/Perl6/Actions.pm:
16:14 dalek rakudo/nom: Complain about declaration of placeholders in the mainline.
16:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/464fb9f25e
16:14 jnthn ^^ patches RT#75844; tagged it testneeded.
16:16 ingy TimToady: in a general sense ws is a separator :)
16:17 ingy ws* thing ws* [thing | ws*]*   =>      thing %%% ws*
16:18 ingy anymo...
16:19 cooper joined #perl6
16:39 pmurias joined #perl6
16:40 wamba joined #perl6
16:45 whiteknight joined #perl6
16:47 gbacon joined #perl6
16:49 masak this may interest some: http://www.r-bloggers.com/hipster-programming-languages/
16:51 TimToady moritz: === is supposed to autothread; junctions must test identity some other way
16:51 TimToady or only use === on non-junctions
16:52 TimToady S03:1273
16:53 TimToady this is in regard to https://github.com/perl6/roast/commit/8e96ed19b8
17:01 moritz TimToady: somehow I remember it just the other way round
17:01 hanekomu masak: "hipster" is a good word for that. i had called them "brogramming languages"
17:02 masak heh :)
17:05 moritz rakudo: use MONKEY_TYPING; class A {}; class B { }; augment class B is A { };
17:05 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Parents cannot be added to a class after it has been composed␤»
17:06 moritz rakudo: class A { method foo(A :$a) { say $a.WHAT } }; A.new.foo
17:06 p6eval rakudo 464fb9: OUTPUT«A()␤»
17:07 moritz rakudo: class A { method foo(A :$a = 3) { say $a.WHAT } }; A.new.foo
17:07 p6eval rakudo 464fb9: OUTPUT«Int()␤»
17:07 moritz meh
17:07 moritz rakudo: class A {}; class B { has A $.foo .= new }
17:08 p6eval rakudo 464fb9: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤===SORRY!===␤error:imcc:syntax error, unexpected DOT ('.')␤     in file '(file unknown)' line 243␤␤»
17:09 localhost joined #perl6
17:10 pmurias sorear: hi
17:10 GlitchMr niecza: say 0/0
17:10 p6eval niecza v10-19-gd2c05c8: OUTPUT«0/1␤»
17:10 GlitchMr rakudo: say 0/0
17:10 p6eval rakudo 464fb9: OUTPUT«Divide by zero␤  in sub infix:<div> at src/gen/CORE.setting:2279␤  in method new at src/gen/CORE.setting:5378␤  in sub infix:</> at src/gen/CORE.setting:5472␤  in block <anon> at /tmp/eT3PCNRnpN:1␤  in <anon> at /tmp/eT3PCNRnpN:1␤␤»
17:11 GlitchMr ^ 0/1... why?
17:11 GlitchMr 0/0 != 0/1...
17:11 GlitchMr 0/1 is 0...
17:11 GlitchMr But not 0/0
17:14 dalek roast: 7b0b34d | moritz++ | S12-methods/instance.t:
17:14 dalek roast: tests for RT #74490, return value of named method declarations
17:14 dalek roast: review: https://github.com/perl6/roast/commit/7b0b34d633
17:15 cognominal_ joined #perl6
17:17 MayDaniel joined #perl6
17:18 pmurias sorear: i get System.DllNotFoundException: /home/pawel/new_order/niecza/obj/p5embed.so but the file exists
17:18 masak GlitchMr: it's a nieczabug.
17:20 GlitchMr niecza: <<<EOF
17:20 p6eval niecza v10-19-gd2c05c8: OUTPUT«␤Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename un…
17:25 sorear good * #perl6
17:27 pmurias sorear: hello
17:27 pmurias sorear: found the source of the System.DllNotFoundException
17:27 pmurias sorear: a typo
17:27 pmurias sorear: plus C treating it as an implicitly defined function
17:29 jnthn moritz: re "Parents cannot be added to a class after it has been composed", I consider that the way standard Perl 6 classes work. If people want that they can write a custom meta-object that supports it.
17:31 * jnthn ain't so into kitchen sinks that sink optimizability :)
17:32 jnthn moritz: The default-not-typechecked thing is certainly a bug. Will investigate that one.
17:32 donri joined #perl6
17:33 GlitchMr If I see "Unhandled Exception" it's bug in niecza, right?
17:33 GlitchMr It sometimes happen with invalid syntax and those exceptions aren't helpful...
17:33 pmurias jnthn: that seems inconsitent with being able to add methods at runtime
17:33 jnthn pmurias: It's not at all.
17:33 jnthn pmurias: They have very different consequences.
17:34 pmurias jnthn: what are the serious inconsequences of adding parents?
17:35 jnthn pmurias: They may want to bring in other attributes, which is a problem if you want to settle on a particular layout for objects.
17:35 jnthn pmurias: If you have a "we store attributes in a HoH" view of the world it's not a problem. But P6opaque doesn't work like that.
17:36 jnthn I guess we could say "it's OK provided the parents don't bring in more attributes".
17:36 jnthn I'm not sure it's worth the complexity though.
17:37 pmurias do we expose the way P6opaque is implemented somewhere
17:37 pmurias ?
17:38 jnthn pmurias: "expose" in what sense?
17:39 pmurias that settling on a particular layout is a part of the language model rather then an implementation feature
17:39 jnthn Different representations all implement the representation API, but they can all make different trade-offs. That's kinda the point.
17:39 jnthn Well, I don't think the spec has to - or should - commit to a layout.
17:40 jnthn It should probably make it so the expectations on the default ClassHOW and its default representation allow for something fairly efficient though.
17:40 jnthn (Efficient in the common cases, that is.)
17:40 pmurias from an implementors world view i fully understand why you (and me) want to settle on a layout
17:40 jnthn Well, we can't box things in too much on layout.
17:40 pmurias but if an user is doing monkey patching he may want to add an attribute
17:41 pmurias we could put the extra one in a HoH ;)
17:41 jnthn Then the user will get the error, google it, and see the answer: "use Meta::Class::VeryCustomizableAlways;" :)
17:42 jnthn pmurias: I pondered doing that, but it's another pointer on every object. :(
17:42 jnthn Which adds up.
17:42 pmurias not nessesarly
17:42 pmurias we would use to object as a key of an extra attributes hash
17:43 pmurias slow but it's an optional feature for hardcore monkey patching
17:43 jnthn True, but that has GC implications.
17:43 jnthn Well, if people want hardcore monkey patching, I think that's something we can fairly say falls into the scope of a module.
17:44 jnthn What the default ClassHOW says is a set of defaults ideal for the common case, not something that sets the limits on what is possible.
17:44 GlitchMr niecza: print 'a'=='b'
17:44 p6eval niecza v10-19-gd2c05c8: OUTPUT«␤Unhandled Exception: System.FormatException: Unknown char: a␤  at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 ␤  at System.Double.Parse (System.String s, IFormatProvider provider) […
17:44 pmurias the whole you can't add an attribute at runtime restriction seems arbitary
17:44 GlitchMr rakudo: print 'a'=='b'
17:44 p6eval rakudo 464fb9: OUTPUT«True»
17:44 GlitchMr ...?
17:45 GlitchMr oh right
17:45 GlitchMr It's eq
17:45 GlitchMr Or ===
17:45 cooper joined #perl6
17:46 am0c^ joined #perl6
17:46 pmurias jnthn: as stopping people from adding methods would help as a lot too
17:50 pmurias s/as/us/
17:51 pmurias jnthn: and the GC implications would be solved by cleaning the class modifing the destructor to clean up hash keys
17:53 tadzik moritz: oh wow, it's all failures indeed!
17:54 tadzik get_pointer() not implemented in class 'whatever'
17:54 dalek niecza: 18b719f | (Paweł Murias)++ | / (3 files):
17:54 dalek niecza: Perl5 integers are converted rather than wrapped.
17:54 dalek niecza: review: https://github.com/sorear/niecza/commit/18b719fb70
17:55 pmurias jnthn: you could put a NYI exception for adding attributes after class composition for now
18:00 GlitchMr rakudo: my $a=0; my $b=0; $a---$b; say $a; say $b
18:01 p6eval rakudo 464fb9: OUTPUT«-1␤0␤»
18:01 GlitchMr niecza: my $a=0; my $b=0; $a---$b; say $a; say $b
18:01 p6eval niecza v10-19-gd2c05c8: OUTPUT«-1␤0␤»
18:01 soh_cah_toa joined #perl6
18:01 jnthn pmurias: Why would I make it say "NYI" when I currently have no intention of implementing it?
18:03 jnthn tadzik: ouch, I get that here too :(
18:03 jnthn tadzik: Was that the Parrot/NQP revision bump?
18:04 jnthn bbs, cooking
18:04 sorear today's alarming comment: http://codepeek.com/paste/4e87560ba86b48752731a900
18:04 jnthn <@Nicholas> Rakudo also failed to release in September
18:04 jnthn wtf...a release went out yesterday.
18:06 soh_cah_toa jnthn: there was? how come there's nothing about it on rakudo.org?
18:08 sivoais joined #perl6
18:09 moritz soh_cah_toa: rakudo.org only announce star releases these days
18:09 soh_cah_toa oh
18:09 TimToady maybe that's what the comment was really about
18:09 moritz soh_cah_toa: tadzik++ sent out an email to perl6-compiler@perl.org
18:09 moritz but I didn't receive it so far :(
18:09 moritz tadzik: care to re-send?
18:10 moritz oh, it's there
18:10 moritz http://www.nntp.perl.org/group/perl.perl6.compiler/2011/10/msg7492.html
18:10 soh_cah_toa installing now. is there still the kill-useless-defaults issue w/ nqp?
18:10 soh_cah_toa bleh, looks like yes
18:11 TimToady I got it here
18:11 soh_cah_toa TimToady: what do you mean? you got it to install or you got the nqp error?
18:11 GlitchMr I'm going to install VirtualBox. It will probably disconnect me... :(
18:11 pmurias jnthn: i was assumping you want it to throw an exception saying it's illegal
18:12 GlitchMr I don't care...
18:12 TimToady I got the announcement here
18:12 soh_cah_toa ah
18:12 pmurias jnthn: "Adding attributes after class composition is illegal as it would hurt performance" ;) style one
18:13 GlitchMr42 joined #perl6
18:13 jnthn pmurias: I thought it already did.
18:13 sunnavy joined #perl6
18:14 moritz nom: class A { }; use MONKEY_TYPING; augment class A { has $.foo };
18:14 p6eval nom 464fb9:  ( no output )
18:14 moritz nom: class A { }; use MONKEY_TYPING; augment class A { has $.foo }; say A.new(foo => 1).foo
18:14 p6eval nom 464fb9: OUTPUT«1␤»
18:14 jnthn Hm.
18:15 sorear who's replying to Klāvs?
18:15 TimToady is that the same person we sent to #perl earlier?
18:15 jnthn really afk cooking
18:15 sorear TimToady: I wasn't paying attention?
18:15 moritz rakudo: my $a = 1..10; for $^a { .say }
18:15 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Cannot declare placeholder parameter $^a in the mainline at line 1, near " { .say }"␤»
18:15 sorear s/\?/./
18:16 TimToady http://irclog.perlgeek.de/perl6/2011-10-01#i_4507341
18:16 sorear sounds like
18:17 * TimToady wonders if he was really asking about Perl 6?
18:18 TimToady probably not...
18:18 pmurias sorear: how should SVany.InvokeMethod return a value?
18:21 dalek roast: 584c1a8 | moritz++ | S06-traits/is-copy.t:
18:21 dalek roast: test for RT #75302
18:21 dalek roast: review: https://github.com/perl6/roast/commit/584c1a8305
18:23 moritz rakudo: enum somenum <a b c d e>; my somenum $temp =  3
18:23 p6eval rakudo 464fb9: OUTPUT«Type check failed in assignment to '$temp'; expected 'somenum' but got 'Int'␤  in block <anon> at /tmp/J9YxQ5xcIy:1␤  in <anon> at /tmp/J9YxQ5xcIy:1␤␤»
18:23 moritz is that correct?
18:23 masak I'd like to talk with @Nicholas to know what he meant...
18:25 masak I think the bigger thing he's wrong on is the "Perl 6 will be Niecza".
18:25 moritz rakudo: subset A of Hash; sub foo(A $x) {}; foo {}
18:25 p6eval rakudo 464fb9:  ( no output )
18:25 moritz masak: then do, he's on irc.perl.org
18:25 masak ok.
18:25 masak but I really need to make noms first...
18:25 moritz rakudo: role R {}; subset S of R; 1 ~~ S
18:25 p6eval rakudo 464fb9:  ( no output )
18:26 masak did someone already point out to him that Rakudo had a release in September?
18:26 moritz I don't think so
18:26 moritz I just tweeted about it
18:30 masak there. message sent, and seemingly landed well.
18:31 robinsmidsrod joined #perl6
18:32 GlitchMr rakudo: my $z=2;sub z{3}say $z-z
18:32 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Confused at line 1, near "sub z{3}sa"␤»
18:32 GlitchMr rakudo: my $z=2;sub z{3} say $z-z
18:32 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Confused at line 1, near "sub z{3} s"␤»
18:32 sorear masak: this was on #p5p, btw.
18:33 GlitchMr rakudo: my $z=2;sub z{3}
18:33 p6eval rakudo 464fb9:  ( no output )
18:33 GlitchMr rakudo: my $z=2;sub z{3}; say $z-z
18:33 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Symbol '$z-z' not predeclared in <anonymous> (/tmp/wlaO27wlOB:1)␤»
18:33 masak sorear: ok. I privmsg'd. didn't want to face a hoard.
18:33 GlitchMr $z-z O_o
18:33 GlitchMr I wanted to substract $z by function z()...
18:33 GlitchMr rakudo: my $z=2;sub z{3}; say $z-z()
18:33 p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Symbol '$z-z' not predeclared in <anonymous> (/tmp/YjjYRhll8d:1)␤»
18:33 GlitchMr Yeah, sure it's fun
18:33 GlitchMr rakudo: my $z=2;sub z{3}; say $z - z()
18:33 p6eval rakudo 464fb9: OUTPUT«-1␤»
18:35 masak er, horde*
18:35 moritz rakudo: nqp::where(1)
18:35 p6eval rakudo 464fb9: OUTPUT«get_pointer() not implemented in class 'Int'␤  in block <anon> at /tmp/DWBKx07Pew:1␤  in <anon> at /tmp/DWBKx07Pew:1␤␤»
18:36 GlitchMr rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10
18:36 p6eval rakudo 464fb9:  ( no output )
18:36 GlitchMr oh right
18:36 GlitchMr rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; print $text
18:36 p6eval rakudo 464fb9: OUTPUT«rkiFbADC87»
18:38 GlitchMr rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; print $text
18:38 p6eval rakudo 464fb9: OUTPUT«i3xQxQyPPp»
18:38 GlitchMr rakudo: {my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; say $text} for 1..10
18:38 GlitchMr ok, I think that's abuse of Perl
18:39 p6eval rakudo 464fb9: OUTPUT«(timeout)RmUAFkjAkj␤g3bbnALnbn␤sXDwHwPe17␤NRRV8r0I9E␤xUVDatq8XO␤J78AX3007I␤V3gM7DYyoz␤»
18:39 GlitchMr But it seems to work
18:39 GlitchMr But why it's so slow?
18:40 GlitchMr I can only count 7 random words when I've expected 10...
18:40 GlitchMr It's slow even on my PC...
18:40 GlitchMr niecza: {my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; say $text} for 1..10
18:40 p6eval niecza v10-20-g18b719f:  ( no output )
18:41 moritz tadzik: I think I found the problem
18:41 GlitchMr niecza doesn't even seem to recognize .roll...
18:41 moritz tadzik: testing a fill
18:41 GlitchMr And rakudo is extremally slow with my pretty simple code...
18:41 GlitchMr Is random generator so slow or what?
18:42 GlitchMr I ran similar code in PHP without problems.
18:45 masak niecza: say ('a'..'z', 'A'..'Z', '0'..'9').roll(10).join for ^10
18:45 p6eval niecza v10-20-g18b719f: OUTPUT«␤Unhandled Exception: Unable to resolve method roll in class Parcel␤  at /tmp/LJwdxGj8_h line 1 (MAIN mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2116 (CORE module…
18:45 masak huh!
18:45 masak sorear: ^^
18:45 masak nom: say ('a'..'z', 'A'..'Z', '0'..'9').roll(10).join for ^10
18:45 p6eval nom 464fb9: OUTPUT«ZwG3aRHL6Q␤wVtXZsgH9n␤p1ilPrkBJj␤U8PO2pLlR5␤sukIJVPOUg␤cGIqz96EDs␤u3wk7UWdHd␤FoV0llpOhu␤UypwAtLVCr␤Fvw5Ak2t2E␤»
18:45 TimToady doen't do roll/pick yet
18:46 masak that feels like a *big* missing feature :)
18:46 GlitchMr There is shortcut for that!
18:46 GlitchMr EVEN BETTER :).
18:46 TimToady note that ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10 has to rebuild the list every time through the loop
18:47 TimToady well, unless the optimizer notices that it can constant fold it
18:47 TimToady but none of the implementations are good at constant folding yet
18:49 TimToady it's funny, because constant folding is one of the most useful optimizations, but people seem to avoid doing it for some reason
18:50 GlitchMr It reminds me what I was doing to generate random strings in PHP
18:51 GlitchMr $return='';for ($i=0;$i<7;$i++){$return.=chr(rand(97,122));}
18:51 GlitchMr It would be even more complex if I would include uppercase letters and numbers...
18:52 GlitchMr And there is no useful .. operator.
18:56 masak TimToady: I'd definitely expect a constant list (Parcel, whatEVER) to be within the reach of an optimizer.
18:57 masak it's like with error messages: to a first approximation, everything that can be done at compile time, should be. :)
18:57 TimToady I'd expect that transitively through any idempotent functions
18:57 masak aye.
18:58 Chat6408 joined #perl6
18:58 masak well, at least the CORE idempotent ones ;)
18:58 Chat6408 hi ppl
18:58 TimToady what is this CORE of which you speak?
18:59 TimToady Chat6408: note: this room is only about the development of the Perl 6 programming language; general discussion is off topic
18:59 Chat6408 4any 1 from ireland here ?
19:00 GlitchMr Chat6408, ...?
19:00 TimToady Chat6408: you're welcome here, but only if you want to talk about Perl 6.
19:00 Chat6408 4what?
19:01 Chat6408 4whats perl 6 lol
19:01 TimToady a cool new programming language
19:01 eiro masak, still running yarn ?
19:01 GlitchMr ...
19:01 GlitchMr "whats perl 6 lol"
19:01 GlitchMr lol
19:02 pmurias sorear: do we want to convert perl5 strings or wrap them?
19:02 TimToady perl6: say lol(1,2 Z <a b>).perl
19:02 p6eval niecza v10-20-g18b719f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'lol' used at line 1â�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) â�¤ …
19:02 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "Z"␤    expecting operator, ":" or ")"␤    at /tmp/N2nDZVEZZt line 1, column 13␤»
19:02 p6eval ..rakudo 464fb9: OUTPUT«Could not find sub &lol␤  in block <anon> at /tmp/RsvITZgGRv:1␤  in <anon> at /tmp/RsvITZgGRv:1␤␤»
19:02 TimToady lol is another of those things nobody seems to want to implement...
19:03 jnthn nom: sub foo(**@a) { say @a.WHAT }; foo()
19:03 p6eval nom 464fb9: OUTPUT«LoL()␤»
19:04 TimToady masak: if the mechanism by which CORE functions are determined to be idempotent is not general enough to apply to user-defined functions as well, something is terribly wrong
19:04 GlitchMr LoL???
19:04 GlitchMr What it is lol?
19:04 jnthn List of List.
19:04 GlitchMr lol
19:04 dalek nqp: a31d3f0 | moritz++ | src/PAST/NQP.pir:
19:04 dalek nqp: generate get_id instead of get_addr
19:04 dalek nqp: review: https://github.com/perl6/nqp/commit/a31d3f0e65
19:04 jnthn Guess we only go so far with it in Rakudo.
19:05 TimToady nom: sub foo(**@a) { say @a.perl }; foo 1,2 Z <a b>;
19:05 p6eval nom 464fb9: OUTPUT«LoL.new(((1, "a"), (2, "b")).list.item)␤»
19:05 TimToady o_O
19:08 sorear pmurias: I say convert 'em
19:08 jnthn TimToady: What exactly is o_O? It looks to have preserved the structure...
19:08 jnthn (Disclaimer: I haven't looked at or tried to understand what pmichaud++ did so far with LoL at all...)
19:10 sorear constant folding is something we really should only do for returning immutable values
19:10 GlitchMr ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10
19:10 GlitchMr It seems to fit in this case...
19:11 dalek rakudo/nom: 2772e64 | jnthn++ | src/binder/bind.c:
19:11 dalek rakudo/nom: Make sure we type check default values. Note that we should really promote the one for literals to compile time.
19:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2772e6415f
19:11 pmurias sorear: ok
19:12 jnthn moritz: ^^ is fix for bug you showed earlier
19:12 moritz jnthn: great, I just dug up the ticket for it
19:13 dalek niecza: f20f832 | (Paweł Murias)++ | / (3 files):
19:13 dalek niecza: Perl5 NV values are converted.
19:13 dalek niecza: review: https://github.com/sorear/niecza/commit/f20f83209c
19:15 dalek roast: 9e7fb12 | moritz++ | S (3 files):
19:15 dalek roast: test type checking of default values, RT #74758
19:15 dalek roast: review: https://github.com/perl6/roast/commit/9e7fb12f46
19:17 moritz rakudo: class Foo { has $.bar = "baz"; submethod BUILD{}}; say Foo.new.bar
19:17 p6eval rakudo 464fb9: OUTPUT«baz␤»
19:18 [Coke] jnthn: closed.
19:18 phenny [Coke]: 12:34Z <jnthn> tell [Coke] It appears that the issue being discussed was resolved a different way (required named parameters). And I know that works (we use it in the setting, for one). Overall, traits are much more robust in nom, so I think we can safely close that one.
19:18 jnthn wtf, string range generation is RIDICULOUSLY slow
19:19 jnthn I can probably do a shot of vodka faster than it can generate 'A'..'Z'.
19:19 [Coke] rakudo: say 320+449+5
19:19 p6eval rakudo 464fb9: OUTPUT«774␤»
19:19 TimToady sorear: we were also postulating constant arguments to our idempotent functions
19:19 dalek roast: 0dc03f4 | moritz++ | S12-attributes/instance.t:
19:19 dalek roast: BUILD should not prevent initialization of attributes it did not mention
19:19 dalek roast: review: https://github.com/perl6/roast/commit/0dc03f461d
19:19 moritz nom: my $t = now; ('a'..'z').list; say now - $t
19:19 p6eval nom 464fb9: OUTPUT«0.0232224514998836␤»
19:19 moritz nom: my $t = now; ('A'..'Z').list; say now - $t
19:19 p6eval nom 464fb9: OUTPUT«0.0191129559046429␤»
19:20 TimToady nom: my $t = now; say now - $t
19:20 p6eval nom 464fb9: OUTPUT«0.0169231936854888␤»
19:20 jnthn nom: my $t = now; ('a'..'z', 'A'..'Z', '0'..'9').list; say now - $t
19:20 p6eval nom 464fb9: OUTPUT«0.0204615304019837␤»
19:20 moritz less then 0.1s for a shot of vodka? not bad
19:20 jnthn ...ok, maybe we need for for 1..0 for me to do the vodka :)
19:20 jnthn moritz: I trained in Russia :P
19:20 jnthn er, for 1..10
19:21 * jnthn checks if the C profiler shows up anything obvious
19:22 jnthn ah, curious...
19:23 jnthn nom: say 'abcd'.index('c')
19:23 p6eval nom 464fb9: OUTPUT«2␤»
19:24 jnthn nom: say 'abcd'.index('c').WHAT
19:24 p6eval nom 464fb9: OUTPUT«Int()␤»
19:24 jnthn nom: say 'abcd'.index('e').WHAT
19:24 * masak and Nicholas have a useful privmsg exchange
19:24 p6eval nom 464fb9: OUTPUT«Str()␤»
19:24 jnthn nom: say 'abcd'.index('e')
19:24 p6eval nom 464fb9: OUTPUT«Str()␤»
19:24 dalek niecza: c43c708 | (Paweł Murias)++ | / (3 files):
19:24 dalek niecza: Convert perl 5 string in an extremely naive fashion ignoring utf and null bytes.
19:24 dalek niecza: review: https://github.com/sorear/niecza/commit/c43c708165
19:24 sorear masak: yay.  Anything worth sharing?
19:25 dalek roast: ac23be8 | moritz++ | S12-subset/subtypes.t:
19:25 dalek roast: fix a syntax error
19:25 dalek roast: review: https://github.com/perl6/roast/commit/ac23be88a0
19:25 masak sorear: Nicholas got the p6c announcement today in the afternoon. some moderator delay going on.
19:25 masak so it was more of a misunderstanding due to relativistic time frames than anything else :)
19:26 sorear I wonder how hard it would be to add times to nom.
19:27 pmurias sorear: should i put failing tests in niecza/t/?
19:27 moritz sorear: times() as in system/user time reporting?
19:27 sorear moritz: yes
19:27 sorear pmurias: sure
19:28 moritz rakudo: ␤our sub xyz($x) { say $x }␤␤+ xyz 3
19:28 p6eval rakudo 464fb9: OUTPUT«3␤No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:607␤  in sub infix:<+> at src/gen/CORE.setting:1945␤  in block <anon> at /tmp/fIwsXES7pW:3␤  in <anon> at /tmp/fIwsXES…
19:28 moritz rakudo: say +True
19:28 p6eval rakudo 464fb9: OUTPUT«1␤»
19:29 moritz https://rt.perl.org/rt3/Ticket/Display.html?id=75710 seems to be fixed -- correct?
19:29 pmurias sorear: or should i put them in a t/todo/ or something so we can test that everything still works?
19:30 jnthn moritz: Did the nqp patch fix the Rakudo spectests?
19:30 moritz jnthn: yes
19:30 kmwallio joined #perl6
19:31 jnthn moritz: OK...you plan to bump NQP_REVISION, or shall I?
19:31 moritz jnthn: sorry, I thought I did...
19:31 moritz pushing now
19:31 jnthn moritz: ah, thanks :)
19:32 dalek rakudo/nom: d655c14 | moritz++ | tools/build/NQP_REVISION:
19:32 dalek rakudo/nom: bump NQP_REVISION to something not so broken
19:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d655c14ece
19:34 moritz nom: given 1 { say "yes" when 1 }
19:34 p6eval nom 464fb9: OUTPUT«yes␤»
19:37 dalek roast: 27a2b93 | moritz++ | S04-statements/given.t:
19:37 dalek roast: test statement-modifying "when"
19:37 dalek roast: review: https://github.com/perl6/roast/commit/27a2b936d0
19:38 dalek niecza: 50e0320 | (Paweł Murias)++ | t/p5/strings.t:
19:38 dalek niecza: Test for p5 string conversion - partly failing
19:38 dalek niecza: review: https://github.com/sorear/niecza/commit/50e0320e8d
19:38 moritz rakudo: my @s = ($_ * 2 if $_ ** 2 > 3 for 0 .. 99); say @s.perl
19:38 p6eval rakudo 464fb9: OUTPUT«Array.new(4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 1…
19:38 soh_cah_toa does anybody recognize this error: Method 'STORE' not found for invocant of class 'Any'
19:38 soh_cah_toa i don't know what it means and i keep getting it whenever i 'use IRC::Utils' aftering installing 2011.09
19:39 pmurias sorear: i'm not sure how can i return values from InvokeMethod should i set the resultSlot on the caller Frame?
19:40 masak soh_cah_toa: probably something to do with array or hash indexing.
19:40 sorear pmurias: yes
19:40 sorear pmurias: er, yes to "resultSlot"
19:40 sorear pmurias: we don't currently have a unified approach to t/ tests
19:40 soh_cah_toa masak: hm, ok. it's weird though that it happens just by upgrading to 2011.09 even though i didn't change anything in the module
19:43 moritz soh_cah_toa: do you have any precompiled PIR files somewhere?
19:43 moritz like in your ~/.perl6/lib or in the working dir
19:43 soh_cah_toa moritz: no, but i'll double check
19:43 jnthn moritz: Do you understand the Str.succ/Str.pred implementation?
19:43 flussence sorear: when I run code that contains NEXT, it gives me that exception as expected but there's also something that looks completely unrelated about statement_level
19:43 jnthn moritz: I'm finding it a tad confusing...
19:44 flussence (https://gist.github.com/1256552)
19:44 soh_cah_toa no pir files :\
19:45 jnthn hmm...it was written by pmichaud.
19:45 moritz jnthn: no
19:45 icwiener joined #perl6
19:46 jnthn oh, I guess RANGEPOS is looking for "where in the string is there a range"...
19:50 masak soh_cah_toa: please try to isolate and golf the error. this sounds interesting.
19:51 soh_cah_toa masak: yeah, i know. i have no idea what to do though. there error message doesn't give any clue as to where the problem is
19:51 jnthn soh_cah_toa: Try running with --ll-exception, it should dump a more informative backtrace.
19:51 soh_cah_toa sure
19:53 * masak usually does A-B debugging at this point
19:54 soh_cah_toa http://nopaste.snit.ch/83649
19:54 soh_cah_toa though much of that doesn't mean much to me :\
19:58 pmurias sorear: what should be the default context for p5 subs? list or scalar?
20:01 moritz rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive'
20:01 p6eval rakudo d655c1: OUTPUT«alive␤»
20:01 jnthn rakudo: my ($found) = grep 1, 1..1_000_000; say $found
20:01 p6eval rakudo d655c1: OUTPUT«1␤»
20:02 masak superstitious parens again :)
20:02 masak but I guess it's from an RT ticket.
20:02 masak oh wait.
20:02 moritz no, it's find
20:02 moritz *fine
20:02 moritz for list assignment
20:02 masak aye.
20:02 moritz RT #75950, to be specific
20:03 moritz rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive'; say $x; say 'alive 2'
20:03 p6eval rakudo d655c1: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/JUn0XNm32y:1)␤»
20:03 moritz rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive'; say $found; say 'alive 2'
20:03 p6eval rakudo d655c1: OUTPUT«alive␤1␤alive 2␤»
20:03 moritz wow, the test hangs
20:03 moritz nom: use Test; my $x; lives_ok { ($x) = grep 5, 1..1_000_000 }; is $x, 5, 'correct result';
20:04 p6eval nom d655c1: OUTPUT«(timeout)ok 1 - ␤»
20:04 moritz nom: use Test; my $x; lives_ok { ($x) = grep 1, 1..1_000_000 }; is $x, 5, 'correct result';
20:04 p6eval nom d655c1: OUTPUT«(timeout)ok 1 - ␤»
20:05 moritz nom: use Test; my ($x)  = grep 5, 1..1_000_000 is $x, 5, 'correct result';
20:05 p6eval nom d655c1: OUTPUT«===SORRY!===␤Confused at line 1, near "my ($x)  ="␤»
20:05 moritz nom: use Test; my ($x)  = grep 5, 1..1_000_000; is $x, 5, 'correct result';
20:05 p6eval nom d655c1: OUTPUT«ok 1 - correct result␤»
20:05 moritz nom: use Test; my $x; ($x)  = grep 5, 1..1_000_000; is $x, 5, 'correct result';
20:05 p6eval nom d655c1: OUTPUT«(timeout)»
20:05 moritz nom: use Test; my $x; ($x,)  = grep 5, 1..1_000_000; is $x, 5, 'correct result';
20:06 p6eval nom d655c1: OUTPUT«ok 1 - correct result␤»
20:06 moritz hm, I wonder if that's correct
20:06 moritz after all it's the comma that makes the list, not the parens
20:07 jnthn Remember that in my (...) it's parsed with <signature>
20:08 jnthn Not jsut as a normal list.
20:08 dalek roast: 2512522 | moritz++ | S03-operators/assign.t:
20:08 dalek roast: unfudge and correct tests for RT #75950
20:08 dalek roast: review: https://github.com/perl6/roast/commit/251252213b
20:09 * tadzik is back there
20:09 moritz tadzik: I've fixed the fallout from the merge
20:10 tadzik moritz++, great
20:11 tadzik I see, I should have paid more attention to this conflict
20:11 jnthn I think we still have the issue in a couple of places, but I'll look at that later.
20:12 jnthn Hunting some performance bugs at the moment.
20:12 dalek roast: e0d5199 | moritz++ | S12-class/augment-supersede.t:
20:12 dalek roast: Hash should be augmentable
20:12 dalek roast: review: https://github.com/perl6/roast/commit/e0d51991a6
20:17 moritz fwiw I'm closing several of the parrot-type-leak-through tickets without tests
20:17 jnthn moritz: Makes sense.
20:17 moritz because they clutter the test suite, and it simply doesn't happen accidentally anymore in nom
20:19 moritz rakudo: my $h = {}; say (%$h).keys
20:19 p6eval rakudo d655c1: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "%$h).keys"␤»
20:19 moritz jnthn: the %$foo syntax would be a big win, and might not be too hard to implement for you
20:19 moritz (short for @($foo))
20:19 jnthn I hope %$foo ain't short for @($foo) :P
20:21 moritz erm, modulo fright sigils, of course
20:22 moritz *right
20:22 * moritz can't type anymore
20:23 sirmacik joined #perl6
20:24 moritz std: defined()
20:24 p6eval std 8b331d2: OUTPUT«ok 00:01 118m␤»
20:26 moritz rakudo: multi f(@a) { }; multi f(*@a) { }; f(my @a = (1, 2, 3))
20:26 p6eval rakudo d655c1:  ( no output )
20:29 moritz nom: my $i = 'e'; say so 'E' ~~ /:i $i/
20:29 p6eval nom d655c1: OUTPUT«Bool::False␤»
20:33 [Coke] rakudo: say 320+438+5
20:33 p6eval rakudo d655c1: OUTPUT«763␤»
20:34 [Coke] wow, it's dropped since I started reviewing.
20:34 jnthn Whoa.
20:34 im2ee re :)
20:34 moritz [Coke]: I've been doing lots of RT work in the last few hours
20:35 [Coke] moritz++; # I'll take the next shift. ;)
20:35 moritz :-)
20:35 [Coke] there's still 38 waiting on tests. (some of those might not even need tests.)
20:36 * [Coke] zzz
20:37 tadzik I'll look through them
20:43 tadzik nom: sub s($i is copy) { my @array; for 1..3 { @array.push($i); my $i = 1 + $i; }; @array }; s(9).perl.say
20:43 p6eval nom d655c1: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Array.new(Any, Any, Any)␤»
20:43 tadzik I don't think that's really correct
20:43 jnthn tadzik: Should be compile time error.
20:44 tadzik jnthn: why so?
20:44 moritz std: sub s($i is copy) {my $i = $i }
20:44 p6eval std 8b331d2: OUTPUT«Potential difficulties:â�¤  Useless redeclaration of variable $i (see line 1) at /tmp/DzHr0lQRus line 1:â�¤------> [32msub s($i is copy) {my $i[33mâ��[31m = $i }[0mâ�¤ok 00:01 124mâ�¤Â»
20:44 jnthn std: sub s($i is copy) { my @array; for 1..3 { @array.push($i); my $i = 1 + $i; }; @array }; s(9).perl.say
20:45 p6eval std 8b331d2: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Lexical symbol '$i' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as OUTER::<$i>â�¤  before you can unambiguously declare a new '$i' in this scope at /tmp/hnlZmmdofH line 1:â�¤---…
20:45 jnthn That's why.
20:46 tadzik then https://rt.perl.org/rt3/Public/Bug/Display.html?id=63596 is bogus
20:47 moritz tadzik: not bogus
20:47 moritz tadzik: it shouldn't Null PMC Access
20:47 moritz and I guess some of my analysis isn't write
20:47 moritz but we still need to do the right thing
20:48 tadzik hm, how do we distinguish NPA from a compile-time error?
20:49 tadzik oh, NPA is runtime
20:49 dalek roast: af1e334 | moritz++ | S04-declarations/my.t:
20:49 dalek roast: test for RT #76452
20:49 dalek roast: review: https://github.com/perl6/roast/commit/af1e334003
20:49 tadzik still, I don't know how to tist it correctly
20:49 moritz eval_dies_ok used to fail if the error was a Null PMC access
20:49 moritz we should add that back, I think
20:49 moritz the test I just added is weird -- it seems to fail only in the eval_dies_ok
20:50 moritz not when I run the same thing in the maingline
20:50 * moritz -> sleep
20:51 jnthn night, moritz
20:54 masak night, moritz. dream of less than 700 open tickets. ;)
21:08 dalek rakudo/nom: e32b7c2 | jnthn++ | src/core/List (2 files):
21:08 dalek rakudo/nom: Couple of small optimizations in lists.
21:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e32b7c244b
21:08 dalek rakudo/nom: 1c27dea | jnthn++ | src/Perl6/Metamodel/ (2 files):
21:08 dalek rakudo/nom: Make boolification cheaper in cases where things don't override .Bool and instead just rely on the definedness check.
21:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c27dea077
21:08 dalek rakudo/nom: c857a18 | jnthn++ | src/core/Parcel.pm:
21:08 dalek rakudo/nom: Make parcel assignmnet a little cheaper.
21:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c857a1804e
21:13 im2ee good night moritz :)
21:13 im2ee hah, it was 20 minutes ago..
21:15 tadzik :)
21:23 bbkr joined #perl6
21:26 bbkr 763 tickets? everyone++
21:32 dalek rakudo/nom: dd1307e | jnthn++ | src/core/Str.pm:
21:32 dalek rakudo/nom: Optimize RANGEPOS a little, which improves Str.succ and Str.pred, though still not really enough.
21:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd1307e447
21:34 icwiener_ joined #perl6
21:43 masak has someone responded to Klāvs on p6u yet?
21:43 masak it's been 8 hours. meybe he's switched to Python already. :)
21:51 Limbic_Region joined #perl6
21:52 masak re https://rt.perl.org/rt3/Ticket/Display.html?id=70297 -- the newline was only half of the request. the other half was that it print ^D (or ^C or ^Z as appropriate) when exiting interactive mode.
21:53 im2ee Have to go.. Good night ! :)
21:53 im2ee p/
21:53 im2ee o/
21:53 tadzik o/
21:53 masak o/
21:54 masak dobranoc!
21:55 im2ee :)
21:56 icwiener joined #perl6
21:57 masak I got a smile back this time \o/
22:02 Reaganomicon joined #perl6
22:22 MayDaniel joined #perl6
22:30 espadrine joined #perl6
22:39 soh_cah_toa how do i make an object a singleton? i have something like:
22:39 soh_cah_toa method new(Foo :$a, Bar :$b = Bar.new) { return self // $?CLASS::SUPER::new(:a($a), :b($b)) }
22:39 soh_cah_toa but i get the error message: Method 'postcircumfix:<( )>' not found for invocant of class 'Any'
22:40 [particle] joined #perl6
22:41 jnthn soh_cah_toa: Sounds right.
22:41 jnthn Is SUPER:: even spec any more?
22:41 jnthn soh_cah_toa: You're looking for callwith(:$a, :$b)
22:42 soh_cah_toa jnthn: return self // callwith(:$a, :$b)
22:42 soh_cah_toa like that?
22:42 dalek rakudo/macros: ae1f0a3 | masak++ | / (5 files):
22:42 dalek rakudo/macros: implemented quasi quotes and macros
22:42 dalek rakudo/macros:
22:42 dalek rakudo/macros: This works:
22:42 dalek rakudo/macros:
22:42 dalek rakudo/macros: - Macro declarations
22:42 dalek rakudo/macros: - Calling a macro (using `macro()` and `macro` and operators)
22:42 dalek rakudo/macros: - Quasi quotes
22:42 dalek rakudo/macros: review: https://github.com/rakudo/rakudo/commit/ae1f0a3884
22:42 masak people, I just pushed... what dalek++ said :)
22:43 tadzik ohohoho
22:43 masak tadzik: try something like this: 'macro foo($a, $b) { say "in macro $a"; quasi { "foo" } }; say "before"; say foo 1, 2; say "after"'
22:43 tadzik # Document it
22:43 tadzik <3
22:44 masak :)
22:44 masak it should output "before\nin macro AST<nnnnn>\nfoo\nafter\n".
22:45 tadzik what's "quasi"?
22:45 Tene masak: was it as straightforward as I thought it would be?
22:45 masak Tene: how should I know? :P
22:45 masak tadzik: it's a block of code that turns into an AST.
22:45 jnthn masak: I hope it says "in macro AST<nnnn>" before before, given it should happen at compile time...
22:46 masak jnthn: oh! yes.
22:46 masak my mistake.
22:46 tadzik I see
22:46 Tene masak: I thought we had discussed implementing that previously.  Apparently not.  :)
22:46 masak "in macro AST<nnnnn>\nbefore\nfoo\nafter"
22:46 jnthn masak: Mistake in what you said rather than mistake in implementing it at compile time, I hope :P
22:46 masak yes :)
22:46 jnthn phew
22:46 jnthn :)
22:47 dalek rakudo/nom: f1eba49 | jnthn++ | src/ (2 files):
22:47 dalek rakudo/nom: Add a couple of ops for checking if we have a VM list/hash.
22:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f1eba49a37
22:47 dalek rakudo/nom: 27090e7 | jnthn++ | src/core/List.pm:
22:47 dalek rakudo/nom: Make List.shift cheaper in the (common) case that we have an element. This in turn makes list assignment cheaper, wich does a gimme to ensure there is an element, followed by a shift.
22:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/27090e7edb
22:52 masak tadzik: at present, you can pass in ASTs into a macro, and you can return ASTs, but there's no way to manipulate them on the way through.
22:52 Tene masak: Very nice work.
22:53 tadzik masak: so I can't quasi { $b }, right?
22:55 soh_cah_toa could somebody help clarify what the 'handles' keyword is for? the spec (as usual) is hard to understand there
22:55 jnthn soh_cah_toa: Delegation.
22:55 jnthn tadzik: I guess you meant quasi { {{{ $b }}} }
22:55 masak tadzik: it would be... what jnthn said.
22:55 jnthn Though that'd just be returning $b anyway.
22:55 tadzik ooh, what'd that be?
22:56 tadzik oh, that's the way you use it, I suppose?
22:56 masak and yes, just returning $b would be easier.
22:56 tadzik hrm
22:56 masak tadzik: yes, it's like string interpolation but with ASTs.
22:56 tadzik is there a spec up-to-date?
22:56 masak sure.
22:56 tadzik kay, I'll just read that
22:56 soh_cah_toa jnthn: uh, ok. could you elaborate? ;)
22:56 masak but if I were you, I'd read it with my gists.
22:56 tadzik :) I'll do that
22:57 masak tadzik: https://gist.github.com/1148915 https://gist.github.com/1149126 https://gist.github.com/1156662
22:57 masak I just tried 'macro first($a, $b, $c) { $a }; say first 42, 43, 44' and it doesn't work for some reason :/
22:57 masak not sure I'm awake enough to debug it now.
22:58 jnthn soh_cah_toa: It's like if you have a class with an attribute, and really you just want to forward calls on the class to calls on that attribute.
22:58 jnthn soh_cah_toa: handles sets up that "forwarding" for you
22:58 jnthn It can rename too (e.g. expose the method as one name on the class, but then call another one on the attribute)
22:58 masak it gives the error `Can not get non-existant attribute '$!past' on class 'AST'`, but there is such an attribute on that class.
22:59 soh_cah_toa jnthn: what i don't understand is that method delegation is separate from object attributes
22:59 soh_cah_toa jnthn: how does a method delegate to an object attribute? that doesn't make sense to me :\
22:59 jnthn masak: Maybe a forgotten decontainerization.
22:59 masak jnthn: oh!
22:59 masak maybe.
22:59 masak we'll discuss that tomorrow :)
22:59 mauke a method on an object delegates to a method on an attribute of that object
22:59 jnthn :)
23:00 masak dobranight, #perl6
23:00 masak it feels nice to have the branch pushed.
23:00 soh_cah_toa interesting. doesn't that make the inheritance tree...weird?
23:00 jnthn nom: class Tail { method wag() { say "wag wag" } }; class Dog { has $.tail handles 'wag' }; Dog.new(tail => Tail.new).wag
23:00 p6eval nom 27090e: OUTPUT«wag wag␤»
23:01 jnthn soh_cah_toa: No, it's completely orthogonal to inheritance
23:01 mauke soh_cah_toa: I don't think it affects inheritance
23:01 jnthn soh_cah_toa: That's kinda the point - it makes doing composition-y OO easy.
23:01 soh_cah_toa alright. i'm just not used to the idea of "selective inheritance"
23:01 mauke inheritance?
23:01 jnthn It's not inheritance at all.
23:01 jnthn See what I did above.
23:02 jnthn All it's doing ofr you in that case is writing a method for you, at some level.
23:02 jnthn It's like you wrote a method wag() { $!tail.wag() }
23:02 jnthn But you don't have to; you just say "handles 'wag'" and you get one generated.
23:02 soh_cah_toa yeah
23:03 soh_cah_toa it just seems weird to just "inherit" one thing (method) instead of making it a subclass of something or composing a role
23:03 dalek rakudo/nom: 698e301 | jnthn++ | src/core/Array.pm:
23:03 dalek rakudo/nom: Optimize array access a little.
23:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/698e30178a
23:03 soh_cah_toa where you'd "inherit" all methods and attributes
23:04 jnthn soh_cah_toa: Huh? Having an object that calls methods on its attributes is like inheriting from the object in that attribute?
23:04 soh_cah_toa i've just never heard of that before. is there any other language that's done that before p6?
23:04 mauke perl5 :-)
23:04 jnthn No, normally one has to code those things up by hand, or end up mis-using inheritance.
23:05 soh_cah_toa ok, not "inteheriting" per se. i mean you're "gaining" behavior from another class
23:05 mauke https://metacpan.org/module/Moose::Manual::Delegation - probably stolen from perl6
23:05 jnthn soh_cah_toa: In a sense though, that's what object oriented programming is about. :)
23:05 * soh_cah_toa is not a compiler designer and does not know all the fancy pants terms
23:06 jnthn soh_cah_toa: I wish the day-to-day programmer was as aware of composition/delegation as they were inheritnace.
23:06 jnthn I've seen a few too many mis-applications of inheritance and the resulting mess.
23:07 soh_cah_toa i didn't realize there was a difference
23:07 soh_cah_toa which is your point exactly ;)
23:07 mauke a triangle has three points  <>  a triangle inherits from three points
23:08 jnthn mauke: ooh, nice example. :)
23:11 soh_cah_toa i suppose the root of much of my "misinformation" is due to the bad practices college enforces through c++ ;)
23:11 TimToady .oO(Perl 6, the Language Who Does Everything Better Than You, with apologies go Martha Stewart...)
23:11 TimToady *to
23:14 tadzik g'night #perl6
23:14 jnthn night, tadzik o/
23:14 tadzik oh, almost forgot the masak++ :)
23:16 soh_cah_toa so what if you have a class Foo that has an attribute `Bar $.foo handles 'bar'` but also defines bar() itself? i'd imagine that it delegates to Foo.bar(), not Bar.bar(), right?
23:16 jnthn nom: class Foo { has $.foo handles 'bar'; method bar() { } }; Foo.bar # curious...
23:16 p6eval nom 27090e: OUTPUT«===SORRY!===␤Package 'Foo' already has a method 'bar'; did you mean to declare a multi-method?␤»
23:17 jnthn hm :)
23:17 TimToady should prolly complain about redef
23:17 jnthn TimToady: That's what it just did :)
23:17 jnthn TimToady: Though the error could probably mention delegation explicitly.
23:17 TimToady sorry, typing 1 handed, so slow...
23:17 jnthn ouch :(
23:18 jnthn Hope the other one gets well soon.
23:18 TimToady thanks, icing it currently
23:18 soh_cah_toa TimToady: what happened to the hand?
23:18 * jnthn ponders how to go about getting optimizer merged
23:19 TimToady attached to sore elbow :)
23:19 soh_cah_toa ah...
23:19 jnthn I really don't want it to get in people's way as the quirks in the stuff it does so far are worked out, and I have a hard time knowing how much fallout their will be.
23:19 TimToady overuse of hammer mebbe
23:20 TimToady too many things looked like a nail...
23:20 soh_cah_toa bashing keyboard with hammer? yeah, i do that too. sometimes with my head
23:20 * jnthn ponders getting the tests it rejects correctly clenaed up, fixing the one or two places it does the wrong thing, then merging it, but requiring --optimize for now.
23:21 jnthn And perhaps building CORE.setting with --optimize.
23:21 jnthn Opinions welcome.
23:22 dalek rakudo/nom: cbe898f | jnthn++ | src/core/List.pm:
23:22 dalek rakudo/nom: Use nqp::islist to better handle vivifying list storage.
23:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cbe898f41b
23:29 espadrine joined #perl6
23:31 PacoLinux joined #perl6
23:32 jnthn omg what.
23:33 jnthn for 1..1000000 { } in nom spends 99% of its time in memmove, according to this profile...
23:57 soh_cah_toa perl6: "foobar" ~~ m:g/oo/
23:57 p6eval niecza v10-23-g50e0320: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Regex modifier g not yet implemented at /tmp/D73fgDAdc5 line 1:â�¤------> [32m"foobar" ~~ m:g[33mâ��[31m/oo/[0mâ�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) â�¤  a…
23:57 p6eval ..rakudo cbe898: OUTPUT«===SORRY!===␤Adverb 'g' not allowed on m at line 1, near ""␤»
23:57 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped b…
23:58 soh_cah_toa that doesn't seem right
23:58 dalek roast: 5721b37 | larry++ | S03-operators/value_equivalence.t:
23:58 dalek roast: === is supposed to autothread
23:58 dalek roast: review: https://github.com/perl6/roast/commit/5721b3772b

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

Perl 6 | Reference Documentation | Rakudo