»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:03 benabik joined 00:07 imarcusthis left 00:14 pmurias left 00:19 daxim left 00:21 imarcusthis joined 00:22 whiteknight joined 00:30 lola_91 joined
lola_91 hello 00:31
raiph hola lola, what's your interest in perl 6 (if any)? 00:39
lola_91 i just passed by to say hi to few friends, they seem offline now :) 00:41
00:52 lola_91 left 01:00 anuby joined 01:01 sftp left 01:02 sftp joined 01:10 hypolin joined, whiteknight left
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
am0c: another sense is "at right angles" -- think in terms of vector-spaces
am0c right, there was only about angles in dictionaries. thank you so much for your kind explanation. 01:15
I see now than that sorear meant that it didn't matter for syntactical view. 01:18
01:19 benabik left 01:20 benabik joined
skids tries to figure out whether .clone should be calling BUILDs 01:39
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…
diakopter O_O
... no idea......
01:52 imarcusthis left, imarcusthis joined 01:55 sftp left 01:56 sftp joined
diakopter rn: say (5.5...5)[2] 02:04
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«3.5␤»
diakopter rn: say (5.5...5)[329845]
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«(timeout)»
diakopter rn: say (5.5...5)[32984]
p6eval niecza v22-14-g136ddcf: OUTPUT«-32978.5␤» 02:05
..rakudo 011ec6: OUTPUT«(timeout)»
02:05 tokuhiro_ left 02:06 tokuhiro_ joined 02:07 gootle joined
diakopter rn: my \o=1; \o\ |o| <o> |o| /o/ 02:08
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: ( no output )
diakopter :D 02:09
02:10 tokuhiro_ left
raiph r: print q{ q[ q{ ] ~ $self ~ q[ } ] } 02:15
p6eval rakudo 011ec6: OUTPUT« q[ q{ ] ~ $self ~ q[ } ] »
raiph ww 02:16
diakopter :)
wat. 02:20
rn: my \o=1; say (\o\).WHAT
p6eval niecza v22-14-g136ddcf: OUTPUT«===SORRY!===␤␤Confused at /tmp/hIhN2uTtBC line 1:␤------> my \o=1; say (\o⏏\).WHAT␤␤Parse failed␤␤»
..rakudo 011ec6: OUTPUT«===SORRY!===␤Unable to parse expression in parenthesized expression; couldn't find final ')' at line 2, near "\\o\\).WHAT"␤»
diakopter ....
rn: my \o=1; say (\o\ ).WHAT 02:21
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«Capture()␤»
diakopter uhm, how could adding a space between a \ and ) make it parse
oh, unspace? 02:22
rn: my $a\ =\ "{\ 'foo'\ }"\ ; say \ $a 02:23
p6eval niecza v22-14-g136ddcf: OUTPUT«foo␤»
..rakudo 011ec6: OUTPUT«===SORRY!===␤Confused␤at /tmp/yoLdGmXvMG:1␤»
am0c is there something similar to 'handles' feature in Perl 5 Moose? 02:34
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:42 telex left 02:44 telex joined
diakopter haha 02:45
rn: my $a ^= 4; say $a
am0c oh, there is 'handles' in Perl 6 too and it is called delegation. hm!
p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)» 02:46
..rakudo 011ec6: OUTPUT«one(one(), 4)␤»
diakopter neither of those seems right
am0c r: my $a ^= 4; say $a
p6eval rakudo 011ec6: OUTPUT«one(one(), 4)␤»
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:47
timotimo_ a moose with handles? are you talking about the antlers? 02:48
diakopter some people grab it by the tail
timotimo_ i guess it supports both methodologies?
am0c raiph: I see, it has been for 7 years then!
timotimo_ so, are the tailgrabbers second-class citizens?
raiph timotimo_: yes, but antlers seemed awkward to spell 02:49
am0c use "moose".ucfisrt;
oops use will be executed at compile time. s/use/require/; 02:50
timotimo_ is that a problem?
02:53 grondilu joined 03:05 grondilu left, Celelibi left
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…
raiph am0c: for more background, audrey's explanation of P6 impact on P5 in 2006: perlmonks.org/?node_id=835936 03:14
am0c yey thank you, raiph ! 03:18
diakopter rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4) 03:19
p6eval rakudo 011ec6: OUTPUT«False␤»
..niecza v22-14-g136ddcf: OUTPUT«True␤»
diakopter False! True!
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.
diakopter rn: say (4) ~~~ (4) ~~~ (4) 03:23
p6eval rakudo 011ec6: OUTPUT«False␤»
..niecza v22-14-g136ddcf: OUTPUT«True␤»
diakopter rn: say (4) ~~~ (4)
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«True␤»
dalek p: ef5bfe0 | duff++ | VERSION:
bump VERSION to 2012.10
diakopter wat. 03:24
rn: say ((4) ~~~ (4)) ~~~ (4)
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«False␤»
diakopter rn: say (4) ~~~ ((4) ~~~ (4))
p6eval rakudo 011ec6, niecza v22-14-g136ddcf: OUTPUT«False␤»
diakopter um
what is the 3-case if not one of those 03:25
(for niecza)
03:32 Celelibi joined 03:33 skids left 03:35 Celelibi left
am0c std: (-> { say "hi"} ).postcircumfix:<( )> 03:47
p6eval std 47e39ad: OUTPUT«ok 00:00 45m␤»
am0c p6: (-> { say "hi"} ).postcircumfix:<( )>
p6eval rakudo 011ec6: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Block'␤ in block at /tmp/M9Anq0beop:1␤␤»
..niecza v22-14-g136ddcf: OUTPUT«hi␤»
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:50
..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…
dalek kudo/nom: f231fc7 | duff++ | docs/announce/2012.10:
Add October 2012 release announcement
kudo/nom: 397a279 | duff++ | docs/release_guide.pod:
update release guide
kudo/nom: 1e942e7 | duff++ | src/core/ (2 files):
Merge branch 'nom' of github.com/rakudo/rakudo into nom
kudo/nom: d954a1c | duff++ | tools/build/NQP_REVISION:
[release] bump NQP revision
kudo/nom: b71bfe1 | duff++ | VERSION:
[release] bump VERSION

  [release] add the blurb about Tokyo.pm
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…
am0c r: say Code.^methods
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␤␤»
am0c std: say Code.^methods
p6eval std 47e39ad: OUTPUT«ok 00:00 42m␤»
am0c std: class A { has Code $.c handles :doit<WHAT_SHOULD_BE_HERE>; } 03:55
p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )> }
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Unable to parse parenthesized expression at /tmp/ntLUU1AEUT line 1:␤------> class A { has Code $.c handles ⏏(doit => &postcircumfix:<( )> }␤Couldn't find final ')'; gave up at /tmp/ntLUU1AEUT line 1:␤------> c ha…
am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>; }
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Unable to parse parenthesized expression at /tmp/75eI5qheUx line 1:␤------> class A { has Code $.c handles ⏏(doit => &postcircumfix:<( )>; }␤Couldn't find final ')'; gave up at /tmp/75eI5qheUx line 1:␤------> ha…
am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>;) } #oops 03:56
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'postcircumfix:<( )>' used at line 1␤Check failed␤FAILED 00:00 47m␤»
am0c std: class A { has Code $.c handles (doit => &postcircumfix:<( )>); } #oops oops oops
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'postcircumfix:<( )>' used at line 1␤Check failed␤FAILED 00:00 47m␤»
am0c std: class A { has Code $.c handles (doit => postcircumfix:<( )>); } #oops oops oops 03:58
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'postcircumfix:<( )>' used at line 1␤Check failed␤FAILED 00:00 45m␤»
am0c std: tiny:<pair> 03:59
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'tiny:<pair>' used at line 1␤Check failed␤FAILED 00:00 41m␤»
am0c std: :tiny<pair> 04:01
p6eval std 47e39ad: OUTPUT«ok 00:00 41m␤»
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␤␤»
am0c n: class A { has Code $.c handles (doit => 'postcircumfix:<( )>') = { say "hi"; }; }; A.new.doit;
p6eval niecza v22-14-g136ddcf: OUTPUT«===SORRY!===␤␤Action method trait_mod:handles not yet implemented at /tmp/bC0K5Epw8w line 1:␤------> handles (doit => 'postcircumfix:<( )>') ⏏= { say "hi"; }; }; A.new.doit;␤␤Trait 0 not available on variables at /tmp/b…
am0c aarh.. i can't 04:05
04:06 colomon joined 04:18 fgomez left 04:31 fgomez joined
am0c isn't there "using namespace" stuff in Perl 6? 04:40
04:41 preflex left
colomon am0c: maybe perlcabal.org/syn/S11.html#Compile-...mportation is what you're looking for? 04:46
sorear o/
colomon \o
sorear diakopter++ #icketing 04:47
colomon is just going to bed, actually. o/ 04:49
04:50 Targen left
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" 04:56
05:25 birdwindupbird joined 05:28 Celelibi joined 05:33 Celelibi left 05:38 mucker joined 05:41 Targen joined 05:46 Celelibi joined 05:47 GlitchMr joined 05:49 kurahaupo left 05:52 Celelibi left 05:56 aharoni joined
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:␤------> sub compare (|args, Num ⏏$x, Num $y --> Bool) { ... }␤ $y is declared but not used at /tmp/iZ4ry1zHH7 line 1:␤------> sub compare (|args, Num $x, Num [3…
am0c std: sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }
p6eval std 47e39ad: OUTPUT«ok 00:00 46m␤» 06:05
am0c nr: sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }
p6eval rakudo b71bfe: OUTPUT«===SORRY!===␤Cannot put required parameter $x after variadic parameters␤at /tmp/k5ONupxJVs:1␤»
..niecza v22-14-g136ddcf: OUTPUT«Potential difficulties:␤ &compare is declared but not used at /tmp/8yJB83suqU line 1:␤------> sub compare ⏏(|args, Num $x, Num $y --> Bool) { $x + ␤␤»
am0c nr: sub compare (|args, Num $x, Num $y --> Bool) { $x + $y }; compare 1, 2
p6eval rakudo b71bfe: OUTPUT«===SORRY!===␤Cannot put required parameter $x after variadic parameters␤at /tmp/eK5IyNoz_7:1␤»
..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…
am0c It seems that Parcel at first parameter is not supported yet. perlcabal.org/syn/S06.html#Argument_list_binding 06:07
TimToady yes, looks like bug to me
06:08 benabik left 06:09 benabik joined 06:11 Celelibi joined 06:12 fgomez left
sorear TimToady: #SanDiego.pm just watched jnthn's perl 6 modules talk. can you confirm that you are the first heckler? :D 06:13
06:16 Celelibi left
TimToady oh, most likely 06:16
sorear I'm like "cool... yes... ah... HEY I KNOW THAT VOICE" 06:21
06:25 fhelmberger joined 06:27 Celelibi joined
am0c I think this is a bug. Circular module loading detected involving module 'ModuleName'. gist.github.com/3916541 06:32
...oops it's not...I just didn't (and don't) know about package and module and class. 06:42
07:10 brrt joined 07:16 flightrecorder joined, FROGGS joined 07:19 grondilu joined 07:26 domidumont joined, domidumont left 07:33 domidumont joined
moritz PerlJam: what's the state of the rakudo release? 07:35
oh, it's out. PerlJam++ 07:36
07:38 colomon_ joined, colomon left, colomon_ is now known as colomon
moritz sorear: how hard would it be for niecza's eval_{lives,dies}_ok to evaluate stuff in the caller's context? 07:39
GlitchMr Isn't it called 'eval_' X~ <lives dies> X~ '_ok' in Perl 6? 07:41
sorear moritz: trouble is that assumes the CALLER still exists 07:42
tadzik good morning #perl6 07:43
sorear moritz: niecza has special casery to avoid optimizing out frames where &eval is mentioned
GOOD MORNING TADZIK
brrt \o everybody
tadzik OH HELLO SOREAR. GOOD DAY
GlitchMr CAPS LOCK IS BEST KEY, ALSO GOOD MORNING, TADZIK :-).
brrt why does capitalized text look like shouting, anyway? 07:46
tadzik comic books legacy, maybe 07:47
moritz sorear: I have trouble drawing conclusions from your answer :-)
sorear: so let me rephrase my question
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
moritz sorear: ok, then I'll experiment with it 07:49
07:52 hoelzro|away is now known as hoelzro 08:03 Celelibi left
am0c Could anyone tell me if this is rakudo bug or my bug? gist.github.com/3916541 08:03
08:04 Celelibi joined 08:05 mucker left
sorear am0c: Your bug. 08:06
am0c oh..T__T 08:07
sorear you have a circular dependency
rakudo tries to load MainWindow, discovers Listener needs to be loaded first
rakudo tries to load Listener, discovers MainWindow needs to be loaded first 08:08
rakudo throws its arms up in despair
am0c aha.. to decide which would be first is the problem. 08:09
hm.. so I will tell rakudo that MainWindow is the first. 08:11
masak morning, #perl6 08:12
phenny masak: 03:20Z <diakopter> ask masak nieczaissue or rakudobug, I dunno: rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
masak rn: say (4) ~~~ (4) ~~~ (4) ~~~ (4)
sorear masaku 08:13
p6eval rakudo d171b9: OUTPUT«False␤»
..niecza v22-14-g136ddcf: OUTPUT«True␤»
sorear sleep&
masak I freely confess that I have no idea what the above should do.
08:13 Celelibi left
am0c sorear: good night 08:13
masak someone with more brainpower may want to analyze it.
FROGGS .oO( a quadcycle ascii art bug? )
sorear rn: say (4) ~~~ (4) ~~~ (4) 08:14
p6eval rakudo d171b9: OUTPUT«False␤»
..niecza v22-14-g136ddcf: OUTPUT«True␤»
FROGGS sorear: gnight!
masak sorear: SWADOL[Niecza improvements]
sorear rn: say (4) ~~~ (4)
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
sorear rn: say (4) ~~~ True
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«False␤»
FROGGS if the result of (4) ~~~ (4) is Bool true...
right, what I thought
08:15 kresike joined
kresike good morning all you happy perl6 people 08:15
FROGGS gmorning
masak kresike! \o/
sorear maybe precedence parsing funny business
out for reals
kresike masak, o/
masak rn: say ~4
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«4␤»
masak rn: say 4 ~~ ~4 08:16
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
masak rn: say (4 ~~ ~4) ~~ (1 == 1)
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤»
masak from this, I'm inclined to say it's a rakudobug, not a nieczabug. 08:17
FROGGS ?
rn: ((4) ~~~ (4)) ~~~ ((4) ~~~ (4))
p6eval rakudo d171b9, niecza v22-14-g136ddcf: ( no output )
FROGGS rn: say ((4) ~~~ (4)) ~~~ ((4) ~~~ (4))
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«True␤» 08:18
08:20 Celelibi joined
Timbus r: say True ~~ ~4 08:21
p6eval rakudo d171b9: OUTPUT«False␤»
Timbus (4) ~~~ (4) ~~~ (4) -> False to my head
(4 ~~ ~4) is true. True ~~ ~4 is false? but im probably way wrong 08:22
or does ~~ chain because wow 08:24
my head
FROGGS pretty awesome: glyphic.s3.amazonaws.com/ozone/mark...300dpi.jpg 08:25
is that still up to date?
08:26 Celelibi left
Timbus := is runtime binding and ::= is compile time? really? 08:28
ij thought it was just a const type thing
08:41 bbkr left
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? gist.github.com/3916541 08:49
GlitchMr am0c: Because it's circular dependency
I once also had this problem
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:50
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
masak that seems to me to be a misunderstanding of how Perl 6 parsing/module loading works. 08:51
am0c hm... 08:52
masak see my discussion about this with TimToady on p6l from a few years ago.
am0c okay.
masak am0c: what you want to do is something like class MainWindow { ... }
with the three dots being literal code.
to make sure the class exists before the dependent class uses it. 08:53
am0c anyway, I haven't had this problem in Perl 5 even though I code like this. it's novel and unfamiliar. 08:54
masak: I will try!
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
why not have an untyped 'parent' inside listener, so that you can attach it to other Window types possibly 09:02
not to give the old 'why would you want that?' response but uh.
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
am0c Timbus: hm... i thought that's the common situation we met. i didn' think that's the erroneous structure. 09:06
jnthn PerlJam++ # release 09:07
am0c jnthn: good morning o/
IMHO it is not good if I 'had' to untype it, anyway, just because of the dependency. 09:08
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:09
i think you should be putting both classes in the one file if they rely heavily on one another 09:10
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 kst left
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:13
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
you might have to remove "use MainWindow"
am0c Timbus: ow! you must be watching me! 09:18
masak yes, circular module usages are always Wrong in Perl 6.
that's why I reacted to what GlitchMr wrote.
arnsholt GlitchMr: I don't think Perl 6 will ever support circular chains of use 09:20
It comes down to how the parser works, essentially
am0c masak: thanks! I found the thread yey. perl.markmail.org/search/?q=list%3A...te:results 09:21
markmail.org/message/rzvfkbsxlkp4ewex 09:22
Timbus dang youre like an internet archaeologist
am0c hehe
that's a funny hyperbole, I like it! 09:23
09:37 domidumont left 09:38 domidumont joined 09:40 domidumont left 09:41 domidumont joined 09:46 domidumont left 09:47 domidumont joined 09:49 domidumont left, domidumont joined 09:54 kst joined 10:03 hypolin left 10:07 anuby left 10:08 Khisanth left
am0c cannot use $.attr public accessor in submethod BUILD.. interesting.. 10:16
it says: Virtual call $.match may not be used on partially constructed objects 10:17
Timbus of course
your object isn't made yet
am0c erm...
Timbus if you're assigning, use $!match i guess 10:18
am0c I have been misunderstood then.
10:20 leont joined
jnthn Use T!attr 10:21
er, $!attr
$.attr is a method call 10:22
10:22 Khisanth joined
am0c thanks! 10:24
10:31 cognominal joined 10:33 cognominal left
am0c snr: class Room { }; class PerlRoom is Room { submethod BUILDALL() { } }; PerlRoom.new; 10:35
p6eval: help
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>
am0c npr: class Room { }; class PerlRoom is Room { submethod BUILDALL() { } }; PerlRoom.new;
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
..niecza v22-14-g136ddcf, pugs: ( no output )
am0c std: class Room { }; class PerlRoom is Room { submethod BUILDALL() { } }; PerlRoom.new;
p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
jnthn Overriding BUILDALL is a pretty bad idea, fwiw :)
(Unless you call the original one too) 10:39
10:44 mucker joined
am0c std: class Room { }; class PerlRoom is Room { submethod BUILDALL() { nextsame; } }; PerlRoom.new; 10:46
p6eval std 47e39ad: OUTPUT«ok 00:00 43m␤»
am0c r: class Room { }; class PerlRoom is Room { submethod BUILDALL() { nextsame; } }; PerlRoom.new;
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:46 brrt left
am0c jnthn: but if i use 'submethod' it's not overring, is it? 10:47
jnthn am0c: Well, it's replacing it for the current class at least 10:48
It's true you'd not be influencing any subclasses.
r: class Room { }; class PerlRoom is Room { submethod BUILDALL(|) { nextsame; } }; PerlRoom.new; # fwiw
p6eval rakudo d171b9: ( no output )
am0c .....ah? 10:49
10:50 cognominal joined
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..
std: class Room { }; class PerlRoom is Room { submethod BUILDALL { nextsame; } }; PerlRoom.new; # same?
p6eval std 47e39ad: OUTPUT«ok 00:00 42m␤»
am0c r: class Room { }; class PerlRoom is Room { submethod BUILDALL { nextsame; } }; PerlRoom.new; # same?
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␤␤»
am0c I see. 10:51
r: class Room { }; class PerlRoom is Room { submethod BUILDALL (|args) { args.say; nextsame; } }; PerlRoom.new; # same?
p6eval rakudo d171b9: OUTPUT« ().hash␤»
am0c o___O
10:55 cognominal left 11:03 mucker left 11:04 cognominal joined
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:04
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…
cognominal oops
11:05 mucker joined
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
11:06 Su-Shee_ joined
cognominal is exit reason enough no to execute the LEAVE phaser? 11:07
11:08 cognominal left
jnthn wonders if it does END phasers on exit... 11:09
Does Perl 5, ooc?
11:09 Su-Shee left
jnthn r: END { say 'kthxbai' }; exit(0) 11:09
p6eval rakudo d171b9: OUTPUT«kthxbai␤»
jnthn Hm
11:09 cognominal joined
jnthn If we do exit we should probably do LEAVE too. :) 11:09
moritz eval: END { print "bai" }; exit
buubot_backup moritz: bai
am0c $ perl -E 'END { say "bye" }; exit'
bye
jnthn er, END
Yeah 11:10
am0c i late :3
jnthn I think we should probably run LEAVE phasers at exit time.
am0c: Hm, in your timezone I guess it's very late...
no, wait, what... :)
11:10 leont left
jnthn Oh, I dunno how time works ;) 11:10
am0c it's 8:10 pm
heh
jnthn oh, so not late in that sense :) 11:11
am0c er.. and it's friday here
it is!
jnthn ah :)
cognominal I do so. exit has not the connation of "hurry out in total panic"
jnthn Same here :)
11:11 brrt joined
jnthn cognominal: Right. That's what segfaults are for :) 11:11
cognominal :)
am0c i mean.. it isn't late #< english is hard >
11:11 cognominal left
am0c in Korean, if somebody said "it isn't sth" and you agree, you say "yes" 11:12
in English, if somebody say "it isn't sth" and you agree, you say "no" 11:13
it's confusing
i mean.. "yes it is" or "no, it isn't"
moritz in German we have a special word for contradicting a negated question 11:14
"doch"
FROGGS in german you can answer yes and/or no, but it tends to be no
11:15 cognominal joined
am0c interesting :3 11:15
hoelzro oh, I love "doch"
that's my favorite German word that doesn't have an English equivalent
am0c "doch" feels like exclamation
cognominal sorry, I will not have a reliable and fast connection for a while. I read the log though
FROGGS hoelzro: maybe it gets adopted like "Doppelg􏿽xE4nger" 11:16
moritz as a German I always find it funny to stumble across German words in English 11:17
"Gedankenexperiment" surprised me 11:18
FROGGS ya, rucksack, kindergarden...
wow
jnthn kaput :)
FROGGS not to forget blitzkrieg *g*
jnthn
.oO( well, that conversation just bombed... )
11:19
FROGGS :o) 11:20
am0c hehe
std: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } } 11:22
p6eval std 47e39ad: OUTPUT«ok 00:00 44m␤»
am0c prn: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } } 11:23
p6eval niecza v22-14-g136ddcf, pugs: ( no output )
..rakudo d171b9: OUTPUT«===SORRY!===␤Attribute $!jth not declared in class B␤at /tmp/LDEOsJbdBT:1␤»
moritz rakudo++
jnthn Indeed. 11:24
I was sure Niecza caught that one...
am0c n: class A { has $.jth }; class B is A { submethod BUILD { $!jth = 1 } }; B.new
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…
am0c woho 11:25
moritz n: class A { method set() { $!foo = 3 } }; A.set
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…
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 )
am0c why BUILD in class B cannot access A's attribute?
FROGGS prn: class A { has $.jth }; class B is A { submethod BUILD { ::A.jth = 1 } }
p6eval rakudo d171b9, niecza v22-14-g136ddcf, pugs: ( no output )
FROGGS something like that, right?
11:26 cognominal left
am0c ah! 11:26
jnthn am0c: It's not about BUILD. It's because attributes are always private to a class.
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 ?
you wouldn't know which one you get
jnthn There's a nice post on why Perl 6 has no protected somewhere I think...
am0c jnthn: I see, then, I might use accessor, and plus class name as a prefix.
moritz jnthn: on my blog, yes 11:28
jnthn moritz: I wondered if it was yours :)
But couldn't remember.
moritz++
moritz perlgeek.de/blog-en/perl-6/protecte...sense.html
jnthn am0c: Note that you can do things like $obj.SomeClass::method()
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.
moritz the attributes being private to each class is one of the reasons that we call a BUILD submethod in each class
so that we can set them there
am0c aha! I got it! it's also nice to comprehend and remember :3 11:31
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:32
am0c FROGGS: I see. that's right. it makes sense! 11:34
jnthn lunch & 11:35
am0c enjoy your lunch o/ 11:37
11:37 colomon_ joined, colomon left, colomon_ is now known as colomon 11:38 aharoni left, GlitchMr left 11:39 Su-Shee_ is now known as Su-Shee 11:42 GlitchMr joined 11:48 cognominal joined 11:53 cognominal left 11:54 GlitchMr left 11:55 cognominal joined
cognominal moritz: I have seen in english schadenfreude, zeitgeist 11:55
moritz cognominal: those are fairly common(ish), which is why they didn't surprise me as much as some other 11:56
cognominal and a synonymous of nemesis, doppelganger? 11:57
doppelgänger! 11:59
11:59 GlitchMr joined
moritz not quite 11:59
nemesis is more like an arch enemy
and doppelgänger is a look-alike pretending to be you 12:00
a double
cognominal indeed, I just read the wikipedia entry for doppergänger
12:02 cosimo left
brrt literally translated : double-goer 12:02
cognominal indeed 12:03
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
Found one online, modified it to work on a multi user system.
masak what's screen_away.pl ? 12:05
Juerd screen_away.pl puts irssi in /away when screen detaches
And back again when you re-attach
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.
cognominal ok 12:07
so I can run screen, or tmux (whatever its name)?
Juerd Yes.
12:08 cognominal left 12:12 jaldhar left
am0c npr: class A { has $.attr; multi submethod BUILD (|) { nextsame } }; A.new(attr => 1).say 12:15
p6eval pugs: OUTPUT«*** ␤ Unexpected ")"␤ expecting ":", "*" or parameter name␤ at /tmp/sdpzYIVt2d line 1, column 47␤» 12:16
..niecza v22-14-g136ddcf: OUTPUT«A.new(...)␤»
..rakudo d171b9: OUTPUT«A.new(attr => Any)␤»
12:17 cognominal joined 12:22 aharoni joined
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(...)␤»
..rakudo d171b9: OUTPUT«"attr" => 1␤A.new(attr => Any)␤»
..pugs: OUTPUT«*** ␤ Unexpected "args"␤ expecting ":", "*" or parameter name␤ at /tmp/OFgj6qRmxT line 1, column 47␤»
12:38 lorn left 12:39 lorn joined 12:45 SamuraiJack joined 12:51 cognominal left 12:58 cognominal joined 13:00 hash_table joined 13:03 preflex joined 13:04 ranguard_ is now known as ranguard, fhelmberger left, Psyche^ joined 13:05 cognominal left 13:06 flightrecorder left 13:08 FROGGS left, Patterner left, Psyche^ is now known as Patterner 13:12 cognominal joined
arnsholt A git question: is it possible to extract a sub-set of a git history into a separate rep somehow? 13:16
jnthn filter-branch 13:17
13:17 cognominal left
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)
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
Yeah
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
moritz I haven't had to use filter-branch since I split up the git-svn clone of the pugs repo
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 ;)
But it's handy for things like this :)
moritz moritz@casella:~/p6/panda>panda install Pod::To::HTML 13:20
No such method 'VAR' for invocant of type 'Any'
arnsholt Yeah, this is where I'm quite thankful for git allowing me to pretty much destroy everything if I really want to
moritz sadface :/
moritz cleans out and tries a fresh bootstrap 13:21
jnthn aww, I canny even install Panda here :( 13:25
t/bar/baz/x.t ........ 1/3 'rm' is not recognized as an internal or external com
mand,
operable program or batch file.
13:25 cognominal joined
jnthn oh no, that's not the actual failure 13:25
t/panda/ecosystem.t .. 1/10 Failed to remove the file 'C:\Users\jnthn\.panda\src
\panda/REMOVEME': unlink failed: Access is denied.
That is. Hm. 13:26
colomon btw, rebootstrap.pl++ 13:27
[Coke] jnthn: had panda ever been made windows-clean?
I know progress was made, but wasn't sure if it was ever 100%
13:30 hash_table left
jnthn [Coke]: Yes, I had it working quite nicely on my laptop during NPW 13:30
moritz I think FROGGS sent several patches 13:32
arnsholt Oooooh! 13:33
git filter-branch --subdirectory-filter experiments/ # All I had to do 13:34
It seems someone wanted the same thing as me at some point =D
moritz you are a uniq snowflake. Even your git filter-branch requirements have been seen before. 13:39
:-)
timotimo_ does that sentence miss an "if" or "though" or am i missing something?
moritz timotimo_: you must read the first sentence with <sarcasm> tags 13:40
timotimo_ a, that makes it consistent again. thanks!
13:41 gootle left
PerlJam good morning #perl6 13:46
colomon o/ 13:47
moritz \o
PerlJam++ # rakudo release
jnthn hi, PerlJam
PerlJam is tired 13:48
This week has been too hectic
colomon ooo, PerlJam++
PerlJam (but good-hectic rather than bad-hectic, so that's a plus :) 13:49
jnthn moritz: Does unlink handle being passed a directory (as in, remove it and everything beneath it) in Rakudo on Linux? 13:59
felher jnthn: Failed to remove the file 'testdir': unlink failed: Is a directory 14:01
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
jnthn felher: That's kinda what I expected. 14:02
cognominal r: my Hash \matrix of Array of Int;
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Term definition requires an initializer at line 2, near "of Array o"␤»
14:02 flightrecorder joined
cognominal r: my %matrix of Array of Int; 14:02
p6eval rakudo d171b9: ( no output )
jnthn I wonder if the issue is that REMOVEME should not end up being a directory... 14:03
14:04 stopbit joined
jnthn oh...maybe the REMOVEME directory is left over from a previous panda fail... 14:05
yes! 14:06
felher :)
felher -> afk 14:07
jnthn moritz: Pod::To::HTML just installed OK here, now I have a working panda again :)
cognominal perl6: say i*i, say i**2 14:13
p6eval niecza v22-14-g136ddcf: OUTPUT«-1+1.2246063538223773E-16i␤-1+0iTrue␤»
..rakudo d171b9: OUTPUT«-1+1.22460635382238e-16i␤-1+0iTrue␤»
14:15 FROGGS joined 14:17 benabik left 14:18 Targen left 14:21 kaare_ joined, colomon left, hash_table joined 14:22 cognominal left 14:26 PacoAir joined, daniel-s left
[Coke] cognominal: did you mean s/,/;/ ? 14:26
sirrobert quit 14:28
14:28 sirrobert left, cognominal joined 14:29 cognominal left, cognominal joined 14:30 PacoAir left, daniel-s joined, PacoAir joined 14:32 skids joined 14:35 cognominal left 14:38 sirrobert joined 14:40 flightrecorder left, FROGGS left 14:41 flightrecorder joined 14:43 domidumont left 14:45 cognominal joined
brrt wishes he was writing in p6 right now 14:45
how can a language not have the concept of pairs?
14:46 daxim left 14:49 qazplm left
[Coke] brrt: I thought you hated perl 6! 14:51
brrt i do not hate perl 6 at all 14:52
i have had some issues with understanding
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 :-)
but in a serious manner
while most languages' semantics can be written on a post-it 14:55
p6 is huge
timotimo_ that's kind of true :(
brrt there is a method to the madness 14:57
grondilu rn: say "Foo" ~~ m:i:g/foo/;
brrt but it isn't really matched well with 'current' VMs 14:58
p6eval niecza v22-14-g136ddcf: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/3mNdGlfy9_ line 1:␤------> say "Foo" ~~ m:i:g⏏/foo/;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) ␤ a…
..rakudo d171b9: OUTPUT«False␤»
cognominal complexity in the language, if well designed, and with a knowledgeable programmer means less complexity in the programs.
timotimo_ hq9+, much?
;)
cognominal brrt: the complexity of signatures in Perl 6 is probably bigger than the complexity of many languages 15:00
brrt for one thing :-) 15:01
although it is 'manageable' in a way
but i'm off
cognominal probably for compensation of the absence of thereof in perl 5.
15:02 brrt left
kresike bye folks 15:09
15:09 kresike left
grondilu found on perlmonks.org, a cool exercice for regexes: rosalind.info 15:14
15:17 arlinius joined
grondilu I failed at rosalind.info/problems/subs 15:17
I tried: say gather for $s.match(/$t/, :g) { take 1+.from }
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␤»
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
grondilu seems to works though :( 15:20
azawawi hi
grondilu solved 15:27
I had to use :overlap 15:28
say gather for $s.match(/$t/, :overlap) { take 1+.from }
cognominal I did not think of :overlap so my solution was ugly 15:29
15:34 atrodo_ joined, atrodo_ left 15:36 atrodo left, rjbs left, rjbs joined 15:37 circlepuller left, mtk left, rking left, revdiablo left, revdiablo joined 15:38 mtk joined, circlepuller joined, FROGGS joined, rking joined
[Coke] discovers that you can't use native types on a MAIN signature 15:46
std: sub MAIN(int $count) { ... } 15:48
p6eval std 47e39ad: OUTPUT«Potential difficulties:␤ $count is declared but not used at /tmp/h3M7eAXjxk line 1:␤------> sub MAIN(int ⏏$count) { ... }␤ok 00:00 44m␤»
[Coke] std: sub MAIN(int $count) { $count++ }
p6eval std 47e39ad: OUTPUT«ok 00:00 44m␤»
[Coke] should that error?
with a "can't use native types, use Int instead" or something?
jnthn [Coke]: How does it fail if you try? 15:49
TimToady I'd think it should unbox the IntStr for you
(not sure rakudo has IntStr yet...) 15:50
15:50 xdbr joined
TimToady rn: <1 2 3>[0].WHAT.say 15:50
p6eval rakudo d171b9: OUTPUT«Str()␤»
..niecza v22-14-g136ddcf: OUTPUT«IntStr()␤»
TimToady no it doesn't
[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
15:51 atrodo joined
jnthn [Coke]: I suspect it should be made to work. 15:51
[Coke] wonders why we have IntStr *and* Cool. 15:52
(and if someone answers taht, perhaps also shove it in the FAQ)
TimToady n: say IntStr ~~ Int; say Cool ~~ Int;
p6eval niecza v22-14-g136ddcf: OUTPUT«True␤False␤»
[Coke] 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
(or perhaps it is)
TimToady [Coke]: It's not a FAQ if you're the first one to ask it...
[Coke] TimToady: and when has anyone ever actually forced faqs to be F? :P 15:54
TimToady What the FAQ! :)
jnthn Dang. I seem to have broken NQP's ability to compile Perl6::Grammar... 15:56
16:00 hoelzro is now known as hoelzro|away
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 "']>/;"␤»
sirrobert I quoted the hyphen... why is it balking?
dalek osystem: a3dc5fd | (Ahmad M. Zawawi)++ | META.list:
Added Farabi6: Experimental in-browser Perl 6 Editor in Perl 6 :)
16:02
TimToady sirrobert: you must use \ in char class
sirrobert ah, ok
TimToady why it says 'escape' rather than 'quote' 16:03
could say 'escape with backslash' I suppose
sirrobert or even just "escape" would make sense to me 16:04
=)
16:04 xdbr left
TimToady std: say 'foo-bar' ~~ m/<['f' '-']>/; 16:04
p6eval std 47e39ad: OUTPUT«===SORRY!===␤Unsupported use of - as character range; in Perl 6 please use .. at /tmp/8VwSl_v6AX line 1:␤------> say 'foo-bar' ~~ m/<['f' '-'⏏]>/;␤Parse failed␤FAILED 00:00 44m␤»
jnthn r: sub foo(:$bar-baz) { say($bar-baz); }; foo(bar-baz => 42); 16:06
p6eval rakudo d171b9: OUTPUT«42␤»
jnthn nqp: sub foo(:$bar-baz) { say($bar-baz); }; foo(bar-baz => 42);
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)␤»
jnthn nqp: sub foo(*%h) { say(%h<bar-baz>); }; foo(bar-baz => 42);
p6eval nqp: OUTPUT«42␤»
jnthn ohhh 16:07
16:09 timbunce left
azawawi does anyone know of a Perl 6 API/script to access Rosetta code examples by language and task? 16:10
16:11 timbunce joined
dalek d: 64edd1c | larry++ | STD.pm6:
suggest \- as well as .. in char class

  sirrobert++
