Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 benabik joined #perl6
00:14 tokuhiro_ joined #perl6
00:32 rurban_ joined #perl6
00:42 tokuhiro_ joined #perl6
00:47 rurban_ Would shall we do with https://github.com/parrot/parrot/issues/874 t/nqp/46-charspec.t when icu was not linked?
00:55 awwaiid joined #perl6
01:04 anuby joined #perl6
01:14 larks joined #perl6
01:14 larks joined #perl6
01:16 hash_table joined #perl6
01:22 larks_ joined #perl6
01:24 larks joined #perl6
01:46 sirrobert joined #perl6
01:48 larks joined #perl6
01:49 aindilis joined #perl6
01:50 larks joined #perl6
01:54 rurban_ delete the test? I was not able to skip it, since the parser calls a parrot function which exits without ICU.
02:02 gootle joined #perl6
02:02 xenoterracide joined #perl6
02:08 xenoterracide joined #perl6
02:25 FROGGS_ joined #perl6
02:38 larks joined #perl6
02:38 larks joined #perl6
03:01 tokuhiro_ joined #perl6
03:21 mjahaber joined #perl6
03:24 mjahaber perl -v
03:55 rurban_ Found a solution within nqp to check for has_icu in charnames, and within parrot not to die, just return -1.
03:56 larks joined #perl6
03:58 Chillance joined #perl6
04:09 quester joined #perl6
04:30 sftp joined #perl6
04:36 Psyche^ joined #perl6
05:00 dalek perl6-bench: 2253bd1 | (Geoffrey Broadwell)++ | / (2 files):
05:00 dalek perl6-bench: Add a push-then-join test (with scaling); increase an old 1e3 limit to 1e4
05:00 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/2253bd1131
05:25 shachaf joined #perl6
05:39 larks joined #perl6
05:56 Kharec joined #perl6
05:57 rvchangue joined #perl6
05:59 birdwindupbird joined #perl6
06:08 rurban_ joined #perl6
06:12 Pleiades` joined #perl6
06:17 SamuraiJack joined #perl6
06:20 moritz \o
06:24 grondilu rn: https://gist.github.com/4231207
06:25 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«(timeout)»
06:26 moritz rurban: I've published your advent post; hope that is OK with you
06:28 kaleem joined #perl6
06:33 wamba joined #perl6
06:34 Pleiades` joined #perl6
06:35 GlitchMr joined #perl6
06:40 FROGGS_ japhb: the output I posted is verbose, yes, but the stuff I posted right underneath the "Updating MANIFEST" is the file's content, not really an output to the shell
06:43 FROGGS_ japhb: the rest is pretty similar to apt, and for this line:
06:43 FROGGS_ (After updating this dist):Found:
06:43 FROGGS_ Foo::Bar v1.0.5-dev by Kevin Flynn GPL2 SHA1 2fd4e1c6-7a2d28fc-ed849ee1-bb76e739-1b93eb12
06:44 FROGGS_ there would emerge a message when stuff like the license changes (thats in S11 too)
06:46 FROGGS_ japhb: I believe I can show a working piece of code within the next week, including a test suite for other people as a guide
07:09 tadzik japhb: I don't know. Should it? :)
07:09 tadzik good morning #perl6
07:13 sorear good morning tadzik
07:26 japhb tadzik: "I have a doubt."
07:27 Kharec joined #perl6
07:28 dalek perl6-examples: a19c36f | (L. Grondin)++ | rosalind/rstr-grondilu.pl:
07:28 dalek perl6-examples: [rosalind] RSTR
07:28 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/a19c36f518
07:30 tadzik (:
07:30 tadzik well, where do we add paths to INC at the later step of Panda-Builder?
07:31 tadzik withp6lib adds stuff at the beginning of PERL6LIB
07:31 tadzik so, yes, we should probably do the same in Build.pm case
07:31 FROGGS_ morning tadzik, sorear and japhb
07:31 tadzik hello FROGGS_
07:32 tadzik I have to flee to $office now, feel free to patch it up
07:57 quester left #perl6
08:04 grondilu joined #perl6
08:04 dalek perl6-examples: dd782ef | (L. Grondin)++ | rosalind/eval-grondilu.pl:
08:04 dalek perl6-examples: [rosalind] EVAL
08:04 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/dd782efeaf
08:07 pecastro joined #perl6
08:09 grondilu what are the Set operators?
08:11 grondilu rn: say Set({1, 2}) | Set({2, 3});
08:11 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot coerce { ... } to a Set; use set({ ... }) to create a one-element set␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2090 (to-set @ 6) ␤  at /home/p6eval/niecza/lib/C…
08:11 p6eval ..rakudo 53daef: OUTPUT«Cannot coerce object of type Capture to Set. To create a one-element set, pass it to the 'set' function␤  in sub to-set at src/gen/CORE.setting:11682␤  in method postcircumfix:<( )> at src/gen/CORE.setting:11674␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/ge…
08:15 anuby joined #perl6
08:16 grondilu rn: say Set({1, 2}).list;
08:16 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot coerce { ... } to a Set; use set({ ... }) to create a one-element set␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2090 (to-set @ 6) ␤  at /home/p6eval/niecza/lib/C…
08:16 p6eval ..rakudo 53daef: OUTPUT«Cannot coerce object of type Capture to Set. To create a one-element set, pass it to the 'set' function␤  in sub to-set at src/gen/CORE.setting:11682␤  in method postcircumfix:<( )> at src/gen/CORE.setting:11674␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/ge…
08:16 grondilu rn: say Set(1, 2).list;
08:16 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Excess arguments to Set.postcircumfix:<( )>, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Set.postcircumfix:<( )> @ 1) ␤  at /tmp/MW0fctGS8I line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting l…
08:16 p6eval ..rakudo 53daef: OUTPUT«Cannot coerce object of type Capture to Set. To create a one-element set, pass it to the 'set' function␤  in sub to-set at src/gen/CORE.setting:11682␤  in method postcircumfix:<( )> at src/gen/CORE.setting:11674␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any  at src/ge…
08:16 grondilu rn: say Set.new({1, 2}).list;
08:16 p6eval niecza v24-5-g599cbcb: OUTPUT«Block()<instance>␤»
08:16 p6eval ..rakudo 53daef: OUTPUT«␤»
08:16 grondilu damn
08:16 grondilu rn: say Set.new(1, 2).list;
08:17 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«1 2␤»
08:24 cedrvint hello #perl6
08:25 moritz \o cedrvint
08:25 cedrvint o/ moritz
08:46 grondilu I think this is a good example of perl6 being to slow for rosalind.  https://gist.github.com/4231872,  http://rosalind.info/problems/seto/
08:48 moritz nr: https://gist.github.com/4231872
08:48 p6eval niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  $n is declared but not used at /tmp/6NK_pxvvQr line 5:â�¤------> [32mmy Set $N .= new: |(1 .. my [33mâ��[31m$n = @data.shift.Int);[0mâ�¤â�¤Unhandled exception: Cannot parse number: Land der Berge, Land am Strome,â�¤  at /home/p6eval/niec…
08:48 p6eval ..rakudo 53daef: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land der Berge, Land am Strome,' (indicated by ⏏)␤  in method Int at src/gen/CORE.setting:10185␤  in method Int at src/gen/CORE.setting:3800␤  in block  at /tmp/F3hLlxwFRq:5␤␤»…
08:49 grondilu rn: https://gist.github.com/4231872
08:49 p6eval rakudo 53daef: OUTPUT«{1, 2, 3, 4, 5, 8, 10}␤{2, 5}␤{1, 3, 4}␤{8, 10}␤{6, 7, 8, 9, 10}␤{1, 3, 4, 6, 7, 9}␤»
08:49 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  $n is declared but not used at /tmp/OslvbgIQbM line 5:â�¤------> [32mmy Set $N .= new: |(1 .. my [33mâ��[31m$n = @data.shift.Int);[0mâ�¤â�¤Unhandled exception: Unable to resolve method Capture in type Rangeâ�¤  at /tmp/OslvbgIQbM line 5 …
08:50 grondilu rn: https://gist.github.com/4231872
08:50 p6eval rakudo 53daef: OUTPUT«{1, 2, 3, 4, 5, 8, 10}␤{2, 5}␤{1, 3, 4}␤{8, 10}␤{6, 7, 8, 9, 10}␤{1, 3, 4, 6, 7, 9}␤»
08:50 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Range␤  at /tmp/Gn_jNeqlXS line 5 (mainline @ 8) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4209 (module-CORE @ 580) ␤  at /ho…
08:52 grondilu rn: https://gist.github.com/4231872
08:52 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«{1, 2, 3, 4, 5, 8, 10}␤{2, 5}␤{1, 3, 4}␤{8, 10}␤{6, 7, 8, 9, 10}␤{1, 3, 4, 6, 7, 9}␤»
08:52 grondilu here you go
08:52 grondilu and this is way too slow with larger sets
08:53 grondilu it would probably be faster if I was not using junctions, but what's the point of junctions if we can never use them?
08:55 moritz why not use the Set operations directly?
08:56 moritz also the point of junctions is convenience; if you find them to be slow, maybe it's time to sacrifice convenience for speed
08:56 grondilu r: say Set.^methods;
08:56 p6eval rakudo 53daef: OUTPUT«keys values elems exists Bool Numeric hash at_key exists_key new BUILD postcircumfix:<( )> iterator list pick roll of Str gist perl elems infinite item fmt Int Num chrs Numeric Str␤»
08:57 grondilu r: say Set.new(1, 2) + Set.new(1, 3);
08:57 p6eval rakudo 53daef: OUTPUT«4␤»
08:57 grondilu what are the Set operations?
08:57 grondilu r: say Set.new(1, 2).union: Set.new(1, 3);
08:57 p6eval rakudo 53daef: OUTPUT«No such method 'union' for invocant of type 'Set'␤  in block  at /tmp/ZOduL8ktIx:1␤␤»
08:59 grondilu r: say Set.new(1, 2) ^ Set.new(1, 3);
08:59 p6eval rakudo 53daef: OUTPUT«one(set(1, 2), set(1, 3))␤»
09:01 wamba joined #perl6
09:03 erkan joined #perl6
09:03 erkan joined #perl6
09:05 moritz grondilu: see the specification
09:05 moritz I don't know them by heart
09:05 moritz r: say Set.^methods(:local)
09:05 p6eval rakudo 53daef: OUTPUT«keys values elems exists Bool Numeric hash at_key exists_key new BUILD postcircumfix:<( )> iterator list pick roll of Str gist perl␤»
09:05 moritz r: say Set.^methods
09:05 p6eval rakudo 53daef: OUTPUT«keys values elems exists Bool Numeric hash at_key exists_key new BUILD postcircumfix:<( )> iterator list pick roll of Str gist perl elems infinite item fmt Int Num chrs Numeric Str␤»
09:08 diakopter n: say &1\[0]
09:08 p6eval niecza v24-5-g599cbcb: OUTPUT«Any()␤»
09:09 moritz nr: say (1..10).grep((* ** 2 ** 2 + 1).is-prime)
09:09 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«1 2 4 6␤»
09:17 timotimo moritz: typo in your advent blogpost: "You saw who easily" in the summary section
09:23 moritz timotimo: not my post :-)
09:23 moritz but I've fixed it anyway, thanks
09:24 timotimo oh, yeah, yours was yesterday wasn't it?
09:24 moritz yes
09:25 timotimo i suppose you didn't get my comment about yesterdays post, that the code in the first block was too long and reached into the navigation menu? i suppose it doesn't matter any more since it's not the uppermost post, but still ...
09:27 moritz timotimo: looked fine here; maybe different fonts or so. I've wrapped two lines now; does it look better in your browser now?
09:28 kurahaupo joined #perl6
09:29 diakopter moritz: typo in Day 6: detecing
09:29 moritz diakopter: thanks, fixed
09:29 timotimo the most (only?) offending line (wasn't there more earlier?) is         is deduplicate('just some words'), 'just omewrd', 'basic deduplication';
09:30 timotimo if you changed that, it didn't reach my browser yet
09:30 timotimo ah yes, now it's wrapped and looks good. thanks!
09:33 kivutar joined #perl6
09:42 diakopter moritz: grammaro in Day 2: predecessors needs an apostrophe
09:44 daxim joined #perl6
09:44 Timbus "Anonymous functions for great good" heh. is that from the learnyouahaskell book? bonus will be happy to see that
09:51 kresike joined #perl6
09:51 kresike hello all you happy perl6 people
09:51 diakopter moritz: also s/aside/alongside/
09:52 moritz diakopter: both fixed, takk
09:53 fhelmberger joined #perl6
09:53 diakopter hee. "Perl 6 has never been this much fun to use."
09:54 diakopter maybe a little less ambiguous to s/this/so/
09:54 diakopter I mean, it's obvious already from context
09:55 diakopter just if you're skimming quickly can possibly misread
09:55 diakopter eh, no worries
09:56 diakopter moritz: re parrot threads, which nqp branch works with them
09:57 diakopter I want to write a sigsegv test
09:58 jnthn diakopter: Could always write that in PIR. Or use the parrot-nqp (the old nqp-rx that is bundled in with Parrot)
09:58 diakopter actually yes it needs to be in pir, you're right
10:00 tadzik er, looking at http://modules.perl6.org/
10:01 tadzik Rakudo::Debugger could use some more fancy description, perhaps :)
10:01 jnthn I wonder who wrote that? :)
10:01 jnthn tadzik: We could make the description say "A debugger for Rakudo", then use the "You don't say?" rage face as its icon :P
10:02 tadzik :D
10:02 tadzik yes!
10:02 moritz you could add "interactive"
10:02 jnthn Good idea :)
10:03 sorear You're calling this thing a debugger for Rakudo
10:03 sorear but AFAICT it cannot be used to debug Rakudo
10:05 jnthn sorear: Uh. WAT.
10:05 jnthn sorear: I don't think that reading is very likely.
10:06 jnthn "I have Rakudo. This is a debugger that goes along with it."
10:07 * sorear was trying for humor
10:07 jnthn Oh. :P
10:07 jnthn Well, not enough coffee yet today for me to get that :P
10:08 diakopter sketch: main thread: new RPA $a; pass $a to Task B; sleep 5; run Task E; sleep 60; print $a[0][0]. Task B: new RPA $c; new RPA $d; $d[0] = Int 4; $c[0] = $d; $a[0] = $c; return; Task E: allocate 10 million PMCs (try to trigger GC in the thread that ran Task B);
10:08 * jnthn wonders if a debug setting would be feasible in some sense.
10:08 masak g'antenoon, #perl6
10:08 jnthn That would actually be pretty cool...
10:09 jnthn lol its masak
10:10 diakopter well, fresh parrot checkout fails on Configure
10:10 diakopter step auto::gcc died during execution: Linker failed
10:11 diakopter (I don't have gcc..?)
10:11 diakopter oh, hm, I guess just a warning
10:12 diakopter who wants to help me make that PIR
10:13 jnthn .oO( intention beset by PIR )
10:13 moritz \o masak
10:14 moritz masak: diakopter had some notes on possible grammar improvements in your last advent calendar post
10:14 moritz masak: I'll leave that to you
10:14 diakopter masak: nm on that..
10:15 masak well, I'm going to backlog anyway.
10:17 diakopter masak: oh noes!
10:17 masak jnthn++ # o/⁵\o
10:20 sorear o/ masak
10:20 * masak sees "predecessors’" and corrects it to be "predecessors'" :)
10:20 masak successive improvements :)
10:20 masak sorear: greetings, earthling.
10:21 diakopter wait eh
10:22 masak .u ’'
10:22 diakopter should be predecessor's
10:22 phenny U+2019 RIGHT SINGLE QUOTATION MARK (’)
10:22 phenny U+0027 APOSTROPHE (')
10:22 diakopter oh well I guess plural is okay too
10:22 masak diakopter: fixed it to "predecessor's"
10:23 diakopter perl or perls
10:23 diakopter or even other languages too collectively
10:24 masak does any other language do the equivalent of @_ and shift?
10:24 masak sh, I guess.
10:24 masak False does somthing similar in spirit, too.
10:24 moritz what about TCL?
10:25 arnsholt I think shell script essentially works like that
10:26 diakopter rn: say 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX​XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 3
10:26 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«2 3␤»
10:27 masak there should be a mode that the implementations flip into where they don't try to parse and run the program, they just go "diakopter, is that you?" :)
10:27 sorear :D
10:29 diakopter rn: say 5 ZZZZZZZZZZZZZZZZZZZZZXZXXXZX​ZXXZXZZZXZXZXXXXXZXXZXXZXXZ 7
10:29 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«5 7␤»
10:29 jnthn I once thought we could implement diakopter mode by looking at ratio of \w to \W, but this one fails that test...
10:32 diakopter rn: sub infix:<XXXX>($a, $b) { $a;$b; 77 }; say 6 XXXXX 8
10:32 p6eval rakudo 53daef: OUTPUT«[31m===[0mSORRY![31m===[0m�Confused�at /tmp/RLYzkglLR7:1�------> [32mfix:<XXXX>($a, $b) { $a;$b; 77 }; say 6 [33m�[31mXXXXX 8[0m�»
10:32 p6eval ..niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Whitespace is required between alphanumeric tokens at /tmp/QARvdi6kxi line 1:â�¤------> [32m<XXXX>($a, $b) { $a;$b; 77 }; say 6 XXXX[33mâ��[31mX 8[0mâ�¤â�¤Undeclared name:â�¤  'X' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤ …
10:32 diakopter ooo rakudo is colory
10:32 lrnperl6 joined #perl6
10:33 wamba joined #perl6
10:34 masak yeah. jnthn++
10:34 diakopter so XXXX doesn't backtrack to get XXXXX
10:35 masak there isn't a lot of backtracking at all going on in the Perl 6 parser, IIRC.
10:35 diakopter rn: sub infix:<X>($a, $b) { $a;$b; 77 }; say 6 XXXX 8
10:35 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«77␤»
10:35 diakopter o_O
10:35 jnthn Yeah, it backtracks in very few places.
10:35 moritz though some meta-ops do backtrack
10:35 jnthn Reduction meta-ops are one place it does, iirc.
10:35 jnthn 'cus of the array composer pun I guess.
10:36 sivoais joined #perl6
10:38 diakopter rn: sub postfix:<+>($a) { $a; 77 }; say +6+ +8+
10:38 lrnperl6 joined #perl6
10:38 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«154␤»
10:38 masak \o/
10:39 jnthn BTW, the exciting thing isn't so much "Rakudo is colory" as it is "Rakudo now tells you the position of the error, and does the highwater thing so you get a much more accurate position" :)
10:39 masak rn: sub postfix:<+>($a) is looser:('infix:<+>') { $a; 77 }; say +6+ +8+
10:39 p6eval rakudo 53daef: OUTPUT«[31m===[0mSORRY![31m===[0m�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, …
10:39 p6eval ..niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��You may only use *one* signature at /tmp/yO4FXtM1g2 line 1:�------> [32mpostfix:<+>($a) is looser:('infix:<+>') [33m�[31m{ $a; 77 }; say +6+ +8+[0m��Unable to resolve method ctxzyg in type Bool at /tmp/yO4FXtM1g2 line 1:�…
10:40 jnthn masak: too much cowb^Wcolon
10:40 masak hm. appears I have the syntax wrong.
10:40 masak oh.
10:40 jnthn Also
10:40 jnthn &infix:<+>
10:40 jnthn Not string names :P
10:40 masak rn: sub postfix:<+>($a) is looser('&infix:<+>') { $a; 77 }; say +6+ +8+
10:40 masak oh!
10:40 p6eval rakudo 53daef: OUTPUT«[31m===[0mSORRY![31m===[0m�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, …
10:40 p6eval ..niecza v24-5-g599cbcb: OUTPUT«154␤»
10:40 masak rn: sub postfix:<+>($a) is looser(&infix:<+>) { $a; 77 }; say +6+ +8+
10:40 p6eval rakudo 53daef: OUTPUT«83␤»
10:40 p6eval ..niecza v24-5-g599cbcb: OUTPUT«77␤»
10:40 masak hah!
10:40 diakopter :D
10:40 diakopter masak wins
10:41 * masak submits rakudobug
10:41 masak hm, wait.
10:41 masak no, Rakudo has this right.
10:41 masak (+6+ +8)+
10:42 masak unless, hm.
10:42 moritz should be 77
10:42 masak the + after the 6.
10:42 masak is it *always* an infix?
10:42 masak er, postfix?
10:42 jnthn I'd think so
10:42 masak then Niecza is right.
10:42 moritz in case of no spaces, postfix wins over infix
10:42 jnthn How so?
10:43 jnthn 6+ trigers the postfix
10:43 masak so does 8+
10:43 jnthn So we get 77
10:43 masak oh, I see what you mean.
10:43 masak yeah, Rakudo is right.
10:43 jnthn Numify it, still 77
10:43 jnthn We look for an infix next
10:43 * masak submits nieczue
10:43 jnthn grr, this is hard to think about :P
10:43 * moritz still isn't convinced
10:44 moritz how is this beast parsed?
10:44 * masak grins
10:44 moritz ((+6)+ + (+8))+
10:44 jnthn Well, I can see what's going on easy enough up to the final postfix.
10:44 moritz that's how I'd expect it
10:44 telex joined #perl6
10:44 moritz and I guess that niecza does it that way
10:44 masak right.
10:44 masak and gets 77.
10:45 moritz since the final postfix is looser than the infix, I'd argue that's correct
10:45 masak I can get behind that.
10:45 masak so, rakudobug.
10:45 diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6+ +8^^^
10:45 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«83␤»
10:45 diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6^^^ +8^^^
10:45 p6eval rakudo 53daef: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<^^^>' called (line 1)␤»
10:45 p6eval ..niecza v24-5-g599cbcb: OUTPUT«77␤»
10:45 diakopter erm
10:46 jnthn ...
10:46 masak o.O
10:46 * masak submits rakudobug
10:46 grondilu rn: my @ = (1 .. *).pick(10_000).join(':');
10:46 * jnthn wonders whose gonna fix these :P
10:47 * jnthn looks at Pm :D
10:47 p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
10:47 p6eval ..rakudo 53daef: OUTPUT«.pick from infinite list NYI␤  in method Str at src/gen/CORE.setting:10188␤  in method Stringy at src/gen/CORE.setting:825␤  in method join at src/gen/CORE.setting:1224␤  in block  at /tmp/9i5R7P46ws:1␤␤»
10:47 grondilu rn: my @ = (1 .. *).join(':');
10:47 masak hehehe, "NYI" :P
10:47 jnthn EXPR is a scary place :)]
10:47 p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
10:47 p6eval ..rakudo 53daef:  ( no output )
10:47 masak you can't have a uniform distribution over an infinite list.
10:47 grondilu rn: my @ = (1 .. *)[^10000].join(':');
10:48 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«(timeout)»
10:48 grondilu jeez, that's too slow
10:48 diakopter hee
10:49 grondilu it's actually just the parsing that makes perl6 too slow for http://rosalind.info/problems/seto/
10:49 grondilu rn: my @ = (1 .. *)[^100].join(':');
10:50 p6eval rakudo 53daef, niecza v24-5-g599cbcb:  ( no output )
10:50 sorear we could use a universal distribution :D
10:50 grondilu ?
10:50 masak moritz: no, (((+6)+) + 8)+
10:50 masak there are only two pluses between the 6 and the 8.
10:51 masak so the second one must be an infix.
10:52 moritz right
10:53 moritz but still,the result should be 77
10:53 masak aye.
10:53 masak just pointing this out for the bug report :)
10:55 diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6 ^^^8^^^
10:55 p6eval rakudo 53daef: OUTPUT«Nil␤»
10:55 p6eval ..niecza v24-5-g599cbcb: 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 <filen…
10:58 diakopter n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say 8^^^+9
10:58 p6eval niecza v24-5-g599cbcb: OUTPUT«77␤»
10:59 diakopter where'd the 9 go
11:00 diakopter n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say(say 8^^^+9)
11:00 masak well, the postfix is looser than the infix :P
11:00 p6eval niecza v24-5-g599cbcb: OUTPUT«77␤True␤»
11:01 diakopter dunno
11:02 diakopter n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say(say 8^^^-9)
11:02 p6eval niecza v24-5-g599cbcb: OUTPUT«77␤True␤»
11:03 diakopter n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say(say 8^^^-die)
11:03 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Died␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /tmp/blI0LLw1Oz line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4209 (module-…
11:04 leont joined #perl6
11:05 Su-Shee_ joined #perl6
11:14 wamba joined #perl6
11:20 xenoterracide joined #perl6
11:22 bowtie joined #perl6
11:37 tokuhiro_ joined #perl6
11:38 dj_rod joined #perl6
11:39 * moritz is on a the second of a span of seven workdays with only one meeting scheduled
11:39 dj_rod rod_on the hawz...
11:39 moritz that is, one meeting in seven days, not one per day :-)
11:40 masak moritz: :)
11:41 dj_rod hey.. looking for  Australlian connection
11:43 moritz dj_rod: try  telnet www.gov.au 80  # straight connection to Australia
11:44 moritz ... or be more specific what kind of connection you're looking for, and how it relates to Perl 6
11:45 dj_rod personal connection.. order in AUS
11:48 moritz dj_rod: I think you're off topic here
11:48 dj_rod yaa im off  topic..
12:10 Su-Shee joined #perl6
12:12 fhelmberger joined #perl6
12:27 rindolf joined #perl6
12:27 grondilu joined #perl6
12:27 dalek perl6-examples: 343cb99 | (L. Grondin)++ | parsers/Newick.pm:
12:27 dalek perl6-examples: [parsers]  Newick tree format (used in bioinformatics)
12:27 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/343cb993dd
12:28 grondilu ^ I added this because I thought it's kind of interesting and there should be more parsers in this section anyway (IMHO)
12:29 cognominal joined #perl6
12:50 Ulti grondilu hi5 for bioinformatics .o/
12:51 leont .o/
12:54 Ulti both left hanging...
12:55 Ulti also newick sucks as a format
12:55 Ulti for big trees anyway
12:56 grondilu well, there was only one grammar in perl6-examples/parsers/,  I thought this was too bad.  The more parsers, the better imho.
13:03 rindolf joined #perl6
13:08 * leont thinks all tree formats suck in their own ways
13:09 Kharec_ joined #perl6
13:10 rindolf joined #perl6
13:13 leont And more than that, I hate how there seem to be about as many bioinformatics formats as bioinformaticians
13:14 mtk joined #perl6
13:28 grondilu I'm not informatician anyway, I just play around with roalind for fun.  But I find the Newick format quite simple and elegant.
13:29 grondilu *bioinfomatician   *rosalind
13:29 grondilu danned typos
13:30 leont It's simple and elegant, but conceptually wrong in most cases
13:31 leont Most trees out there aren't rooted
13:32 leont It's basically using a directed graph for data that isn't directed
13:32 grondilu aren't philogenic trees directed?
13:32 leont Ideally, yes
13:33 leont But there is raw data, and there is "I think the directions are like this"
13:34 leont Biologically, they are absolutely directed (unless you're dealing with horizontal gene transfer or some such)
13:37 gootle joined #perl6
13:40 cedrvint rn: ('A' ... 'a').say
13:41 p6eval niecza v24-5-g599cbcb: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a␤»
13:41 p6eval ..rakudo 53daef: OUTPUT«(timeout)»
13:41 cedrvint it seems rakudo loops forever in this case.
13:41 GlitchMr joined #perl6
13:43 cedrvint according to http://rosettacode.org/wiki/Calendar​_-_for_%22real%22_programmers#Perl_6 it is a regression
13:43 cedrvint r: ["\0"..."~"].say
13:44 p6eval rakudo 53daef: OUTPUT«(timeout)»
13:48 moritz Œr: ["\0"..."~"][^10].say
13:48 moritz r: ["\0"..."~"][^10].say
13:49 p6eval rakudo 53daef: OUTPUT«(timeout)»
13:57 Kharec joined #perl6
14:12 PacoAir joined #perl6
14:20 kaare_ joined #perl6
14:29 skids joined #perl6
14:31 sirrobert quit
14:38 atrodo joined #perl6
14:42 erkan joined #perl6
14:42 erkan joined #perl6
14:49 atrodo joined #perl6
14:58 bluescreen10 joined #perl6
15:03 sweet_kid joined #perl6
15:09 rurban_ joined #perl6
15:11 xinming_ joined #perl6
15:16 stopbit joined #perl6
15:16 moritz wow, on my new workstation rakudo parses its setting in ~67s
15:17 moritz that's nearly a factor 2 faster than the next fastest machine I have access to
15:21 moritz t/spec/S32-io/IO-Socket-INET.rakudo also fails test 9 for me
15:25 moritz we already have a ticket for it
15:25 dalek roast: ed49c88 | moritz++ | S32-io/IO-Socket-INET.t:
15:25 dalek roast: re-fudge failing socket test
15:25 dalek roast: review: https://github.com/perl6/roast/commit/ed49c883f8
15:25 moritz so I'm fudging the test for now
15:32 hash_table joined #perl6
15:37 rurban_ joined #perl6
15:38 erkan joined #perl6
15:38 erkan joined #perl6
15:38 wamba joined #perl6
15:42 bluescreen10 joined #perl6
16:11 xinming joined #perl6
16:14 benabik joined #perl6
16:19 atrodo joined #perl6
16:20 rurban_ joined #perl6
16:31 kaleem joined #perl6
16:37 grondilu rn:  say "foo" ~~ / <.alpha>+<digit>? /; say $/<digit> // "no digit";
16:37 p6eval niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(3) text(foo) pos([].list) named({}.hash)>␤no digit␤»
16:37 p6eval ..rakudo 53daef: OUTPUT«「foo」␤␤␤»
16:38 grondilu rn:  say "foo" ~~ / <.alpha>+<digit>? /; say ($/<digit> // "no digit");
16:38 p6eval niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(3) text(foo) pos([].list) named({}.hash)>␤no digit␤»
16:38 p6eval ..rakudo 53daef: OUTPUT«「foo」␤␤␤»
16:38 grondilu rn:  say "foo7" ~~ / <.alpha>+<digit>? /; say $/<digit> // "no digit";
16:38 p6eval niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(4) text(foo7) pos([].list) named({"digit" => #<match from(3) to(4) text(7) pos([].list) named({}.hash)>}.hash)>␤#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
16:38 p6eval ..rakudo 53daef: OUTPUT«「foo7」␤ digit => 「7」␤␤「7」␤␤»
16:39 grondilu rn:  say "foo7" ~~ / <.alpha>+<digit>? /; say $/.<digit> // "no digit";
16:40 p6eval niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(4) text(foo7) pos([].list) named({"digit" => #<match from(3) to(4) text(7) pos([].list) named({}.hash)>}.hash)>␤#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
16:40 p6eval ..rakudo 53daef: OUTPUT«「foo7」␤ digit => 「7」␤␤「7」␤␤»
16:40 grondilu rn:  "foo7" ~~ / <.alpha>+<digit>? /; say $/.<digit> // "no digit";
16:40 p6eval rakudo 53daef: OUTPUT«「7」␤␤»
16:40 p6eval ..niecza v24-5-g599cbcb: OUTPUT«#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
16:40 grondilu rn:  "foo7" ~~ / <.alpha>+<digit>? /; say $/{"digit"} // "no digit";
16:40 p6eval rakudo 53daef: OUTPUT«「7」␤␤»
16:40 p6eval ..niecza v24-5-g599cbcb: OUTPUT«#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
16:41 grondilu rn:  "foo" ~~ / <.alpha>+<digit>? /; say $/.<digit> // "no digit";
16:41 p6eval niecza v24-5-g599cbcb: OUTPUT«no digit␤»
16:41 p6eval ..rakudo 53daef: OUTPUT«␤»
16:41 grondilu rn:  "foo" ~~ / <.alpha>+<digit>? /; print $/<digit> // "no digit";
16:41 p6eval rakudo 53daef:  ( no output )
16:41 p6eval ..niecza v24-5-g599cbcb: OUTPUT«no digit»
16:44 kresike bye folks
16:45 grondilu r: say .<digit> // "no digit" given "foo" ~~ / <.alpha>+ <digit>? /;
16:45 p6eval rakudo 53daef: OUTPUT«␤»
16:46 grondilu r: print .<digit>.perl given "foo" ~~ / <.alpha>+ <digit>? /;
16:46 p6eval rakudo 53daef: OUTPUT«()»
16:46 grondilu r: print () // "bummer"
16:46 p6eval rakudo 53daef:  ( no output )
16:46 grondilu rn: print () // "bummer"
16:46 p6eval rakudo 53daef, niecza v24-5-g599cbcb:  ( no output )
16:47 grondilu rn: print () || "bummer"
16:47 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«bummer»
16:47 grondilu r: say .<digit> || "digit" given "foo" ~~ / <.alpha>+ <digit>? /;
16:47 p6eval rakudo 53daef: OUTPUT«digit␤»
16:47 grondilu r: say .<digit> || "no digit" given "foo0" ~~ / <.alpha>+ <digit>? /;
16:47 p6eval rakudo 53daef: OUTPUT«「0」␤␤»
16:47 Khisanth joined #perl6
16:51 grondilu I'm afraid I still don't get the difference between '||' and '//'
16:51 grondilu :/
16:52 moritz r: say 0 // 42;
16:52 p6eval rakudo 53daef: OUTPUT«0␤»
16:52 moritz r: say Int // 42;
16:52 p6eval rakudo 53daef: OUTPUT«42␤»
16:52 moritz grondilu: that's the difference
16:53 grondilu r: say 0 || 42
16:53 p6eval rakudo 53daef: OUTPUT«42␤»
16:53 grondilu r: say "0" || "42"
16:53 p6eval rakudo 53daef: OUTPUT«42␤»
16:54 grondilu r: my %h; say %h<foo> // "bar";
16:54 p6eval rakudo 53daef: OUTPUT«bar␤»
16:55 grondilu ok but then why :
16:55 grondilu r: say .<digit> // "no digit" given "foo" ~~ / <.alpha>+ <digit>? /;
16:55 p6eval rakudo 53daef: OUTPUT«␤»
16:55 grondilu do not output "no digit"?
16:56 benabik Because .<digit> is an empty string instead of undefined?
16:57 grondilu r: say .<digit>.perl given "foo" ~~ / <.alpha>+ <digit>? /;
16:57 p6eval rakudo 53daef: OUTPUT«()␤»
16:58 grondilu hum yeah it's an empty list, not an undefined one
16:58 grondilu I just can't get my mind to remember this all
16:58 benabik Oh, yeah.  Quantifiers return lists.
16:59 grondilu r: say .<beer> // "no beer" given "foo" ~~ / <.alpha>+ <digit>? /;
16:59 p6eval rakudo 53daef: OUTPUT«no beer␤»
16:59 grondilu oh yeah, and here 'beer' is not a key to the hash, so // returns the rhs
16:59 grondilu makes sense
17:06 pecastro joined #perl6
17:11 xinming_ joined #perl6
17:17 TimToady except that ? is supposed to return undef in that situation
17:17 TimToady that it returns () is a known specrot in rakudo
17:18 TimToady the result of the silly designers of Perl 6 changing their mind more than once on the subject :)
17:20 MayDaniel joined #perl6
17:24 Woodi hallo today :)
17:25 Woodi could someone translate to me that 'given' usage not looking like switch pls ?
17:27 * moritz doesn't understand the question
17:27 Chillance joined #perl6
17:27 Woodi FROGGS_: I like proposed debianish-like modules TUI :) too thinked it is noisy but compared to cpan> instal module it isn't...
17:28 Woodi it is: say something given something_other
17:28 Woodi is it like say sth if sth3 ?
17:29 geekosaur I think given just localizes and sets $_ to the result of something_other?
17:29 TimToady no, it just sets $_ for the LHS
17:29 geekosaur maybe not localizes
17:29 Woodi not look like proper switch :) given $a { when 'a': { say 'a' } }
17:30 Woodi r: say $_ given 'a';
17:30 p6eval rakudo 53daef: OUTPUT«a␤»
17:31 moritz Woodi: 'when' can be used outside of switch statements. That's why it's not called 'switch'
17:32 SmokeMachine joined #perl6
17:32 SmokeMac_ joined #perl6
17:33 Woodi moritz: can you get example of 'when' out of switch ?
17:35 TimToady nr: for ^100 { .say when /7/ }
17:35 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«7␤17␤27␤37␤47␤57␤67␤70␤71​␤72␤73␤74␤75␤76␤77␤78␤79␤87␤97␤»
17:36 Woodi o, nice :)
17:36 TimToady or in list comprehensions
17:36 TimToady nr: say ($_ when /7/ for ^100)
17:36 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«7 17 27 37 47 57 67 70 71 72 73 74 75 76 77 78 79 87 97␤»
17:38 moritz Woodi: you even had one yourself
17:38 moritz r: say $_ given 'a';
17:38 p6eval rakudo 53daef: OUTPUT«a␤»
17:38 moritz no switching here
17:39 TimToady yes, setting and using the topic are orthogonal in p6
17:39 Woodi with my current knowledge this do not contain textual 'when' :)
17:39 TimToady given just sets the topic, and doesn't care what you do with it
17:39 TimToady when just pattern matches on the topic, and doesn't care how it was set
17:40 TimToady it just so happens that the combination of given/when looks a lot like a switch statement
17:43 benabik joined #perl6
17:44 Woodi so given sets $_ and when check it value ?
17:45 moritz erm, sorry, I misread
17:45 moritz yes
17:45 TimToady specifically, when does smartmatching, using the argument to when as the pattern
17:46 pecastro joined #perl6
17:47 sizz joined #perl6
17:48 TimToady when PATTERN is the same as: if $_ ~~ PATTERN except that it doesn't need to set $_ for the pattern, since it already is set
17:49 TimToady it's really more like: if PATTERN.ACCEPTS($_)
17:50 TimToady nr: $_ = 70; say /7/.ACCEPTS($_)
17:50 p6eval rakudo 53daef: OUTPUT«「7」␤␤»
17:50 p6eval ..niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(1) text(7) pos([].list) named({}.hash)>␤»
17:51 moritz sorear: IMHO Match.gist should not print the pos([].list) named({}.hash)  when there are no captures
17:51 moritz it's quite distracting, and .gist is meant for humans after all
17:52 TimToady I like rakudo's output there :)
17:52 Woodi so Perl6 have pattern matching mechanism like described in http://en.wikipedia.org/wiki/Pattern_matching ? or it is extension to regex matching ?
17:54 TimToady you can look at it either way
17:54 TimToady however, it's still closer to regex in flavor, insofar as no tokener is assumed
17:55 TimToady in fact, Perl 6 writes a tokener for you sekritly
17:56 rurban_ joined #perl6
17:57 TimToady note, the FP folks use "Pattern Matching" to mean something more like signature binding, as in http://rosettacode.org/wik​i/Pattern_matching#Perl_6
18:00 Woodi of course perl6 have signature binding too, yes ? :)
18:01 TimToady of course :)
18:03 Woodi TimToady: something usefull left to integrate ? :)
18:03 TimToady we're still thinking about logic programming
18:03 TimToady not to mention multithreading
18:04 moritz and IO
18:04 SamuraiJack joined #perl6
18:06 skids r: $_=2; given 1 { .say }; .say; # given temporizes and sets the topic.  important and useful distinction.
18:06 p6eval rakudo 53daef: OUTPUT«1␤2␤»
18:08 TimToady well, not exactly temporization, more like lexical, insofar as 'given 1 {}' really means more like 'given 1 -> $_ {}'
18:09 TimToady but yeah, loosely speaking
18:11 skids Would it be fair to call it the item form of "for" or does the phaser behavior in the block differ?
18:12 xinming joined #perl6
18:12 TimToady the binding differs slightly, insofar as 'for' cares about partial binding
18:12 TimToady so it can take the list N-at-a-time
18:13 TimToady I don't remember if we specced given to take phasers like a loop
18:13 TimToady nr: given 1 { last }
18:13 p6eval rakudo 53daef: OUTPUT«last without loop construct␤  in block  at src/gen/CORE.setting:429␤  in block  at src/gen/CORE.setting:486␤  in block  at /tmp/af_p6HvmMs:1␤␤»
18:13 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Illegal control operator: last␤  at /tmp/uCDWVOYZBE line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4209 (module-CORE @ 580) ␤  at /home/p6eval/niecza…
18:13 TimToady if so, nobody implements it :)
18:14 TimToady I think it would violate POLS anyway
18:14 PerlJam indeed
18:14 PerlJam (I was just thinking "what?!?, that's crazy" :-)
18:15 TimToady most over-aggressive unifications have that effect
18:17 TimToady (see most FP languages for examples :)
18:18 xinming joined #perl6
18:18 Woodi moritz: what is a problem with IO ? it is lack of spec or VM introduces intermediate problems or ... ?
18:19 TimToady yes
18:19 TimToady Perl 6 always tries to turn your ORs into ANDs... :)
18:21 Woodi I understand if something is problematic it is such becouse it is complex :)
18:21 dalek perl6-roast-data: c1ad88a | coke++ | / (3 files):
18:21 dalek perl6-roast-data: today (automated commit)
18:21 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/c1ad88a1f4
18:22 PerlJam Woodi: unfortunately, most of reality is that way depending on the scale at which you look
18:22 Woodi but not realy have a picture of what are constraints and requirement and dreams here :)
18:23 Woodi I just belive in making problems clear helps :)
18:25 PerlJam Woodi: yep.  Often I think it's that we don't whittle problems down to their essence before attempting to solve them that causes most grief.  (Sometimes we just don't know any better though)
18:25 * TimToady was just making a joke because we usually go for TMTOWTDI here, which tends to turn "or" into "and"
18:25 Woodi why we can't have C like IO API ? with buffering in VM as in v5
18:26 flussence .oO( I want an IO pony )
18:26 Woodi and make Win a special case :)
18:26 moritz Woodi: who says we can't?
18:26 TimToady we can have a C api, but it'll only work with buf8, since that's all C knows about really
18:27 TimToady deciding when to encode/decode is a problem that C does not attempt to solve in the API
18:27 Woodi do we have source(s) of not-buf8 data ?
18:27 TimToady and really, it's the Unix IO api, not C
18:27 PerlJam Woodi: humans
18:29 TimToady that's why the default IO api assumes text (Unicode), not bytes
18:30 TimToady fershure, we need the lowlevel api too
18:30 Woodi humans means keyboard and tcp ?
18:30 TimToady and the stuff coming in the pipeline from some other process
18:31 TimToady and there's more than a few text files on the disk, now that I think of it...
18:32 TimToady there's a reason that Unicode has the "Uni"
18:32 Woodi processes are in computers, so in actual hardware precesses use C types ? so maybe serialization is needed on Perl6 side ?
18:33 moritz Woodi: hardware just uses bytes
18:33 TimToady hardware doesn't use C types; C uses hardware types :)
18:33 moritz and serialization is there; it's called &pack in its most general form
18:33 dalek perl6-examples: 5a73069 | (L. Grondin)++ | rosalind/indc-grondilu.pl:
18:33 dalek perl6-examples: [rosalind] INDC
18:33 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/5a7306945e
18:34 Woodi so where is problem ? :)
18:34 SSC joined #perl6
18:34 TimToady we're trying to hang things on the correct peg these days, and pack is usually the wrong peg
18:35 TimToady most serialization decisions should probably be on the filehandle, or handled via some kind of AOP/role distribution if you want objects to self-serialize
18:36 flussence thinking about it, I'd love to see a module that works like XML::Rabbit, but for binary files, and read/write... maybe I'm asking for an IO unicorn now though
18:36 TimToady you just need to find an IO virgin for bait
18:36 SSC_ joined #perl6
18:39 * leont concurs, C's IO model is not a good one to copy in the 21st century. Perl 5 is having enough pains with that already, don't copy that.
18:40 TimToady well, it fits with the Unix model as well: "I don't know anything about the type of this data, and I'm not gonna go out of my way to help you figure out what the type is."
18:40 fhelmberger joined #perl6
18:40 FROGGS_ Woodi: thanks :o)
18:40 TimToady "I am a computer, and you should serve my best interests."
18:41 leont Sounds rather feline :-p
18:41 TimToady "Careful, I byte!"
18:42 dalek perl6-examples: d0ab6d5 | (L. Grondin)++ | rosalind/indc-grondilu.pl:
18:42 dalek perl6-examples: [rosalind] INDC (shorter)
18:42 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d0ab6d5a0d
18:42 SSC_ left #perl6
18:45 kcwu joined #perl6
18:49 pecastro joined #perl6
18:49 dalek perl6-examples: 0714dda | (L. Grondin)++ | rosalind/ini1-grondilu.pl:
18:49 dalek perl6-examples: [rosalind] INI1 (python wrapping)
18:49 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/0714ddaf45
18:50 grondilu ^ have look at this one guys, it's funny
19:02 benabik_ joined #perl6
19:04 ruoso joined #perl6
19:09 kivutar joined #perl6
19:10 GlitchMr hahahalol
19:10 GlitchMr But why say?
19:10 GlitchMr Why not simply shell
19:10 GlitchMr shell 'python -c "import this"'
19:11 flussence useless use of /bin/sh
19:11 GlitchMr run then
19:11 flussence that's better :)
19:11 GlitchMr I'm sure I've added it some time ago
19:11 GlitchMr run 'python', '-c', 'import this
19:12 GlitchMr '
19:12 GlitchMr oops
19:12 grondilu r: shell 'echo "hello"'
19:12 GlitchMr run 'python', '-c', 'import this'
19:12 p6eval rakudo 53daef: OUTPUT«shell is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub shell at src/RESTRICTED.setting:7␤  in block  at /tmp/eZcrhOlx78:1␤␤»
19:12 * grondilu did not know about  'shell'
19:12 flussence (speaking of which, why/how do we have run() but not fork() or runinstead()?)
19:13 GlitchMr But why bother with Python lessons?
19:13 GlitchMr Especially if first one depends on Zen of Python.
19:13 GlitchMr flussence: Because nobody has implemented runinstead...
19:14 GlitchMr I've implemented run() just because I needed it for my program.
19:15 flussence oh that's interesting, parrot has a builtin for that...
19:15 xinming_ joined #perl6
19:15 GlitchMr If you want, implement those. I just implemented run() because I wanted to use it.
19:16 quester joined #perl6
19:17 flussence I may end up doing so... my code's slowly spiralling toward insanity for lack of them
19:20 GlitchMr http://perl6advent.wordpress.com/2012/12​/07/day-7-mimebase64-on-encoded-strings/
19:21 GlitchMr Seriously? Trying to use base 64 on strings?
19:21 GlitchMr Why?
19:21 GlitchMr Base64 is for binary data.
19:22 GlitchMr It makes as much sense as have "encryption" function that XORs everything by 0xFF and trying to use it on non-ASCII string.
19:22 benabik Unicode strings count as binary data for some definition thereof.
19:23 GlitchMr Yes, except "\x100" doesn't have any encoding specified
19:23 benabik IIRC, base64 is for "non-ASCII" data.
19:24 GlitchMr It could be UTF-8, UTF-16, UTF-32, MagicalEncoding3000 and more
19:25 benabik Parrot's decode_base64 takes an encoding argument.  If you know that the buffer is supposed to be UTF-8, then you can say so.
19:25 GlitchMr Or even ISO-8859-13.
19:26 doy yeah, extending that argument to perl 5 doesn't make a lot of sense
19:26 doy the internal encoding of perl 5 strings is entirely an implementation detail
19:26 GlitchMr Internal encoding is something you shouldn't care about
19:26 GlitchMr I know it's either ISO-8859-1 or UTF-8, but it doesn't really matter.
19:26 GlitchMr If your program actually depends on that, it's broken.
19:27 doy right
19:27 moritz (or it might be, whatitsname, EBDIC or so)
19:27 GlitchMr Oh right
19:27 GlitchMr I've forgot EBCDIC and EBCDIC-UTF
19:28 GlitchMr UTC-EBCDIC*
19:28 * Woodi thing Perl6 isn't just language spec
19:28 Woodi v5 was Unix tool or kind of layer which isolate from using Unix. v6 wants to be universal above everything :)
19:29 GlitchMr Because Python is obsolete.
19:29 GlitchMr I mean, Perl 6 will be perfect.
19:30 GlitchMr But seriously, Python is fine tool. But AWK was fine tool too.
19:30 GlitchMr Actually, I still use AWK.
19:31 arnsholt AWK is awesome!
19:31 arnsholt (awksome?)
19:31 Woodi I sometimes use sed becouse it nicely mix in shell programming... but Perl replaces shell programming
19:32 GlitchMr I usually use awk for things you are using sed for
19:32 GlitchMr It's less ugly
19:32 tadzik arnsholt: awekward! :P
19:33 zby_home_ joined #perl6
19:33 GlitchMr For example, replace abc with def and print string only if it contained abc
19:33 GlitchMr In AWK, it's just
19:33 GlitchMr gsub(/abc/,"def")
19:34 moritz print if s/abc/def/
19:34 GlitchMr print if s/abc/def/g;
19:34 GlitchMr I know
19:34 GlitchMr But it's still shorter.
19:34 Woodi or: sed -e'/abc/def/' | grep -i abc or something like this
19:34 Woodi sed -e's/*
19:34 GlitchMr that won't work
19:35 GlitchMr abc was replaced with def
19:35 Woodi I do not understand exercise then :)
19:35 Woodi err
19:35 Woodi right
19:36 Woodi so grep abc | sed*
19:36 GlitchMr That could be better
19:37 grondilu damn it I've been writing $*IN.lines for ages and I only realize now that I could use just 'lines'
19:37 GlitchMr But try to convert program like this: {print $1}
19:37 GlitchMr Probably -a option would help, but it's still longer
19:38 Woodi then cut -f 1 -d delimiter can be used :)
19:39 Woodi GlitchMr: you switch from shell to awk when you have something bigger to do. if things are bigger you switch to perl :)
19:39 GlitchMr The truth is that AWK is ultimate programming language for UNIx.
19:39 GlitchMr And Perl is ugly.
19:39 tadzik yeah, awk is pretty ;
19:39 GlitchMr tadzik: you can remove that semicolon
19:40 GlitchMr AWK doesn't need semicolons
19:40 Woodi awk is hard lets do perl :)
19:41 GlitchMr Should I make "better than Perl lol" language?
19:42 leont I remember reading somewhere that O'Reilly sells more awk than tcl books
19:42 leont And I do have colleagues that use it quite a bit (though sometimes I consider trying to convert them to perl)
19:43 Woodi leont: imagine such freedom of choosing tools in Windows OSes :)
19:44 leont s/of choosing tools //
19:46 GlitchMr Better than Perl lol: https://gist.github.com/4235941
19:48 Woodi so perl5 is Unix programmable tool. Should Perl6 be "every environment" programmable tool ?
19:50 skids .oO(sigh.  2012 already and still no decent 'lolcat' support in i18n)
19:55 Woodi GlitchMr: but you are right, I should relearn awk :)
19:55 sftp joined #perl6
19:58 ivan``_ joined #perl6
20:06 atrodo_ joined #perl6
20:10 Khisanth joined #perl6
20:10 leont joined #perl6
20:10 imarcusthis joined #perl6
20:10 colomon joined #perl6
20:10 wooden joined #perl6
20:10 rom1504 joined #perl6
20:10 ingy joined #perl6
20:10 lorn joined #perl6
20:10 sjohnson joined #perl6
20:10 pmichaud joined #perl6
20:10 Yappocall_ joined #perl6
20:10 masak joined #perl6
20:10 bakedb_ joined #perl6
20:10 simcop2387 joined #perl6
20:10 TimToady joined #perl6
20:12 ifim joined #perl6
20:14 xinming joined #perl6
20:29 grondilu rn: sub foo($_) { .fmt: "%10s" }; print foo "bar";
20:29 p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«       bar»
20:35 benabik_ joined #perl6
20:41 moritz PerlJam: how's your advent calendar post for tomorrow coming along?
20:43 TimToady nr: .say for lines»[0]
20:43 p6eval rakudo 53daef: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
20:43 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil…
20:43 TimToady nr: .say for lines».words»[0]
20:43 p6eval rakudo 53daef: OUTPUT«Land␤der␤Berge,␤Land␤am␤Strome,␤Land␤de​r␤Äcker,␤Land␤der␤Dome,␤Land␤der␤Hämmer,␤zukun​ftsreich!␤Heimat␤bist␤du␤großer␤Söhne,␤Volk,␤b​egnadet␤für␤das␤Schöne,␤vielgerühmtes␤Österrei​ch,␤vielgerühmtes␤Österreich!␤Heiß␤umfehdet,␤w​ild␤umstritten␤liegst␤dem␤Erdteil␤du␤inmit…
20:43 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil…
20:44 TimToady nr: .words[0].say for lines
20:44 p6eval rakudo 53daef: OUTPUT«Land␤Land␤Land␤Heimat␤Volk,␤vielgerühmtes␤v​ielgerühmtes␤Nil␤Heiß␤liegst␤einem␤Hast␤hoher␤viel​geprüftes␤vielgeprüftes␤Nil␤Mutig␤frei␤arbeitsfroh​␤Einig␤Vaterland,␤vielgeliebtes␤vielgeliebtes␤»
20:44 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Land␤Land␤Land␤Heimat␤Volk,␤vielge​rühmtes␤vielgerühmtes␤Any()␤Heiß␤liegst␤e​inem␤Hast␤hoher␤vielgeprüftes␤vielgeprüft​es␤Any()␤Mutig␤frei␤arbeitsfroh␤Einig␤Vat​erland,␤vielgeliebtes␤vielgeliebtes␤»
20:44 grondilu what's all this?
20:44 TimToady {print $1}
20:46 TimToady of course, with a -p switch, it's just .words[0]
20:46 moritz $_=.words[0] I think
20:46 TimToady right
20:47 benabik .=words[0] ?  Or does that not work?
20:47 TimToady .=words.=[0]  :)
20:47 kurahaupo joined #perl6
20:48 moritz .=(words[0]) # just kidding
20:48 TimToady anyway, it should be a -s switch instead of a -p switch, if we want it to 'say' instead of 'print'
20:49 TimToady but I suspect an explicit loop would be better; -n and -p are rather low-wattage features
20:53 TimToady using settings to implement those is like using a sledgehammer to swat flies
20:57 dalek perl6-examples: 8805265 | grondilu++ | rosalind/tran-grondilu.pl:
20:57 dalek perl6-examples: Update rosalind/tran-grondilu.pl
20:57 dalek perl6-examples:
20:57 dalek perl6-examples: no need for $*IN
20:57 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8805265b47
21:10 wamba joined #perl6
21:16 quester left #perl6
21:32 cognominal joined #perl6
21:48 spider-mario joined #perl6
21:50 spider-mario joined #perl6
22:11 FROGGS_ .u 北亰
22:11 phenny U+5317 CJK UNIFIED IDEOGRAPH-5317 (北)
22:11 phenny U+4EB0 CJK UNIFIED IDEOGRAPH-4EB0 (亰)
22:11 sorear beijing
22:11 FROGGS_ right you are
22:16 cooper_ joined #perl6
22:28 cognominal joined #perl6
22:34 jnthn evening o/
22:35 sorear o/ jnthn
22:37 quester joined #perl6
22:38 * jnthn now has a raspberry pi
22:38 jnthn $dayjob++
22:42 fgomez joined #perl6
22:50 quester rn: say $*PERL;
22:50 p6eval rakudo 53daef: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.11-27-g53daeff", "release-number" => "", "build-date" => "2012-12-05T22:12:52Z", "codename" => ""}).hash␤»
22:50 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Any()␤»
22:50 MayDaniel joined #perl6
22:54 hash_table joined #perl6
22:56 MayDaniel joined #perl6
23:00 masak yeah, $boss's Christmas gift to each of us this year: a raspberry pi.
23:00 masak (we're hiring. we're explicitly looking for excellence.)
23:02 rurban_ joined #perl6
23:05 jnthn .oO( But will it run Rakudo? )
23:09 benabik joined #perl6
23:09 Woodi if it run debian -> it run perl5 -> it can run perl6 :)
23:10 masak I wish that chain of inferences were more true.
23:10 Woodi but why they plug HD video but just 300MHz P2 cpu ? :)
23:11 Woodi it isn't ?
23:12 Woodi debian is default on pi, precompiled rakudo should run me think...
23:16 Krunch masak: what are you hiring for?
23:16 Krunch (apart from "excellence")
23:20 masak Krunch: people who will either consult with companies, or build/deliver courses.
23:20 masak Krunch: we're based in southern Sweden. it's a help but not a strict requirement if you're willing to move there.
23:21 jnthn ooh, almost 40,000 points!
23:21 jnthn er, ww
23:21 sorear o/ masak
23:21 diakopter O_O
23:21 * sorear is, sadly, not anywhere near southern Sweden
23:23 masak sorear: well, I already gave up on trying to lure you into the company, and settled for going on the same generation ark as you when the time comes.
23:23 masak sorear: we're going to sap black holes of their energy, and design Perl 7.
23:24 jnthn masak: Doesn't that mean Perl 7 will be made of suck? :P
23:24 Krunch "build/deliver courses" about...Perl?
23:25 sorear seems to be a lot of C# lately
23:25 jnthn heh, that's just me :P
23:25 masak sorear: jnthn takes the C# bits.
23:25 Krunch Perl.NET
23:25 masak Krunch: I've delivered Perl 5 courses.
23:25 jnthn Quite a lot of Git at the moment also.
23:25 masak aye.
23:25 masak Krunch: surprisingly much of what we do with Perl 6 gets factored into various courses and delivered as different things.
23:26 Krunch wait, you get paid to do  perl6 things?
23:26 Krunch :)
23:26 sorear I think when you hire masak and jnthn at the same company, Perl 6 is inevitable.
23:28 masak Krunch: no, but $dayjob has us for 80% of full time, and we do Perl 6 things on the remaining 20% (and then some).
23:28 masak but the learnings from Perl 6 definitely pay our salary in various ways, yes.
23:28 fgomez joined #perl6
23:36 whiteknight joined #perl6
23:47 armitage81 joined #perl6
23:47 armitage81 joined #perl6
23:56 skids joined #perl6
23:57 Woodi hey, just found nice thing from y2005 :)  http://discuss.joelonsoftware.​com/default.asp?joel.3.219431
23:58 masak yeah, seen that one before. :)
23:59 jnthn 'night o/

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

Perl 6 | Reference Documentation | Rakudo