»ö« 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:05 benabik joined 00:14 tokuhiro_ joined 00:32 rurban_ joined 00:39 tokuhiro_ left 00:41 pmurias left 00:42 tokuhiro_ joined
rurban_ Would shall we do with github.com/parrot/parrot/issues/874 t/nqp/46-charspec.t when icu was not linked? 00:47
00:55 awwaiid joined 01:00 awwaiid left 01:04 anuby joined 01:12 larks left 01:14 larks joined, larks left, larks joined 01:16 hash_table joined, atrodo left 01:21 lichtkind left 01:22 larks_ joined 01:23 bowtie left, larks left, larks_ is now known as larks 01:24 larks left, larks joined 01:25 wamba left 01:28 leont left 01:45 sirrobert left 01:46 sirrobert joined, larks left 01:48 larks joined 01:49 aindilis joined 01:50 larks left, larks joined
rurban_ delete the test? I was not able to skip it, since the parser calls a parrot function which exits without ICU. 01:54
01:55 hash_table left 01:57 xenoterracide left 02:02 gootle joined, xenoterracide joined 02:03 xenoterracide left 02:08 xenoterracide joined 02:13 whiteknight left 02:25 FROGGS_ joined 02:36 larks left 02:38 larks joined, larks left, larks joined 03:01 tokuhiro_ left, tokuhiro_ joined 03:06 tokuhiro_ left 03:21 mjahaber joined
mjahaber perl -v 03:24
03:54 larks left
rurban_ Found a solution within nqp to check for has_icu in charnames, and within parrot not to die, just return -1. 03:55
03:56 larks joined 03:58 Chillance joined 04:09 quester joined 04:30 sftp joined 04:36 Psyche^ joined 04:40 Psyche^ is now known as Patterner
dalek rl6-bench: 2253bd1 | (Geoffrey Broadwell)++ | / (2 files):
Add a push-then-join test (with scaling); increase an old 1e3 limit to 1e4
05:00
05:06 rurban_ left 05:10 skids left 05:18 sftp left 05:25 shachaf joined 05:39 kurahaupo left, larks left, larks joined 05:54 kivutar left 05:56 Kharec joined 05:57 rvchangue joined, mjahaber left 05:59 birdwindupbird joined 06:02 Chillance left 06:08 rurban_ joined 06:12 Pleiades` joined, rurban_ left 06:17 SamuraiJack joined
moritz \o 06:20
grondilu rn: gist.github.com/4231207 06:24
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«(timeout)» 06:25
moritz rurban: I've published your advent post; hope that is OK with you 06:26
06:28 Pleiades` left, kaleem joined 06:33 wamba joined 06:34 Pleiades` joined 06:35 GlitchMr joined
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:40
06:40 grondilu left
FROGGS_ japhb: the rest is pretty similar to apt, and for this line: 06:43
(After updating this dist):Found:
Foo::Bar v1.0.5-dev by Kevin Flynn GPL2 SHA1 2fd4e1c6-7a2d28fc-ed849ee1-bb76e739-1b93eb12
there would emerge a message when stuff like the license changes (thats in S11 too) 06:44
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 06:46
07:06 rvchangue left
tadzik japhb: I don't know. Should it? :) 07:09
good morning #perl6
sorear good morning tadzik 07:13
07:17 Kharec left
japhb tadzik: "I have a doubt." 07:26
07:27 Kharec joined, wamba left
dalek pan style="color: #395be5">perl6-examples: a19c36f | (L. Grondin)++ | rosalind/rstr-grondilu.pl:
[rosalind] RSTR
07:28
tadzik (: 07:30
well, where do we add paths to INC at the later step of Panda-Builder?
withp6lib adds stuff at the beginning of PERL6LIB 07:31
so, yes, we should probably do the same in Build.pm case
FROGGS_ morning tadzik, sorear and japhb
tadzik hello FROGGS_
I have to flee to $office now, feel free to patch it up 07:32
07:57 quester left 08:04 grondilu joined
dalek pan style="color: #395be5">perl6-examples: dd782ef | (L. Grondin)++ | rosalind/eval-grondilu.pl:
[rosalind] EVAL
08:04
08:07 pecastro joined
grondilu what are the Set operators? 08:09
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…
..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:14 anuby left 08:15 anuby joined
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…
..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…
grondilu rn: say Set(1, 2).list;
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…
..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…
grondilu rn: say Set.new({1, 2}).list;
p6eval niecza v24-5-g599cbcb: OUTPUT«Block()<instance>␤»
..rakudo 53daef: OUTPUT«␤»
grondilu damn
rn: say Set.new(1, 2).list;
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«1 2␤» 08:17
cedrvint hello #perl6 08:24
moritz \o cedrvint 08:25
cedrvint o/ moritz
grondilu I think this is a good example of perl6 being to slow for rosalind. gist.github.com/4231872, rosalind.info/problems/seto/ 08:46
moritz nr: 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:␤------> my Set $N .= new: |(1 .. my ⏏$n = @data.shift.Int);␤␤Unhandled exception: Cannot parse number: Land der Berge, Land am Strome,␤ at /home/p6eval/niec…
..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␤␤»…
grondilu rn: 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}␤»
..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:␤ $n is declared but not used at /tmp/OslvbgIQbM line 5:␤------> my Set $N .= new: |(1 .. my ⏏$n = @data.shift.Int);␤␤Unhandled exception: Unable to resolve method Capture in type Range␤ at /tmp/OslvbgIQbM line 5 …
grondilu rn: 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}␤»
..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…
grondilu rn: 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}␤»
grondilu here you go
and this is way too slow with larger sets
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:53
moritz why not use the Set operations directly? 08:55
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;
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␤»
grondilu r: say Set.new(1, 2) + Set.new(1, 3); 08:57
p6eval rakudo 53daef: OUTPUT«4␤»
grondilu what are the Set operations?
r: say Set.new(1, 2).union: Set.new(1, 3);
p6eval rakudo 53daef: OUTPUT«No such method 'union' for invocant of type 'Set'␤ in block at /tmp/ZOduL8ktIx:1␤␤»
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 09:03 erkan joined, erkan left, erkan joined
moritz grondilu: see the specification 09:05
I don't know them by heart
r: say Set.^methods(:local)
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␤»
moritz r: say Set.^methods
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␤»
diakopter n: say &1\[0] 09:08
p6eval niecza v24-5-g599cbcb: OUTPUT«Any()␤»
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␤»
timotimo moritz: typo in your advent blogpost: "You saw who easily" in the summary section 09:17
moritz timotimo: not my post :-) 09:23
but I've fixed it anyway, thanks
timotimo oh, yeah, yours was yesterday wasn't it? 09:24
moritz yes
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:25
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:27
09:28 kurahaupo joined
diakopter moritz: typo in Day 6: detecing 09:29
09:29 wamba left
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';
if you changed that, it didn't reach my browser yet 09:30
ah yes, now it's wrapped and looks good. thanks!
09:33 kivutar joined
diakopter moritz: grammaro in Day 2: predecessors needs an apostrophe 09:42
09:44 daxim joined
Timbus "Anonymous functions for great good" heh. is that from the learnyouahaskell book? bonus will be happy to see that 09:44
09:51 kresike joined
kresike hello all you happy perl6 people 09:51
diakopter moritz: also s/aside/alongside/
moritz diakopter: both fixed, takk 09:52
09:53 fhelmberger joined, GlitchMr left
diakopter hee. "Perl 6 has never been this much fun to use." 09:53
maybe a little less ambiguous to s/this/so/ 09:54
I mean, it's obvious already from context
just if you're skimming quickly can possibly misread 09:55
eh, no worries
moritz: re parrot threads, which nqp branch works with them 09:56
I want to write a sigsegv test 09:57
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
tadzik er, looking at modules.perl6.org/ 10:00
Rakudo::Debugger could use some more fancy description, perhaps :) 10:01
jnthn I wonder who wrote that? :)
tadzik: We could make the description say "A debugger for Rakudo", then use the "You don't say?" rage face as its icon :P
tadzik :D 10:02
yes!
moritz you could add "interactive"
jnthn Good idea :)
sorear You're calling this thing a debugger for Rakudo 10:03
but AFAICT it cannot be used to debug Rakudo
jnthn sorear: Uh. WAT. 10:05
sorear: I don't think that reading is very likely.
"I have Rakudo. This is a debugger that goes along with it." 10:06
sorear was trying for humor 10:07
jnthn Oh. :P
Well, not enough coffee yet today for me to get that :P
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.
masak g'antenoon, #perl6
jnthn That would actually be pretty cool... 10:09
lol its masak
diakopter well, fresh parrot checkout fails on Configure 10:10
step auto::gcc died during execution: Linker failed 10:11
(I don't have gcc..?)
oh, hm, I guess just a warning
who wants to help me make that PIR 10:12
jnthn
.oO( intention beset by PIR )
10:13
moritz \o masak
masak: diakopter had some notes on possible grammar improvements in your last advent calendar post 10:14
masak: I'll leave that to you
diakopter masak: nm on that..
masak well, I'm going to backlog anyway. 10:15
diakopter masak: oh noes! 10:17
masak jnthn++ # o/⁵\o
sorear o/ masak 10:20
masak sees "predecessors’" and corrects it to be "predecessors'" :)
successive improvements :)
sorear: greetings, earthling.
diakopter wait eh 10:21
masak .u ’' 10:22
diakopter should be predecessor's
phenny U+2019 RIGHT SINGLE QUOTATION MARK (’)
U+0027 APOSTROPHE (')
diakopter oh well I guess plural is okay too
masak diakopter: fixed it to "predecessor's"
diakopter perl or perls 10:23
or even other languages too collectively
masak does any other language do the equivalent of @_ and shift? 10:24
sh, I guess.
False does somthing similar in spirit, too.
moritz what about TCL?
arnsholt I think shell script essentially works like that 10:25
diakopter rn: say 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 3 10:26
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«2 3␤»
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
diakopter rn: say 5 ZZZZZZZZZZZZZZZZZZZZZXZXXXZXZXXZXZZZXZXZXXXXXZXXZXXZXXZ 7 10:29
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«5 7␤»
jnthn I once thought we could implement diakopter mode by looking at ratio of \w to \W, but this one fails that test...
diakopter rn: sub infix:<XXXX>($a, $b) { $a;$b; 77 }; say 6 XXXXX 8 10:32
p6eval rakudo 53daef: OUTPUT«===SORRY!===␤Confused␤at /tmp/RLYzkglLR7:1␤------> fix:<XXXX>($a, $b) { $a;$b; 77 }; say 6 ⏏XXXXX 8␤»
..niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤Whitespace is required between alphanumeric tokens at /tmp/QARvdi6kxi line 1:␤------> <XXXX>($a, $b) { $a;$b; 77 }; say 6 XXXX⏏X 8␤␤Undeclared name:␤ 'X' used at line 1␤␤Unhandled exception: Check failed␤␤ …
diakopter ooo rakudo is colory
10:32 lrnperl6 joined 10:33 wamba joined, gootle left, anuby left
masak yeah. jnthn++ 10:34
diakopter so XXXX doesn't backtrack to get XXXXX
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
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«77␤»
diakopter o_O
jnthn Yeah, it backtracks in very few places.
moritz though some meta-ops do backtrack
jnthn Reduction meta-ops are one place it does, iirc.
'cus of the array composer pun I guess.
10:36 sivoais joined 10:37 lrnperl6 left
diakopter rn: sub postfix:<+>($a) { $a; 77 }; say +6+ +8+ 10:38
10:38 lrnperl6 joined
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«154␤» 10:38
masak \o/
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+
p6eval rakudo 53daef: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, …
..niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤You may only use *one* signature at /tmp/yO4FXtM1g2 line 1:␤------> postfix:<+>($a) is looser:('infix:<+>') ⏏{ $a; 77 }; say +6+ +8+␤␤Unable to resolve method ctxzyg in type Bool at /tmp/yO4FXtM1g2 line 1:␤…
jnthn masak: too much cowb^Wcolon 10:40
masak hm. appears I have the syntax wrong.
oh.
jnthn Also
&infix:<+>
Not string names :P
masak rn: sub postfix:<+>($a) is looser('&infix:<+>') { $a; 77 }; say +6+ +8+
oh!
p6eval rakudo 53daef: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, …
..niecza v24-5-g599cbcb: OUTPUT«154␤»
masak rn: sub postfix:<+>($a) is looser(&infix:<+>) { $a; 77 }; say +6+ +8+
p6eval rakudo 53daef: OUTPUT«83␤»
..niecza v24-5-g599cbcb: OUTPUT«77␤»
masak hah!
diakopter :D
masak wins
masak submits rakudobug 10:41
hm, wait.
no, Rakudo has this right.
(+6+ +8)+
10:42 lrnperl6 left
masak unless, hm. 10:42
moritz should be 77
masak the + after the 6.
is it *always* an infix?
er, postfix?
jnthn I'd think so
masak then Niecza is right.
moritz in case of no spaces, postfix wins over infix
jnthn How so?
6+ trigers the postfix 10:43
masak so does 8+
jnthn So we get 77
masak oh, I see what you mean.
yeah, Rakudo is right.
jnthn Numify it, still 77
We look for an infix next
masak submits nieczue
jnthn grr, this is hard to think about :P
moritz still isn't convinced
how is this beast parsed? 10:44
masak grins
moritz ((+6)+ + (+8))+
jnthn Well, I can see what's going on easy enough up to the final postfix.
moritz that's how I'd expect it
10:44 telex joined
moritz and I guess that niecza does it that way 10:44
masak right.
and gets 77.
moritz since the final postfix is looser than the infix, I'd argue that's correct 10:45
masak I can get behind that.
so, rakudobug.
diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6+ +8^^^
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«83␤»
diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6^^^ +8^^^
p6eval rakudo 53daef: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<^^^>' called (line 1)␤»
..niecza v24-5-g599cbcb: OUTPUT«77␤»
diakopter erm
jnthn ... 10:46
masak o.O
masak submits rakudobug
grondilu rn: my @ = (1 .. *).pick(10_000).join(':');
jnthn wonders whose gonna fix these :P
jnthn looks at Pm :D 10:47
p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
..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␤␤»
grondilu rn: my @ = (1 .. *).join(':');
masak hehehe, "NYI" :P
jnthn EXPR is a scary place :)]
p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
..rakudo 53daef: ( no output )
masak you can't have a uniform distribution over an infinite list.
grondilu rn: my @ = (1 .. *)[^10000].join(':');
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«(timeout)» 10:48
grondilu jeez, that's too slow
diakopter hee
grondilu it's actually just the parsing that makes perl6 too slow for rosalind.info/problems/seto/ 10:49
rn: my @ = (1 .. *)[^100].join(':');
p6eval rakudo 53daef, niecza v24-5-g599cbcb: ( no output ) 10:50
sorear we could use a universal distribution :D
grondilu ?
masak moritz: no, (((+6)+) + 8)+
there are only two pluses between the 6 and the 8.
so the second one must be an infix. 10:51
moritz right 10:52
but still,the result should be 77 10:53
masak aye.
just pointing this out for the bug report :)
diakopter rn: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6 ^^^8^^^ 10:55
p6eval rakudo 53daef: OUTPUT«Nil␤»
..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:56 kurahaupo left
diakopter n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say 8^^^+9 10:58
p6eval niecza v24-5-g599cbcb: OUTPUT«77␤»
diakopter where'd the 9 go 10:59
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
p6eval niecza v24-5-g599cbcb: OUTPUT«77␤True␤»
11:01 wamba left
diakopter dunno 11:01
n: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say(say 8^^^-9) 11:02
p6eval niecza v24-5-g599cbcb: OUTPUT«77␤True␤»
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:05 leont joined, Su-Shee_ joined 11:14 wamba joined 11:20 xenoterracide left, xenoterracide joined 11:22 bowtie joined 11:32 Su-Shee_ is now known as Su-Shee 11:33 grondilu left 11:37 tokuhiro_ joined 11:38 dj_rod joined
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...
moritz that is, one meeting in seven days, not one per day :-)
masak moritz: :) 11:40
dj_rod hey.. looking for Australlian connection 11:41
moritz dj_rod: try telnet www.gov.au 80 # straight connection to Australia 11:43
... or be more specific what kind of connection you're looking for, and how it relates to Perl 6 11:44
dj_rod personal connection.. order in AUS 11:45
moritz dj_rod: I think you're off topic here 11:48
dj_rod yaa im off topic..
12:09 Su-Shee left 12:10 Su-Shee joined 12:12 fhelmberger left, fhelmberger joined 12:27 rindolf joined, grondilu joined
dalek pan style="color: #395be5">perl6-examples: 343cb99 | (L. Grondin)++ | parsers/Newick.pm:
[parsers] Newick tree format (used in bioinformatics)
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
Ulti grondilu hi5 for bioinformatics .o/ 12:50
leont .o/ 12:51
Ulti both left hanging... 12:54
also newick sucks as a format 12:55
for big trees anyway
grondilu well, there was only one grammar in perl6-examples/parsers/, I thought this was too bad. The more parsers, the better imho. 12:56
13:03 rindolf left, rindolf joined
leont thinks all tree formats suck in their own ways 13:08
13:09 Kharec_ joined, Kharec_ left 13:10 rindolf left, rindolf joined 13:12 Kharec left
leont And more than that, I hate how there seem to be about as many bioinformatics formats as bioinformaticians 13:13
13:14 mtk joined 13:17 dj_rod left
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:28
*bioinfomatician *rosalind 13:29
danned typos
leont It's simple and elegant, but conceptually wrong in most cases 13:30
Most trees out there aren't rooted 13:31
It's basically using a directed graph for data that isn't directed 13:32
grondilu aren't philogenic trees directed?
leont Ideally, yes
But there is raw data, and there is "I think the directions are like this" 13:33
Biologically, they are absolutely directed (unless you're dealing with horizontal gene transfer or some such) 13:34
13:37 gootle joined
cedrvint rn: ('A' ... 'a').say 13:40
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
..rakudo 53daef: OUTPUT«(timeout)»
cedrvint it seems rakudo loops forever in this case.
13:41 GlitchMr joined
cedrvint according to rosettacode.org/wiki/Calendar_-_for...ers#Perl_6 it is a regression 13:43
r: ["\0"..."~"].say
p6eval rakudo 53daef: OUTPUT«(timeout)» 13:44
13:44 kaleem left
moritz r: ["\0"..."~"][^10].say 13:48
r: ["\0"..."~"][^10].say
p6eval rakudo 53daef: OUTPUT«(timeout)» 13:49
13:50 SamuraiJack left 13:51 pecastro left 13:57 Kharec joined 14:04 wamba left 14:12 PacoAir joined 14:20 kaare_ joined, fhelmberger left 14:29 skids joined
sirrobert quit 14:31
14:31 sirrobert left 14:35 gootle left 14:38 atrodo joined 14:42 erkan left, atrodo left, erkan joined, erkan left, erkan joined 14:49 atrodo joined 14:58 bluescreen10 joined 15:03 sweet_kid joined 15:09 rurban_ joined 15:10 tokuhiro_ left, Kharec left 15:11 xinming_ joined 15:14 xinming left 15:16 stopbit joined
moritz wow, on my new workstation rakudo parses its setting in ~67s 15:16
that's nearly a factor 2 faster than the next fastest machine I have access to 15:17
15:21 rurban_ left
moritz t/spec/S32-io/IO-Socket-INET.rakudo also fails test 9 for me 15:21
we already have a ticket for it 15:25
dalek ast: ed49c88 | moritz++ | S32-io/IO-Socket-INET.t:
re-fudge failing socket test
moritz so I'm fudging the test for now
15:28 benabik left 15:30 bluescreen10 left 15:32 hash_table joined 15:36 erkan left 15:37 rurban_ joined 15:38 erkan joined, erkan left, erkan joined, wamba joined 15:42 bluescreen10 joined 15:45 wamba left 15:50 rurban_ left 16:11 xinming joined 16:14 benabik joined 16:15 xinming_ left 16:16 kivutar left 16:19 atrodo left, atrodo joined 16:20 rurban_ joined 16:22 daxim left 16:31 kaleem joined, rurban_ left
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␤»
..rakudo 53daef: OUTPUT«「foo」␤␤␤»
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␤»
..rakudo 53daef: OUTPUT«「foo」␤␤␤»
grondilu rn: say "foo7" ~~ / <.alpha>+<digit>? /; say $/<digit> // "no digit";
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)>␤»
..rakudo 53daef: OUTPUT«「foo7」␤ digit => 「7」␤␤「7」␤␤»
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)>␤»
..rakudo 53daef: OUTPUT«「foo7」␤ digit => 「7」␤␤「7」␤␤»
grondilu rn: "foo7" ~~ / <.alpha>+<digit>? /; say $/.<digit> // "no digit";
p6eval rakudo 53daef: OUTPUT«「7」␤␤»
..niecza v24-5-g599cbcb: OUTPUT«#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
grondilu rn: "foo7" ~~ / <.alpha>+<digit>? /; say $/{"digit"} // "no digit";
p6eval rakudo 53daef: OUTPUT«「7」␤␤»
..niecza v24-5-g599cbcb: OUTPUT«#<match from(3) to(4) text(7) pos([].list) named({}.hash)>␤»
grondilu rn: "foo" ~~ / <.alpha>+<digit>? /; say $/.<digit> // "no digit"; 16:41
p6eval niecza v24-5-g599cbcb: OUTPUT«no digit␤»
..rakudo 53daef: OUTPUT«␤»
grondilu rn: "foo" ~~ / <.alpha>+<digit>? /; print $/<digit> // "no digit";
p6eval rakudo 53daef: ( no output )
..niecza v24-5-g599cbcb: OUTPUT«no digit»
kresike bye folks 16:44
16:44 kresike left
grondilu r: say .<digit> // "no digit" given "foo" ~~ / <.alpha>+ <digit>? /; 16:45
p6eval rakudo 53daef: OUTPUT«␤»
grondilu r: print .<digit>.perl given "foo" ~~ / <.alpha>+ <digit>? /; 16:46
p6eval rakudo 53daef: OUTPUT«()»
grondilu r: print () // "bummer"
p6eval rakudo 53daef: ( no output )
grondilu rn: print () // "bummer"
p6eval rakudo 53daef, niecza v24-5-g599cbcb: ( no output )
grondilu rn: print () || "bummer" 16:47
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT«bummer»
grondilu r: say .<digit> || "digit" given "foo" ~~ / <.alpha>+ <digit>? /;
p6eval rakudo 53daef: OUTPUT«digit␤»
grondilu r: say .<digit> || "no digit" given "foo0" ~~ / <.alpha>+ <digit>? /;
p6eval rakudo 53daef: OUTPUT«「0」␤␤»
16:47 Khisanth joined
grondilu I'm afraid I still don't get the difference between '||' and '//' 16:51
:/
moritz r: say 0 // 42; 16:52
p6eval rakudo 53daef: OUTPUT«0␤»
moritz r: say Int // 42;
p6eval rakudo 53daef: OUTPUT«42␤»
moritz grondilu: that's the difference
grondilu r: say 0 || 42 16:53
p6eval rakudo 53daef: OUTPUT«42␤»
grondilu r: say "0" || "42"
p6eval rakudo 53daef: OUTPUT«42␤»
grondilu r: my %h; say %h<foo> // "bar"; 16:54
p6eval rakudo 53daef: OUTPUT«bar␤»
grondilu ok but then why : 16:55
r: say .<digit> // "no digit" given "foo" ~~ / <.alpha>+ <digit>? /;
p6eval rakudo 53daef: OUTPUT«␤»
grondilu do not output "no digit"?
benabik Because .<digit> is an empty string instead of undefined? 16:56
16:57 kaleem left
grondilu r: say .<digit>.perl given "foo" ~~ / <.alpha>+ <digit>? /; 16:57
p6eval rakudo 53daef: OUTPUT«()␤»
grondilu hum yeah it's an empty list, not an undefined one 16:58
I just can't get my mind to remember this all
benabik Oh, yeah. Quantifiers return lists.
grondilu r: say .<beer> // "no beer" given "foo" ~~ / <.alpha>+ <digit>? /; 16:59
p6eval rakudo 53daef: OUTPUT«no beer␤»
grondilu oh yeah, and here 'beer' is not a key to the hash, so // returns the rhs
makes sense
17:06 pecastro joined 17:11 xinming_ joined 17:15 xinming left
TimToady except that ? is supposed to return undef in that situation 17:17
that it returns () is a known specrot in rakudo
the result of the silly designers of Perl 6 changing their mind more than once on the subject :) 17:18
17:18 birdwindupbird left 17:19 cognominal left 17:20 MayDaniel joined 17:22 benabik left
Woodi hallo today :) 17:24
could someone translate to me that 'given' usage not looking like switch pls ? 17:25
17:27 pecastro left
moritz doesn't understand the question 17:27
17:27 Chillance joined
Woodi FROGGS_: I like proposed debianish-like modules TUI :) too thinked it is noisy but compared to cpan> instal module it isn't... 17:27
it is: say something given something_other 17:28
is it like say sth if sth3 ?
geekosaur I think given just localizes and sets $_ to the result of something_other? 17:29
TimToady no, it just sets $_ for the LHS
geekosaur maybe not localizes
Woodi not look like proper switch :) given $a { when 'a': { say 'a' } }
r: say $_ given 'a'; 17:30
p6eval rakudo 53daef: OUTPUT«a␤»
moritz Woodi: 'when' can be used outside of switch statements. That's why it's not called 'switch' 17:31
17:32 SmokeMachine joined, SmokeMac_ left, SmokeMac_ joined
Woodi moritz: can you get example of 'when' out of switch ? 17:33
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␤»
Woodi o, nice :) 17:36
TimToady or in list comprehensions
17:36 SmokeMachine left
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␤»
moritz Woodi: you even had one yourself 17:38
r: say $_ given 'a';
p6eval rakudo 53daef: OUTPUT«a␤»
moritz no switching here
TimToady yes, setting and using the topic are orthogonal in p6 17:39
Woodi with my current knowledge this do not contain textual 'when' :)
TimToady given just sets the topic, and doesn't care what you do with it
when just pattern matches on the topic, and doesn't care how it was set
it just so happens that the combination of given/when looks a lot like a switch statement 17:40
17:43 benabik joined
Woodi so given sets $_ and when check it value ? 17:44
moritz erm, sorry, I misread 17:45
yes
TimToady specifically, when does smartmatching, using the argument to when as the pattern
17:46 pecastro joined 17:47 sizz joined
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:48
it's really more like: if PATTERN.ACCEPTS($_) 17:49
nr: $_ = 70; say /7/.ACCEPTS($_) 17:50
p6eval rakudo 53daef: OUTPUT«「7」␤␤»
..niecza v24-5-g599cbcb: OUTPUT«#<match from(0) to(1) text(7) pos([].list) named({}.hash)>␤»
moritz sorear: IMHO Match.gist should not print the pos([].list) named({}.hash) when there are no captures 17:51
it's quite distracting, and .gist is meant for humans after all
TimToady I like rakudo's output there :) 17:52
Woodi so Perl6 have pattern matching mechanism like described in en.wikipedia.org/wiki/Pattern_matching ? or it is extension to regex matching ?
TimToady you can look at it either way 17:54
however, it's still closer to regex in flavor, insofar as no tokener is assumed
in fact, Perl 6 writes a tokener for you sekritly 17:55
17:56 rurban_ joined
TimToady note, the FP folks use "Pattern Matching" to mean something more like signature binding, as in rosettacode.org/wiki/Pattern_matching#Perl_6 17:57
Woodi of course perl6 have signature binding too, yes ? :) 18:00
TimToady of course :) 18:01
Woodi TimToady: something usefull left to integrate ? :) 18:03
TimToady we're still thinking about logic programming
not to mention multithreading
18:04 SamuraiJack joined
moritz and IO 18:04
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␤»
TimToady well, not exactly temporization, more like lexical, insofar as 'given 1 {}' really means more like 'given 1 -> $_ {}' 18:08
but yeah, loosely speaking 18:09
skids Would it be fair to call it the item form of "for" or does the phaser behavior in the block differ? 18:11
18:12 xinming joined
TimToady the binding differs slightly, insofar as 'for' cares about partial binding 18:12
so it can take the list N-at-a-time
I don't remember if we specced given to take phasers like a loop 18:13
nr: given 1 { last }
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␤␤»
..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…
TimToady if so, nobody implements it :)
I think it would violate POLS anyway 18:14
PerlJam indeed
(I was just thinking "what?!?, that's crazy" :-)
18:15 xinming_ left
TimToady most over-aggressive unifications have that effect 18:15
18:16 xinming left
TimToady (see most FP languages for examples :) 18:17
18:18 xinming joined
Woodi moritz: what is a problem with IO ? it is lack of spec or VM introduces intermediate problems or ... ? 18:18
TimToady yes 18:19
Perl 6 always tries to turn your ORs into ANDs... :)
Woodi I understand if something is problematic it is such becouse it is complex :) 18:21
dalek rl6-roast-data: c1ad88a | coke++ | / (3 files):
today (automated commit)
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 :)
I just belive in making problems clear helps :) 18:23
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"
Woodi why we can't have C like IO API ? with buffering in VM as in v5
flussence
.oO( I want an IO pony )
18:26
Woodi and make Win a special case :)
moritz Woodi: who says we can't?
TimToady we can have a C api, but it'll only work with buf8, since that's all C knows about really
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 ?
TimToady and really, it's the Unix IO api, not C
PerlJam Woodi: humans
TimToady that's why the default IO api assumes text (Unicode), not bytes 18:29
fershure, we need the lowlevel api too 18:30
Woodi humans means keyboard and tcp ?
TimToady and the stuff coming in the pipeline from some other process
and there's more than a few text files on the disk, now that I think of it... 18:31
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 ?
moritz Woodi: hardware just uses bytes 18:33
TimToady hardware doesn't use C types; C uses hardware types :)
moritz and serialization is there; it's called &pack in its most general form
dalek pan style="color: #395be5">perl6-examples: 5a73069 | (L. Grondin)++ | rosalind/indc-grondilu.pl:
[rosalind] INDC
Woodi so where is problem ? :) 18:34
18:34 SSC joined
TimToady we're trying to hang things on the correct peg these days, and pack is usually the wrong peg 18:34
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:35
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 18:38 SSC left
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:39
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
18:40 fhelmberger joined
FROGGS_ Woodi: thanks :o) 18:40
TimToady "I am a computer, and you should serve my best interests."
leont Sounds rather feline :-p 18:41
TimToady "Careful, I byte!"
dalek pan style="color: #395be5">perl6-examples: d0ab6d5 | (L. Grondin)++ | rosalind/indc-grondilu.pl:
[rosalind] INDC (shorter)
18:42
18:42 SSC_ left 18:45 kcwu joined 18:48 pecastro left 18:49 pecastro joined
dalek pan style="color: #395be5">perl6-examples: 0714dda | (L. Grondin)++ | rosalind/ini1-grondilu.pl:
[rosalind] INI1 (python wrapping)
18:49
grondilu ^ have look at this one guys, it's funny 18:50
18:57 fhelmberger left 19:02 benabik_ joined, benabik left, benabik_ is now known as benabik 19:04 ruoso joined 19:09 kivutar joined
GlitchMr hahahalol 19:10
But why say?
Why not simply shell
shell 'python -c "import this"'
flussence useless use of /bin/sh 19:11
GlitchMr run then
flussence that's better :)
GlitchMr I'm sure I've added it some time ago
run 'python', '-c', 'import this 19:12
'
oops
run 'python', '-c', 'import this'
grondilu r: shell 'echo "hello"'
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␤␤»
grondilu did not know about 'shell'
flussence (speaking of which, why/how do we have run() but not fork() or runinstead()?)
GlitchMr But why bother with Python lessons? 19:13
Especially if first one depends on Zen of Python.
flussence: Because nobody has implemented runinstead...
I've implemented run() just because I needed it for my program. 19:14
flussence oh that's interesting, parrot has a builtin for that... 19:15
19:15 xinming_ joined
GlitchMr If you want, implement those. I just implemented run() because I wanted to use it. 19:15
19:16 quester joined
flussence I may end up doing so... my code's slowly spiralling toward insanity for lack of them 19:17
19:18 xinming left
GlitchMr perl6advent.wordpress.com/2012/12/0...d-strings/ 19:20
Seriously? Trying to use base 64 on strings? 19:21
Why?
Base64 is for binary data.
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.
IIRC, base64 is for "non-ASCII" data. 19:23
GlitchMr Yes, except "\x100" doesn't have any encoding specified
It could be UTF-8, UTF-16, UTF-32, MagicalEncoding3000 and more 19:24
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
19:25 SamuraiJack left
GlitchMr Or even ISO-8859-13. 19:25
doy yeah, extending that argument to perl 5 doesn't make a lot of sense 19:26
the internal encoding of perl 5 strings is entirely an implementation detail
GlitchMr Internal encoding is something you shouldn't care about
I know it's either ISO-8859-1 or UTF-8, but it doesn't really matter.
If your program actually depends on that, it's broken.
doy right 19:27
moritz (or it might be, whatitsname, EBDIC or so)
GlitchMr Oh right
I've forgot EBCDIC and EBCDIC-UTF
UTC-EBCDIC* 19:28
Woodi thing Perl6 isn't just language spec
v5 was Unix tool or kind of layer which isolate from using Unix. v6 wants to be universal above everything :)
GlitchMr Because Python is obsolete. 19:29
I mean, Perl 6 will be perfect.
But seriously, Python is fine tool. But AWK was fine tool too. 19:30
Actually, I still use AWK.
arnsholt AWK is awesome! 19:31
(awksome?)
Woodi I sometimes use sed becouse it nicely mix in shell programming... but Perl replaces shell programming
GlitchMr I usually use awk for things you are using sed for 19:32
It's less ugly
tadzik arnsholt: awekward! :P
19:33 zby_home_ joined
GlitchMr For example, replace abc with def and print string only if it contained abc 19:33
In AWK, it's just
gsub(/abc/,"def")
moritz print if s/abc/def/ 19:34
GlitchMr print if s/abc/def/g;
I know
But it's still shorter.
Woodi or: sed -e'/abc/def/' | grep -i abc or something like this
sed -e's/*
GlitchMr that won't work 19:35
abc was replaced with def
Woodi I do not understand exercise then :)
err
right
so grep abc | sed* 19:36
GlitchMr That could be better
But try to convert program like this: {print $1} 19:37
grondilu damn it I've been writing $*IN.lines for ages and I only realize now that I could use just 'lines'
GlitchMr Probably -a option would help, but it's still longer
Woodi then cut -f 1 -d delimiter can be used :) 19:38
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.
And Perl is ugly.
tadzik yeah, awk is pretty ;
GlitchMr tadzik: you can remove that semicolon
AWK doesn't need semicolons 19:40
Woodi awk is hard lets do perl :)
GlitchMr Should I make "better than Perl lol" language? 19:41
leont I remember reading somewhere that O'Reilly sells more awk than tcl books 19:42
And I do have colleagues that use it quite a bit (though sometimes I consider trying to convert them to perl)
Woodi leont: imagine such freedom of choosing tools in Windows OSes :) 19:43
leont s/of choosing tools // 19:44
GlitchMr Better than Perl lol: gist.github.com/4235941 19:46
19:47 GlitchMr left
Woodi so perl5 is Unix programmable tool. Should Perl6 be "every environment" programmable tool ? 19:48
skids
.oO(sigh. 2012 already and still no decent 'lolcat' support in i18n)
19:50
Woodi GlitchMr: but you are right, I should relearn awk :) 19:55
19:55 sftp joined 19:58 ivan``_ joined 20:05 Khisanth left, leont left, sjohnson left, pmichaud left 20:06 atrodo_ joined 20:08 atrodo left, atrodo_ is now known as atrodo 20:11 Khisanth joined, leont joined, imarcusthis joined, colomon joined, wooden joined, rom1504 joined, ingy joined, lorn joined, sjohnson joined, pmichaud joined, Yappocall_ joined, masak joined, bakedb_ joined, simcop2387 joined, TimToady joined 20:12 ifim joined 20:14 xinming joined 20:18 xinming_ left, SmokeMac_ left
grondilu rn: sub foo($_) { .fmt: "%10s" }; print foo "bar"; 20:29
p6eval rakudo 53daef, niecza v24-5-g599cbcb: OUTPUT« bar»
20:30 kivutar left 20:35 benabik_ joined, benabik left, benabik_ is now known as benabik 20:39 Chillance left
moritz PerlJam: how's your advent calendar post for tomorrow coming along? 20:41
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…
..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…
TimToady nr: .say for lines».words»[0]
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␤inmit…
..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…
TimToady nr: .words[0].say for lines 20:44
p6eval rakudo 53daef: OUTPUT«Land␤Land␤Land␤Heimat␤Volk,␤vielgerühmtes␤vielgerühmtes␤Nil␤Heiß␤liegst␤einem␤Hast␤hoher␤vielgeprüftes␤vielgeprüftes␤Nil␤Mutig␤frei␤arbeitsfroh␤Einig␤Vaterland,␤vielgeliebtes␤vielgeliebtes␤»
..niecza v24-5-g599cbcb: OUTPUT«Land␤Land␤Land␤Heimat␤Volk,␤vielgerühmtes␤vielgerühmtes␤Any()␤Heiß␤liegst␤einem␤Hast␤hoher␤vielgeprüftes␤vielgeprüftes␤Any()␤Mutig␤frei␤arbeitsfroh␤Einig␤Vaterland,␤vielgeliebtes␤vielgeliebtes␤»
grondilu what's all this?
TimToady {print $1}
of course, with a -p switch, it's just .words[0] 20:46
moritz $_=.words[0] I think
TimToady right
benabik .=words[0] ? Or does that not work? 20:47
20:47 kurahaupo joined
TimToady .=words.=[0] :) 20:47
20:47 kurahaupo left
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'
but I suspect an explicit loop would be better; -n and -p are rather low-wattage features 20:49
using settings to implement those is like using a sledgehammer to swat flies 20:53
dalek pan style="color: #395be5">perl6-examples: 8805265 | grondilu++ | rosalind/tran-grondilu.pl:
Update rosalind/tran-grondilu.pl

no need for $*IN
20:57
21:00 zby_home_ left 21:10 wamba joined 21:16 quester left 21:32 cognominal joined 21:48 spider-mario joined 21:49 spider-mario left 21:50 spider-mario joined 21:54 rurban_ left 21:57 hash_table left 22:01 benabik left 22:07 PacoAir left 22:08 skids left
FROGGS_ .u 北亰 22:11
phenny U+5317 CJK UNIFIED IDEOGRAPH-5317 (北)
U+4EB0 CJK UNIFIED IDEOGRAPH-4EB0 (亰)
sorear beijing
FROGGS_ right you are
22:16 cooper_ left, cooper_ joined 22:19 spider-mario left, cooper_ is now known as cooper 22:24 fgomez left, kaare_ left 22:25 cognominal left 22:28 cognominal joined
jnthn evening o/ 22:34
sorear o/ jnthn 22:35
22:37 quester joined
jnthn now has a raspberry pi 22:38
$dayjob++
22:40 MayDaniel left 22:41 wamba left 22:42 fgomez joined 22:48 bluescreen10 left
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␤»
..niecza v24-5-g599cbcb: OUTPUT«Any()␤»
22:50 MayDaniel joined 22:54 MayDaniel left, hash_table joined 22:56 cognominal left, MayDaniel joined 22:57 fgomez left 22:59 MayDaniel left
masak yeah, $boss's Christmas gift to each of us this year: a raspberry pi. 23:00
(we're hiring. we're explicitly looking for excellence.)
23:02 rurban_ joined 23:03 hash_table left
jnthn
.oO( But will it run Rakudo? )
23:05
23:09 benabik joined
Woodi if it run debian -> it run perl5 -> it can run perl6 :) 23:09
masak I wish that chain of inferences were more true. 23:10
Woodi but why they plug HD video but just 300MHz P2 cpu ? :)
it isn't ? 23:11
debian is default on pi, precompiled rakudo should run me think... 23:12
Krunch masak: what are you hiring for? 23:16
(apart from "excellence")
masak Krunch: people who will either consult with companies, or build/deliver courses. 23:20
Krunch: we're based in southern Sweden. it's a help but not a strict requirement if you're willing to move there.
jnthn ooh, almost 40,000 points! 23:21
er, ww
sorear o/ masak
diakopter O_O
sorear is, sadly, not anywhere near southern Sweden
23:22 stopbit left
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
sorear: we're going to sap black holes of their energy, and design Perl 7.
jnthn masak: Doesn't that mean Perl 7 will be made of suck? :P 23:24
Krunch "build/deliver courses" about...Perl?
sorear seems to be a lot of C# lately 23:25
jnthn heh, that's just me :P
masak sorear: jnthn takes the C# bits.
Krunch Perl.NET
masak Krunch: I've delivered Perl 5 courses.
jnthn Quite a lot of Git at the moment also.
masak aye.
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?
:)
sorear I think when you hire masak and jnthn at the same company, Perl 6 is inevitable.
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
but the learnings from Perl 6 definitely pay our salary in various ways, yes.
23:28 fgomez joined 23:31 rurban_ left 23:36 whiteknight joined 23:41 sftp left 23:42 fgomez left 23:47 armitage81 joined, armitage81 left, armitage81 joined 23:56 skids joined
Woodi hey, just found nice thing from y2005 :) discuss.joelonsoftware.com/default....l.3.219431 23:57
masak yeah, seen that one before. :) 23:58
jnthn 'night o/ 23:59