Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 benabik joined #perl6
00:21 imarcusthis joined #perl6
00:22 whiteknight joined #perl6
00:30 lola_91 joined #perl6
00:31 lola_91 hello
00:39 raiph hola lola, what's your interest in perl 6 (if any)?
00:41 lola_91 i just passed by to say hi to few friends, they seem offline now :)
01:00 anuby joined #perl6
01:02 sftp joined #perl6
01:10 hypolin joined #perl6
01:12 kurahaupo am0c:  "orthogonal" means "independent", in the predicate logic sense. if two things are "orthogonal" it means they can be varied independently without limiting each other.
01:12 kurahaupo am0c: another sense is "at right angles" -- think in terms of vector-spaces
01:15 am0c right, there was only about angles in dictionaries. thank you so much for your kind explanation.
01:18 am0c I see now than that sorear meant that it didn't matter for syntactical view.
01:20 benabik joined #perl6
01:39 * skids tries to figure out whether .clone should be calling BUILDs
01:42 diakopter n: say <FILE>:d
01:42 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Illegal control operator: goto(fail, lexotic)␤  at /home/p6eval/niecza/lib/CORE.setting line 1469 (_lexotic @ 8) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1471 (goto @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3598 (ANON…
01:42 diakopter O_O
01:42 diakopter ... no idea......
01:52 imarcusthis joined #perl6
01:56 sftp joined #perl6
02:04 diakopter rn: say (5.5...5)[2]
02:04 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«3.5␤»
02:04 diakopter rn: say (5.5...5)[329845]
02:04 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«(timeout)»
02:04 diakopter rn: say (5.5...5)[32984]
02:05 p6eval niecza v22-14-g136ddcf: OUTPUT«-32978.5␤»
02:05 p6eval ..rakudo 011ec6: OUTPUT«(timeout)»
02:06 tokuhiro_ joined #perl6
02:07 gootle joined #perl6
02:08 diakopter rn: my \o=1;        \o\  |o| <o> |o|  /o/
02:08 p6eval rakudo 011ec6, niecza v22-14-g136ddcf:  ( no output )
02:09 diakopter :D
02:15 raiph r: print q{ q[ q{ ] ~ $self ~ q[ } ] }
02:15 p6eval rakudo 011ec6: OUTPUT« q[ q{ ] ~ $self ~ q[ } ] »
02:16 raiph ww
02:16 diakopter :)
02:20 diakopter wat.
02:20 diakopter rn: my \o=1; say (\o\).WHAT
02:20 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/hIhN2uTtBC line 1:�------> [32mmy \o=1; say (\o[33m�[31m\).WHAT[0m��Parse failed��»
02:20 p6eval ..rakudo 011ec6: OUTPUT«===SORRY!===␤Unable to parse expression in parenthesized expression; couldn't find final ')' at line 2, near "\\o\\).WHAT"␤»
02:20 diakopter ....
02:21 diakopter rn: my \o=1; say (\o\ ).WHAT
02:21 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«Capture()␤»
02:21 diakopter uhm, how could adding a space between a \ and ) make it parse
02:22 diakopter oh, unspace?
02:23 diakopter rn: my $a\ =\ "{\ 'foo'\ }"\ ; say \ $a
02:23 p6eval niecza v22-14-g136ddcf: OUTPUT«foo␤»
02:23 p6eval ..rakudo 011ec6: OUTPUT«===SORRY!===␤Confused␤at /tmp/yoLdGmXvMG:1␤»
02:34 am0c is there something similar to 'handles' feature in Perl 5 Moose?
02:36 diakopter rn: my&o={;};         o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
02:36 p6eval rakudo 011ec6, niecza v22-14-g136ddcf:  ( no output )
02:44 telex joined #perl6
02:45 diakopter haha
02:45 diakopter rn: my $a ^= 4; say $a
02:45 am0c oh, there is 'handles' in Perl 6 too and it is called delegation. hm!
02:46 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
02:46 p6eval ..rakudo 011ec6: OUTPUT«one(one(), 4)␤»
02:46 diakopter neither of those seems right
02:46 am0c r: my $a ^= 4; say $a
02:46 p6eval rakudo 011ec6: OUTPUT«one(one(), 4)␤»
02:47 raiph am0c: aiui moose was originally a backport to Perl 5 of OO as it was in Perl 6 around 2005; P6 had "handles" in it so moose got it too.
02:48 timotimo_ a moose with handles? are you talking about the antlers?
02:48 diakopter some people grab it by the tail
02:48 timotimo_ i guess it supports both methodologies?
02:48 am0c raiph: I see, it has been for 7 years then!
02:48 timotimo_ so, are the tailgrabbers second-class citizens?
02:49 raiph timotimo_: yes, but antlers seemed awkward to spell
02:49 am0c use "moose".ucfisrt;
02:50 am0c oops use will be executed at compile time. s/use/require/;
02:50 timotimo_ is that a problem?
02:53 grondilu joined #perl6
03:07 diakopter n: 1^^1
03:07 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] in <file…
03:14 raiph am0c: for more background, audrey's explanation of P6 impact on P5 in 2006: http://perlmonks.org/?node_id=835936
03:18 am0c yey thank you, raiph !
03:19 diakopter rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
03:19 p6eval rakudo 011ec6: OUTPUT«False␤»
03:19 p6eval ..niecza v22-14-g136ddcf: OUTPUT«True␤»
03:19 diakopter False! True!
03:20 diakopter phenny: ask masak nieczaissue or rakudobug, I dunno:   rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
03:20 phenny diakopter: I'll pass that on when masak is around.
03:23 diakopter rn: say (4) ~~~ (4) ~~~ (4)
03:23 p6eval rakudo 011ec6: OUTPUT«False␤»
03:23 p6eval ..niecza v22-14-g136ddcf: OUTPUT«True␤»
03:23 diakopter rn: say (4) ~~~ (4)
03:23 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«True␤»
03:23 dalek nqp: ef5bfe0 | duff++ | VERSION:
03:23 dalek nqp: bump VERSION to 2012.10
03:23 dalek nqp: review: https://github.com/perl6/nqp/commit/ef5bfe0c06
03:24 diakopter wat.
03:24 diakopter rn: say ((4) ~~~ (4)) ~~~ (4)
03:24 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«False␤»
03:24 diakopter rn: say (4) ~~~ ((4) ~~~ (4))
03:24 p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«False␤»
03:24 diakopter um
03:25 diakopter what is the 3-case if not one of those
03:25 diakopter (for niecza)
03:32 Celelibi joined #perl6
03:47 am0c std: (-> { say "hi"} ).postcircumfix:<( )>
03:47 p6eval std 47e39ad: OUTPUT«ok 00:00 45m␤»
03:47 am0c p6: (-> { say "hi"} ).postcircumfix:<( )>
03:47 p6eval rakudo 011ec6: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Block'␤  in block  at /tmp/M9Anq0beop:1␤␤»
03:47 p6eval ..niecza v22-14-g136ddcf: OUTPUT«hi␤»
03:49 am0c p6: ( -> { say "hi" } ).do
03:49 p6eval rakudo 011ec6: OUTPUT«No such method 'do' for invocant of type 'Block'␤  in block  at /tmp/5NIPTUaRJt:1␤␤»
03:49 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method do in type Block␤  at /tmp/MKg73n5gBy line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤  at /home/p…
03:50 dalek rakudo/nom: f231fc7 | duff++ | docs/announce/2012.10:
03:50 dalek rakudo/nom: Add October 2012 release announcement
03:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f231fc7a91
03:50 dalek rakudo/nom: 397a279 | duff++ | docs/release_guide.pod:
03:50 dalek rakudo/nom: update release guide
03:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/397a2794d8
03:50 dalek rakudo/nom: 1e942e7 | duff++ | src/core/ (2 files):
03:50 dalek rakudo/nom: Merge branch 'nom' of https://github.com/rakudo/rakudo into nom
03:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e942e7bff
03:50 dalek rakudo/nom: d954a1c | duff++ | tools/build/NQP_REVISION:
03:50 dalek rakudo/nom: [release] bump NQP revision
03:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d954a1c1af
03:50 dalek rakudo/nom: b71bfe1 | duff++ | VERSION:
03:50 dalek rakudo/nom: [release] bump VERSION
03:53 am0c n: say Code.^methods
03:53 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method methods in type ClassHOW␤  at /tmp/kmyxCCqI1C line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤  at…
03:53 am0c r: say Code.^methods
03:53 p6eval rakudo 011ec6: OUTPUT«No such method 'gist' for invocant of type 'Sub'␤  in method gist at src/gen/CORE.setting:4837␤  in sub say at src/gen/CORE.setting:7266␤  in block  at /tmp/4qwee1MRXF:1␤␤»
03:53 am0c std: say Code.^methods
03:53 p6eval std 47e39ad: OUTPUT«ok 00:00 42m␤»
03:55 am0c std: class A { has Code $.c handles :doit<WHAT_SHOULD_BE_HERE>; }
03:55 p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
03:55 am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )> }
03:55 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse parenthesized expression at /tmp/ntLUU1AEUT line 1:�------> [32mclass A { has Code $.c handles [33m�[31m(doit => &postcircumfix:<( )> }[0m�Couldn't find final ')'; gave up at /tmp/ntLUU1AEUT line 1:�------> [32mc ha…
03:55 am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>; }
03:55 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse parenthesized expression at /tmp/75eI5qheUx line 1:�------> [32mclass A { has Code $.c handles [33m�[31m(doit => &postcircumfix:<( )>; }[0m�Couldn't find final ')'; gave up at /tmp/75eI5qheUx line 1:�------> [32m ha…
03:56 am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>;) } #oops
03:56 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'postcircumfix:<( )>' used at line 1�Check failed�FAILED 00:00 47m�»
03:56 am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>); } #oops oops oops
03:56 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'postcircumfix:<( )>' used at line 1�Check failed�FAILED 00:00 47m�»
03:58 am0c std: class A { has Code $.c handles (doit => postcircumfix:<( )>); } #oops oops oops
03:58 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'postcircumfix:<( )>' used at line 1�Check failed�FAILED 00:00 45m�»
03:59 am0c std: tiny:<pair>
03:59 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'tiny:<pair>' used at line 1�Check failed�FAILED 00:00 41m�»
04:01 am0c std: :tiny<pair>
04:01 p6eval std 47e39ad: OUTPUT«ok 00:00 41m␤»
04:04 am0c r: class A { has Code $.c handles (doit => 'postcircumfix:<( )>') = { say "hi"; }; }; A.new.doit;
04:04 p6eval rakudo 011ec6: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Block'␤  in method doit at src/gen/CORE.setting:227␤  in block  at /tmp/03T9DaEiEb:1␤␤»
04:04 am0c n: class A { has Code $.c handles (doit => 'postcircumfix:<( )>') = { say "hi"; }; }; A.new.doit;
04:04 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method trait_mod:handles not yet implemented at /tmp/bC0K5Epw8w line 1:�------> [32mhandles (doit => 'postcircumfix:<( )>') [33m�[31m= { say "hi"; }; }; A.new.doit;[0m��Trait 0 not available on variables at /tmp/b…
04:05 am0c aarh.. i can't
04:06 colomon joined #perl6
04:31 fgomez joined #perl6
04:40 am0c isn't there "using namespace" stuff in Perl 6?
04:46 colomon am0c: maybe http://perlcabal.org/syn/S11.html#Compile-time_Importation is what you're looking for?
04:46 sorear o/
04:46 colomon \o
04:47 sorear diakopter++ #icketing
04:49 * colomon is just going to bed, actually.  o/
04:56 am0c colomon: I think it's not. for example, after "using namespace std;" in C++ you don't have to type "std::cin" but instead we can just say "cin"
05:14 dalek rakudo/nom: d171b92 | duff++ | docs/announce/2012.10:
05:14 dalek rakudo/nom: [release] add the blurb about Tokyo.pm
05:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d171b92e36
05:25 birdwindupbird joined #perl6
05:28 Celelibi joined #perl6
05:38 mucker joined #perl6
05:41 Targen joined #perl6
05:46 Celelibi joined #perl6
05:47 GlitchMr joined #perl6
05:56 aharoni joined #perl6
06:04 am0c std:     sub compare (|args, Num $x, Num $y --> Bool) { ... }
06:04 p6eval std 47e39ad: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/iZ4ry1zHH7 line 1:â�¤------> [32msub compare (|args, Num [33mâ��[31m$x, Num $y --> Bool) { ... }[0mâ�¤  $y is declared but not used at /tmp/iZ4ry1zHH7 line 1:â�¤------> [32msub compare (|args, Num $x, Num [3…
06:04 am0c std:     sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }
06:05 p6eval std 47e39ad: OUTPUT«ok 00:00 46m␤»
06:05 am0c nr:     sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }
06:05 p6eval rakudo b71bfe: OUTPUT«===SORRY!===␤Cannot put required parameter $x after variadic parameters␤at /tmp/k5ONupxJVs:1␤»
06:05 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Potential difficulties:â�¤  &compare is declared but not used at /tmp/8yJB83suqU line 1:â�¤------> [32msub compare [33mâ��[31m(|args, Num $x, Num $y --> Bool) { $x + [0mâ�¤â�¤Â»
06:05 am0c nr:     sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }; compare 1, 2
06:05 p6eval rakudo b71bfe: OUTPUT«===SORRY!===␤Cannot put required parameter $x after variadic parameters␤at /tmp/eK5IyNoz_7:1␤»
06:05 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: No value for parameter '$x' in 'compare'␤  at /tmp/sze6RLS0ip line 0 (compare @ 1) ␤  at /tmp/sze6RLS0ip line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting l…
06:07 am0c It seems that Parcel at first parameter is not supported yet. http://perlcabal.org/syn/S06.html#Argument_list_binding
06:07 TimToady yes, looks like bug to me
06:09 benabik joined #perl6
06:11 Celelibi joined #perl6
06:13 sorear TimToady: #SanDiego.pm just watched jnthn's perl 6 modules talk.  can you confirm that you are the first heckler? :D
06:16 TimToady oh, most likely
06:21 sorear I'm like "cool... yes... ah... HEY I KNOW THAT VOICE"
06:25 fhelmberger joined #perl6
06:27 Celelibi joined #perl6
06:32 am0c I think this is a bug. Circular module loading detected involving module 'ModuleName'. https://gist.github.com/3916541
06:42 am0c ...oops it's not...I just didn't (and don't) know about package and module and class.
07:10 brrt joined #perl6
07:16 flightrecorder joined #perl6
07:16 FROGGS joined #perl6
07:19 grondilu joined #perl6
07:26 domidumont joined #perl6
07:33 domidumont joined #perl6
07:35 moritz PerlJam: what's the state of the rakudo release?
07:36 moritz oh, it's out. PerlJam++
07:38 colomon_ joined #perl6
07:39 moritz sorear: how hard would it be for niecza's eval_{lives,dies}_ok to evaluate stuff in the caller's context?
07:41 GlitchMr Isn't it called 'eval_' X~ <lives dies> X~ '_ok' in Perl 6?
07:42 sorear moritz: trouble is that assumes the CALLER still exists
07:43 tadzik good morning #perl6
07:43 sorear moritz: niecza has special casery to avoid optimizing out frames where &eval is mentioned
07:43 sorear GOOD MORNING TADZIK
07:43 brrt \o everybody
07:43 tadzik OH HELLO SOREAR. GOOD DAY
07:43 GlitchMr CAPS LOCK IS BEST KEY, ALSO GOOD MORNING, TADZIK :-).
07:46 brrt why does capitalized text look like shouting, anyway?
07:47 tadzik comic books legacy, maybe
07:47 moritz sorear: I have trouble drawing conclusions from your answer :-)
07:47 moritz sorear: so let me rephrase my question
07:48 moritz sorear: would you object to me changing the spec and roast to have eval_{lives,dies}_ok evaluate the string the caller's context?
07:48 sorear moritz: no
07:49 moritz sorear: ok, then I'll experiment with it
08:03 am0c Could anyone tell me if this is rakudo bug or my bug? https://gist.github.com/3916541
08:04 Celelibi joined #perl6
08:06 sorear am0c: Your bug.
08:07 am0c oh..T__T
08:07 sorear you have a circular dependency
08:07 sorear rakudo tries to load MainWindow, discovers Listener needs to be loaded first
08:08 sorear rakudo tries to load Listener, discovers MainWindow needs to be loaded first
08:08 sorear rakudo throws its arms up in despair
08:09 am0c aha.. to decide which would be first is the problem.
08:11 am0c hm.. so I will tell rakudo that MainWindow is the first.
08:12 masak morning, #perl6
08:12 phenny masak: 03:20Z <diakopter> ask masak nieczaissue or rakudobug, I dunno:   rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
08:12 masak rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
08:13 sorear masaku
08:13 p6eval rakudo d171b9: OUTPUT«False␤»
08:13 p6eval ..niecza v22-14-g136ddcf: OUTPUT«True␤»
08:13 sorear sleep&
08:13 masak I freely confess that I have no idea what the above should do.
08:13 am0c sorear: good night
08:13 masak someone with more brainpower may want to analyze it.
08:13 * FROGGS .oO( a quadcycle ascii art bug? )
08:14 sorear rn: say (4) ~~~ (4) ~~~ (4)
08:14 p6eval rakudo d171b9: OUTPUT«False␤»
08:14 p6eval ..niecza v22-14-g136ddcf: OUTPUT«True␤»
08:14 FROGGS sorear: gnight!
08:14 masak sorear: SWADOL[Niecza improvements]
08:14 sorear rn: say (4) ~~~ (4)
08:14 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
08:14 sorear rn: say (4) ~~~ True
08:14 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«False␤»
08:14 FROGGS if the result of (4) ~~~ (4) is Bool true...
08:14 FROGGS right, what I thought
08:15 kresike joined #perl6
08:15 kresike good morning all you happy perl6 people
08:15 FROGGS gmorning
08:15 masak kresike! \o/
08:15 sorear maybe precedence parsing funny business
08:15 sorear out for reals
08:15 kresike masak, o/
08:15 masak rn: say ~4
08:15 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«4␤»
08:16 masak rn: say 4 ~~ ~4
08:16 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
08:16 masak rn: say (4 ~~ ~4) ~~ (1 == 1)
08:16 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
08:17 masak from this, I'm inclined to say it's a rakudobug, not a nieczabug.
08:17 FROGGS ?
08:17 FROGGS rn: ((4) ~~~ (4)) ~~~ ((4) ~~~ (4))
08:17 p6eval rakudo d171b9, niecza v22-14-g136ddcf:  ( no output )
08:17 FROGGS rn: say ((4) ~~~ (4)) ~~~ ((4) ~~~ (4))
08:18 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
08:20 Celelibi joined #perl6
08:21 Timbus r: say True ~~ ~4
08:21 p6eval rakudo d171b9: OUTPUT«False␤»
08:21 Timbus (4) ~~~ (4) ~~~ (4) -> False to my head
08:22 Timbus (4 ~~ ~4) is true. True ~~ ~4 is false? but im probably way wrong
08:24 Timbus or does ~~ chain because wow
08:24 Timbus my head
08:25 FROGGS pretty awesome: http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the%20Operators%20A4%20300dpi.jpg
08:25 FROGGS is that still up to date?
08:28 Timbus := is runtime binding and ::= is compile time? really?
08:28 Timbus ij thought it was just a const type thing
08:49 am0c Could anyone tell me how should I fix this code? I am really curious but cannot solve this problem. should I just don't do that? https://gist.github.com/3916541
08:49 GlitchMr am0c: Because it's circular dependency
08:49 GlitchMr I once also had this problem
08:50 GlitchMr It's possible that it will be fixed in future (in the way Node.js does it for example), but currently Rakudo doesn't support circular dependencies
08:51 am0c I see.
08:51 masak GlitchMr: please source your claim that it's possible that it will be fixed in the future.
08:51 daxim joined #perl6
08:51 masak that seems to me to be a misunderstanding of how Perl 6 parsing/module loading works.
08:52 am0c hm...
08:52 masak see my discussion about this with TimToady on p6l from a few years ago.
08:52 am0c okay.
08:52 masak am0c: what you want to do is something like class MainWindow { ... }
08:52 masak with the three dots being literal code.
08:53 masak to make sure the class exists before the dependent class uses it.
08:54 am0c anyway, I haven't had this problem in Perl 5 even though I code like this. it's novel and unfamiliar.
08:54 am0c masak: I will try!
09:01 Timbus the problem is your two classes are dependent on one another. i know that sounds obvious, but. they really are. one cannot exist without the other. so why are they separate? why is listener not a nested class or a role.
09:01 Timbus why not have an untyped 'parent' inside listener, so that you can attach it to other Window types possibly
09:02 Timbus not to give the old 'why would you want that?' response but uh.
09:03 jnthn morning o/
09:03 Timbus or is this more like a linked list? if you have some kinda window -> listener -> otherwindow -> otherlistener chain.. thing.. maybe then i can see the use?
09:05 Celelibi joined #perl6
09:06 am0c Timbus: hm... i thought that's the common situation we met. i didn' think that's the erroneous structure.
09:07 jnthn PerlJam++ # release
09:07 am0c jnthn: good morning o/
09:08 am0c IMHO it is not good if I 'had' to untype it, anyway, just because of the dependency.
09:09 Timbus am0c, i can see a need for an attribute class to sometimes access the parent holding it, but I would usually prefer it was untyped. if it really is typed, then I see no harm in doing what masak said and declaring a 'class MainWindow {...}' in the listener.pm file
09:10 Timbus i think you should be putting both classes in the one file if they rely heavily on one another
09:11 Timbus for refactoring and etc porpoises
09:11 am0c ah, right, it's not seperate features so combined in one if Listener has only specific parent type.
09:13 Timbus well, re-reading what i and masak said it might not have been clear: you can pre-declare a class just like you can in C++, to resolve these circular dependencies
09:15 Timbus so even though i think you should merge the two files in this particular case, you can literally just put "class MainWindow {...}" <- exactly that, at the top pf listener.pm to resolve the issue, and still use what you already have laid out
09:15 Timbus you might have to remove "use MainWindow"
09:18 am0c Timbus: ow! you must be watching me!
09:18 masak yes, circular module usages are always Wrong in Perl 6.
09:18 masak that's why I reacted to what GlitchMr wrote.
09:20 arnsholt GlitchMr: I don't think Perl 6 will ever support circular chains of use
09:20 arnsholt It comes down to how the parser works, essentially
09:21 am0c masak: thanks! I found the thread yey. http://perl.markmail.org/search/?q=list%3Aorg.perl.perl6-language+from%3A%22Carl+M%C3%A4sak%22+dependency#query:list%3Aorg.perl.perl6-language%20from%3A%22Carl%20M%C3%A4sak%22%20dependency+page:1+mid:rzvfkbsxlkp4ewex+state:results
09:22 am0c http://markmail.org/message/rzvfkbsxlkp4ewex
09:22 Timbus dang youre like an internet archaeologist
09:22 am0c hehe
09:23 am0c that's a funny hyperbole, I like it!
09:38 domidumont joined #perl6
09:41 domidumont joined #perl6
09:47 domidumont joined #perl6
09:49 domidumont joined #perl6
09:54 kst joined #perl6
10:16 am0c cannot use $.attr public accessor in submethod BUILD.. interesting..
10:17 am0c it says: Virtual call $.match may not be used on partially constructed objects
10:17 Timbus of course
10:17 Timbus your object isn't made yet
10:17 am0c erm...
10:18 Timbus if you're assigning, use $!match i guess
10:18 am0c I have been misunderstood then.
10:20 leont joined #perl6
10:21 jnthn Use T!attr
10:21 jnthn er, $!attr
10:22 jnthn $.attr is a method call
10:22 Khisanth joined #perl6
10:24 am0c thanks!
10:31 cognominal joined #perl6
10:35 am0c snr: class Room {  }; class PerlRoom is Room { submethod BUILDALL() {  } }; PerlRoom.new;
10:35 am0c p6eval: help
10:35 p6eval am0c: Usage: <(star|pugs|nqp|b|std|niecza|rakudo|nom|npr|n|r|perl6|prn|rn|p|rnp|nrp|pnr|rpn|p6|nr)(?^::\s) $perl6_program>
10:35 am0c npr: class Room {  }; class PerlRoom is Room { submethod BUILDALL() {  } }; PerlRoom.new;
10:36 p6eval rakudo d171b9: OUTPUT«Too many positional parameters passed; got 3 but expected 1␤  in submethod BUILDALL at /tmp/shTghh1K8i:1␤  in method bless at src/gen/CORE.setting:681␤  in method new at src/gen/CORE.setting:666␤  in block  at /tmp/shTghh1K8i:1␤␤»
10:36 p6eval ..niecza v22-14-g136ddcf, pugs:  ( no output )
10:36 am0c std: class Room {  }; class PerlRoom is Room { submethod BUILDALL() {  } }; PerlRoom.new;
10:36 p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
10:36 jnthn Overriding BUILDALL is a pretty bad idea, fwiw :)
10:39 jnthn (Unless you call the original one too)
10:44 mucker joined #perl6
10:46 am0c std: class Room {  }; class PerlRoom is Room { submethod BUILDALL() { nextsame; } }; PerlRoom.new;
10:46 p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
10:46 am0c r: class Room {  }; class PerlRoom is Room { submethod BUILDALL() { nextsame; } }; PerlRoom.new;
10:46 p6eval rakudo d171b9: OUTPUT«Too many positional parameters passed; got 3 but expected 1␤  in submethod BUILDALL at /tmp/h4cOtdj7Kb:1␤  in method bless at src/gen/CORE.setting:681␤  in method new at src/gen/CORE.setting:666␤  in block  at /tmp/h4cOtdj7Kb:1␤␤»
10:47 am0c jnthn: but if i use 'submethod' it's not overring, is it?
10:48 jnthn am0c: Well, it's replacing it for the current class at least
10:48 jnthn It's true you'd not be influencing any subclasses.
10:48 jnthn r: class Room {  }; class PerlRoom is Room { submethod BUILDALL(|) { nextsame; } }; PerlRoom.new; # fwiw
10:48 p6eval rakudo d171b9:  ( no output )
10:49 am0c .....ah?
10:50 cognominal joined #perl6
10:50 jnthn it's like sub foo(|all_the_args) { } but without giving a name to the capture that gets all the args :)
10:50 am0c hm..
10:50 am0c std: class Room {  }; class PerlRoom is Room { submethod BUILDALL { nextsame; } }; PerlRoom.new; # same?
10:50 p6eval std 47e39ad: OUTPUT«ok 00:00 42m␤»
10:50 am0c r: class Room {  }; class PerlRoom is Room { submethod BUILDALL { nextsame; } }; PerlRoom.new; # same?
10:50 p6eval rakudo d171b9: OUTPUT«Too many positional parameters passed; got 3 but expected 1␤  in submethod BUILDALL at /tmp/XtiG5a9HjT:1␤  in method bless at src/gen/CORE.setting:681␤  in method new at src/gen/CORE.setting:666␤  in block  at /tmp/XtiG5a9HjT:1␤␤»
10:51 am0c I see.
10:51 am0c r: class Room {  }; class PerlRoom is Room { submethod BUILDALL (|args) { args.say; nextsame; } }; PerlRoom.new; # same?
10:51 p6eval rakudo d171b9: OUTPUT« ().hash␤»
10:51 am0c o___O
11:04 cognominal joined #perl6
11:04 cognominal nc:  sub a($c='') { ENTER  say "enter"; LEAVE say "leave"; return if $c == "return"; exit(1) if $c == "exit";  };  a; a("return"); a("exit")
11:05 cognominal r:  sub a($c='') { ENTER  say "enter"; LEAVE say "leave"; return if $c == "return"; exit(1) if $c == "exit";  };  a; a("return"); a("exit")
11:05 p6eval rakudo d171b9: OUTPUT«enter␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏return' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:9948␤  in sub infix:<==> at src/gen/CORE.setting:2612␤  in sub infix:<==> at src/gen/CORE.setting:261…
11:05 cognominal oops
11:05 mucker joined #perl6
11:05 cognominal rn:   sub a($c='') { ENTER  say "enter"; LEAVE say "leave"; return if $c eq "return"; exit(1) if $c eq "exit";  };  a; a("return"); a("exit")
11:05 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«enter␤leave␤enter␤leave␤enter␤»
11:06 Su-Shee_ joined #perl6
11:07 cognominal is exit reason enough no to execute the LEAVE phaser?
11:09 * jnthn wonders if it does END phasers on exit...
11:09 jnthn Does Perl 5, ooc?
11:09 jnthn r: END { say 'kthxbai' }; exit(0)
11:09 p6eval rakudo d171b9: OUTPUT«kthxbai␤»
11:09 jnthn Hm
11:09 cognominal joined #perl6
11:09 jnthn If we do exit we should probably do LEAVE too. :)
11:09 moritz eval: END { print "bai" }; exit
11:09 buubot_backup moritz: bai
11:09 am0c $ perl -E 'END { say "bye" }; exit'
11:09 am0c bye
11:09 jnthn er, END
11:09 jnthn Yeah
11:10 am0c i late :3
11:10 jnthn I think we should probably run LEAVE phasers at exit time.
11:10 jnthn am0c: Hm, in your timezone I guess it's very late...
11:10 jnthn no, wait, what... :)
11:10 leont left #perl6
11:10 jnthn Oh, I dunno how time works ;)
11:10 am0c it's 8:10 pm
11:10 am0c heh
11:11 jnthn oh, so not late in that sense :)
11:11 am0c er.. and it's friday here
11:11 am0c it is!
11:11 jnthn ah :)
11:11 cognominal I do so.   exit has not the connation of  "hurry out in total panic"
11:11 jnthn Same here :)
11:11 brrt joined #perl6
11:11 jnthn cognominal: Right. That's what segfaults are for :)
11:11 cognominal :)
11:11 am0c i mean.. it isn't late #< english is hard >
11:12 am0c in Korean, if somebody said "it isn't sth" and you agree, you say "yes"
11:13 am0c in English, if somebody say "it isn't sth" and you agree, you say "no"
11:13 am0c it's confusing
11:13 am0c i mean.. "yes it is" or "no, it isn't"
11:14 moritz in German we have a special word for contradicting a negated question
11:14 moritz "doch"
11:14 FROGGS in german you can answer yes and/or no, but it tends to be no
11:15 cognominal joined #perl6
11:15 am0c interesting :3
11:15 hoelzro oh, I love "doch"
11:15 hoelzro that's my favorite German word that doesn't have an English equivalent
11:15 am0c "doch" feels like exclamation
11:15 cognominal sorry, I will not have a reliable and fast connection for a while. I read the log though
11:16 FROGGS hoelzro: maybe it gets adopted like "Doppelgänger"
11:17 moritz as a German I always find it funny to stumble across German words in English
11:18 moritz "Gedankenexperiment" surprised me
11:18 FROGGS ya, rucksack, kindergarden...
11:18 FROGGS wow
11:18 jnthn kaput :)
11:18 FROGGS not to forget blitzkrieg *g*
11:19 jnthn .oO( well, that conversation just bombed... )
11:20 FROGGS :o)
11:20 am0c hehe
11:22 am0c std: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } }
11:22 p6eval std 47e39ad: OUTPUT«ok 00:00 44m␤»
11:23 am0c prn: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } }
11:23 p6eval niecza v22-14-g136ddcf, pugs:  ( no output )
11:23 p6eval ..rakudo d171b9: OUTPUT«===SORRY!===␤Attribute $!jth not declared in class B␤at /tmp/LDEOsJbdBT:1␤»
11:23 moritz rakudo++
11:24 jnthn Indeed.
11:24 jnthn I was sure Niecza caught that one...
11:24 am0c n: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } }; B.new
11:24 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Niecza.Kernel.DefaultNew (Niecza.Frame th, Niecza.P6any proto, Niecza.VarHash args) [0x00000] in <filename unknown>:0 ␤  at Run.CORE.C189Mu.new (N…
11:25 am0c woho
11:25 moritz n: class A { method set() { $!foo = 3 } }; A.set
11:25 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Attribute $!foo not defined in A or any superclass␤  at /tmp/zUuJCG5UDY line 1 (A.set @ 3) ␤  at /tmp/zUuJCG5UDY line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.s…
11:26 FROGGS prn: class A { has $.jth }; class B is A { submethod BUILD { ::B.jth = 1 } }
11:26 p6eval rakudo d171b9, niecza v22-14-g136ddcf, pugs:  ( no output )
11:26 am0c why BUILD in class B cannot access A's attribute?
11:26 FROGGS prn: class A { has $.jth }; class B is A { submethod BUILD { ::A.jth = 1 } }
11:26 p6eval rakudo d171b9, niecza v22-14-g136ddcf, pugs:  ( no output )
11:26 FROGGS something like that, right?
11:26 am0c ah!
11:26 jnthn am0c: It's not about BUILD. It's because attributes are always private to a class.
11:27 jnthn A subclass can never see a parent class attributes.
11:27 FROGGS am0c: what if B is A is C, and A and C have $.jth ?
11:27 FROGGS you wouldn't know which one you get
11:27 jnthn There's a nice post on why Perl 6 has no protected somewhere I think...
11:27 am0c jnthn: I see, then, I might use accessor, and plus class name as a prefix.
11:28 moritz jnthn: on my blog, yes
11:28 jnthn moritz: I wondered if it was yours :)
11:28 jnthn But couldn't remember.
11:28 jnthn moritz++
11:28 moritz http://perlgeek.de/blog-en/perl-6/protected-attributes-make-no-sense.html
11:28 jnthn am0c: Note that you can do things like $obj.SomeClass::method()
11:29 jnthn am0c: That is, if you know exactly which class' accessor you want, you can get at it like that.
11:29 am0c FROGGS: I think dispatcher can select for us and sometimes not work well.
11:29 moritz the attributes being private to each class is one of the reasons that we call a BUILD submethod in each class
11:29 moritz so that we can set them there
11:31 am0c aha! I got it! it's also nice to comprehend and remember :3
11:32 FROGGS am0c: if you want to access multi method then yes, because they have a different signature, but an attribute has no such thing
11:34 am0c FROGGS: I see. that's right. it makes sense!
11:35 jnthn lunch &
11:37 am0c enjoy your lunch o/
11:37 colomon_ joined #perl6
11:42 GlitchMr joined #perl6
11:48 cognominal joined #perl6
11:55 cognominal joined #perl6
11:55 cognominal moritz: I have seen in english   schadenfreude,  zeitgeist
11:56 moritz cognominal: those are fairly common(ish), which is why they didn't surprise me as much as some other
11:57 cognominal and a synonymous of nemesis,  doppelganger?
11:59 cognominal doppelgänger!
11:59 GlitchMr joined #perl6
11:59 moritz not quite
11:59 moritz nemesis is more like an arch enemy
12:00 moritz and doppelgänger is a look-alike pretending to be you
12:00 moritz a double
12:00 cognominal indeed, I just read the wikipedia entry for doppergänger
12:02 brrt literally translated : double-goer
12:03 cognominal indeed
12:04 Juerd In case anyone wants to migrate from screen+irssi+screen_away.pl to mosh+screen+irssi, I have a mosh_away.pl in ~juerd/.irssi/scripts
12:04 Juerd Found one online, modified it to work on a multi user system.
12:05 masak what's screen_away.pl ?
12:05 Juerd screen_away.pl puts irssi in /away when screen detaches
12:05 Juerd And back again when you re-attach
12:06 cognominal Juerd, that means I can use perlcabal as an irc bouncer?
12:06 Juerd cognominal: As something to run an IRC client on. Please don't use feather for proxies or bouncers.
12:07 cognominal ok
12:07 cognominal so I can run screen, or tmux (whatever its name)?
12:07 Juerd Yes.
12:15 am0c npr: class A { has $.attr; multi submethod BUILD (|) { nextsame } }; A.new(attr => 1).say
12:16 p6eval pugs: OUTPUT«*** ␤    Unexpected ")"␤    expecting ":", "*" or parameter name␤    at /tmp/sdpzYIVt2d line 1, column 47␤»
12:16 p6eval ..niecza v22-14-g136ddcf: OUTPUT«A.new(...)␤»
12:16 p6eval ..rakudo d171b9: OUTPUT«A.new(attr => Any)␤»
12:17 cognominal joined #perl6
12:22 aharoni joined #perl6
12:24 am0c npr:  class A { has $.attr; multi submethod BUILD (|args) { args.say; nextsame; } }; A.new(attr => 1).say
12:24 p6eval niecza v22-14-g136ddcf: OUTPUT«A.new(...)␤»
12:24 p6eval ..rakudo d171b9: OUTPUT«"attr" => 1␤A.new(attr => Any)␤»
12:24 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "args"␤    expecting ":", "*" or parameter name␤    at /tmp/OFgj6qRmxT line 1, column 47␤»
12:39 lorn joined #perl6
12:45 SamuraiJack joined #perl6
12:58 cognominal joined #perl6
13:00 hash_table joined #perl6
13:03 preflex joined #perl6
13:04 Psyche^ joined #perl6
13:12 cognominal joined #perl6
13:16 arnsholt A git question: is it possible to extract a sub-set of a git history into a separate rep somehow?
13:17 jnthn filter-branch
13:17 arnsholt Oooh, right.
13:17 moritz (the poor man's solution is to add the original repo as a remote, and then rebase the commits you want into a local branch; filter-branch is probably much better)
13:18 jnthn (Make a copy of the repo, and filter-branch that, iirc)
13:18 arnsholt Clean checkout, then filter-branch and kill and mangle as appropriate
13:18 arnsholt Yeah
13:18 arnsholt I'd like to share the code for the experiments described in an article, but the repo has two different versions of the article (for different conferences) and the experiments as a subdirectory
13:18 moritz I haven't had to use filter-branch since I split up the git-svn clone of the pugs repo
13:19 arnsholt So I should probably clean up the repo a bit before sharing =)
13:19 jnthn I'm not sure it's a tool for frequent use ;)
13:19 jnthn But it's handy for things like this :)
13:20 moritz moritz@casella:~/p6/panda>panda install Pod::To::HTML
13:20 moritz No such method 'VAR' for invocant of type 'Any'
13:20 arnsholt Yeah, this is where I'm quite thankful for git allowing me to pretty much destroy everything if I really want to
13:20 moritz sadface :/
13:21 * moritz cleans out and tries a fresh bootstrap
13:24 jnthn aww, I canny even install Panda here :(
13:25 jnthn t/bar/baz/x.t ........ 1/3 'rm' is not recognized as an internal or external com
13:25 jnthn mand,
13:25 jnthn operable program or batch file.
13:25 cognominal joined #perl6
13:25 jnthn oh no, that's not the actual failure
13:25 jnthn t/panda/ecosystem.t .. 1/10 Failed to remove the file 'C:\Users\jnthn\.panda\src
13:25 jnthn \panda/REMOVEME': unlink failed: Access is denied.
13:26 jnthn That is. Hm.
13:27 colomon btw, rebootstrap.pl++
13:27 [Coke] jnthn: had panda ever been made windows-clean?
13:27 [Coke] I know progress was made, but wasn't sure if it was ever 100%
13:30 jnthn [Coke]: Yes, I had it working quite nicely on my laptop during NPW
13:32 moritz I think FROGGS sent several patches
13:33 arnsholt Oooooh!
13:34 arnsholt git filter-branch --subdirectory-filter experiments/ # All I had to do
13:34 arnsholt It seems someone wanted the same thing as me at some point =D
13:39 moritz you are a uniq snowflake. Even your git filter-branch requirements have been seen before.
13:39 moritz :-)
13:39 timotimo_ does that sentence miss an "if" or "though" or am i missing something?
13:40 moritz timotimo_: you must read the first sentence with <sarcasm> tags
13:40 timotimo_ a, that makes it consistent again. thanks!
13:46 PerlJam good morning #perl6
13:47 colomon o/
13:47 moritz \o
13:47 moritz PerlJam++ # rakudo release
13:47 jnthn hi, PerlJam
13:48 * PerlJam is tired
13:48 PerlJam This week has been too hectic
13:48 colomon ooo, PerlJam++
13:49 PerlJam (but good-hectic rather than bad-hectic, so that's a plus :)
13:59 jnthn moritz: Does unlink handle being passed a directory (as in, remove it and everything beneath it) in Rakudo on Linux?
14:01 felher jnthn: Failed to remove the file 'testdir': unlink failed: Is a directory
14:01 felher jnthn: at least with This is perl6 version 2012.08-119-g0973612 built on parrot 4.7.0 revision RELEASE_4_7_0-165-g29796c6
14:02 jnthn felher: That's kinda what I expected.
14:02 cognominal r: my Hash \matrix of Array of Int;
14:02 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Term definition requires an initializer at line 2, near "of Array o"␤»
14:02 flightrecorder joined #perl6
14:02 cognominal r: my %matrix of Array of Int;
14:02 p6eval rakudo d171b9:  ( no output )
14:03 jnthn I wonder if the issue is that REMOVEME should not end up being a directory...
14:04 stopbit joined #perl6
14:05 jnthn oh...maybe the REMOVEME directory is left over from a previous panda fail...
14:06 jnthn yes!
14:06 felher :)
14:07 * felher -> afk
14:07 jnthn moritz: Pod::To::HTML just installed OK here, now I have a working panda again :)
14:13 cognominal perl6: say i*i, say i**2
14:13 p6eval niecza v22-14-g136ddcf: OUTPUT«-1+1.2246063538223773E-16i␤-1+0iTrue␤»
14:13 p6eval ..rakudo d171b9: OUTPUT«-1+1.22460635382238e-16i␤-1+0iTrue␤»
14:15 FROGGS joined #perl6
14:21 kaare_ joined #perl6
14:21 hash_table joined #perl6
14:26 PacoAir joined #perl6
14:26 [Coke] cognominal: did you mean s/,/;/ ?
14:28 sirrobert quit
14:28 cognominal joined #perl6
14:29 cognominal joined #perl6
14:30 daniel-s joined #perl6
14:30 PacoAir joined #perl6
14:32 skids joined #perl6
14:38 sirrobert joined #perl6
14:41 flightrecorder joined #perl6
14:45 cognominal joined #perl6
14:45 * brrt wishes he was writing in p6 right now
14:45 brrt how can a language not have the concept of pairs?
14:51 [Coke] brrt: I thought you hated perl 6!
14:52 brrt i do not hate perl 6 at all
14:52 brrt i have had some issues with understanding
14:54 cognominal brrt hates perl 6 at none. Maybe because he does not dig junction?  :)
14:54 brrt why would i hang out at p6 if i hated it :-)
14:54 brrt but in a serious manner
14:55 brrt while most languages' semantics can be written on a post-it
14:55 brrt p6 is huge
14:55 timotimo_ that's kind of true :(
14:57 brrt there is a method to the madness
14:57 grondilu rn: say "Foo" ~~ m:i:g/foo/;
14:58 brrt but it isn't really matched well with 'current' VMs
14:58 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Regex modifier g not yet implemented at /tmp/3mNdGlfy9_ line 1:â�¤------> [32msay "Foo" ~~ m:i:g[33mâ��[31m/foo/;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) â�¤  a…
14:58 p6eval ..rakudo d171b9: OUTPUT«False␤»
14:58 cognominal complexity in the language, if well designed, and with a knowledgeable programmer means less complexity in the programs.
14:58 timotimo_ hq9+, much?
14:58 timotimo_ ;)
15:00 cognominal brrt: the complexity of signatures in Perl 6 is probably bigger than the complexity of many languages
15:01 brrt for one thing :-)
15:01 brrt although it is 'manageable' in a way
15:01 brrt but i'm off
15:01 cognominal probably for compensation of the absence of thereof in perl 5.
15:09 kresike bye folks
15:14 grondilu found on perlmonks.org, a cool exercice for regexes:  http://rosalind.info
15:17 arlinius joined #perl6
15:17 grondilu I failed at http://rosalind.info/problems/subs
15:17 grondilu I tried:  say gather for $s.match(/$t/, :g) { take 1+.from }
15:19 grondilu r: my $s = "there is more than one way to do it"; say gather for $s.match(/t/, :g) { take 1+.from }
15:19 p6eval rakudo d171b9: OUTPUT«1 15 28 35␤»
15:20 grondilu r: my $s = "foo fooo fooooo"; say gather for $s.match(/oo/, :g) { take 1+.from }
15:20 p6eval rakudo d171b9: OUTPUT«2 6 11 13␤»
15:20 azawawi joined #perl6
15:20 grondilu seems to works though :(
15:20 azawawi hi
15:27 * grondilu solved
15:28 grondilu I had to use :overlap
15:28 grondilu say gather for $s.match(/$t/, :overlap) { take 1+.from }
15:29 cognominal I did not think of :overlap so my solution was ugly
15:34 atrodo_ joined #perl6
15:36 rjbs joined #perl6
15:37 revdiablo joined #perl6
15:38 mtk joined #perl6
15:38 circlepuller joined #perl6
15:38 FROGGS joined #perl6
15:38 rking joined #perl6
15:46 * [Coke] discovers that you can't use native types on a MAIN signature
15:48 [Coke] std: sub MAIN(int $count) { ... }
15:48 p6eval std 47e39ad: OUTPUT«Potential difficulties:â�¤  $count is declared but not used at /tmp/h3M7eAXjxk line 1:â�¤------> [32msub MAIN(int [33mâ��[31m$count) { ... }[0mâ�¤ok 00:00 44mâ�¤Â»
15:48 [Coke] std: sub MAIN(int $count) { $count++ }
15:48 p6eval std 47e39ad: OUTPUT«ok 00:00 44m␤»
15:48 [Coke] should that error?
15:48 [Coke] with a "can't use native types, use Int instead" or something?
15:49 jnthn [Coke]: How does it fail if you try?
15:49 TimToady I'd think it should unbox the IntStr for you
15:50 TimToady (not sure rakudo has IntStr yet...)
15:50 xdbr joined #perl6
15:50 TimToady rn: <1 2 3>[0].WHAT.say
15:50 p6eval rakudo d171b9: OUTPUT«Str()␤»
15:50 p6eval ..niecza v22-14-g136ddcf: OUTPUT«IntStr()␤»
15:50 TimToady no it doesn't
15:51 [Coke] jnthn: if you have a main with a native int as the only sig arg, and run it as "perl6 foo.pl 3", it spits the usage back at you. If you say "Int", it works. (if you say Int and pass in "A", it spits the usage at you)
15:51 atrodo joined #perl6
15:51 jnthn [Coke]: I suspect it should be made to work.
15:52 * [Coke] wonders why we have IntStr *and* Cool.
15:52 [Coke] (and if someone answers taht, perhaps also shove it in the FAQ)
15:52 TimToady n: say IntStr ~~ Int; say Cool ~~ Int;
15:52 p6eval niecza v22-14-g136ddcf: OUTPUT«True␤False␤»
15:53 [Coke] http://en.wikipedia.org/wiki/Perl_6#Gather has links that point to use.perl.org that are now borked.
15:53 GlitchMr Cool is not Int
15:53 GlitchMr (or perhaps it is)
15:53 TimToady [Coke]: It's not a FAQ if you're the first one to ask it...
15:54 [Coke] TimToady: and when has anyone ever actually forced faqs to be F? :P
15:54 TimToady What the FAQ!  :)
15:56 jnthn Dang. I seem to have broken NQP's ability to compile Perl6::Grammar...
16:01 sirrobert r: say 'foo-bar' ~~ m/<['f' '-']>/;
16:01 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing at line 2, near "']>/;"␤»
16:01 sirrobert I quoted the hyphen... why is it balking?
16:02 dalek ecosystem: a3dc5fd | (Ahmad M. Zawawi)++ | META.list:
16:02 dalek ecosystem: Added Farabi6: Experimental in-browser Perl 6 Editor in Perl 6 :)
16:02 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a3dc5fd3aa
16:02 TimToady sirrobert: you must use \ in char class
16:02 sirrobert ah, ok
16:03 TimToady why it says 'escape' rather than 'quote'
16:03 TimToady could say 'escape with backslash' I suppose
16:04 sirrobert or even just "escape" would make sense to me
16:04 sirrobert =)
16:04 TimToady std: say 'foo-bar' ~~ m/<['f' '-']>/;
16:04 p6eval std 47e39ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of - as character range; in Perl 6 please use .. at /tmp/8VwSl_v6AX line 1:�------> [32msay 'foo-bar' ~~ m/<['f' '-'[33m�[31m]>/;[0m�Parse failed�FAILED 00:00 44m�»
16:06 jnthn r: sub foo(:$bar-baz) { say($bar-baz); }; foo(bar-baz => 42);
16:06 p6eval rakudo d171b9: OUTPUT«42␤»
16:06 jnthn nqp: sub foo(:$bar-baz) { say($bar-baz); }; foo(bar-baz => 42);
16:06 p6eval nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(:$bar-baz"␤current instr.: 'panic' pc 20353 (src/stage2/gen/NQPHLL.pir:7408) (src/stage2/gen/NQPHLL.pm:324)␤»
16:06 jnthn nqp: sub foo(*%h) { say(%h<bar-baz>); }; foo(bar-baz => 42);
16:06 p6eval nqp: OUTPUT«42␤»
16:07 jnthn ohhh
16:10 azawawi does anyone know of a Perl 6 API/script to access Rosetta code examples by language and task?
16:11 timbunce joined #perl6
16:11 dalek std: 64edd1c | larry++ | STD.pm6:
16:11 dalek std: suggest \- as well as .. in char class
16:11 dalek std:
16:11 dalek std: sirrobert++
16:11 dalek std: review: https://github.com/perl6/std/commit/64edd1c707
16:13 dalek nqp: 41e7b93 | jnthn++ | src/NQP/ (2 files):
16:13 dalek nqp: Add a way to give a role's body block parameters.
16:13 dalek nqp:
16:13 dalek nqp: Quite restricted, but should be enough to provide for the needs of STD
16:13 dalek nqp: and doing user-defined operators as role mix-ins.
16:13 dalek nqp: review: https://github.com/perl6/nqp/commit/41e7b93a9b
16:13 dalek nqp: 1aff9bc | jnthn++ | / (3 files):
16:13 dalek nqp: Basic MOP-level support for role arguments.
16:13 dalek nqp:
16:13 dalek nqp: There's no syntactic sugar for it, but this allows provision of role
16:13 dalek nqp: arguments in order to do a mix-in of the parameterized role.
16:13 dalek nqp: review: https://github.com/perl6/nqp/commit/1aff9bc306
16:13 dalek nqp: f4d8630 | jnthn++ | t/nqp/66-pararole.t:
16:13 dalek nqp: Test for mixing in parametric roles.
16:14 jnthn dalek y u no report all commits?
16:14 MayDaniel joined #perl6
16:15 moritz dalek is often kicked for flooding when it tries to report all commits
16:15 moritz #parrot has more of them :-)
16:16 TimToady I see no kick message though...
16:23 timbunce_ joined #perl6
16:24 fgomez joined #perl6
16:28 Vlavv_ joined #perl6
16:30 timbunce_ joined #perl6
16:32 timbunce__ joined #perl6
16:38 Chillance joined #perl6
16:47 orafu joined #perl6
16:49 azawawi panda install HTTP::Client  # has test errors....
16:55 azawawi so what do we use to get working http request over rakudo?
17:09 cognominal joined #perl6
17:11 jnthn star: use LWP::Simple; say LWP::Simple.get('http://google.com/')
17:11 p6eval star 2012.07: OUTPUT«<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><meta itemprop="image" content="/images/google_favicon_128.png"><title>Google</title><script>window.google={kEI:"2YmBUOn7DMO40QWL6oCADA",getEI:function(a){var b;while(a&&!(a.getAtt…
17:12 jnthn azawawi: ^
17:13 azawawi jnthn: i missed that... thanks
17:13 azawawi jnthn: im relearning Perl 6 through my Farabi6 in-browser editor experiment
17:29 azawawi more test errors... must be using a newer rakudo or something
17:31 moritz LWP::Simple is a bit broken at the moment -- maybe you'll have more luck with HTTP::Client
17:31 * grondilu timed out at http://rosalind.info/problems/cons/
17:33 azawawi moritz: both are broken with newer rakudo
17:33 azawawi moritz: and hi. :)
17:34 * azawawi reverts back to rakudo star 2012.09
17:38 [Coke] note that evalbot is using 2012.07
17:39 moritz because I forgot to update it to a newer version :/
17:41 azawawi is there a smoker page / CPAN6 testers?
17:41 GlitchMr Why unless 1 { } else { } throws X::Syntax::UnlessElse, but most of obsolete Perl 5 syntax throws X::Syntax::Obsolete?
17:42 GlitchMr Shouldn't X::Syntax::UnlessElse be X::Syntax::Obsolete?
17:42 moritz GlitchMr: do you think it would be more helpful for the user if we threw X::Syntax::Obsolete?
17:43 GlitchMr But isn't new Array as obsolete as unless 1 { } else { }
17:43 GlitchMr Why unless 1 { } else { } has exception, but new Array doesn't?
17:43 moritz both throw an exception
17:43 GlitchMr Well, ok
17:44 GlitchMr But why new Array has generic X::Syntax::Obsolete exception?
17:45 moritz probably because STD.pm6 does it that way
17:45 GlitchMr Shouldn
17:45 GlitchMr 't X::Syntax::Obsolete be a role
17:45 GlitchMr And obsoleted features would throw actual exceptions
17:46 * moritz has problems with the term "actual exceptions"
17:46 GlitchMr Well, ok, the exceptions that are unique to this error.
17:47 GlitchMr For example, X::Syntax::IndirectObjectCall
17:47 GlitchMr That would do X::Syntax::Obsolete
17:47 GlitchMr Or perhaps, X::Syntax::Obsolete::IndirectObjectCall, but this is really deep for exception name
17:48 moritz I'm not sure it's worth the effort
17:48 GlitchMr But well, the longest (currently) exception name is X::Syntax::Augment::WithoutMonkeyTyping.
17:48 moritz typed exceptions are mostly useful for runtime exception; I mostly extended them to compile time for sake of completeness
17:48 diakopter r: class F { }; role F { };
17:48 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_possibility' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤»
17:49 diakopter masak: masakbot ^^
17:49 moritz but the use cases for them are actually pretty rare
17:50 diakopter r: role F { }; role F { }; class G does F { };
17:50 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤None of the parametric role variants for 'F' matched the arguments supplied.␤Ambiguous call to ''; these signatures all match:␤:(Mu )␤:(Mu )␤␤»
17:50 diakopter masak: masakbot ^^
17:52 diakopter I'd call both those errors LTA
17:54 diakopter r: role F { }; class F { };
17:54 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'is_composed' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤»
17:54 diakopter another
17:56 arlinius joined #perl6
17:56 moritz r: https://gist.github.com/3919636
17:56 p6eval rakudo d171b9: OUTPUT«ATGCAACT␤A: 5 1 0 0 5 5 0 0␤C: 0 0 1 4 2 0 6 1␤G: 1 1 6 3 0 1 0 0␤T: 1 5 0 0 0 1 1 6␤»
17:57 moritz grondilu: ^^
17:57 moritz n: https://gist.github.com/3919636
17:57 p6eval niecza v22-14-g136ddcf: OUTPUT«ATGCAACT␤A: 5 1 0 0 5 5 0 0␤C: 0 0 1 4 2 0 6 1␤G: 1 1 6 3 0 1 0 0␤T: 1 5 0 0 0 1 1 6␤»
17:57 diakopter r: class F is Blah { }
17:57 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, :rw(:$rw)!)␤:(Rout…
17:58 diakopter this is LTA; it should say Blah isn't declared
17:58 cognominal joined #perl6
17:58 moritz yay for coding on one implementation, and have it run without change on the other
18:03 diakopter r: package X { has $.foo }
18:03 p6eval rakudo d171b9: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Attribute::Package␤===SORRY!===␤Error while compiling, type X::Attribute::Package␤  package-kind: package␤  name: $.foo␤ at line 2, near "}"␤»
18:03 sjohnson joined #perl6
18:03 diakopter LTA
18:04 moritz bug, in fact
18:05 diakopter r: package X is Associative { }
18:05 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_parent' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤at /tmp/wWj1JCqEk5:1␤»
18:05 diakopter LTA or bug
18:06 moritz r: package A { has $.foo }
18:06 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤A package cannot have attributes, but you tried to declare '$.foo'␤at /tmp/nRg47XnLe6:1␤»
18:06 moritz wtf
18:06 diakopter cuz X is already declared
18:06 moritz if it's inside X, it doesn't X::* types already?
18:06 moritz erm
18:07 moritz if it's inside X, it doesn't find X::* types anymore?
18:07 diakopter I don't know what Attribute::Package is
18:07 diakopter oh; you're saying it's an error
18:07 diakopter gothca
18:07 diakopter gotcha
18:07 moritz well, the error class is X::Attribute::Package
18:10 moritz r: class A::B { }; package A { say A::B }
18:10 p6eval rakudo d171b9: OUTPUT«A::B()␤»
18:23 dalek nqp: 3245496 | jnthn++ | src/ (4 files):
18:23 dalek nqp: Allow ::($foo) for methods inside roles.
18:23 dalek nqp:
18:23 dalek nqp: Again, a fairly restricted form, but sufficient for what NQP needs to
18:23 dalek nqp: provide for Rakudo to do user defined ops as role mixins.
18:23 dalek nqp: review: https://github.com/perl6/nqp/commit/324549642e
18:23 dalek nqp: 045172e | jnthn++ | t/nqp/66-pararole.t:
18:23 dalek nqp: Tests for ::(...) in method names.
18:23 dalek nqp: review: https://github.com/perl6/nqp/commit/045172e164
18:25 diakopter r: role E { has $.foo = 2; }; role G is E { has $.foo = 3; }; class H does G { }; say H.new.foo
18:25 p6eval rakudo d171b9: OUTPUT«3␤»
18:26 dalek rakudo/categorically-better: 6e5ae1f | jnthn++ | src/Perl6/Grammar.pm:
18:26 dalek rakudo/categorically-better: Start cleaning up custom operators.
18:26 dalek rakudo/categorically-better:
18:26 dalek rakudo/categorically-better: Move the check for if the operator is already parsed into gen_op, and
18:26 dalek rakudo/categorically-better: rename it to add_categorical, to move towards STD.
18:26 dalek rakudo/categorically-better: review: https://github.com/rakudo/rakudo/commit/6e5ae1f031
18:26 dalek rakudo/categorically-better: d9ae366 | jnthn++ | src/Perl6/Grammar.pm:
18:26 dalek rakudo/categorically-better: First pass at mixing in roles for categoricals.
18:26 dalek rakudo/categorically-better:
18:26 dalek rakudo/categorically-better: Basically works. However, the new operators don't participate in LTM
18:26 dalek rakudo/categorically-better: yet, which will need fixing.
18:26 dalek rakudo/categorically-better: review: https://github.com/rakudo/rakudo/commit/d9ae366003
18:26 diakopter so the inheriting role's attribute overrides the parent role's attribute of the same name?
18:27 jnthn diakopter: Note that what's inherited isn't really the role. You used "is" which forced the role to be punned to a class, and then this was added to parent list of H.
18:27 jnthn And then the role that was mixed in overrode it.
18:27 jnthn So, correct behavior.
18:28 moritz jnthn++ # branch name
18:30 sjohnson joined #perl6
18:35 * [Coke] wonders if jnthn is eventually going to add so much to nqp that it's just rakudo.
18:35 diakopter r: role E { has $.foo = 2; }; role G is E { has $!foo = 3; }; class H does G { }; say H.new.foo
18:35 p6eval rakudo d171b9: OUTPUT«2␤»
18:35 diakopter jnthn: but if foo is public in the parent, the role's overrides
18:35 diakopter the parent role's
18:36 diakopter r: role E { has $.foo = 2; }; role G is E { has $!foo = 3; method foo() { $!foo } }; class H does G { }; say H.new.foo
18:36 p6eval rakudo d171b9: OUTPUT«3␤»
18:37 diakopter but if I add a foo method to the child role, it again pulls from the child role attribute
18:38 diakopter so it's like the overriding foo method pulls from a different attribute than the parent's foo method
18:39 * jnthn doesn't see anything unexpected in the output, and isn't quite sure which piece of the puzzle diakopter is missing...
18:39 jnthn The .foo you're doing is a method call
18:39 diakopter well, it's as if adding the foo method activates the child $!foo (with value 3)
18:40 jnthn They're both there
18:40 diakopter oh...
18:40 jnthn They're different attributes because they're in different classes (thanks to the class you got by punning)
18:41 jnthn r: class A { has $.foo = 2; }; class B is A { has $!foo = 3; }; B.new.foo.say
18:41 p6eval rakudo d171b9: OUTPUT«2␤»
18:41 jnthn r: class A { has $.foo = 2; }; class B is A { has $!foo = 3; method foo() { $!foo } }; B.new.foo.say
18:41 p6eval rakudo d171b9: OUTPUT«3␤»
18:42 jnthn It ends up just like this.
18:42 diakopter oh
18:43 diakopter r: class A { has $.foo = 2; method bar() { $.foo } }; class B is A { has $!foo = 3; method foo() { $!foo } }; B.new.bar.say
18:43 p6eval rakudo d171b9: OUTPUT«3␤»
18:43 diakopter ok
18:44 azawawi joined #perl6
18:44 diakopter n: class A { has $.foo = 2; method bar() { $!foo } }; class B is A { has $!foo = 3; method foo() { $!foo } }; B.new.bar.say
18:44 p6eval niecza v22-14-g136ddcf: OUTPUT«2␤»
18:44 * diakopter 's head swims a bit
18:44 azawawi star: use LWP::Simple; say LWP::Simple.get('http://rosettacode.org/');
18:44 p6eval star 2012.07: OUTPUT«<!DOCTYPE html>␤<html lang="en" dir="ltr" class="client-nojs">␤<head>␤<title>Rosetta Code</title>␤<meta charset="UTF-8" />␤<meta name="generator" content="MediaWiki 1.18.0" />␤<link rel="shortcut icon" href="/favicon.ico" />␤<link rel="search" type="application/open…
18:45 doy w37
18:45 doy oops
18:45 dalek Heuristic branch merge: pushed 38 commits to nqp/kill-nqpattr by jnthn
18:51 azawawi star: say $*PERL;
18:51 p6eval star 2012.07: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.07", "release-number" => "", "build-date" => "2012-07-28T09:39:00Z", "codename" => ""}).hash␤»
18:51 azawawi rakudo: say $*PERL
18:51 p6eval rakudo d171b9: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.09.1-63-gb71bfe1", "release-number" => "", "build-date" => "2012-10-19T04:13:09Z", "codename" => ""}).hash␤»
18:56 REPLeffect joined #perl6
19:00 tokuhiro_ joined #perl6
19:05 spider-mario joined #perl6
19:06 mhasch joined #perl6
19:09 fgomez joined #perl6
19:11 REPLeffect joined #perl6
19:14 domidumont joined #perl6
19:21 * masak submits rakudobug
19:21 * masak submits rakudobug
19:21 masak (diakopter's two, above)
19:21 diakopter arguably three more
19:22 masak feel free to bring them down here for ease of discussion.
19:23 diakopter well, I don't know which ones you submitted
19:26 masak the two you highlighted me for.
19:26 diakopter masak: this one  r: class F is Blah { }
19:26 diakopter masak: this one:  r: package X { has $.foo }
19:27 diakopter masak: this one:  package X is Associative { }
19:27 masak r: class F is Blah { }
19:27 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, :rw(:$rw)!)␤:(Rout…
19:27 diakopter it should say Blah is not declared
19:27 masak arguably, es.
19:27 masak yes*
19:27 masak actually, I had gotten used to the crappy error message, but you're right, it should.
19:27 * masak submits rakudobug
19:28 jnthn Suggestion for *how* to make things better welcome.
19:28 jnthn (As in, a suggestion based on an understanding of how traits work :))
19:29 masak jnthn: in your view, is it impossible, or just difficult?
19:30 masak it's
19:30 masak IRON GODDESS
19:30 jnthn masak: I'm just not sure how to do it.
19:30 masak TIEGUANYIN
19:30 masak oh, heh. this isn't privmsg, is it? :P
19:30 jnthn masak: My first idea was another multi trait_mod:<is> to try and be a fallback
19:31 jnthn masak: I...thought iron goddess was an odd category of difficulty :P
19:31 masak let's just assume it was. :)
19:31 masak jnthn: intercept the bad error message and substitute it with a good one? :)
19:31 diakopter heh
19:31 jnthn masak: That's a safer option.
19:32 diakopter masak: also note the other two above
19:32 masak yes, let's move on.
19:32 masak r: package X { has $.foo }
19:32 p6eval rakudo d171b9: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Attribute::Package␤===SORRY!===␤Error while compiling, type X::Attribute::Package␤  package-kind: package␤  name: $.foo␤ at line 2, near "}"␤»
19:32 * masak submits rakudobug
19:32 jnthn Failed to fail.
19:33 masak r: package X is Associative { }
19:33 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_parent' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤at /tmp/mq69N3UynC:1␤»
19:33 masak heh.
19:33 * masak submits rakudobug
19:34 masak the MOP and packages are not the best of friends, it seems.
19:34 jnthn It's nothing surprising.
19:34 jnthn Packages *don't* supporting adding parents.
19:34 jnthn Not having a method is a perfectly good way of not supporting something.
19:35 diakopter right but,
19:35 jnthn It's just that a failed dispatch is not a perfectly good way to tell the user they did something wrong. :)
19:35 diakopter r: package Y { has $.foo }
19:35 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤A package cannot have attributes, but you tried to declare '$.foo'␤at /tmp/2i6sY9F_OO:1␤»
19:35 diakopter oops
19:35 diakopter r: package Y is Associative { }
19:35 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_parent' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤at /tmp/bik8m_Cmfx:1␤»
19:35 diakopter oh
19:36 jnthn The fix is to check for an add_parent method and whine if it ain't there.
19:36 masak right.
19:36 masak agree.
19:38 grondilu rn: say my % = <foo bar> X [0, 0];
19:38 p6eval rakudo d171b9: OUTPUT«("foo" => 0, "bar" => 0).hash␤»
19:38 p6eval ..niecza v22-14-g136ddcf: OUTPUT«{"bar" => [0, 0], "foo" => [0, 0]}␤»
19:38 masak I'm with Niecza here.
19:38 grondilu so am I
19:38 * masak submits rakudobug
19:39 masak rn: .say for <foo bar> X [0, 0]
19:39 p6eval niecza v22-14-g136ddcf: OUTPUT«foo␤0 0␤bar␤0 0␤»
19:39 p6eval ..rakudo d171b9: OUTPUT«foo␤0␤foo␤0␤bar␤0␤bar␤0␤»
19:39 jnthn Is the left side actually thunked there?
19:39 masak hard to tell; it's constant.
19:40 TimToady the problem is that rakudo is flattening a [] in list context
19:40 masak indeed.
19:40 jnthn Yeah, that's a known issue with X for a while I think.
19:40 masak it's probably in RT already, actually.
19:40 jnthn I think so
19:41 jnthn I know that we have made [0, 0] xx 2 thunk the LHS.
19:41 masak right, but that's not the issue here.
19:41 jnthn rn: say my % = <foo bar> Z=> [0, 0] xx 2;
19:41 masak I don't think X should thunk that way, actually.
19:41 p6eval rakudo d171b9: OUTPUT«("foo" => [0, 0], "bar" => [0, 0]).hash␤»
19:41 p6eval ..niecza v22-14-g136ddcf: OUTPUT«{"bar" => [0, 0], "foo" => [0, 0]}␤»
19:42 jnthn That's how I'd write the above fwiw.
19:42 TimToady if anything were to thunk, it'd be the right side
19:42 jnthn masak: I'm not sure it should either
19:42 jnthn Was just seeing the possible surprise :)
19:43 TimToady I have considered *allowing* lambdas on the right of X, where the parameter would be the current value of the left side
19:43 TimToady currently you have to write nested loops to get a triangular set of indices
19:44 skids r: role A { has $.a; submethod BUILD (:$!a) { } }; class C does A { }; my C $c .= new();
19:44 p6eval rakudo d171b9: OUTPUT«Can not get attribute '$!a' declared in class 'A' with this object␤  in submethod BUILD at /tmp/Y7oPnCGxmg:1␤  in method BUILDALL at src/gen/CORE.setting:696␤  in method bless at src/gen/CORE.setting:681␤  in method new at src/gen/CORE.setting:666␤  in method dispa…
19:45 TimToady for 1..10 X { $^i .. 10 } -> $i, $j {...}   # but in this case it would be explicit block, not thunking
19:56 timbunce_ joined #perl6
19:57 azawawi star: use LWP::Simple; say LWP::Simple.get('http://rosettacode.org/').chars;
19:57 p6eval star 2012.07: OUTPUT«1447␤»
19:58 azawawi i doubt that it is correct...
19:58 azawawi s/it/this
19:58 jnthn Same.
19:58 azawawi LWP::Simple.get does not get all data
19:59 diakopter maybe it doesn't handle chunked
19:59 TimToady maybe it's not 1447 enough...
20:00 jnthn hm
20:00 jnthn my Buf $resp = $sock.read(2 * 1024);
20:01 jnthn Then it tries to parse out a content length.
20:01 jnthn And only bothers to read more if it can do so
20:02 jnthn Probably not such a 1447 way to do things...
20:02 masak phenny: sv en "lat"?
20:02 phenny masak: "lazy" (sv to en, translate.google.com)
20:02 masak TimToady: ^^ :)
20:02 sorear o/
20:02 flussence that theory adds up... I count 600 bytes of headers
20:03 masak sorear! \o/
20:03 flussence (none of which are a content length)
20:03 * diakopter giggles at the reply to [perl #115364]
20:04 sorear hah
20:05 sorear [ https://rt.perl.org/rt3/Public/Bug/Display.html?id=115364#txn-1164590 ]
20:05 azawawi so basically LWP::Simple and HTTP::Client are broken... i tried going as far back as rakudo.2012.07
20:05 diakopter I'll rethink your mechanism...
20:07 diakopter in this case, "LTA" was LTA
20:07 masak yeah, someone should rewrite that darn LTA component that keeps generating error messages all the time!
20:07 azawawi LTA?
20:07 masak seriously, that's how much you miss out by not being on IRC with the rest of us :P
20:08 masak azawawi: "less than awesome".
20:08 masak azawawi: used about error messages that don't live up to our high standards.
20:08 masak since several years back, we submit those as bug reports.
20:09 TimToady std: /[a-z]/
20:09 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid regex metacharacter (must be quoted to match literally) at /tmp/o40IvQhwOh line 1:â�¤------> [32m/[a-[33mâ��[31mz]/[0mâ�¤Potential difficulties:â�¤  [a-z] appears to be an old-school character class; please use <[a..z]> if you mean …
20:09 diakopter STD is MTA
20:09 TimToady in spots
20:14 azawawi masak: i need a working http client library to write a rosetta code by task/language browser in Farabi6
20:14 diakopter rn: my$a="b"; $a ~~ s :g/b/bb/; say $a
20:14 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/aNBw4VBDh_:1␤»
20:14 p6eval ..niecza v22-14-g136ddcf: OUTPUT«bb␤»
20:15 jnthn You...can put a space there?
20:16 diakopter says std
20:16 jnthn o.O
20:16 masak sure, why not?
20:16 jnthn Because it looks...wrong...
20:16 masak visual-pill-wise, yes.
20:16 masak agree.
20:17 jnthn std: m :i/foo/
20:17 p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
20:17 jnthn At least it's consistent.
20:17 masak though that might be mitigated if there are spaces between the ///, too.
20:17 jnthn std: m :i /foo/
20:17 p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
20:17 masak also, that.
20:17 jnthn That looks OKer.
20:17 jnthn r: m :i /foo/
20:17 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/bYCjNf_Dgg:1␤»
20:18 * jnthn had no idea that should even parse.
20:18 diakopter r: m:i /foo/
20:18 p6eval rakudo d171b9: OUTPUT«No such method 'match' for invocant of type 'Any'␤  in block  at /tmp/MEMN9SvPcj:1␤␤»
20:18 diakopter I win
20:19 lichtkind joined #perl6
20:19 diakopter well, niecza does the same thing
20:19 jnthn heh, it'll parse it in that case
20:19 jnthn That error is the correct one.
20:19 masak aye.
20:19 diakopter oh
20:19 jnthn I'm surprised about the space being allowed though. :)
20:20 jnthn Just need to allow it before the adverbs, then.
20:20 lichtkind ll
20:20 lichtkind shit wrong console :)
20:20 lichtkind hai
20:20 sorear hey jnthn.  I had sandiego.pm watch your Tokyo modules talk :D
20:20 sorear hai lichtkind
20:20 jnthn sorear: Hope it made sense :)
20:20 jnthn sorear: And was interesting.
20:21 dalek nqp/kill-nqpattr: 5c9e6eb | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
20:21 dalek nqp/kill-nqpattr: Factor out NFA and capture storage.
20:21 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/5c9e6ebc46
20:21 sorear jnthn: only thing was that the live coding was not quite legible
20:21 sorear live demo rather
20:22 lichtkind jnthn: you try to kill nqp?
20:22 azawawi star: use IO::Socket::INET;
20:22 p6eval star 2012.07: OUTPUT«===SORRY!===␤Could not find IO::Socket::INET in any of: /home/p6eval/.perl6/lib, /home/p6eval/star/lib/parrot/4.6.0/languages/perl6/lib␤»
20:23 diakopter std: tr///
20:23 p6eval std 64edd1c: OUTPUT«ok 00:00 41m␤»
20:24 jnthn lichtkind: Just one aspect of it :)_
20:24 azawawi niecza: use IO::Socket::INET;
20:24 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to locate module IO::Socket::INET in /home/p6eval/niecza/lib /home/p6eval/niecza␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) ␤  at /home/p6eval/niecza/src/NieczaPathSearch.pm6 line 23 (NieczaPathSearch.loa…
20:24 jerome joined #perl6
20:25 jnthn azawawi: IO::Socket::INET is built in so doesn't need a use. Though, it's somewhat hidden in p6eval
20:25 azawawi jnthn: but it doesnt make sense. consistency-wise that is
20:27 lichtkind jnthn: which one or is there a post about it?
20:27 jnthn lichtkind: It's mostly just some internal refactoring to get rid of a cheat.
20:27 jnthn azawawi: What's inconsistent?
20:28 * jnthn thinks he missed something...
20:28 azawawi jnthn: use Some::Library; # use it...
20:29 azawawi jnthn: if i use a core library, perl6 should find it.. right?
20:29 jnthn azawawi: It's not a library.
20:29 masak jnthn: OMG are you killing NQP!?!? :P
20:29 jnthn azawawi: It's in the setting, which is the outer lexical scope of your program
20:30 * masak .oO( but we worked so hard on it... )
20:30 jnthn masak: :P
20:30 skids That reminds me, Zavolaj can use libc functions, but 'is native("libc")' doesn't work due to multiarch libc paths.  Libc already being linked, it doesn't seem to care if you tell it the wrong lib, but using 'libparrot' causes issues.  Right now I'm using 'libicuuc' as a hack.  Any better workaround?
20:30 jnthn https://github.com/perl6/nqp/blob/master/src/cheats/parrot-sub.pir # for anybody who really wants to know what I@m getting rid of.
20:30 jnthn skids: Won't libc always be in memory?
20:31 azawawi jnthn: coming from Perl and Java land, it sounds awkwards... from an application developer point-of-view...
20:31 jnthn skids: Did you try just "is native"
20:31 flussence eval my $s; open(my $f, q{>}, \$s); say $f->foobar # seems consistent enough to me.
20:31 buubot_backup flussence: ERROR: Can't locate object method "say" via package "IO::File" at (eval 20) line 1.
20:31 jnthn azawawi: Perl doesn't make you say "use Array;" to use arrays...
20:31 skids Ah I tried leaving off the "is native" entirely but not that.
20:31 lichtkind jnthn: thanks
20:31 fgomez joined #perl6
20:32 diakopter niecza: say (use strict).WHAT;
20:32 p6eval niecza v22-14-g136ddcf: OUTPUT«Nil␤»
20:32 azawawi jnthn: at least the error should be more clear
20:33 azawawi jnthn: because i spent like 5 minutes trying to find why it is not finding it :)
20:33 skids jnthn: no dice, some sort of segv.
20:33 jnthn skids: But it didn't complain it couldn't find it?
20:33 azawawi star: use IO::Socket::INET;
20:33 p6eval star 2012.07: OUTPUT«===SORRY!===␤Could not find IO::Socket::INET in any of: /home/p6eval/.perl6/lib, /home/p6eval/star/lib/parrot/4.6.0/languages/perl6/lib␤»
20:34 * azawawi fun
20:34 jnthn skids: In that case the SEGV must be about the call itself
20:35 masak azawawi: IO::Socket::INET is already in the setting, no need to 'use' it.
20:35 azawawi i know :)
20:35 azawawi but i didnt know like 5 min ago
20:35 skids jnthn: not quite sure, it's hard to get Failures to collapse in my code.  Now I'm finding that providing any random string seems to work.
20:36 azawawi I am just pointing out that the error message should tell me that when i try to use it :)
20:36 * skids golfs
20:36 sorear eval use UNIVERSAL;
20:37 buubot_backup sorear: ERROR: Can't locate UNIVERSAL.pm in @INC (@INC contains:) at (eval 20) line 1. BEGIN failed--compilation aborted at (eval 20) line 1.
20:37 sorear azawawi: see perl5 does the exact same thing
20:37 jnthn sorear: Doesn't prevent us doing something better ;)
20:37 sorear jnthn: what do you have in mind?
20:38 azawawi better error messages is the key to success
20:38 jnthn sorear: Could maybe check what the symbol table contains and include a "BTW, there's a ... already in scope" in the error
20:40 sorear also it's kind of bothersome to spend time improving error messages when I know nobody reads them :|
20:41 azawawi and that reminds me where is the documentation for IO::Socket::INET? :)
20:42 flussence wait, so what happens to two identical use; statements in the same scope? does the second one ignore the fact the first already succeeded and re-run the file?
20:43 rjbs In 5?
20:43 flussence in 6, I know 5 works sensibly
20:43 jnthn azawawi: doc.perl6.org doesn't cover it yet, it seems
20:43 rjbs Ok.  Only asked because p5 came up. ;)
20:44 flussence (because I tend to leave "use Data::Dumper" all over the place when writing code there :)
20:44 jnthn azawawi: otoh, doc.perl6.org didn't exist or cover anything a while ago... :)
20:44 azawawi jnthn: im already impressed that doc.perl6.org is there...
20:44 jnthn flussence: It certainly won't re-run the file.
20:44 jnthn azawawi: Yeah, it's great it's coming along. moritz++ and japhb++ did much great things there
20:45 jnthn flussence: And if it does import things again then symbols should not conflict with themselves
20:45 jnthn r: use Test; use Test;
20:45 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Cannot import the following symbols from Test, becase they aready exist in this lexical scope:  &plan, &pass, &ok, &nok, &is, &isnt, &is_approx, &todo, &skip, &skip_rest, &diag, &flunk, &isa_ok, &dies_ok, &lives_ok, &eval_dies_ok, &eval_lives_ok, &is_d…
20:45 jnthn hah!
20:45 jnthn Apparently they can :P
20:46 flussence oh neat, it shows you all the exports :D
20:46 jnthn "Let's call it a feature!"
20:47 skids jnthn: well, "is native" without the lib seems to work in a golf, so it must be my code's fault.
20:47 skids jnthn++
20:54 grondilu r: use Test; need Test;
20:54 p6eval rakudo d171b9:  ( no output )
20:54 dalek nqp/kill-nqpattr: 2c7cd73 | jnthn++ | src/ (2 files):
20:54 dalek nqp/kill-nqpattr: Eliminate sub form of qbuildsub.
20:54 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/2c7cd73a27
20:54 dalek nqp/kill-nqpattr: e72739f | jnthn++ | src/NQP/Actions.pm:
20:54 dalek nqp/kill-nqpattr: Remove a workaround we need no more.
20:54 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/e72739fc21
20:54 dalek nqp/kill-nqpattr: cfd0d54 | jnthn++ | src/NQP/Actions.pm:
20:54 dalek nqp/kill-nqpattr: Clean up regex code object creation.
20:55 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/cfd0d548c3
20:58 grondilu rn: .say for "foo\nXXX\nbar".match: /^^ ( foo | bar ) $$ .*? /, :g;
20:58 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named g␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1) ␤  at /tmp/UJSxTZmklm line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6…
20:58 p6eval ..rakudo d171b9: OUTPUT«「foo」␤ 0 => 「foo」␤␤「bar」␤ 0 => 「bar」␤␤»
20:59 * grondilu was expecting XXX somewhere in the output
21:00 jnthn grondilu: .*? will happily match nothing
21:00 jnthn And then nothing makes it backgrack
21:00 jnthn *track
21:01 * ingy waves
21:01 ingy \oXo/
21:01 grondilu oh yeah indeed.  I wanted it not to be gready but not that much.
21:01 jnthn o/ ingy
21:01 ingy hi jnthn :)
21:03 grondilu r: .say for "foo\n blah blah".match: /^^ foo $$ .* /, :g;
21:03 p6eval rakudo d171b9: OUTPUT«「foo␤ blah blah」␤␤»
21:05 grondilu r: .say for "foo\n one\nfoo\n two".match: /^^ foo $$ .* /, :g;
21:05 p6eval rakudo d171b9: OUTPUT«「foo␤ one␤foo␤ two」␤␤»
21:05 sorear You wanted it to be just greedy enough?
21:05 am0c r: %*ENV
21:05 p6eval rakudo d171b9:  ( no output )
21:05 grondilu sorear: yeah, so I can have an array of results, not a whole match
21:06 azawawi any perl 6 tidy tool?
21:06 am0c r: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
21:06 p6eval rakudo d171b9:  ( no output )
21:06 am0c std: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
21:06 p6eval std 64edd1c: OUTPUT«ok 00:00 45m␤»
21:06 am0c p: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
21:06 p6eval pugs: OUTPUT«*** No such method in class Num: "&key"␤    at /tmp/z4nd9MbNSv line 1, column 44-49␤»
21:06 sorear viv -6 maybe counts but it won't preserve comments
21:13 bapa joined #perl6
21:26 bruges_ joined #perl6
21:43 _edwin joined #perl6
21:44 _edwin hi perl6!
21:44 diakopter howdy
21:44 _edwin anyone else having problems reaching rosettacode.org?
21:45 grondilu _edwin: indeed, can't reach it.
21:45 flussence same here, it was working fine 1¾ hours ago
21:45 dalek nqp/kill-nqpattr: 2fdbe0b | jnthn++ | src/ (2 files):
21:45 dalek nqp/kill-nqpattr: Start storing NFA directly.
21:45 dalek nqp/kill-nqpattr:
21:45 dalek nqp/kill-nqpattr: This means it should now be serialized instead of needing to be turned
21:45 dalek nqp/kill-nqpattr: into a QAST tree.
21:45 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/2fdbe0b523
21:45 dalek nqp/kill-nqpattr: 93966ce | jnthn++ | src/ops/nqp.ops:
21:45 dalek nqp/kill-nqpattr: Add a Parrot Sub => code object op.
21:45 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/93966cebd4
21:45 dalek nqp/kill-nqpattr: 727b917 | jnthn++ | src/QAST/Operations.nqp:
21:45 dalek nqp/kill-nqpattr: nqp:: ops for getting/setting a Sub's code object.
21:45 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/727b917b03
21:45 dalek nqp/kill-nqpattr: d4ee944 | jnthn++ | src/stage0/ (9 files):
21:45 dalek nqp/kill-nqpattr: Update bootstrap.
21:45 _edwin just wanted to add a solution, now it's offline :(
21:45 grondilu r: perl6 -e say "foo 52" ~~ / foo<ws> (<?digit>**2) /;
21:45 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/8THSVlJkCF:1␤»
21:46 grondilu r: say "foo 52" ~~ / foo<ws> (<?digit>**2) /;
21:46 p6eval rakudo d171b9: OUTPUT«「foo 」␤ ws => 「 」␤ 0 => 「」␤␤»
21:46 grondilu rn: say "foo 52" ~~ / foo<ws> (<?digit>**2) /;
21:46 p6eval niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(4) text(foo ) pos([#<match from(4) to(4) text() pos([].list) named({}.hash)>].list) named({"ws" => Cursor.new(...)}.hash)>␤»
21:46 p6eval ..rakudo d171b9: OUTPUT«「foo 」␤ ws => 「 」␤ 0 => 「」␤␤»
21:46 jnthn grondilu: <?digit> is a zero-width assertion. I'm guessing it's not quite what you're after.
21:46 grondilu ok
21:47 jnthn (it checks a digit matches at this point, but doesn't actually match one)
21:47 hash_table joined #perl6
21:54 diakopter r: say -> {YOU_ARE_HERE}
21:54 p6eval rakudo d171b9: OUTPUT«(signal SEGV)»
21:55 diakopter I guess I am not here
21:55 sorear huh?
21:56 diakopter :) (YOU_ARE_HERE)
21:56 diakopter (the segfault)
21:56 diakopter sorry, stupid joke
21:56 sorear ah
21:56 sorear I thought it was a complaint at the lack of response
21:57 sorear rpn: print '(signal SEGV)'
21:57 diakopter I caught that possible connotation too late
21:57 p6eval rakudo d171b9, niecza v22-14-g136ddcf, pugs: OUTPUT«(signal SEGV)»
22:01 diakopter n: say (-> {YOU_ARE_HERE})()
22:01 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.␤  at System.Collections.Generic.Dictionary`2[System.String,Niecza.SubInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0…
22:01 * diakopter files nieczaissue
22:01 sorear n: {YOU_ARE_HERE}
22:01 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.␤  at System.Collections.Generic.Dictionary`2[System.String,Niecza.SubInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0…
22:02 sorear golfed it for you
22:02 diakopter n: say -> {YOU_ARE_HERE}
22:02 p6eval niecza v22-14-g136ddcf: OUTPUT«{ ... }␤»
22:04 dalek nqp/kill-nqpattr: 77f0498 | jnthn++ | src/QRegex/Cursor.nqp:
22:04 dalek nqp/kill-nqpattr: Put code object in $!regexsub when possible.
22:04 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/77f04984ce
22:04 dalek nqp/kill-nqpattr: 384651d | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
22:04 dalek nqp/kill-nqpattr: Eliminate now-unrequired code.
22:04 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/384651dafb
22:04 dalek nqp/kill-nqpattr: a7352d1 | jnthn++ | src/ (2 files):
22:04 dalek nqp/kill-nqpattr: Start moving caps into the code object.
22:04 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/a7352d1eb8
22:06 diakopter rn: say ""~~/^^$$^^$$/
22:06 p6eval rakudo d171b9: OUTPUT«「」␤␤»
22:06 p6eval ..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(0) text() pos([].list) named({}.hash)>␤»
22:18 xinming_ joined #perl6
22:20 diakopter sorear: here's an interesting one
22:21 diakopter rn: default { 5 }; say "alive"
22:21 p6eval niecza v22-14-g136ddcf:  ( no output )
22:21 p6eval ..rakudo d171b9: OUTPUT«succeed without when clause␤  in block  at src/gen/CORE.setting:391␤  in block  at src/gen/CORE.setting:468␤  in block  at /tmp/so1Duf6DUf:1␤␤»
22:21 diakopter I guess default causes some kind of return?
22:22 sorear yes
22:23 diakopter should it catch that default is used outside a when?
22:25 sorear yes it probably should
22:29 diakopter r: say DOC BEGIN { 4 };
22:29 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'flat' not found for invocant of class 'NQPMu'␤»
22:29 diakopter leaky error
22:29 diakopter phenny: tell masak  r: say -> {YOU_ARE_HERE}
22:29 phenny diakopter: I'll pass that on when masak is around.
22:30 diakopter phenny: tell masak  r: say DOC BEGIN { 4 };
22:30 phenny diakopter: I'll pass that on when masak is around.
22:31 colomon joined #perl6
22:36 dalek nqp/kill-nqpattr: c6cd504 | jnthn++ | src/ (3 files):
22:36 dalek nqp/kill-nqpattr: Start moving altnfas into the code object.
22:36 dalek nqp/kill-nqpattr: review: https://github.com/perl6/nqp/commit/c6cd504730
22:37 Khisanth joined #perl6
22:38 diakopter rn: say :foo
22:38 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Excess arguments to gistcat, unused named foo␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (gistcat @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1305 (say @ 7) ␤  at /tmp/Y_jxL8OyZ6 line 1 (mainline @ 3) ␤  at /home/p6eval/…
22:38 p6eval ..rakudo d171b9: OUTPUT«␤»
22:38 diakopter sorear: bug?
22:40 sorear diakopter: it's slightly leaky but I wouldn't call it a bug
22:41 sorear niecza does basically sub say (|c) { real-say(gistcat(|c)) }
22:42 jnthn Time for some sleep &
22:43 sivoais joined #perl6
22:46 azawawi how do i slurp a binary file in Perl 6?
23:01 grondilu joined #perl6
23:01 grondilu rn: my (%a, %b); .say for map { .perl }, %a X %b;
23:01 p6eval rakudo d171b9: OUTPUT«Cannot call 'map'; none of these signatures match:␤:(&code, *@values)␤␤  in block  at /tmp/iYSfKpYrC_:1␤␤»
23:01 p6eval ..niecza v22-14-g136ddcf:  ( no output )
23:02 flussence azawawi: open(:bin)
23:02 grondilu I think rakudo does not reckognize %a X %b as a list of values
23:02 grondilu I think rakudo does not reckognize %a X %b as a list of *pairs*
23:03 grondilu r: my (%a, %b); .say for map *.perl, %a X %b;
23:03 p6eval rakudo d171b9: OUTPUT«Cannot call 'map'; none of these signatures match:␤:(&code, *@values)␤␤  in block  at /tmp/5FRqt9HdiR:1␤␤»
23:03 skids joined #perl6
23:04 supernovus joined #perl6
23:05 timbunce_ joined #perl6
23:08 Pleiades` joined #perl6
23:11 diakopter r: say my Int$a+=2; say my Int$b*=2;
23:11 p6eval rakudo d171b9: OUTPUT«2␤2␤»
23:11 diakopter how can it be both 0 and 1
23:12 diakopter rn: say my Int$a+=2; say my Int$b*=2; say $a*$b
23:12 p6eval niecza v22-14-g136ddcf: OUTPUT«2␤0␤0␤»
23:12 p6eval ..rakudo d171b9: OUTPUT«2␤2␤4␤»
23:12 diakopter o_O
23:12 flussence wtf
23:13 lichtkind guood night
23:20 skids r: say my Int$a+&=2; say my Int$a+=4;
23:20 p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Redeclaration of symbol $a␤at /tmp/4PoNA8r4Dc:1␤»
23:20 skids r: say my Int$a+&=2; say my Int$b+=4;
23:20 p6eval rakudo d171b9: OUTPUT«2␤4␤»
23:20 skids Plainly <op>= is just returning the RHS.
23:21 flussence r: my Int $a &= -5
23:21 p6eval rakudo d171b9: OUTPUT«Type check failed in assignment to '$a'; expected 'Int' but got 'Int'␤  in block  at src/gen/CORE.setting:1895␤  in sub AUTOTHREAD at src/gen/CORE.setting:1889␤  in block  at src/gen/CORE.setting:12021␤  in block  at /tmp/TkrcL5SwOh:1␤␤»
23:21 diakopter nice
23:22 diakopter rn: my Int $a &&= -5; say $a
23:23 p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«Int()␤»
23:25 skids Oh actually this might be spec.
23:25 diakopter well, niecza differs
23:26 Khisanth joined #perl6
23:26 skids "If you apply an assignment operator to a container containing a type object...the type object autovivifies to the operator's identify value.
23:26 skids .oO(methinks that should be "identity")
23:27 flussence OH.
23:27 diakopter ok, so they're all wrong
23:27 doy no, rakudo is right
23:28 diakopter oic
23:29 skids "$x -= 1; is more or less equivalent to: $x = [-]() unless defined $x; $x = $x - 1;"
23:30 flussence r: my Int $a +&= -5
23:30 doy although maybe not for &&=
23:30 p6eval rakudo d171b9:  ( no output )
23:30 flussence r: my Int $a +&= -5; say $a
23:30 p6eval rakudo d171b9: OUTPUT«-1␤»
23:30 flussence oh ok, I had the junction op before.
23:31 flussence (I was beginning to worry the laws of mathematics had broken down entirely...)
23:31 skids Magic trumps math:-)
23:31 skids r: say [+&]()
23:31 p6eval rakudo d171b9: OUTPUT«-1␤»
23:32 sorear r: say -1 +& -1
23:32 p6eval rakudo d171b9: OUTPUT«-1␤»
23:32 sorear r: say -1 +& -5
23:32 p6eval rakudo d171b9: OUTPUT«-1␤»
23:32 sorear that,however
23:33 sorear r: say (-1) +& (-5)
23:33 p6eval rakudo d171b9: OUTPUT«-1␤»
23:33 sorear wrongness
23:33 sorear np: say (-1) +& (-5)
23:33 sorear rnp: say (-1) +& (-5)
23:33 p6eval niecza v22-14-g136ddcf, pugs: OUTPUT«-5␤»
23:33 p6eval ..rakudo d171b9: OUTPUT«-1␤»
23:35 skids rakudo bitops need to be run over several times with a correctness truck.
23:37 skids r: say -$_ +& -1 for ^10
23:37 p6eval rakudo d171b9: OUTPUT«0␤-1␤0␤-1␤0␤-1␤0␤-1␤0␤-1␤»
23:38 flussence I can see the argument for S03:4486, but I think the line below it is horrible and niecza is the only one being sane here
23:41 doy why?
23:43 doy i'd say the other way around
23:44 flussence because it makes $undef *= 2 behave different from $undef = $undef * 2
23:45 doy that's the case for the ** behavior too
23:46 sorear I have a theory that the original purpose of undef was to make perl -ne '$total += length $_' DWIM
23:49 doy i mean, it's the case for everything in that table that gives a value other than the "normal" default undef value
23:49 sorear TimToady: am I on the right track?  do you even remember anymore?
23:49 diakopter hee
23:50 diakopter are you sure -n came before undef?
23:51 sorear Inessential.

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

Perl 6 | Reference Documentation | Rakudo