»ö« 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:07 raiph left 00:16 MikeFair_ left 00:23 MikeFair_ joined 00:27 att left
diakopter n: 'alive' 00:27
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
diakopter sorear: niecza rebuild seems stuck
00:40 benabik joined 00:45 cognominal joined 00:47 Psyche^ joined, Psyche^ is now known as Patterner 00:52 fgomez left 00:54 whiteknight left, kevouze joined 00:55 cognominal left 00:56 anuby joined 01:02 cognominal joined 01:07 kevouze_ joined 01:09 kevouze left 01:12 kevouze_ left 01:13 fgomez joined 01:21 tokuhiro_ joined 01:25 att joined 01:29 cognominal left 01:30 cognominal joined 01:42 cognominal left 01:48 cognominal joined 01:49 grondilu left
dalek rl6-bench: c11b540 | (Geoffrey Broadwell)++ | / (2 files):
Split bench into timeall and analyze
01:51
rl6-bench: 1ee014f | (Geoffrey Broadwell)++ | / (2 files):
Update EXPECTED and README to refer to split timeall and analyze scripts; minor additional fixes in each
rl6-bench: 3b96734 | (Geoffrey Broadwell)++ | bench:
Remove no-longer-needed bench script
rl6-bench: 511186f | (Geoffrey Broadwell)++ | .gitignore:
Add bench-*.json to .gitignore
japhb Well, that at least splits the original monolithic Perl 5 script into two somewhat more focused Perl 5 scripts. Conversion of `analyze` to Perl 6 may have to wait for another day. :-) 01:52
01:53 cognominal left 02:01 PacoAir left 02:36 orafu left, orafu joined 02:37 wamba joined 02:41 tokuhiro_ left 02:46 Circlepuller joined 02:59 att left 03:12 xinming_ joined 03:16 xinming left 03:37 thou left 03:54 skids left 04:05 cognominal joined 04:12 telex left 04:13 kst left 04:17 raiph joined 04:26 telex joined 04:29 kst joined
masak r: my $m = method ($a) { say $a }; class A {}; A.new.$m(42) 04:30
p6eval rakudo 547fcb: OUTPUT«42␤»
04:31 thou joined
masak r: my $m = method ($a) { say $a }; class A {}; sub bind($obj, $method) { -> *@args { $obj.$method(|@args) } }; my $bound = bind(A.new, $m); $bound(42) 04:32
p6eval rakudo 547fcb: OUTPUT«42␤»
masak \o/
04:32 telex left 04:34 aharoni joined 04:35 telex joined 04:45 flightrecorder joined 04:50 hash_table left 04:53 hash_table joined 05:07 aharoni left 05:11 Patterner left 05:12 Psyche^ joined, Psyche^ is now known as Patterner
Woodi morning today :) 05:13
masak: how that last example work ? looks like one-line MOP for me...
err, def&implementation of MOP... 05:14
especially: how this: $obj.$method(... can happen ? 05:16
05:17 sftp left 05:21 birdwindupbird joined
raiph Woodi: i think jnthn just changed rakudo to make the my $m = method bit work. i think $o.$m() has long worked. 05:22
Woodi but some random sub shouldn't be allowed to add method to class... 05:23
or it's kind of wrapper ?
*add meth to obj egzaktly 05:24
raiph Woodi: poked around logs. "recent change" might be my imagination. note: irclog.perlgeek.de/perl6/2012-10-08#i_6044469 05:38
ah. and irclog.perlgeek.de/perl6/2012-10-11#i_6051934 05:41
Woodi: this is what i was thinking was the relevant commit: github.com/rakudo/rakudo/commit/5a92ef1c0e 05:46
Woodi raiph: np. I was probably wrong too, with masak intentions. looks now like find of security breach :) 05:50
05:51 GlitchMr joined, popl left 05:55 gootle joined 05:59 wamba left 06:00 hash_table left 06:05 kurahaupo left 06:08 cognominal left 06:10 hoelzro|away is now known as hoelzro, hoelzro is now known as hoelzro|away 06:11 flightrecorder left
masak raiph: everything I used above has worked for a long time. 06:13
Woodi: in no way am I adding a method to a class. you may want to look again. 06:14
06:14 cognominal joined
raiph masak: thanks. 06:14
masak it would only be a "security breach" (though you probably mean "breach of encapsulation/information hiding") if the anon method could access private state. which it can't. only methods in the class block can do that. 06:15
raiph masak: at first i thought you were adding a method to an object. but it's not even that is it?
masak correct. it's not.
the name of the sub -- "bind" -- is a clue.
raiph so exactly what is it? :) 06:16
masak I'm binding an object (to be the invocant) to an anonymous method.
JavaScript has a method .bind on functions which does this. essentially pre-setting 'this' on the invocation.
sorear raiph: $obj.$method(42) is almost synonymous with $method($obj, 42)
perl 6 does not have a magical this value, it's just the first argument 06:17
masak what sorear said. in Perl 5 thre is an *equivalence* between method calls and sub calls with an extra first parameter. in Perl 6 they are different but still very similar.
another way to say that is that there aren't "sub lambdas" and "method lambdas". there's only lambdas. methods just happen to have an extra (often hidden) first parameter. 06:18
there *is* a way to add methods to objects, using anonymous subclassing. 06:19
rn: my $o = 42 but role { method greet { say "OH HAI" } }; say $o; $o.greet() 06:20
sorear n: class A { method foo(:$foo:) {} }; A.foo
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«42␤OH HAI␤»
niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
sorear r: class A { method foo(:$foo:) {} }; A.foo
p6eval rakudo 547fcb: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in method foo at /tmp/sDHRdlw4hS:1␤ in block at /tmp/sDHRdlw4hS:1␤␤»
masak hm, that signature sholdn't parse, methinks. 06:21
nameds must come after positionals, so the colon after ':$foo' can't appear there.
Woodi hmm, why add $obj as "invocant" for subs/methods with syntax exactly like method on object call ? 06:22
raiph r: my \m = method () { say 1 }; sub bind (\o, \m) { -> { $o.$m }; my $b = bind (1, m); $b(); 06:33
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Variable $o is not declared␤at /tmp/cRNu4bJ4jc:1␤»
TimToady r: my $m = method ($self: $a) { say $a }; class A {}; my $bound = $m.assuming(A.new); $bound(42); 06:37
p6eval rakudo 547fcb: OUTPUT«42␤»
TimToady r: my $m = method ($a) { say $a }; class A {}; my $bound = $m.assuming(A.new:); $bound(42);
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Unable to parse expression in argument list; couldn't find final ')' at line 2, near ":); $bound"␤»
TimToady n: my $m = method ($a) { say $a }; class A {}; my $bound = $m.assuming(A.new:); $bound(42);
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
TimToady heh
n: my $m = method ($a) { say $a }; class A {}; my $bound = $m.assuming(A.new:); $bound(42); 06:38
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
TimToady um...
n: say 42
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤» 06:39
TimToady this is...suboptimal...
raiph nr: sub s (\a, \b) { }; s (1, 2); 06:40
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in sub s at /tmp/iPzMmiWHGe:1␤ in block at /tmp/iPzMmiWHGe:1␤␤»
raiph r: sub s (\a, \b) { }; s (1, 2); # what am i doing wrong? 06:42
p6eval rakudo 547fcb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in sub s at /tmp/n2XtQv4sC8:1␤ in block at /tmp/n2XtQv4sC8:1␤␤»
TimToady sorear: see timeouts above 06:45
06:54 kaleem joined, Chillance joined
sorear yeah I'm aware 06:54
TimToady r: my $m = method ($a) { say $a }; class A {}; my $bound = $m.assuming(A.new); $bound(42); 07:04
p6eval rakudo 547fcb: OUTPUT«42␤»
TimToady I guess that works too
r: my $m = method ($a) { say self.WHAT, ' ', $a }; class A {}; my $bound = $m.assuming(A.new); $bound(42); 07:05
p6eval rakudo 547fcb: OUTPUT«A() 42␤»
TimToady even works right :)
masak: so I think your bind() is a bit of overkill 07:07
zzz & 07:08
sjohnson bed! 07:12
07:12 brrt joined
masak TimToady: heh, I had .assuming on my list of alternative ways to do .bind, and then promptly forgot about it ;) 07:16
07:17 atrodo left 07:18 flightrecorder joined
jnthn morning o/ 07:18
brrt hi \o
jnthn raiph: (doing wrong) passing a single parcel argument 07:19
r: sub s (\a, \b) { }; s(1, 2); 07:20
p6eval rakudo 547fcb: ( no output )
07:20 FROGGS joined
raiph jnthn: ah. simple enough. thanks. and good morning. :) 07:23
masak jnthn! \o/ 07:24
07:30 wamba joined
sorear don't count on a prompt resolution of the p6evalissue. 07:32
raiph jnthn: does the Rakudo source tree contain any lines of pure PIR, or is all PIR code embedded in NQP? How many lines of NQP contain PIR?
jnthn raiph: iirc, there's two (non-generated) .pir files in NQP, in src/cheats/ 07:33
And I think we've none at all for Rakudo
07:33 hoelzro|away is now known as hoelzro
moritz nr: say 42 07:34
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«42␤»
07:35 integral left 07:37 woosley left
masak n: say '(timeout)[auto-compiling setting]' 07:37
07:37 integral joined, integral left, integral joined
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤» 07:37
tadzik yeah, it finally compiled the setting and now reacts correctly :) 07:38
masak that's the only reasonable explanation I can see, anyway. 07:43
moritz n: say 1 07:45
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
masak dang, hypothesis falsified. :P 07:47
tadzik quick, do something before it kills feather again :)
07:48 wamba left
moritz huh, on feather3, the process 'perl poll' takes 100% CPU 07:52
07:56 pippo_ joined 07:57 pippo_ left 07:59 daxim joined
GlitchMr n: say [*] 1.. 6 #`?? 08:01
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
08:02 cognominal left, wamba joined 08:04 fhelmberger joined 08:09 cognominal joined 08:11 GlitchMr left 08:24 wamba left 08:31 dju joined 08:35 dakkar joined 08:41 dju left 08:43 thou left 08:48 dju joined, dju left, dju joined 08:49 dju left
masak if a routine defines itself as returning a Str, what does a no-argument 'return' return? 09:01
jnthn r: sub foo() returns Str { return } 09:02
p6eval rakudo 547fcb: ( no output ) 09:03
hoelzro guesses Str
jnthn ...apparently, not an exception...
jnthn kinda expected that to complain
09:03 Tene left
jnthn Oh, I wonder if it returns Nil, and Nil is accepted in any context? 09:04
09:04 tgt joined
jnthn r: sub foo() returns Str { return }; say foo.WHAT 09:04
p6eval rakudo 547fcb: OUTPUT«Type check failed for return value; expected 'Str' but got 'Nil'␤ in sub foo at /tmp/3JL_UDkW2p:1␤ in block at /tmp/3JL_UDkW2p:1␤␤»
jnthn Oh!
I didn't call it above
duh.
OK, then it is doing what I expect
masak ah. 09:05
jnthn I think that's sane
masak yes, that was one of two possibilities that I expected.
jnthn If you said you're gonna return a Str and then you don't... 09:06
masak the other one being that 'return' is context-sensitive enough to know that it should return Str.
09:08 arnsholt left
moritz that'd sound like a piece of context flowing in the wrong direction 09:19
though maybe necessary for returns of native type 09:20
(or maybe not)
09:21 Tene joined 09:22 Caldrin joined
Caldrin Hi! Is there a new POD for perl6 or do I use the old POD for documenting my modules? 09:24
tadzik there's new Pod, yes
Caldrin Can you link me to documentation, please? 09:25
09:26 cognominal left
Caldrin Ah, I found this: zag.ru/perl6-pod/S26.html 09:28
tadzik: Thanks for your answer.
masak Caldrin: welcome! there's indeed a new Pod, but I should warn you that rendering support is not yet up to the standard of the old POD. 09:30
oh and by the way, tadzik++ is the guy who implemented almost all of the Pod parsing in Rakudo :) 09:31
Caldrin masak: Well, as far as I see there are other places too, where Perl6 is not yet up to the standard of Perl5. Thats fine for me. I want to be an early adopter of "The Next Big Thing". 09:33
masak then double welcome.
doubly*
09:34 fglock left 09:36 SamuraiJack joined, dju joined
Caldrin Thank you 09:37
09:42 dju left 09:48 kaleem left 09:54 kaleem joined 10:00 hypolin left 10:09 anuby left 10:14 rindolf joined 10:21 wamba joined 10:25 sjohnson left, arlinius left 10:34 zby_home_ joined 10:38 GlitchMr joined 10:41 Patterner left, estrai_ left, wooden left, infosophy left, buubot_backup left, mhasch left, sevvie left, quietfanatic left, szbalint left, shachaf left, smash left, apejens left, BooK left, raiph left, sisar left, rjbs- left, simcop2387 left, colomon left, aloha left, ChoHag left, rindolf left, crazedpsyc left, Woodi left, felipe left, patspam_ left, fuleo left, ggoebel left, felher left, groky left, FROGGS left, brrt left, preflex left, killbot left, mikec_ left, ashleydev left, tgt left, dakkar left, tadzik left, _jaldhar left, jerome left, mtk left, bruges left, baest left, japhb left, bbkr left, lestrrat left, Ulti left, cibs left, bbkr_ left, odoacre left, Bucciarati left, Vlavv_ left, sizz left, lorn left, Tene left, rhr left, rurban left, ServerSage left, ruz left, frettled left, charsbar_____ left, `patch` left, kaleem left, sivoais left, dalek left, mst left, s1n left, c1sung left, kcwu left, larks left, Bucciarati joined, Yappocall left 10:44 Yappocall_ joined, rindolf joined, kaleem joined, Tene joined, tgt joined, dakkar joined, FROGGS joined, Patterner joined, raiph joined, rhr joined, sisar joined, sivoais joined, tadzik joined, preflex joined, ruz joined, rurban joined, dalek joined, cibs joined, _jaldhar joined, ServerSage joined, jerome joined, bbkr_ joined, mtk joined, bruges joined, crazedpsyc joined, estrai_ joined, rjbs- joined, killbot joined, odoacre joined, simcop2387 joined, Woodi joined, colomon joined, buubot_backup joined, mst joined, s1n joined, wooden joined, mhasch joined, felipe joined, infosophy joined, patspam_ joined, Vlavv_ joined, baest joined, japhb joined, BooK joined, apejens joined, smash joined, shachaf joined, calvino.freenode.net sets mode: +v dalek, szbalint joined, quietfanatic joined, sevvie joined, mikec_ joined, sizz joined, lorn joined, ashleydev joined, fuleo joined, aloha joined, bbkr joined, ChoHag joined, ggoebel joined, Ulti joined, felher joined, groky joined, c1sung joined, kcwu joined, lestrrat joined, larks joined, `patch` joined, charsbar_____ joined, frettled joined, flightrecorder left 10:45 daniel-s left, flightrecorder joined, dalek left, d4l3k_ joined, felipe left 10:46 d4l3k_ is now known as dalek, flightrecorder left, flightrecorder joined 11:01 daniel-s joined 11:03 dju joined 11:05 Su-Shee_ joined 11:06 dju left 11:07 felipe joined, Su-Shee left, dju joined, dju left, dju joined
jnthn heads to Stockholm for NPW & 11:08
11:09 dju left 11:10 brrt joined, SamuraiJack left 11:11 Su-Shee_ is now known as Su-Shee 11:12 kaleem left, kaleem joined 11:13 cognominal joined 11:15 cognominal_ joined, SamuraiJack joined 11:17 cognominal left 11:39 cognominal_ left 11:41 cognominal joined, PacoAir joined 11:47 cognominal left
dalek rlito: b50d8dc | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js - new structure p5ArrayOfAlias
11:47
11:48 cognominal joined, cognominal left, cognominal_ joined 12:09 SamuraiJack_ joined 12:12 SamuraiJack left
masak jnthn: good luck in Stockholm! say hello from me! :) 12:14
12:17 cognominal_ left 12:19 _jaldhar left 12:21 sjohnson joined 12:27 cognominal_ joined 12:31 cognominal_ left
[Coke] realizes he did not re-check the daily run builds to make sure today's daily run was ok. whoops. 12:37
"wait and see", I guess.
12:38 hash_table joined
[Coke] drinks a coffee and hopes for the best. 12:40
rindolf [Coke]: shouldn't you drink coke? ;-) 12:51
12:55 fhelmberger left 12:56 mucker joined 12:57 grondilu joined
grondilu What's the equivalent of perl5's "SUPER" pseudo-class? 12:58
masak closest equivalent is nextsame, callwith, et al. 12:59
but "SUPER" doesn't make much sense in a MI language. 13:00
it's all about method resolution orders instead. hence nextsame and gang.
grondilu ok 13:01
13:01 Patterner left
moritz the question about SUPER is a FAQ now 13:05
somebody[tm] should really add it (and the answer) to the perl6/faq repo
grondilu nr: class Foo { method talk { say "foo" } }; class Bar is Foo { nextsame; say "bar" }; .talk given my Bar $x .= new;
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«nextsame is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:485␤ in block at /tmp/EkcVMqf5Sv:1␤␤»
13:05 Psyche^ joined 13:06 Psyche^ is now known as Patterner 13:07 integral left
grondilu callsame and co seem to deal with multi dispatch, not inheritance :/ 13:07
moritz so does SUPER 13:08
what else do you need it for, except calling methods from superclasses?
grondilu r: class Foo { method talk { say "foo" } }; class Bar is Foo { callwith; say "bar" }; Bar.new.talk;
p6eval rakudo 547fcb: OUTPUT«callwith is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:463␤ in block at /tmp/uqHSYuAAcL:1␤␤»
moritz well, you need to call it inside a method 13:09
huf where's method talk in Bar?
moritz as a first step at least :-)
grondilu oops
13:09 wamba left
moritz r: class Foo { method talk { say "foo" } }; class Bar is Foo { method talk { callsame; say 'bar' } }; Bar.new.talk 13:09
p6eval rakudo 547fcb: OUTPUT«foo␤bar␤»
grondilu my bad
indeed.
13:09 brrt left
grondilu Thanks :-) 13:10
moritz np & yw :-) 13:11
13:11 kaleem left 13:12 kaleem joined, hash_table left 13:13 kaleem left, kaleem joined
[Coke] rindolf: it's a little early for the cold stuff. I switch to Coke Zero about 10am local time. :) 13:14
13:14 kaleem left 13:15 integral joined, integral left, integral joined 13:16 benabik left, benabik joined
rindolf [Coke]: ah. 13:16
grondilu rn: say 3.infix:[my $ = "*"](4); 13:22
p6eval rakudo 547fcb: OUTPUT«No such method 'infix:<*>' for invocant of type 'Int'␤ in block at /tmp/SlLgrXlTKT:1␤␤»
..niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
grondilu Is this kind of indirection NYI? 13:24
13:24 fhelmberger joined
moritz r: say 3.&infix:[my $ = "*"](4); 13:24
p6eval rakudo 547fcb: OUTPUT«12␤»
moritz grondilu: if you want to use a subroutine as a method, you must include the & in the name 13:25
grondilu ok, but I guess S12 needs to be corrected then. 13:26
around line 379
moritz I don't see why 13:29
in that case $methodobj contains a callable
13:29 kaleem joined
moritz but you were using a method *name* 13:30
13:32 sisar left 13:40 sftp joined
grondilu it took some time but yeah I think I get it. 13:42
r: class Foo is Str { method infix:<++>($s) { self ~ $s } }; say Foo.new.infix:<++>("bar");
p6eval rakudo 547fcb: OUTPUT«bar␤»
grondilu here we don't need '&' indeed.
13:43 kaleem left
moritz right, because infix:<++> already is a method, not a sub 13:43
dalek rlito: 1a8d3e4 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js - p5ArrayOfAlias - shift, pop
13:46
13:47 fhelmberger left
moritz css.dzone.com/articles/anti-javascript-perl-6 13:50
(sorry if that's already been posted, I haven't backlogged thorougly for a time)
www.johndcook.com/blog/2012/10/09/t...avascript/ is the original URL 13:52
13:55 bluescreen10 joined
[Coke] wow, that's a surprisingly postive take on the situation. :) 13:55
13:59 stopbit joined
moritz aye :-) 13:59
r: class A { method !foo($x) { say "private $x" }; method public { $!foo("stuff") } }; A.new.public 14:01
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Attribute $!foo not declared in class A␤at /tmp/FnPF5WO3bX:1␤»
moritz according to S12:471, that should work 14:02
as a short way to say $( self!foo('stuff') )
though personally I'm not sure the conflict with attribute names is worth it
14:04 flightrecorder left 14:06 FROGGS left 14:09 flightrecorder joined 14:18 FROGGS joined 14:20 cognominal joined 14:21 hash_table joined 14:23 benabik left 14:24 flightrecorder left, FROGGS left 14:26 skids joined, atrodo joined 14:31 tgt left 14:44 fhelmberger joined 14:51 fhelmberger left 15:04 birdwindupbird left 15:12 daxim left 15:26 flightrecorder joined 15:28 FROGGS joined 15:31 hoelzro is now known as hoelzro|away 15:39 att joined 15:54 fgomez left 16:00 kaare_ joined 16:02 wamba joined 16:03 orafu left 16:05 supernovus joined 16:11 bluescreen10 left
supernovus r: my $m = method ($a) { say "$.name says $a"; }; class A { has $.name; }; my $foo = A.new(:name<Bob>); $foo.$m("hello"); 16:15
phenny supernovus: 10 Oct 02:01Z <[Coke]> tell supernovus I tried to write a test that this passed and rakudo failed, and failed. Can you add a test to the ticket or to roast?
p6eval rakudo 547fcb: OUTPUT«Bob says hello␤»
Ulti r: my @list = <hello>; @list.unshift(1..Inf); say @list[*-1]; 16:22
p6eval rakudo 547fcb: OUTPUT«(timeout)»
Ulti I think it starts to reify Inf
yeah it does looking at my RAM usage :D 16:23
if you go the other way around you can't push on the end of an Inf list it raises an exception 16:24
n: my @list = <hello>; @list.unshift(1..Inf); say @list[*-1];
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
colomon n: my @list = <hello>; @list.unshift(1..Inf); say @list[*-1]; 16:25
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
colomon huh. why still compiling the setting? 16:26
Ulti would be kind of neat if it just noticed the end was already reified and /after/ the inf list.... like recursive laziness
colomon n: say "Hello"
16:26 att left
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤» 16:26
Ulti but yeah thats a nasty edge case for the spec I guess 16:27
colomon seems like something is wrong with p6eval here....
supernovus [Coke]: Okay. I'll check out roast and look at adding a test.
Ulti well this fails on my local install of Rakudo too
though not sure if its this months Rakudo* 16:28
16:28 MayDaniel joined, Vlavv` joined, raiph left
colomon Ulti: I would never expect unshift an infinite list to work. :) 16:28
but say "Hello" ought to work. 16:29
Ulti heh yeah
the real problem is unshift of an infinite /does/ work 16:30
16:30 vlixes joined, Vlavv_ left
Ulti hmm weird 16:32
16:33 thou joined
Ulti the latest Rakudo* flips out on the act of unshifting the infinite range, Rakudo* from August flips out when you ask for the last element 16:33
^ scratch that they both dont like the initial unshift 16:35
16:38 tadzik left
GlitchMr perl6: @(1, 2, 3).perl.say 16:39
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«(1, 2, 3).list␤»
GlitchMr r: @(1, 2, 3).unshift.perl.say
p6eval rakudo 547fcb: OUTPUT«(1, 2, 3).list␤»
supernovus Hmm, if I commit this change to roast, adding the test for my patch, then anyone running rakudo without the patch will now get failures in S32-str/pack.t until the patch is applied. 16:40
16:41 att joined 16:43 tadzik joined
grondilu rn: role Foo { method postfix:<!>() { "Foo!" } }; my $x; say ($x but Foo)!; 16:45
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)[auto-compiling setting]␤»
..rakudo 547fcb: OUTPUT«===SORRY!===␤Confused␤at /tmp/1cC6VROLGs:1␤»
16:49 MayDaniel left, MayDaniel joined
diakopter std: say "h"~~/<<<<<<:m/>>>>>>/>>>>>>/a/ # TimToady what does this mean 16:52
p6eval std 77327a4: OUTPUT«ok 00:00 44m␤»
dalek ast: f244f31 | (Timothy Totten)++ | S32-str/pack.t:
Added test for 'x' in pack()

rakudo patch: rt.perl.org/rt3/Public/Bug/Display...?id=115120
16:53 dakkar left
diakopter TimToady: I can't tell what's terminating what 16:54
TimToady that's what viv is for
supernovus [Coke]: Tests for the 'x' flags added to S32-str/pack.t 16:55
Ulti I think I just discovered my favorite bit of perl six "my @list = (); say if @list eq Nil;" rather than in perl5 where you do a check for undef and then scalar @list == 0 16:56
TimToady why do you use eq? 16:57
and @list == 0 is already in scalar context 16:58
diakopter r: my @list = [Nil, Nil]; say 1 if @list eq Nil;
p6eval rakudo 547fcb: OUTPUT«1␤»
diakopter too bad niecza p6eval is broken 16:59
TimToady Ulti: I guess I don't know what you're really trying to accomplish there 17:00
PerlJam Is feather really really slow i^Hor is it just me? 17:01
jnthn o/ from Stockholm 17:02
PerlJam jnthn: o/ 17:03
Ulti TimToady: in perl5 you can't do something like if @list eq []
or () 17:04
at least if you can I am doing it wrong
TimToady why do you want to use 'eq' for that? that's a string coercion
Ulti I don't its just in rakudo I got a load of errors about Nil and numerical comparisson
"use of uninitialized value of type Nil in numeric context" 17:05
17:05 fgomez joined
PerlJam Ulti: Are you just trying to see if the array is emtpy? 17:05
TimToady Nil is not really a value, it's the absence of a value
Ulti PerlJam: yeah
TimToady 'unless @list'
of 'if @list'
just use it in Boolean context 17:06
r: my @list = (); say so @list;
p6eval rakudo 547fcb: OUTPUT«False␤»
Ulti specifically arrayrefs though in perl5, basically every line of selectall_arrayref in DBI has a messed up if afterwards
TimToady well, you just have to deref it in P5 to get array behavior 17:07
Ulti yeah, but you first check for undef too otherwise you are deref'ing undef
TimToady okay, I see what you're saing now 17:08
*y
Ulti sorry I was really not clear
but yeah just double checked, perl6 just magics the arrayrefness for you 17:09
so the logic of testing an array or arrayref is identical
which is really nice
TimToady bows, then remembers who wrote Perl 5... :) 17:10
17:11 raiph joined
Ulti heh 17:12
meh perl5 just /always/ use refs then you dont get into any trouble 17:13
PerlJam TimToady: You can strut for Perl 6 without being humble about Perl 5. It's okay. :-) 17:14
Ulti :) 17:16
whenever I get frustrated over anything datastructure related in perl5 I flick back to some of my past Java code with huge nested generic declarations for stuff like HashTable<String,HashTable<String,ArrayList<String>>> 17:18
its all good
hashes and lists should just work and they should be primitives of all languages 17:19
jnthn The thing is that Java also doesn't have type inference. So you often have to write those things *twice*, once on the thing that'll hold it and once in the new statement.
Ulti yup
17:20 tadzik left
Ulti I have lots of declarations for class variables that cover like 6 wrapped lines in my Java.... when I complaing to other people who love Java they just ask why I would want a data structure like that... and not a nest of 10 classes 17:20
HashStringListHashOfString datastructure = new HashStringListHashOfString <--- so much better! 17:21
jnthn :/
jnthn is glad he doesn't have to deal with Java 17:22
Ulti I had to deal with it to complete my degree which kind of sucks
GlitchMr HashStringListHashOfString? This is too descriptive name...
Ulti not for Java, the more verbose you are the better the code 17:23
the best is the javadoc comments that just repeat the class names with spaces added :D 17:24
but hey Java vs Perl isn't a fair race
GlitchMr What sort of data structure is that anyways?
HashString?
OfString?
Ulti a great one for holding a graph of word use in a passage of text
in perl you would just use a hash of hashes or something 17:25
GlitchMr Is structure like this: {a: [{b: 'abc'}]}
(this is JavaScript, by the way)
Ulti checks his specific example
GlitchMr I've no idea what this class name actually means 17:26
17:26 tadzik joined
GlitchMr Probably because I haven't programmed in Java, but not sure 17:26
Ulti HashTable<String,HashTable<String,ArrayList<String>>> === {'a'=>{'b'=>['c','d','e']}}
GlitchMr uhmmm... fun
Ulti I use that quite often
weirdly
GlitchMr What is === anyways? 17:27
Ulti where b is a word following a and then you just have a list of stuff associated with that connection
GlitchMr The part on the left is type, the part on the right is instanceof that type
Ulti GlitchMr just pseudo english/code for are equivalent
GlitchMr: thats me saying the Java declaration of a type is equivalent to the perl literal form
[Coke] I think I (nigh) killed feather again. looks like it's actually one of the pugs tests chewing all memory. 17:28
Ulti vanishes into the ether bbl
GlitchMr So HashTable<> is two arguments type - the first one is type used for keys, the second is type used for values. Am I right? 17:29
[Coke] PerlJam: it wasn't just you
GlitchMr That makes sense
[Coke] all ok now. Disabling cron job until that test gets fudged for pugs.
GlitchMr As for Java, I don't like it because it's language intended to be used with IDE 17:30
Try using it without IDE
17:30 SamuraiJack_ left
[Coke] tempting to add the "perl6-limited.pl" trick so that any one test that may or not be fudged doesn't take down the host system. 17:31
GlitchMr Probably type declaration would be smaller if HashTable would be Hash and ArrayList would be Array, but it's Java... 17:32
jnthn .Net called it Dictionary, which is terribly huffmanized.
At least List is reasonably short 17:33
GlitchMr Isn't .Net Microsoft's response for Java?
17:34 sisar joined
GlitchMr So, identifiers length is comparable with Java 17:34
jnthn GlitchMr: Yeah, but C# is a rather better language than Java. By quite some way.
17:35 leont joined
[Coke] supernovus++ 17:36
17:38 wamba left 17:39 rindolf left
PerlJam jnthn: that's okay, Java is way better than C++ ;) 17:41
jnthn It's almost as if languages get better with time by learning form the mistakes of others! 17:42
PerlJam jnthn: then how do you explain PHP? They learned the wrong things? 17:43
[Coke] php has been out there for a while. 17:44
jnthn PerlJam: "mistake" is subjective? ;-)
flussence PHP got the ordering of "make it {work,correct,fast}" wrong
PerlJam Coke: php is contemporaneous with Perl 5. I think they missed a few lessons. 17:45
flussence they went for working then fast, and then people started using it and they realised "fast" for plain CGI isn't neccessarily fast for other uses
(in particular, adding new language features is an utter nightmare because their parser does a direct translation between source tokens and VM opcodes instead of building a tree) 17:47
doy that sounds remarkably like perl 5 17:48
PerlJam I had a conversation with a CS prof earlier today whose wife is teaching an "internet programming" course (basically writing web apps). She started teaching theml HTML, then CSS, then PHP ... soon she's going to flip them to RoR. I wonder how many will conclude that PHP is a good thing?
flussence no, p5 builds a parse tree first and then does stuff to that... (IIRC from the camel book)
doy well, it builds opcodes directly via a bison parser 17:49
flussence (although I've heard the p5 parser isn't fun to hack on either)
doy so the parse tree is still just implicit
flussence php's is more like trying to compile assembly code by using sed
doy i have no doubt 17:50
(:
[Coke] I am biased, of course, but I'd go for CF before php. 17:51
jnthn Time for a break from talk prep..
(yes, I didn't finish preparing for my NPW talk for tomorrow yet...)
17:51 SamuraiJack joined
flussence r: my \a = set <1 2 3>; say 1 ~~ a 18:04
p6eval rakudo 547fcb: OUTPUT«False␤»
flussence for some reason I get a segfault on the repl if I do "my \a = set <1 2 3>" and then "1 ~~ a" on another line, but not on the same line 18:06
GlitchMr Unlike Perl 5, ~~ is not "contains" operator. But still, it shouldn't crash 18:08
flussence also does it with "= any set" there (which is what I was going for) 18:09
PerlJam I don't think Perl 5 knows what operator ~~ is yet ;)
(unless p5p came to some concensus while I wasn't looking)
sisar r: my @a; say @a[1]; say @a[*-1]; 18:10
p6eval rakudo 547fcb: OUTPUT«Any()␤Cannot use negative index -1 on Array␤ in method gist at src/gen/CORE.setting:9934␤ in sub say at src/gen/CORE.setting:7250␤ in block at /tmp/xqsiYi23M9:1␤␤»
GlitchMr In Perl 5, you can say 1 ~~ [1, 2, 3] and it works
leont p5p and concensus on smartmatch? Who are you kidding!
GlitchMr I don't know why Perl 5 needs smartmatch 18:11
sisar what's with the "Cannot use negative index -1 on Array" error? What am i doing wrong ?
PerlJam GlitchMr: for the "switch" statement of course! :)
GlitchMr Smartmatching is too smart for Perl 5
sisar r: my Int @a; say @a[*-1]; 18:12
p6eval rakudo 547fcb: OUTPUT«Cannot use negative index -1 on Array+{TypedArray}␤ in method gist at src/gen/CORE.setting:9934␤ in sub say at src/gen/CORE.setting:7250␤ in block at /tmp/wuBlgCX9mc:1␤␤»
flussence sisar: @a[*] in that context is 0, because it's empty.
r: my @a; say @a[@a.elems - 1];
p6eval rakudo 547fcb: OUTPUT«Cannot use negative index -1 on Array␤ in method gist at src/gen/CORE.setting:9934␤ in sub say at src/gen/CORE.setting:7250␤ in block at /tmp/wzGMEkgVnn:1␤␤»
GlitchMr In most cases, smartmatching is just any() function, just like in List::MoreUtils 18:13
PerlJam sisar: did you think that "say @a[1]" would auto-vivify ?
TimToady In Perl 6 you can say [1, 2, 3] ~~ [1, 2, 3] and it works :)
GlitchMr $ [1, 2, 3] ~~ [1, 2, 3]
1
TimToady but it does something completely different 18:14
GlitchMr But well, ~~ in Perl 5 appears to be similar to Perl 6 operator. Except of those any() sort of operations aren't in Perl 6.
TimToady there are no implicit anys in p6
sisar PerlJam: yeah, say @[a1] should auto-vivify, shouldn't it ? I was thinking @a[*-1] would auto-vivify too, but now i see that is not possible.
TimToady and we actually have a type system
sisar *@a[1]
flussence the p6 ~~ is a lot nicer, since it just boils down to multi ACCEPTS methods underneath 18:15
GlitchMr Smartmatching in Perl 5 simply doesn't work well without typing
Of course it can get type of reference, but that's all
18:16 mucker left
GlitchMr Also: $ 'red' ~~ ['blue', [['green', ['red']], 'purple']] 18:16
1
~~ is recursive?
That's too clever to be useful... 18:17
leont GlitchMr: In perl5? Sometimes􏿽x85
sisar flussence: Confirmed. I get the seg falut too on the REPL.
GlitchMr For me, ~~ in Perl 5 sounds like a mistake 18:18
diakopter r: my @a; my $c=now; @a[@a]=$_ for 1..5000; say now - $c;
GlitchMr And for me, given when in Perl 5 is mistake too
p6eval rakudo 547fcb: OUTPUT«6.4875409␤»
diakopter r: my @a; my $c=now; @a.push($_) for 1..5000; say now - $c;
leont I like when, actually
p6eval rakudo 547fcb: OUTPUT«(timeout)»
diakopter rakudo like @a[@a]= much better than push 18:19
leont And given an appropriate matcher library, smartmatch can be pretty cool
diakopter *likes
GlitchMr .push() should be better than
TimToady given/when is fine if you limit yourself to strings and numbers
leont It's the part that makes guesses that is awful
GlitchMr TimToady: isn't hash of subroutines for that?
diakopter GlitchMr: ?
18:20 dduncan joined
PerlJam sisar: autovivification of array elements in rvalue context seems weird and slightly dangerous to me. 18:20
TimToady GlitchMr: sometimes a switch is more readable
18:20 fglock joined, dduncan left
diakopter GlitchMr: what do you mean by ".push() should be better than" 18:20
GlitchMr then* 18:21
diakopter what do you mean by "should"
@a[@a]= is far faster 18:22
r: my @a; my $c=now; @a[$_]=$_ for 0..4999; say now - $c; 18:24
p6eval rakudo 547fcb: OUTPUT«0.4320339␤»
diakopter but 5000 length queries are hella slow
(6 seconds) 18:25
where did all those crickets come fromt? 18:26
GlitchMr: why/how should push method be better? 18:27
GlitchMr It should be faster 18:32
diakopter do you mean "someone ought to make it faster?" or "I'm surprised it's not faster"
TimToady the two are not mutually exclusive :)
diakopter right, but it could be only one or the other 18:33
TimToady well, it *should* be only one or the other :)
diakopter I'm not surprised it's faster; method lookups/execution are slow 18:34
flussence they're both slow, but it's only 3x slower than the assignment method 18:35
18:35 sjohnson left, sjohnson joined
diakopter r: my @a; my $c=now; unshift(@a,$_) for 1..3000; say now - $c; 18:38
p6eval rakudo 547fcb: OUTPUT«7.1017452␤»
diakopter r: my @a; my $c=now; splice(@a,0,0,$_) for 1..3000; say now - $c;
p6eval rakudo 547fcb: OUTPUT«7.945410␤»
18:38 _edwin joined, hash_table left
GlitchMr So, multidispatch is slow? 18:42
flussence if you want to see *slow*, try `time perl6 -e "say +open('/usr/share/dict/words').lines"` 18:46
I ran the profiler and it seems like 30% of the time is just from .chomp
diakopter it's 15,000x slower than wc -l 18:49
r: my $a=sub {}; $a.$a 18:51
p6eval rakudo 547fcb: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in sub at /tmp/BTUvRAiy46:1␤ in block at /tmp/BTUvRAiy46:1␤␤»
diakopter r: my $a=sub ($b) { say $b }; 15.$a 18:53
p6eval rakudo 547fcb: OUTPUT«15␤»
diakopter is that supposed to do that?
flussence r: my $c = method () { say self }; 15.$c; 18:54
p6eval rakudo 547fcb: OUTPUT«15␤»
18:54 leont left
flussence I think it's equivalent to that 18:54
hm, .lines seems a lot faster than .slurp.comb(/^^.*$$/) at any rate, and .slurp.split(/\n/) is even worse for memory usage 18:56
just poking around... is that commented out code in core/IO.pm:124 still relevant? 18:59
_edwin rosettacode.org/wiki/CRC-32#Perl_6 19:02
19:02 integral left
_edwin for some reason i seem to be drawn to write such absurdly slow code :} 19:03
19:03 integral joined, integral left, integral joined
_edwin maybe because in my dayjob I'm counting processor cycles all the time :/ 19:04
GlitchMr us2.php.net/manual/en/function.crc32.php 19:10
So... in PHP, crc32() can give negative numbers on 32-bit systems...
That doesn't makes sense. 19:11
19:11 brrt joined
supernovus gah, apparently DateTime.now still believes my local timezone to be +0700 instead of -0700. :( 19:11
GlitchMr But it's PHP
sorear when you get right down to it the return value of crc32 should be an element of GF(2^32), not int or unsigned it 19:12
returning negative numbers doesn't make less sense than returing positive numbers greater than 1
or ℤ/2ℤ[x] 19:14
diakopter r: (method { self.(self) }).(method { self.(self) }) # hee hee 19:15
p6eval rakudo 547fcb: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 88369 (src/gen/CORE.setting.pir:42327) (src/gen/CORE.setting:9039)␤called from Sub '<anon>' pc 174 ((file unknown):118) (/tmp/9w7_9BuMOm:1)␤called from Sub '<anon>' pc 196 ((file unknown):134) (/…
diakopter sorear: niecza p6eval is dieded 19:16
sorear diakopter: I know
19:16 GlitchMr left
diakopter r: $_=method {self.(self)};$_.$_ 19:17
p6eval rakudo 547fcb: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 88369 (src/gen/CORE.setting.pir:42327) (src/gen/CORE.setting:9039)␤called from Sub '<anon>' pc 116 ((file unknown):83) (/tmp/e3WOOmTLLj:1)␤called from Sub '<anon>' pc 138 ((file unknown):99) (/tm…
[Coke] r: my $ℤ= 3; say $;
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name␤at /tmp/vaPJsqD5uA:1␤»
[Coke] r: my $ℤ= 3; say $ℤ;
p6eval rakudo 547fcb: OUTPUT«3␤»
[Coke] huh. spif.
.u ℤ
phenny U+2124 DOUBLE-STRUCK CAPITAL Z (ℤ)
brrt would cqrs be a good fit for a shop inventory system? 19:20
TimToady r: my \ℤ = 3; say ℤ; 19:23
p6eval rakudo 547fcb: OUTPUT«3␤»
jnthn .u ℤ
phenny U+2124 DOUBLE-STRUCK CAPITAL Z (ℤ)
brrt what does the \ sigil do?
19:23 mtk left
jnthn (gives me a box here...) 19:23
brrt: Introduces a name you can from then on refer to without the sigil 19:24
Also as a result of having no sigil it imposes no context
brrt can barely wrap his had arround that 19:26
oh
i see
19:28 hash_table joined
[Coke] r: my \say = 3; say say; 19:29
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Confused␤at /tmp/wR6Au7GVKw:1␤»
[Coke] r: my \if = 3; say if;
p6eval rakudo 547fcb: OUTPUT«␤»
[Coke] std: my \if = 3; say if;
p6eval std 77327a4: OUTPUT«===SORRY!===␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/SzPydU71Ox line 1:␤------> my \if = 3; say⏏ if;␤Confused at /tmp/SzPydU71Ox line 1:␤------> [3…
[Coke] I suspect that my \<keyword> should be disallowed. 19:30
"this ain't tcl"
TimToady this is why you should use Unicode symbols
brrt r: my \whatever = 42; say whatever;
p6eval rakudo 547fcb: OUTPUT«42␤» 19:31
brrt r: my \whatever = 1,2,3; say whatever
p6eval rakudo 547fcb: OUTPUT«1 2 3␤»
brrt nice
jnthn TimToady: "i" and "f" are both in Unicode :P
brrt r: my \whatever = Foo => 'bar'; say whatever
p6eval rakudo 547fcb: OUTPUT«"Foo" => "bar"␤»
brrt yay, i like perl6 again 19:32
TimToady so fickle... 19:33
19:34 japhb_ joined
japhb_ TimToady, I was thinking the exact same thing. ;-) 19:34
sorear, I know you know about the niecza being unavailable on p6eval. If you haven't had a chance to look at it personally, I can add that it won't compile locally for me right now either; seems to be related to the gamma function commit yesterday: 19:37
lib/Builtins.cs(11,7): error CS0246: The type or namespace name `SpecialMathFunctions' could not be found. Are you missing a using directive or an assembly reference?
19:37 birdwindupbird joined
japhb_ That's the error after 'git pull; make clean; make' 19:37
TimToady [Coke]: note that most keywords in p6 will win under LTM because they tend to include a trailing whitespace. 19:38
r: my \do = 42; say do do;
p6eval rakudo 547fcb: OUTPUT«42␤»
japhb_ my \do = 42; say do do ; 19:39
r: my \do = 42; say do do ;
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Can only use get_how on a SixModelObject␤»
supernovus r: my \foo = 1,2,3,4; say foo.WHAT;
p6eval rakudo 547fcb: OUTPUT«Parcel()␤»
jnthn whoa...
japhb_: That one'd want reporting.
supernovus hmm, better than what I get locally, which is "Segmentation fault (core dumped)"
jnthn r: do
japhb_ jnthn, OK, will do
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&do' called (line 1)␤»
sorear japhb_: poke colomon, looks like colomon forgot to commit makefile changes 19:40
colomon doh!
there you go, sorry about that. 19:41
dalek ecza: 7ae412a | (Solomon Foster)++ | Makefile:
Add SpecialMathFunctions.cs to the build.
TimToady std: my \do = 42; say do do ; 19:42
p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
TimToady std: say do do ; 19:43
p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
TimToady r: say do do ;
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Can only use get_how on a SixModelObject␤»
moritz r: say BEGIN BEGIN 3
p6eval rakudo 547fcb: OUTPUT«3␤»
diakopter r: my \if = (my \say = 1 ); say if if if if {} if 19:44
p6eval rakudo 547fcb: ( no output )
diakopter no clue there
TimToady std: my \if = (my \say = 1 ); say if if if if {} if 19:45
p6eval std 77327a4: OUTPUT«===SORRY!===␤Missing semicolon at /tmp/vdW6AgbtuV line 1:␤------> my \if = (my \say = 1 ); say if if⏏ if if {} if␤Parse failed␤FAILED 00:00 44m␤»
diakopter I cannot fathom how rakudo's parsing that 19:47
I've tried all kinds of replacing if with 1
japhb_ colomon, Working like a charm now, thank you! 19:48
colomon thank you for bringing it to my attention
japhb_ jnthn, bug sent
np
Does someone need to kick the rebuild for p6eval, or will it try automatically? 19:49
moritz it's done by cron 19:50
19:50 cognominal_ joined
japhb_ moritz, even when a previous build is stuck? 19:50
moritz define "stuck"
if it fails, no problem 19:51
19:51 cognominal left
moritz if it hangs... no idea, never had that problem 19:51
sorear I don't think it's hanging
japhb_ fair enough
Before colomon's fix, the build died quickly here, I was just wondering about the message that p6eval was giving (that sounded like it was trying to compile the setting and just never completing) 19:52
sorear japhb_: since the build failed, each time you ran p6eval it tried to compile the setting 19:53
and then failed a few seconds in, killed with signal SIGXCPU
japhb_ nodnod
diakopter r: if 1 { say 4 } if 1 { say 5 } 19:55
p6eval rakudo 547fcb: OUTPUT«4␤5␤»
19:55 cognominal_ left
diakopter jnthn: why does the above work? 19:55
sorear std: if 1 { say 4 } if 1 { say 5 }
p6eval std 77327a4: OUTPUT«===SORRY!===␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/t4yEuVbNZ5 line 1:␤------> if 1 { say 4 }⏏ if 1 { say 5 }␤ expecting any of:␤ horizontal whitespace␤ statement_control␤Parse failed␤FAILE…
19:57 hoelzro|away is now known as hoelzro
hoelzro hey Perl6 folk 19:58
I finally managed to build Rakudo * 2012.09 on my laptop!
\o/
[Coke] yay! 19:59
hoelzro now I'm back with questions ;)
$*EXECUTABLE_NAME is supposed to be the name of the script I'm running, right? 20:00
like $0 from Perl 5?
20:01 SamuraiJack left
sorear I think that it's actually $^X 20:01
$0 is $*PROGRAM_NAME or something
hoelzro ah, that's what I'm looking for =)
because it was returning $^X and I was thinking "wtf"
sorear: thanks!
flussence all the systemish vars are listed at the top of S28 20:02
moritz doc.perl6.org/language/variables#Sp...+Variables 20:03
jnthn diakopter: I think that one's RT'd already...some oddity with end of statement.
diakopter oh
jnthn Though I thought I sync'd some of that stuff with STD when doing the LTM work... 20:04
Must be some difference somewhere.
20:06 cognominal_ joined 20:12 brrt left 20:18 VXZ joined 20:24 rummik- is now known as rummik, birdwindupbird left 20:26 sirrobert joined
sirrobert hallo 20:26
sorear hi
20:26 birdwindupbird joined
jnthn o/ sirrobert 20:26
sirrobert how do I write an lvalue method? 20:27
there's something I saw once, but I can't find it... rw-return or return-rw maybe
jnthn return-rw,
sirrobert trying to write a customer setter/getter
hmm
r: class A { method v (Str $v) { return-rw $v } }; A.new.v = 4; 20:29
p6eval rakudo 547fcb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method v at /tmp/I0JuUdkuTr:1␤ in block at /tmp/I0JuUdkuTr:1␤␤»
sirrobert r: class A { method v (Str $v?) { return-rw $v } }; A.new.v = 4;
p6eval rakudo 547fcb: OUTPUT«Cannot assign to a readonly variable or a value␤ in block at /tmp/q2QRroqHSj:1␤␤»
sirrobert keep getting that 20:30
(ignore that the type was wrong in that example.. the error is that it can't assign.
r: class A { method v (Str $v?) { return-rw $v } }; A.new.v = 'foo;;
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Confused␤at /tmp/YXhUR1B0qz:1␤»
colomon sirrobert: what do you think you're assigning there? 20:31
n: class A { method v (Str $v?) { return-rw $v } }; A.new.v = 4;
p6eval niecza v22-9-g7ae412a: OUTPUT«Unhandled exception: Writing to readonly scalar␤ at /tmp/AV7BC97rWo line 1 (mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4205 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4206 (module-CORE @ 576) ␤ at /home/p6eval/niecza/lib…
colomon n: class A { method v (Str $v?) { return-rw $v } }; my $a; A.new.v($a) = 4; say $a;
p6eval niecza v22-9-g7ae412a: OUTPUT«Unhandled exception: Nominal type check failed in binding '$v' in 'A.v'; got Any, needed Str␤ at /tmp/DWz1Sv6kkO line 0 (A.v @ 1) ␤ at /tmp/DWz1Sv6kkO line 1 (mainline @ 7) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4205 (ANON @ 3) ␤ at /home/p6eval…
sirrobert in that example, just some var. but this doesn't work either:
jnthn Yeah, doing it to a (readonly) parameter won't cut it
sirrobert: What're you actually trying to do, by the way? :) 20:32
colomon n: class A { method v (Str $v is rw) { return-rw $v } }; my $a; A.new.v($a) = 4; say $a;
p6eval niecza v22-9-g7ae412a: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/zTBkTLy1QT line 1:␤------> thod v (Str $v is rw) { return-rw $v } }⏏; my $a; A.new.v($a) = 4; say $a;␤␤Parse failed␤␤»…
sirrobert r: class A { has $.v; method v ($v) { return-rw $.v } }; A.new.v = 'foo;
p6eval rakudo 547fcb: OUTPUT«===SORRY!===␤Confused␤at /tmp/6wxkeBIzbG:1␤»
sirrobert that's closer to what I want to do.
r: class A { has $.v; method v ($v) { return-rw $.v } }; A.new.v = 'foo';
p6eval rakudo 547fcb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method v at /tmp/Bk6BQzD21a:1␤ in block at /tmp/Bk6BQzD21a:1␤␤»
sirrobert dang it 20:33
heh
r: class A { has $.v; method v ($v?) { return-rw $.v } }; A.new.v = 'foo';
p6eval rakudo 547fcb: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 88369 (src/gen/CORE.setting.pir:42327) (src/gen/CORE.setting:9039)␤called from Sub 'v' pc 151 ((file unknown):178492324) (/tmp/RoXftqPBKG:1)␤called from Sub 'v' pc 174 ((file unknown):178492341) …
sirrobert look, so here's the problem I want to solve =)
jnthn sirrobert: Yes, but why do you want to write the custom accessor in the first place? That kinda changes the answer :)
sirrobert I am handling semantic versioning as a set of properties: major, minor, patch (1.25.2)
sorear sirrobert: $.v means self.v, the infinite recusion is thus obvious 20:34
sirrobert I want to be able to set with $foo.version = '1.2.3'
sorear sirrobert: You meant $!v
colomon r: class A { has $.a; method v() { return-rw $!a; }; }; A.new.v = 'foo';
p6eval rakudo 547fcb: ( no output )
20:34 hoelzro is now known as hoelzro|away
colomon r: class A { has $.a; method v() { return-rw $!a; }; }; my $a = A.new; $a.v = 'foo'; say $a.a 20:34
p6eval rakudo 547fcb: OUTPUT«foo␤»
colomon sirrobert: there you go
sirrobert sorear: ohhhhh... I keep forgetting that $.v is a virtual method call
thanks all
skids should there be an "is rw" on the method now that there is return-rw? 20:35
20:35 kaare_ left
sirrobert How do I do some processing on the value that's getting assigned? 20:35
sorear use a Proxy 20:36
skids sirrobert: use a proxy.
colomon sirrobert: I think you might... yeah proxy
sirrobert docs url?
(haven't heard of a proxy in perl6)
or you just mean a private attr with a different name? 20:37
sorear n: Proxy.new(FETCH => -> $ { }, STORE => -> $, $new { say $new }) = 5
p6eval niecza v22-9-g7ae412a: OUTPUT«5␤»
sorear n: Proxy.new(FETCH => -> $ { 7 }, STORE => -> $, $new { say $new })++
p6eval niecza v22-9-g7ae412a: OUTPUT«8␤»
sirrobert hmm
skids docs are a bit sparse. Working example (you don't need the Zavolaj stuff in there): gist.github.com/2771728
sirrobert skids: thanks, reading 20:38
sorear r: Proxy.new(FETCH => -> $ { 7 }, STORE => -> $, $new { say $new })++
p6eval rakudo 547fcb: OUTPUT«8␤»
colomon sirrobert: perlcabal.org/syn/S06.html#Lvalue_subroutines
sirrobert colomon: thanks
(didn't realize you could do method !foo () {...} for private methods...?)
ok, makes more sense now. Thanks all 20:39
dalek osystem: 1e70a74 | (Timothy Totten)++ | META.list:
Added Netstring library.
20:41
kudo-debugger: c1d805d | jonathan++ | lib/Debugger/UI/CommandLine.pm:
fail shouldn't count as a throw.
20:42
sirrobert proxy is kinda like p5 tie 20:43
skids Pretty much.
jnthn sirrobert: If you haven't heard the news already: latest debugger in git repo has step out and step over. It also allows looking at self and attributes. :) 20:44
sirrobert: Thanks for the feature requests :)
sirrobert jnthn++: woot! no more work today, gonna play with it =) 20:45
thanks
20:45 cognominal__ joined
sirrobert jnthn: that's going to be GREAT for skipping those loooong regex parsings heh 20:46
grondilu is thi debugger panda-compliant? I don't see it on modules.perl.org.
grondilu meant modules.perl6.org
jnthn grondilu: It's build is, afaik, just a little too demanding for Panda at the moment. 20:47
20:47 cognominal_ left
grondilu ok, I'll wait 20:48
20:48 cognominal joined
jnthn grondilu: It's bundled in with the Rakudo Star monthlies. 20:49
I think tadzik++ mumbled something about custom build steps at some point, so at some point I hope it'll be Pandable
sjn \o 20:50
20:50 cognominal__ left
jnthn hi sjn 20:50
sjn: In Stockholm? 20:51
sjn is at claes++'s apartment, laxing to music, preparing some trouble for tomorrow's NPW talk :)
jnthn: yep, you?
jnthn laxing to music? sounds a bit fishy... 20:52
sjn: Yes, I'm here
In a hotel that should be 10ish minutes walk to the venue in the morning :)
sjn is done laxing, and proceeds with his re-laxing.
jnthn
.oO( hmm, that pun probably only works in Swedish... )
sjn jnthn: yes, it does. :) 20:53
20:53 felher left
diakopter haha 20:53
sjn you could say that was a red herring of a pun :)
20:53 felher joined
jnthn :D 20:53
sorear jnthn: lax=salmon in swedish?
phenny: sv en "lax"? 20:54
phenny sorear: "salmon" (sv to en, translate.google.com)
jnthn sorear: yeah
skids wonders how many words for salmon there are in finnish
sorear I saw Lachs on a menu in .de, so I was kinda prepared for that
colomon hmmm, origin of lox? 20:55
sorear two years or so ago I was in a USian restraunt and I saw a menu item, "FRIED LOX"
20:55 felher left, cognominal left
sorear to which I say to the group "Fried LOX? I've heard of fried Kool-Aid, but this is just ridiculous" 20:56
20:56 felher joined
skids Sorry I didn't understand that. I have a herring problem. 20:57
sorear LOX also means liquid oxygen...
jnthn Oh... 20:58
jnthn didn't know that.
.oO( In California, would FRIED LAX mean the airport burnt down? )
dalek kudo-debugger: 2a155b7 | jonathan++ | bin/perl6-debug.nqp:
Don't single-step sigspace.