16:11
p: 41e7b93 | jnthn++ | src/NQP/ (2 files):
Add a way to give a role's body block parameters.

Quite restricted, but should be enough to provide for the needs of STD and doing user-defined operators as role mix-ins.
16:13
p: 1aff9bc | jnthn++ | / (3 files):
Basic MOP-level support for role arguments.

There's no syntactic sugar for it, but this allows provision of role arguments in order to do a mix-in of the parameterized role.
p: f4d8630 | jnthn++ | t/nqp/66-pararole.t:
Test for mixing in parametric roles.

Allow ::($foo) for methods inside roles.
Again, a fairly restricted form, but sufficient for what NQP needs to provide for Rakudo to do user defined ops as role mixins.
jnthn dalek y u no report all commits? 16:14
16:14 MayDaniel joined
moritz dalek is often kicked for flooding when it tries to report all commits 16:15
#parrot has more of them :-)
TimToady I see no kick message though... 16:16
16:23 timbunce_ joined 16:24 fgomez joined, timbunce left, timbunce_ is now known as timbunce 16:28 Vlavv_ joined 16:30 timbunce_ joined, Vlavv` left 16:32 timbunce__ joined 16:33 timbunce left, timbunce__ is now known as timbunce 16:35 timbunce_ left 16:38 Chillance joined 16:47 orafu joined
azawawi panda install HTTP::Client # has test errors.... 16:49
so what do we use to get working http request over rakudo? 16:55
16:56 cognominal left 17:03 birdwindupbird left 17:09 cognominal joined
jnthn star: use LWP::Simple; say LWP::Simple.get('google.com/') 17:11
p6eval star 2012.07: OUTPUT«<!doctype html><html itemscope="itemscope" itemtype="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…
jnthn azawawi: ^ 17:12
17:12 arlinius left
azawawi jnthn: i missed that... thanks 17:13
jnthn: im relearning Perl 6 through my Farabi6 in-browser editor experiment
17:22 jerome left
azawawi more test errors... must be using a newer rakudo or something 17:29
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 rosalind.info/problems/cons/
azawawi moritz: both are broken with newer rakudo 17:33
moritz: and hi. :)
azawawi reverts back to rakudo star 2012.09 17:34
17:37 cognominal left
[Coke] note that evalbot is using 2012.07 17:38
17:38 sjohnson left
moritz because I forgot to update it to a newer version :/ 17:39
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?
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?
GlitchMr But isn't new Array as obsolete as unless 1 { } else { } 17:43
Why unless 1 { } else { } has exception, but new Array doesn't?
moritz both throw an exception
GlitchMr Well, ok
But why new Array has generic X::Syntax::Obsolete exception? 17:44
moritz probably because STD.pm6 does it that way 17:45
GlitchMr Shouldn
't X::Syntax::Obsolete be a role
And obsoleted features would throw actual exceptions
moritz has problems with the term "actual exceptions" 17:46
GlitchMr Well, ok, the exceptions that are unique to this error.
For example, X::Syntax::IndirectObjectCall 17:47
That would do X::Syntax::Obsolete
Or perhaps, X::Syntax::Obsolete::IndirectObjectCall, but this is really deep for exception name
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.
moritz typed exceptions are mostly useful for runtime exception; I mostly extended them to compile time for sake of completeness
diakopter r: class F { }; role F { };
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_possibility' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤» 17:49
diakopter masak: masakbot ^^
moritz but the use cases for them are actually pretty rare
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 )␤␤»
diakopter masak: masakbot ^^
I'd call both those errors LTA 17:52
r: role F { }; class F { }; 17:54
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'is_composed' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤»
diakopter another
17:56 arlinius joined
moritz r: 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␤»
moritz grondilu: ^^ 17:57
n: gist.github.com/3919636
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␤»
diakopter r: class F is Blah { }
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…
diakopter this is LTA; it should say Blah isn't declared 17:58
17:58 cognominal joined
moritz yay for coding on one implementation, and have it run without change on the other 17:58
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
diakopter LTA 18:03
moritz bug, in fact 18:04
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␤»
diakopter LTA or bug
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␤»
moritz wtf
diakopter cuz X is already declared
moritz if it's inside X, it doesn't X::* types already?
erm
18:06 azawawi left
moritz if it's inside X, it doesn't find X::* types anymore? 18:07
diakopter I don't know what Attribute::Package is
oh; you're saying it's an error
gothca
gotcha
moritz well, the error class is X::Attribute::Package
r: class A::B { }; package A { say A::B } 18:10
p6eval rakudo d171b9: OUTPUT«A::B()␤»
18:19 cognominal left
p: 045172e | jnthn++ | t/nqp/66-pararole.t:
Tests for ::(...) in method names.
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␤»
dalek kudo/categorically-better: 6e5ae1f | jnthn++ | src/Perl6/Grammar.pm:
Start cleaning up custom operators.

Move the check for if the operator is already parsed into gen_op, and rename it to add_categorical, to move towards STD.
18:26
kudo/categorically-better: d9ae366 | jnthn++ | src/Perl6/Grammar.pm:
First pass at mixing in roles for categoricals.

Basically works. However, the new operators don't participate in LTM yet, which will need fixing.
diakopter so the inheriting role's attribute overrides the parent role's attribute of the same name?
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
And then the role that was mixed in overrode it.
So, correct behavior.
moritz jnthn++ # branch name 18:28
18:30 sjohnson left, sjohnson joined
[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
p6eval rakudo d171b9: OUTPUT«2␤»
diakopter jnthn: but if foo is public in the parent, the role's overrides
the parent role's
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␤»
diakopter but if I add a foo method to the child role, it again pulls from the child role attribute 18:37
so it's like the overriding foo method pulls from a different attribute than the parent's foo method 18:38
jnthn doesn't see anything unexpected in the output, and isn't quite sure which piece of the puzzle diakopter is missing... 18:39
The .foo you're doing is a method call
diakopter well, it's as if adding the foo method activates the child $!foo (with value 3)
18:40 REPLeffect left
jnthn They're both there 18:40
diakopter oh...
jnthn They're different attributes because they're in different classes (thanks to the class you got by punning)
r: class A { has $.foo = 2; }; class B is A { has $!foo = 3; }; B.new.foo.say 18:41
p6eval rakudo d171b9: OUTPUT«2␤»
jnthn r: class A { has $.foo = 2; }; class B is A { has $!foo = 3; method foo() { $!foo } }; B.new.foo.say
p6eval rakudo d171b9: OUTPUT«3␤»
jnthn It ends up just like this. 18:42
diakopter oh
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␤»
diakopter ok
18:44 azawawi joined
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␤»
diakopter 's head swims a bit
azawawi star: use LWP::Simple; say LWP::Simple.get('rosettacode.org/');
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…
doy w37 18:45
oops
dalek Heuristic branch merge: pushed 38 commits to nqp/kill-nqpattr by jnthn
18:49 fgomez left
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␤»
azawawi rakudo: say $*PERL
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 19:00 tokuhiro_ joined 19:05 spider-mario joined, REPLeffect left 19:06 mhasch joined 19:09 fgomez joined 19:11 REPLeffect joined 19:14 domidumont joined
masak submits rakudobug 19:21
(diakopter's two, above)
diakopter arguably three more
masak feel free to bring them down here for ease of discussion. 19:22
diakopter well, I don't know which ones you submitted 19:23
masak the two you highlighted me for. 19:26
diakopter masak: this one r: class F is Blah { }
masak: this one: r: package X { has $.foo }
19:26 domidumont left
diakopter masak: this one: package X is Associative { } 19:27
masak r: class F is Blah { }
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…
diakopter it should say Blah is not declared
masak arguably, es.
yes*
actually, I had gotten used to the crappy error message, but you're right, it should.
masak submits rakudobug 19:28
jnthn Suggestion for *how* to make things better welcome.
(As in, a suggestion based on an understanding of how traits work :))
masak jnthn: in your view, is it impossible, or just difficult? 19:29
it's 19:30
IRON GODDESS
jnthn masak: I'm just not sure how to do it.
masak TIEGUANYIN
oh, heh. this isn't privmsg, is it? :P
jnthn masak: My first idea was another multi trait_mod:<is> to try and be a fallback
masak: I...thought iron goddess was an odd category of difficulty :P 19:31
masak let's just assume it was. :)
jnthn: intercept the bad error message and substitute it with a good one? :)
diakopter heh
jnthn masak: That's a safer option.
diakopter masak: also note the other two above 19:32
masak yes, let's move on.
r: package X { has $.foo }
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 "}"␤»
masak submits rakudobug
jnthn Failed to fail.
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␤»
masak heh.
masak submits rakudobug
the MOP and packages are not the best of friends, it seems. 19:34
jnthn It's nothing surprising.
Packages *don't* supporting adding parents.
Not having a method is a perfectly good way of not supporting something.
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. :)
diakopter r: package Y { has $.foo }
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤A package cannot have attributes, but you tried to declare '$.foo'␤at /tmp/2i6sY9F_OO:1␤»
diakopter oops
r: package Y is Associative { }
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'add_parent' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤at /tmp/bik8m_Cmfx:1␤»
diakopter oh
jnthn The fix is to check for an add_parent method and whine if it ain't there. 19:36
masak right.
agree.
grondilu rn: say my % = <foo bar> X [0, 0]; 19:38
p6eval rakudo d171b9: OUTPUT«("foo" => 0, "bar" => 0).hash␤»
..niecza v22-14-g136ddcf: OUTPUT«{"bar" => [0, 0], "foo" => [0, 0]}␤»
masak I'm with Niecza here.
grondilu so am I
masak submits rakudobug
rn: .say for <foo bar> X [0, 0] 19:39
p6eval niecza v22-14-g136ddcf: OUTPUT«foo␤0 0␤bar␤0 0␤»
..rakudo d171b9: OUTPUT«foo␤0␤foo␤0␤bar␤0␤bar␤0␤»
jnthn Is the left side actually thunked there?
masak hard to tell; it's constant.
TimToady the problem is that rakudo is flattening a [] in list context 19:40
masak indeed.
jnthn Yeah, that's a known issue with X for a while I think.
masak it's probably in RT already, actually.
jnthn I think so
I know that we have made [0, 0] xx 2 thunk the LHS. 19:41
masak right, but that's not the issue here.
jnthn rn: say my % = <foo bar> Z=> [0, 0] xx 2;
masak I don't think X should thunk that way, actually.
p6eval rakudo d171b9: OUTPUT«("foo" => [0, 0], "bar" => [0, 0]).hash␤»
..niecza v22-14-g136ddcf: OUTPUT«{"bar" => [0, 0], "foo" => [0, 0]}␤»
jnthn That's how I'd write the above fwiw. 19:42
TimToady if anything were to thunk, it'd be the right side
jnthn masak: I'm not sure it should either
Was just seeing the possible surprise :)
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
currently you have to write nested loops to get a triangular set of indices
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…
TimToady for 1..10 X { $^i .. 10 } -> $i, $j {...} # but in this case it would be explicit block, not thunking 19:45
19:52 sirrobert left 19:56 timbunce_ joined, timbunce left, timbunce_ is now known as timbunce
azawawi star: use LWP::Simple; say LWP::Simple.get('rosettacode.org/').chars; 19:57
p6eval star 2012.07: OUTPUT«1447␤»
azawawi i doubt that it is correct... 19:58
s/it/this
jnthn Same.
azawawi LWP::Simple.get does not get all data
diakopter maybe it doesn't handle chunked 19:59
TimToady maybe it's not 1447 enough...
jnthn hm 20:00
my Buf $resp = $sock.read(2 * 1024);
Then it tries to parse out a content length. 20:01
And only bothers to read more if it can do so
Probably not such a 1447 way to do things... 20:02
masak phenny: sv en "lat"?
phenny masak: "lazy" (sv to en, translate.google.com)
masak TimToady: ^^ :)
sorear o/
flussence that theory adds up... I count 600 bytes of headers 20:03
masak sorear! \o/
flussence (none of which are a content length)
diakopter giggles at the reply to [perl #115364]
20:03 GlitchMr left
sorear hah 20:04
[ rt.perl.org/rt3/Public/Bug/Display...xn-1164590 ] 20:05
azawawi so basically LWP::Simple and HTTP::Client are broken... i tried going as far back as rakudo.2012.07
diakopter I'll rethink your mechanism...
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!
azawawi LTA?
masak seriously, that's how much you miss out by not being on IRC with the rest of us :P
azawawi: "less than awesome". 20:08
azawawi: used about error messages that don't live up to our high standards.
since several years back, we submit those as bug reports.
TimToady std: /[a-z]/ 20:09
p6eval std 64edd1c: OUTPUT«===SORRY!===␤Invalid regex metacharacter (must be quoted to match literally) at /tmp/o40IvQhwOh line 1:␤------> /[a-⏏z]/␤Potential difficulties:␤ [a-z] appears to be an old-school character class; please use <[a..z]> if you mean …
diakopter STD is MTA
TimToady in spots
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
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/aNBw4VBDh_:1␤»
..niecza v22-14-g136ddcf: OUTPUT«bb␤»
jnthn You...can put a space there? 20:15
diakopter says std 20:16
jnthn o.O
masak sure, why not?
jnthn Because it looks...wrong...
masak visual-pill-wise, yes.
agree.
jnthn std: m :i/foo/ 20:17
p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
jnthn At least it's consistent.
masak though that might be mitigated if there are spaces between the ///, too.
jnthn std: m :i /foo/
p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
masak also, that.
jnthn That looks OKer.
r: m :i /foo/
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/bYCjNf_Dgg:1␤»
jnthn had no idea that should even parse. 20:18
diakopter r: m:i /foo/
p6eval rakudo d171b9: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in block at /tmp/MEMN9SvPcj:1␤␤»
diakopter I win
20:18 fgomez left 20:19 lichtkind joined, lichtkind is now known as undefined
diakopter well, niecza does the same thing 20:19
jnthn heh, it'll parse it in that case
That error is the correct one.
masak aye.
diakopter oh
20:19 undefined is now known as Guest86130
jnthn I'm surprised about the space being allowed though. :) 20:19
20:20 Guest86130 is now known as lichtkind
jnthn Just need to allow it before the adverbs, then. 20:20
lichtkind ll
shit wrong console :)
hai
sorear hey jnthn. I had sandiego.pm watch your Tokyo modules talk :D
hai lichtkind
jnthn sorear: Hope it made sense :)
sorear: And was interesting.
dalek p/kill-nqpattr: 5c9e6eb | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Factor out NFA and capture storage.
20:21
sorear jnthn: only thing was that the live coding was not quite legible
live demo rather
lichtkind jnthn: you try to kill nqp? 20:22
azawawi star: use IO::Socket::INET;
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␤»
diakopter std: tr/// 20:23
p6eval std 64edd1c: OUTPUT«ok 00:00 41m␤»
jnthn lichtkind: Just one aspect of it :)_ 20:24
azawawi niecza: use IO::Socket::INET;
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
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
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.
azawawi: What's inconsistent?
jnthn thinks he missed something... 20:28
azawawi jnthn: use Some::Library; # use it...
jnthn: if i use a core library, perl6 should find it.. right? 20:29
jnthn azawawi: It's not a library.
masak jnthn: OMG are you killing NQP!?!? :P
jnthn azawawi: It's in the setting, which is the outer lexical scope of your program
masak .oO( but we worked so hard on it... ) 20:30
jnthn masak: :P
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?
jnthn github.com/perl6/nqp/blob/master/s...ot-sub.pir # for anybody who really wants to know what I@m getting rid of.
skids: Won't libc always be in memory?
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"
flussence eval my $s; open(my $f, q{>}, \$s); say $f->foobar # seems consistent enough to me.
buubot_backup flussence: ERROR: Can't locate object method "say" via package "IO::File" at (eval 20) line 1.
jnthn azawawi: Perl doesn't make you say "use Array;" to use arrays...
skids Ah I tried leaving off the "is native" entirely but not that.
lichtkind jnthn: thanks
20:31 fgomez joined
diakopter niecza: say (use strict).WHAT; 20:32
p6eval niecza v22-14-g136ddcf: OUTPUT«Nil␤»
azawawi jnthn: at least the error should be more clear
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.
jnthn skids: But it didn't complain it couldn't find it?
azawawi star: use IO::Socket::INET;
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␤»
azawawi fun 20:34
jnthn skids: In that case the SEGV must be about the call itself
masak azawawi: IO::Socket::INET is already in the setting, no need to 'use' it. 20:35
azawawi i know :)
but i didnt know like 5 min ago
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.
azawawi I am just pointing out that the error message should tell me that when i try to use it :) 20:36
skids golfs
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.
sorear azawawi: see perl5 does the exact same thing
jnthn sorear: Doesn't prevent us doing something better ;)
sorear jnthn: what do you have in mind?
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
sorear also it's kind of bothersome to spend time improving error messages when I know nobody reads them :| 20:40
azawawi and that reminds me where is the documentation for IO::Socket::INET? :) 20:41
20:41 kaare_ left
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:42
rjbs In 5? 20:43
flussence in 6, I know 5 works sensibly
jnthn azawawi: doc.perl6.org doesn't cover it yet, it seems
rjbs Ok. Only asked because p5 came up. ;)
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... :)
azawawi jnthn: im already impressed that doc.perl6.org is there...
jnthn flussence: It certainly won't re-run the file.
azawawi: Yeah, it's great it's coming along. moritz++ and japhb++ did much great things there
flussence: And if it does import things again then symbols should not conflict with themselves 20:45
r: use Test; use Test;
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…
jnthn hah!
Apparently they can :P
20:45 SamuraiJack left
flussence oh neat, it shows you all the exports :D 20:46
jnthn "Let's call it a feature!"
skids jnthn: well, "is native" without the lib seems to work in a golf, so it must be my code's fault. 20:47
jnthn++
grondilu r: use Test; need Test; 20:54
p6eval rakudo d171b9: ( no output )
dalek p/kill-nqpattr: 2c7cd73 | jnthn++ | src/ (2 files):
Eliminate sub form of qbuildsub.
p/kill-nqpattr: e72739f | jnthn++ | src/NQP/Actions.pm:
Remove a workaround we need no more.
p/kill-nqpattr: cfd0d54 | jnthn++ | src/NQP/Actions.pm:
Clean up regex code object creation.
20:55 hash_table left
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…
..rakudo d171b9: OUTPUT«「foo」␤ 0 => 「foo」␤␤「bar」␤ 0 => 「bar」␤␤»
grondilu was expecting XXX somewhere in the output 20:59
jnthn grondilu: .*? will happily match nothing 21:00
And then nothing makes it backgrack
*track
ingy waves 21:01
\oXo/
grondilu oh yeah indeed. I wanted it not to be gready but not that much.
jnthn o/ ingy
ingy hi jnthn :)
grondilu r: .say for "foo\n blah blah".match: /^^ foo $$ .* /, :g; 21:03
p6eval rakudo d171b9: OUTPUT«「foo␤ blah blah」␤␤»
grondilu r: .say for "foo\n one\nfoo\n two".match: /^^ foo $$ .* /, :g; 21:05
p6eval rakudo d171b9: OUTPUT«「foo␤ one␤foo␤ two」␤␤»
sorear You wanted it to be just greedy enough?
am0c r: %*ENV
p6eval rakudo d171b9: ( no output )
grondilu sorear: yeah, so I can have an array of results, not a whole match
azawawi any perl 6 tidy tool? 21:06
am0c r: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
p6eval rakudo d171b9: ( no output )
am0c std: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
p6eval std 64edd1c: OUTPUT«ok 00:00 45m␤»
am0c p: my %env = gogo=>2, duck=>4; %env.grep( Str(*.key) ~~ m/ gogo / )
p6eval pugs: OUTPUT«*** No such method in class Num: "&key"␤ at /tmp/z4nd9MbNSv line 1, column 44-49␤»
sorear viv -6 maybe counts but it won't preserve comments
21:09 skids left 21:13 bapa joined 21:26 bruges_ joined 21:27 bruges left 21:35 MayDaniel left 21:36 mucker left 21:43 _edwin joined
_edwin hi perl6! 21:44
diakopter howdy
_edwin anyone else having problems reaching rosettacode.org?
grondilu _edwin: indeed, can't reach it. 21:45
flussence same here, it was working fine 1¾ hours ago
dalek p/kill-nqpattr: 2fdbe0b | jnthn++ | src/ (2 files):
Start storing NFA directly.

This means it should now be serialized instead of needing to be turned into a QAST tree.
p/kill-nqpattr: 93966ce | jnthn++ | src/ops/nqp.ops:
Add a Parrot Sub => code object op.
p/kill-nqpattr: 727b917 | jnthn++ | src/QAST/Operations.nqp:
nqp:: ops for getting/setting a Sub's code object.
p/kill-nqpattr: d4ee944 | jnthn++ | src/stage0/ (9 files):
Update bootstrap.

Put code object in $!regexsub when possible.
_edwin just wanted to add a solution, now it's offline :(
grondilu r: perl6 -e say "foo 52" ~~ / foo<ws> (<?digit>**2) /;
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Confused␤at /tmp/8THSVlJkCF:1␤»
grondilu r: say "foo 52" ~~ / foo<ws> (<?digit>**2) /; 21:46
p6eval rakudo d171b9: OUTPUT«「foo 」␤ ws => 「 」␤ 0 => 「」␤␤»
grondilu rn: say "foo 52" ~~ / foo<ws> (<?digit>**2) /;
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)>␤»
..rakudo d171b9: OUTPUT«「foo 」␤ ws => 「 」␤ 0 => 「」␤␤»
jnthn grondilu: <?digit> is a zero-width assertion. I'm guessing it's not quite what you're after.
grondilu ok
jnthn (it checks a digit matches at this point, but doesn't actually match one) 21:47
21:47 hash_table joined
diakopter r: say -> {YOU_ARE_HERE} 21:54
p6eval rakudo d171b9: OUTPUT«(signal SEGV)»
diakopter I guess I am not here 21:55
sorear huh?
diakopter :) (YOU_ARE_HERE) 21:56
(the segfault)
sorry, stupid joke
sorear ah
I thought it was a complaint at the lack of response
rpn: print '(signal SEGV)' 21:57
diakopter I caught that possible connotation too late
p6eval rakudo d171b9, niecza v22-14-g136ddcf, pugs: OUTPUT«(signal SEGV)»
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…
diakopter files nieczaissue
sorear n: {YOU_ARE_HERE}
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…
sorear golfed it for you 22:02
diakopter n: say -> {YOU_ARE_HERE}
p6eval niecza v22-14-g136ddcf: OUTPUT«{ ... }␤»
p/kill-nqpattr: 384651d | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Eliminate now-unrequired code.
p/kill-nqpattr: a7352d1 | jnthn++ | src/ (2 files):
Start moving caps into the code object.
diakopter rn: say ""~~/^^$$^^$$/ 22:06
p6eval rakudo d171b9: OUTPUT«「」␤␤»
..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(0) text() pos([].list) named({}.hash)>␤»
22:07 sivoais left 22:18 xinming_ joined
diakopter sorear: here's an interesting one 22:20
rn: default { 5 }; say "alive" 22:21
p6eval niecza v22-14-g136ddcf: ( no output )
..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 xinming left
diakopter I guess default causes some kind of return? 22:21
sorear yes 22:22
diakopter should it catch that default is used outside a when? 22:23
22:24 grondilu left
sorear yes it probably should 22:24
22:24 Khisanth left
diakopter r: say DOC BEGIN { 4 }; 22:29
p6eval rakudo d171b9: OUTPUT«===SORRY!===␤Method 'flat' not found for invocant of class 'NQPMu'␤»
diakopter leaky error
22:29 _edwin left
diakopter phenny: tell masak r: say -> {YOU_ARE_HERE} 22:29
phenny diakopter: I'll pass that on when masak is around.
diakopter phenny: tell masak r: say DOC BEGIN { 4 }; 22:30
phenny diakopter: I'll pass that on when masak is around.
22:31 aharoni left, colomon joined
dalek p/kill-nqpattr: c6cd504 | jnthn++ | src/ (3 files):
Start moving altnfas into the code object.
22:36
22:37 Khisanth joined
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/…
..rakudo d171b9: OUTPUT«␤»
diakopter sorear: bug?
sorear diakopter: it's slightly leaky but I wouldn't call it a bug 22:40
niecza does basically sub say (|c) { real-say(gistcat(|c)) } 22:41
jnthn Time for some sleep & 22:42
22:43 sivoais joined 22:45 Chillance left
azawawi how do i slurp a binary file in Perl 6? 22:46
23:01 grondilu joined
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␤␤»
..niecza v22-14-g136ddcf: ( no output )
flussence azawawi: open(:bin) 23:02
grondilu I think rakudo does not reckognize %a X %b as a list of values
23:02 spider-mario left
grondilu I think rakudo does not reckognize %a X %b as a list of *pairs* 23:02
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 Pleiades` left, skids joined 23:04 supernovus joined 23:05 stopbit left, timbunce_ joined 23:08 Pleiades` joined, timbunce left, timbunce_ is now known as timbunce 23:10 Khisanth left
diakopter r: say my Int$a+=2; say my Int$b*=2; 23:11
p6eval rakudo d171b9: OUTPUT«2␤2␤»
diakopter how can it be both 0 and 1
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␤»
..rakudo d171b9: OUTPUT«2␤2␤4␤»
diakopter o_O
23:12 hoelzro|away is now known as hoelzro
flussence wtf 23:12
23:12 timbunce left
lichtkind guood night 23:13
23:13 lichtkind left 23:16 cibs left 23:17 atrodo left, azawawi left
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␤»
skids r: say my Int$a+&=2; say my Int$b+=4;
p6eval rakudo d171b9: OUTPUT«2␤4␤»
skids Plainly <op>= is just returning the RHS.
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␤␤»
diakopter nice
rn: my Int $a &&= -5; say $a 23:22
p6eval rakudo d171b9, niecza v22-14-g136ddcf: OUTPUT«Int()␤» 23:23
skids Oh actually this might be spec. 23:25
diakopter well, niecza differs
23:26 Khisanth joined
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
.oO(methinks that should be "identity")
flussence OH. 23:27
diakopter ok, so they're all wrong
doy no, rakudo is right
diakopter oic 23:28
skids "$x -= 1; is more or less equivalent to: $x = [-]() unless defined $x; $x = $x - 1;" 23:29
flussence r: my Int $a +&= -5 23:30
doy although maybe not for &&=
p6eval rakudo d171b9: ( no output )
flussence r: my Int $a +&= -5; say $a
p6eval rakudo d171b9: OUTPUT«-1␤»
flussence oh ok, I had the junction op before.
(I was beginning to worry the laws of mathematics had broken down entirely...) 23:31
skids Magic trumps math:-)
r: say [+&]()
p6eval rakudo d171b9: OUTPUT«-1␤»
sorear r: say -1 +& -1 23:32
p6eval rakudo d171b9: OUTPUT«-1␤»
sorear r: say -1 +& -5
p6eval rakudo d171b9: OUTPUT«-1␤»
sorear that,however
r: say (-1) +& (-5) 23:33
p6eval rakudo d171b9: OUTPUT«-1␤»
sorear wrongness
np: say (-1) +& (-5)
rnp: say (-1) +& (-5)
p6eval niecza v22-14-g136ddcf, pugs: OUTPUT«-5␤»
..rakudo d171b9: OUTPUT«-1␤»
skids rakudo bitops need to be run over several times with a correctness truck. 23:35
23:37 thou_ left
skids r: say -$_ +& -1 for ^10 23:37
p6eval rakudo d171b9: OUTPUT«0␤-1␤0␤-1␤0␤-1␤0␤-1␤0␤-1␤»
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:38
23:38 hoelzro is now known as hoelzro|away
doy why? 23:42
i'd say the other way around 23:43
flussence because it makes $undef *= 2 behave different from $undef = $undef * 2 23:44
23:44 tokuhiro_ left
doy that's the case for the ** behavior too 23:45
sorear I have a theory that the original purpose of undef was to make perl -ne '$total += length $_' DWIM 23:46
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?
diakopter hee
are you sure -n came before undef? 23:50
sorear Inessential. 23:51
23:57 supernovus left