It feels like it adds negative value to the debugging experience.
_edwin rosettacode.org/wiki/CRC-32#Perl_6 20:59
NativeCall crc32 \o/
20:59 cognominal joined 21:00 cognominal left
_edwin somewhat makes up for my superslow CRC-32 (sorry for double line) 21:00
21:00 cognominal joined
flussence wonders if it's possible to access the linux kernel hash/crypto functions using NativeCall... 21:00
21:00 hoelzro|away is now known as hoelzro
skids _edwin: You should admire how slow the native CRC implementations are in the Sum package :-) 21:01
I will be getting around to NCI interfaces soon I hope.
21:02 erkan left
skids flussence: that I doubt, but openssl has quite a few hash functions and it is everywhere unix flavored these days. 21:03
21:04 erkan joined, erkan left, erkan joined
_edwin skids, hm...just wanted to install Sum and got this: gist.github.com/3881510 21:04
skids Hrm... I'll have to try a panda install. star09 is working for me. What rakudo version? 21:05
flussence skids: right, I guess openssl knows how to pass through to the kernel stuff for hardware accel too... 21:07
_edwin This is perl6 version 2012.09.1-7-gfb11f13 built on parrot 4.4.0 revision RELEASE_4_4_0
skids flussence: if any library does, it would be openssl, I guess. I'll probably and up writing ties to rhash and mhash as well. Windows will require a different developer as I'm allergic to it. 21:08
Well, I'll try a panda install when I get home and see if I can figure out what's broken.
21:09 spider-mario joined 21:10 supernovus left 21:12 cognominal left, att left
skids Hrm it is probably tripping up on the POD hooks for validating the manpage synopsis -- maybe it is stripping pod first. 21:13
skids decommutes.
21:14 erkan left
bbkr_ how can I bump module version in Star ? 21:16
21:18 skids left 21:19 sudokode left 21:21 birdwindupbird left, cognominal joined
_edwin I really wonder how the J solution for CRC-32 works 21:21
21:22 sudokode joined
sorear _edwin: www.jsoftware.com/help/dictionary/dx128.htm#3 21:23
128!:3 is the standard library routine for CRCs
_edwin 128!:3 is a standard library call??? these guys are crazy :) 21:26
but thanks for explaining. i thought it was a combination of primitives and wondered how it could be so short 21:27
21:28 MayDaniel left, killbot left
hoelzro hey guys, I wrote a blog post about building Rakudo * on Arch Linux: hoelz.ro/blog/building-rakudo-perl-...arch-linux 21:30
please let me know if I wrote anything incorrect!
21:30 zby_home_ left
sorear _edwin: a programming system with good native support for polynomials over GF(2) can do a CRC with some padding, a cast, a remainder, and a cast 21:31
I thought J had native polynomails but looks like I'm wrong
something like SAGE could probably do it
21:32 cognominal_ joined
_edwin true, but it still would need a bit of program text to turn a string into a polynomial 21:32
21:34 cognominal left
sorear , #: a. i. 'Hello World' 21:35
21:35 Rai_ joined, Rai_ is now known as KaitouRai 21:36 erkan joined, erkan left, erkan joined 21:38 KaitouRai left
__sri i suppose everyone here has already read this awesome book, but just in case, the architecture of PyPy www.aosabook.org/en/pypy.html 21:38
dalek kudo-debugger: 1462774 | jonathan++ | bin/perl6-debug.nqp:
Make m:P5/.../ regexes debuggable too.
21:40
PerlJam sri: I haven't read it (yet :-). Thanks. 21:41
_edwin the paragraph about RPython makes it sound somewhat similar to NQP 21:42
__sri the chapters about GHC and LLVM are also pretty cool 21:43
oh and the CLR chapter... actually... it's all great :) 21:44
21:46 wamba joined 21:53 hash_table left, rurban left 21:54 rurban joined 22:03 rurban left 22:08 rurban joined
jnthn sleep & 22:08
22:11 hoelzro is now known as hoelzro|away 22:23 _edwin left 22:38 skids joined 22:40 VXZ left 22:41 fgomez left 22:42 fgomez joined 22:47 stopbit left
skids Hrm. Are POD contents supposed to be in precompiled modules or not -- it seems there is the remnant of the pos structure, but contents are empty. 22:49
s/pos/pod/
22:51 spider-mario left 22:54 zpmorgan left 22:55 Circlepuller left 23:02 FROGGS left, flightrecorder left 23:03 PacoAir left 23:09 Circlepuller_ joined
flussence skids: Pod blocks add a lot to parsing time, keeping them around would probably defeat the purpose of precompiling 23:10
23:10 tokuhiro_ joined
sorear ...huh? 23:11
if you precompile, there is no parsing time.
23:17 Khisanth left 23:20 wamba left
flussence I see a giant base64'd binary thing in pir output and some chopped up pod strings in an array, maybe the binary holds all the info needed to reassemble the text on demand, I dunno. 23:22
23:30 Circlepuller_ left 23:33 Khisanth joined 23:43 MikeFair_ left 23:46 fgomez left 23:48 MikeFair joined 23:53 armitage_ joined 23:54 armitage_ left, armitage_ joined, armitage_ left, armitage_ joined, armitage_ left 23:56 armitage_ joined 23:57 armitage_ left 23:58 armitage81 joined