»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:03 risou is now known as risou_awy 00:15 toebu joined 00:22 packetknife joined 00:24 tokuhirom left 00:25 whiteknight joined 00:26 whiteknight is now known as Guest3133 00:28 toebu left 00:29 replore joined 00:38 hundskatt left 00:53 am0c joined 00:55 Radvendii joined 01:04 toebu joined 01:06 abercrombie left 01:07 abercrombie joined
Radvendii i LOVE perl6s integration of unicode :D no more annoying 0x342Fs :D 01:25
what happened to .uc? 01:27
b: say <a,b,c>».uc;
p6eval b 1b7dd1: OUTPUT«A,B,C␤»
Radvendii oh
huh. 01:28
01:29 am0c left
Radvendii question though: what happened to `command` executing a command in the command line? how do i do that now? 01:30
b: "ls".exec 01:31
p6eval b 1b7dd1: OUTPUT«Method 'exec' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/wHi4N5uTBE␤»
Radvendii b: `ls`
p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Confused at line 22, near "`ls`"␤»
Radvendii anyone? 01:35
b: q:x[ls] 01:38
p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Colons may not be used to delimit quoting constructs at line 22, near ":x[ls]"␤»
Radvendii b: qx[ls]
p6eval b 1b7dd1: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/kXDkKbmO4G␤ in main program body at line 1:/tmp/kXDkKbmO4G␤» 01:39
Radvendii never mind. i figured it out 01:40
01:42 shinobicl_ joined 01:44 plutoid joined
shinobicl_ rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say "AAA" !== "BBB" ?? "Distinct" !! "Same" ; 01:45
p6eval rakudo f70f20: OUTPUT«Same␤»
dalek kudo/nom: 66edf0b | moritz++ | / (2 files):
properly handle bigish numbers in Num.floor and .ceiling
01:46
01:47 am0c joined
Radvendii huh? 01:50
what's with that output?
shinobicl_ it should say "Distinct" 01:51
Radvendii i know
htats really weird
try putting parens around the "AAA" !== "BBB" part?
rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say( ("AAA" !== "BBB") ?? "Distinct" !! "Same" ); 01:53
p6eval rakudo f70f20: OUTPUT«Same␤»
shinobicl_ rakudo: our multi infix:<**>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say "AAA" ** "BBB" ?? "Distinct" !! "Same" ;
p6eval rakudo f70f20: OUTPUT«Distinct␤»
shinobicl_ The problem is with the "!==" 01:54
Radvendii ah
rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say "AAA" &[!==] "BBB" ?? "Distinct" !! "Same" ;
p6eval rakudo f70f20: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤ in sub <anon> at src/gen/CORE.setting:8515␤ in block <anon> at /tmp/erevJSopZd:1␤ in <anon> at /tmp/erevJSopZd:1␤»
shinobicl_ somehow i can't overload it
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==]"AAA", "BBB" ?? "Distinct" !! "Same" ;
p6eval rakudo f70f20: OUTPUT«===SORRY!===␤Confused at line 1, near "say &[!==]"␤»
Radvendii what's the syntax?
rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==]( "AAA", "BBB") ?? "Distinct" !! "Same" ; 01:55
p6eval rakudo f70f20: OUTPUT«Distinct␤»
Radvendii there we go
rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==] === *!==*;
p6eval rakudo f70f20: OUTPUT«WhateverCode.new()␤»
Radvendii how do we tell if two things are just references to the same thing? 01:56
rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==] ~~ *!==*;
p6eval rakudo f70f20: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:638␤ in sub infix:<==> at src/gen/CORE.setting:2178␤ in block <anon> at /tmp/wWquJRqr44:1␤ in <anon> at /tmp/wWquJRqr…
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==] ~~ (* !== *);
p6eval rakudo f70f20: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:638␤ in sub infix:<==> at src/gen/CORE.setting:2178␤ in whatevercode <anon> at /tmp/EmYYfHb0yc:1␤ in method ACCEPTS a…
moritz Radvendii: strings are value types, so there's no difference between "the same string" and "references to the the same string"
shinobicl_ that's the error i'm having
i can't overload !== for a specific datatype. It complains about the !== needing "Numeric" 01:57
Radvendii no... if you use &[!==]($s1, $s2) as the function call it works. i think it's not parsing !== as the operator you defined 01:58
moritz it has to do with !== normally being a meta operator
shinobicl_ ohh, i see
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say &[!==]("aaa", "bbb"); 01:59
shinobicl_ and === is a metaoperator too?
p6eval rakudo f70f20: OUTPUT«Bool::True␤»
Radvendii versus
01:59 Sarten-X left
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say "aaa" !== "bbb"; 01:59
p6eval rakudo f70f20: OUTPUT«Bool::False␤»
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; (* !== *)==&[!==] ; 02:00
p6eval rakudo f70f20: ( no output )
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say (* !== *)==&[!==] ;
p6eval rakudo f70f20: OUTPUT«WhateverCode.new()␤»
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say (* !== *)==&[!==] ?? "yes" !! "no" ;
p6eval rakudo f70f20: OUTPUT«WhateverCode.new()␤»
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say ((* !== *)==&[!==]); 02:01
p6eval rakudo f70f20: OUTPUT«WhateverCode.new()␤»
Radvendii rakudo: our multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say ((* !== *)==&[!==] ?? "yes" !! "no");
p6eval rakudo f70f20: OUTPUT«WhateverCode.new()␤»
Radvendii what the hell?
whatever. im pretty sure it's not recognizing !== as the operator you defined 02:02
02:02 toebu left
TimToady why are you using "our"? 02:02
functions are lexically scoped in Perl 6
perl6: my multi infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say( ("AAA" !== "BBB") ?? "Distinct" !! "Same" ); 02:03
p6eval niecza v12-4-g8c09133: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 168 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/Niec…
..rakudo f70f20: OUTPUT«Same␤»
..pugs b927740: OUTPUT«Distinct␤»
02:03 toebu joined 02:07 Sarten-X joined 02:10 wolfman2000 joined
TimToady niecza: my multi infix:<!==>(Str $, Str $) { say "HERE" }; 'a' !== 'b' 02:19
p6eval niecza v12-4-g8c09133: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 168 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/Niec…
TimToady niecza: my sub infix:<!==>(Str $, Str $) { say "HERE" }; 'a' !== 'b'
p6eval niecza v12-4-g8c09133: OUTPUT«HERE␤»
TimToady perl6: my sub infix:<!==>(Str $s1, Str $s2) { return ($s1 ne $s2); }; say( ("AAA" !== "BBB") ?? "Distinct" !! "Same" ); 02:20
p6eval rakudo f70f20: OUTPUT«Same␤»
..pugs b927740, niecza v12-4-g8c09133: OUTPUT«Distinct␤»
TimToady LTM failure for rakudo, methinks
mind, it's bad style to override metaoperators
shinobicl_ i din't know it was a metaoperator, my fault 02:21
moritz only mentioned it half an hour ago
dalek : 53ff291 | moritz++ | misc/perl6advent-2011/topic-brainstorming:
[advent] clean up topic list a bit
02:22
shinobicl_ moritz: yes i remember :), i didn't know before that.... but is === a metaoperator too? 02:23
TimToady no
and it's only the ! that is the meta
it's ordinarly applied to == when you say !==
in += the = is a metaoperator 02:24
in X=> it's the X
shinobicl_ i thought that, if "==" is the opposite of "!=", then the opposite of "===" should be "!=="
TimToady != is just an alias to !== 02:25
shinobicl_ i fact i din't know it existed before trying to overload it
TimToady metaops don't replace characters like that though
there are currently 8 metaoperators, described in perlcabal.org/syn/S03.html#Meta_operators 02:26
02:27 orafu left
shinobicl_ "To avoid visual confusion with the !! operator, you may not modify any operator already beginning with !." 02:28
i'll use eq and ne then :)
TimToady that's what they're there for 02:29
like !=, ne is just an alias for !eq
02:29 orafu joined 02:38 shinobicl_ left 03:03 Guest3133 left 03:11 toebu left 03:26 packetknife left 03:27 kst left, kst joined 03:28 benabik joined 03:30 s1n joined
pat_js if I have a regex like /<foo>* |<bar>/ in a grammar, how can I access them in a Actions-object? 03:32
with them I refer to $<foo> and $<bar>
oh my regex is not the one I'm asking for, it's more like /[<foo>|<bar>]*/ 03:33
03:34 s1n2 joined, s1n left 03:35 shinobicl_ joined
TimToady the bits should still show up in $<foo> and $<bar> 03:36
if you'd used () instead of [], you'd need $0<foo> instead 03:37
pat_js and the order?
japhb moritz, it looks like you pushed a bump to NQP_REVISION in rakudo 66edf0b6eb , but didn't push nqp?
03:37 molaf joined 03:38 jimmy1980 left
TimToady the subparts will be in the order matched, but you can't tell the relative order between the two lists unless you look at match positions 03:38
actually, if you'd used ()*, then $0[*] would be the order, and each of those would contain either foo or bar 03:39
often if you're starting to use $0, it means you really need a named subrule though 03:40
so you'd match <foobar>*, and foobar would match foo or bar
the standard grammar uses very few numbered captures 03:41
pat_js I don't think that will work, because <foo> is, in my case a proto token and <bar> is a recursive call
TimToady I meant <foobar>* would match <foo> or <bar>, so it isn't bothered by proto or recursion 03:45
03:45 jimmy1980 joined
TimToady that's no different from (<foo>|<bar>)*, except with a named rule 03:45
shinobicl_ perl6: multi infix:<op>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 op 9) ?? "Same" !! "Distinct"; say (1 op 11) ?? "Same" !! "Distinct"; 03:47
p6eval niecza v12-4-g8c09133: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 168 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/Niec…
..pugs b927740: OUTPUT«Same␤Distinct␤»
..rakudo f70f20: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
TimToady from the outside a named rule is simply that; it's invisible to the caller whether it's calling a proto, or something recursive
shinobicl_ perl6: multi infix:<eq>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 eq 9) ?? "Same" !! "Distinct"; say (1 eq 11) ?? "Same" !! "Distinct"; 03:48
TimToady (though it does change what is returned, of course)
p6eval niecza v12-4-g8c09133: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 168 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/Niec…
..pugs b927740, rakudo f70f20: OUTPUT«Same␤Distinct␤»
japhb shinobicl_, you can /msg p6eval as well, if you want to just play around and try things without an audience
TimToady esp since niecza doesn't like the multi 03:50
shinobicl_ japhb: sorry, i just want to know something about the operator overloading... 03:55
what should it happen if i declare an operator as "multi" but has not been defined yet? 03:56
TimToady huh, my nom doesn't build
error: pathspec '2011.11-110-g29cc6d8' did not match any file(s) known to git.
03:56 donri left
TimToady shinobicl_: it should autogen a proto for you 03:57
shinobicl_ rakudo: multi infix:<eqmag>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 eqmag 9) ?? "Same" !! "Distinct"; say (1 eqmag 11) ?? "Same" !! "Distinct"; 03:58
p6eval rakudo f70f20: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
shinobicl_ rakudo: multi infix:<eq>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 eq 9) ?? "Same" !! "Distinct"; say (1 eq 11) ?? "Same" !! "Distinct";
p6eval rakudo f70f20: OUTPUT«Same␤Distinct␤»
03:59 JimmyZ joined
shinobicl_ so,, these two should return the same even if there is no a previous "eqmag" operator ? 03:59
JimmyZ Hello, TimToady 04:00
colomon nom: multi infix:<eqmag>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 eqmag 9) ?? "Same" !! "Distinct"; say (1 eqmag 11) ?? "Same" !! "Distinct";
p6eval nom f70f20: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤»
colomon std: multi infix:<eqmag>(Int $n1, Int $n2) { return ($n1.log10.floor == $n2.log10.floor); }; say (1 eqmag 9) ?? "Same" !! "Distinct"; say (1 eqmag 11) ?? "Same" !! "Distinct"; 04:01
p6eval std be1f10e: OUTPUT«ok 00:01 127m␤»
colomon shinobicl: Pretty sure you're looking at a (known) nom-bug.
shinobicl_ oh.. i see..thanks colomon!
colomon so the answer is yes, they should return the same. 04:02
04:02 s1n2 left
pat_js thanks a lot, another little question, I now got the right structure of lists, I want, but it is filled with Mu()s, is that ~$/ thing still working on Rakudo? 04:04
04:06 envi_ left 04:09 lestrrat left 04:10 lestrrat joined
pat_js ah sorry, had a typo in my method declarations 04:10
04:14 robins joined 04:20 dayangkun joined 04:23 pat_js left
sorear good * #perl6 04:25
phenny sorear: 06 Dec 21:51Z <[Coke]> tell sorear that "make spectest" should be green again; all failures that were blocking it now have tickets.
sorear colomon: in principle, it would be possible to factor out some of the ff logic into a function, but if I did that the arguments would have to be thunkified and it wouldn't save much ugliness 04:29
[Coke]: awesome 04:31
04:32 am0c left, am0c joined 04:34 JimmyZ_ joined 04:36 JimmyZ left, JimmyZ_ is now known as JimmyZ 04:37 am0c left
japhb TimToady, in case you hadn't figured it out already, moritz's most recent commit bumped NQP_REVISION, but he'd forgotten to push nqp itself. The solution is to git checkout HEAD^ , and then you should be able to build. 04:51
04:52 vlixes joined 04:59 shinobicl_ left 05:01 molaf left 05:02 dayangkun left 05:03 dayangkun joined, am0c^ joined 05:08 ponbiki joined 05:09 pat_js joined 05:11 woosley joined 05:19 dayangkun left, dayangkun joined 05:30 vlixes left 05:32 xinming joined 05:37 jimmy1980 left 05:38 ageis left, jimmy1980 joined 05:43 yake joined 05:46 yake left, Radvendii left 05:47 dayangkun left 05:54 jeffreykegler joined 05:55 jeffreykegler left
dalek p: d5649fd | moritz++ | tools/build/PARROT_REVISION:
bump parrot revision to one that has the is_inf_or_nan opcode
05:58
moritz evalbot rebuild nom
p6eval OK (started asynchronously)
moritz sorry about that 06:00
06:02 am0c joined 06:04 fridim_ left 06:15 kaleem joined 06:26 ponbiki left 06:27 am0c^ left
pat_js rakudo: sub infix:<±> ($a,$b) {($a-$b)..($a+$b)}; say 4 ± 1 06:34
p6eval rakudo f70f20: OUTPUT«===SORRY!===␤Confused at line 1, near "say 4 \x{b1} 1"␤»
pat_js that had worked a year ago, i think
perl6: sub infix:<±> ($a,$b) {($a-$b)..($a+$b)}; 4 ± 1 06:35
p6eval rakudo f70f20: OUTPUT«===SORRY!===␤Confused at line 1, near "4 \x{b1} 1"␤»
..niecza v12-4-g8c09133: ( no output )
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\177'␤decodeUTF8': bad data: '\177'␤»
moritz b: sub infix:<±> ($a,$b) {($a-$b)..($a+$b)}; say 4 ± 1
p6eval b 1b7dd1: OUTPUT«345␤»
pat_js who's b?
06:36 fridim_ joined
moritz an older rakudo version 06:36
06:36 hundskatt joined 06:41 replore left, replore_ joined
Woodi want to note that current law in Poland delegalized "mass netto +- a little" on wrappings. Maybe similiar happens in all EU countries ? New standard is "epsilon" marked with "e" on wrapping... 06:56
geekosaur hasn't that been an eu directive for a while? 07:02
07:03 wtw joined 07:15 koban joined
Woodi yes, forced here in 2009 07:20
07:22 JimmyZ left 07:28 Sarten-X left
japhb Moritz, I'm not sure if the Rakudo build is still broken, or if it's just me. 07:34
07:36 Sarten-X joined
japhb 2011.11-110 has a different checkin SHA1 than the one in NQP_REVISION 07:37
s/checkin/commit/ of course 07:38
sleep &
07:46 lestrrat left 07:47 lestrrat joined 07:51 stepnem left, mj41 joined 07:54 hundskatt left 08:04 fridim_ left 08:09 mkramer joined 08:14 jimmy1980 left 08:20 jimmy1980 joined 08:21 mkramer left 08:25 robins is now known as robinsmidsrod 08:34 mj41 left 08:38 sftp left 08:40 sftp joined 08:45 cognominal left 08:47 mj41 joined 08:59 Trashlord left 09:04 Trashlord joined 09:07 grondilu joined
grondilu perl Configure.pl --gen-nqp => 09:07
error: pathspec '2011.11-110-g29cc6d8' did not match any file(s) known to git.
Command failed (status 256): git checkout 2011.11-110-g29cc6d8
?
09:12 cognominal joined 09:13 tzhs joined 09:17 lestrrat left 09:19 lestrrat joined
dalek kudo/nom: 735d127 | moritz++ | tools/build/NQP_REVISION:
fix NQP revision, moritz--
09:23
grondilu thks :) 09:26
nom: multi sub postfix:<!> (Int $n) { $n < 2 ?? 1 !! $n*($n-1) }; say 4!;' 09:32
p6eval nom f70f20: OUTPUT«===SORRY!===␤Confused at line 1, near "say 4!;'"␤»
grondilu this is still not working :(
oops, I meant: multi sub postfix:<!> (Int $n) { [*] 1 .. $n }; say 4!;' 09:33
jnthn hmm...wonder how hard i would be to just put back the way it worked before 09:38
er, IT would be...
09:38 jimmy1980 left 09:40 GlitchMr joined 09:41 dakkar joined
jnthn maybe I get chance to try it this evening... 09:44
09:45 jimmy1980 joined 09:46 envi_ joined 09:49 toebu joined 09:51 woosley left 09:53 replore_ left 10:03 cognominal_ joined 10:07 cognominal left 10:08 tzhs left 10:12 plutoid left 10:18 grondilu left 10:21 bacek joined 10:29 cognominal_ left, cognominal_ joined 10:36 bacek left 10:53 bacek joined 10:59 toebu left
moritz hm 11:10
precompiled PIR with NaN and Inf in it seems to be broken again :/ 11:11
dalek p: aa20f03 | moritz++ | src/PAST/NQP.pir:
add nqp::isspecial_n alias for pir::is_inf_or_nan__In
11:25
11:35 serk17 joined 11:37 toebu joined, daxim joined 11:58 benabik left 11:59 toebu left 12:01 daemon left 12:04 daemon joined 12:13 mkramer joined 12:14 Patterner left 12:17 mkramer left 12:18 Psyche^ joined, Psyche^ is now known as Patterner 12:21 bluescreen10 joined
jnthn moritz: I think I woulda preferred the NQP iop the mention inf and nan in its name rather than "special" 12:32
*op
moritz jnthn: what name would you prefer?
jnthn isnanorinf would be clearer 12:37
I think it's obvious enough that it only applies to num too
moritz ok 12:38
jnthn: I'll do the rename today or tomorrow 12:39
jnthn ok, no hurry :) 12:40
12:41 packetknife joined, Trashlord left 12:42 Trashlord joined
dalek p: 987cd89 | moritz++ | src/PAST/NQP.pir:
rename nqp::isspecial_n to isnanorinf
12:44
moritz turns out I haven't pushed the usage of the nqp:: op anyway 12:46
12:49 benabik joined
jnthn aha :) 12:50
12:50 serk17 left 13:04 jimmy1980 left 13:12 mishin joined
jnthn heh...I told my students they could take a break for coffee and cake, and yet the whole class is still sat here hacking away! Developers. :) 13:19
13:26 GlitchMr left 13:27 baest joined 13:34 risou_awy is now known as risou 13:35 kaleem left
dalek kudo/nom: 7cb7f2a | moritz++ | / (2 files):
use nqp::isnanorinf op in rounders
13:36
13:38 icwiener joined
raiph %greet<en> 13:45
S06:1289 "as the flattening C<*> does" is that a fossil?
13:46 f00li5h left 13:47 shinobicl left
benabik raiph: I don't think so. It's discussing the difference between sub foo(**@bar) and sub foo(*@bar) 13:47
13:47 shinobicl joined
moritz benabik is right 13:49
benabik \o/
benabik is always unsure with spec questions, since I never read it _that_ carefully.
raiph benabik, moritz: thanks 13:51
13:54 koban left
moritz phenny: tell mberends that the timing code in Test.pm has a wee problem -- the assignment to $time_after changes the return value, which should be True for passing tests, and False for failed ones. Now it's just always a timestamp 14:01
phenny moritz: I'll pass that on when mberends is around.
14:05 kaleem joined
moritz nom: proto foo(|$) {*}; sub foo() { } 14:08
p6eval nom 7cb7f2: OUTPUT«===SORRY!===␤Illegal redeclaration of routine 'foo' at line 1, near ""␤»
14:08 Lab-7_ joined, betterworld left 14:09 betterworld joined, icwiener left, icwiener joined
dalek ast: f4e1734 | moritz++ | S (6 files):
Merge branch 'master' of git://github.com/perl6/roast
14:12
ast: 3654c37 | moritz++ | S (2 files):
simplify some tests
14:17 Lab-7_ left 14:24 zantiosx joined
PerlJam Am I imagining things or is compiling Rakudo taking even longer these days? (I'd time it myself, but I don't want to wait for the compile again :) 14:25
moritz it is rather slow 14:33
during my bigint work I've discovered that some routines in the actions are run twice
I guess it'd help if we avoided that :-) 14:34
benabik Possibly due to backtracking.
Noticed that on some toy languages I wrote with nqp.
14:35 am0c left
moritz benabik: src/Perl6/Actions.pm contains not a single regex, just tokens and rules (which shouldn't backtrack) 14:35
of course there can still be failed alternatives that aren't LTM'ed
benabik moritz: I thought rules backtracked. :-/ 14:36
14:36 jaldhar left
moritz benabik: nope 14:36
rule implies :s :ratchet
benabik huh
moritz token implies just :ratchet
S05:549-551 14:38
dalek kudo/nom: 9fd40d8 | moritz++ | src/core/Num.pm:
fix Inf.perl
14:41
PerlJam rakudo++ I had accidentally typed $:foo when I meant :$foo and the error message I got told me so! :-) 14:47
pmichaud_ ...why are we checking for nan/inf in ceil/floor? Shouldn't the ceil/floor parrot ops do this also?
raiph pmichaud: o/ 14:50
pmichaud raiph: o/ 14:51
14:52 zantiosx left
raiph moritz recently wrote ".WHICH ... does object identity comparsion (like the === operator), but caching needs object equivalence comparsion (like the eqv operator)." 14:53
14:53 kaleem left 14:54 kaleem joined
moritz pmichaud: because we can't box a NaN of Inf into an Int 14:54
pmichaud ...can't nqp::p6bigint take care of that, though? 14:55
raiph what would be the equivalent of WHICH that does deep eqv?
moritz raiph: nothing of that sort is specced
pmichaud it seems like p6bigint needs to be smart enough to handle NaN and Inf anyway 14:56
moritz pmichaud: maybe, but I'm not smart enough to do that :/
at least not efficiently
pmichaud it's in src/ops/perl6.ops, line 502 14:57
[Coke] pmichaud: o/
pmichaud basically, check for NaN/Inf there
moritz I don't think we're using that op anymore
pmichaud it's shown in the patch you just submitted
moritz but rather we use the nqp_bigint_* variants 14:58
pmichaud oh, nqp::p6bigint is mapped somewhere else now? looking
moritz oh, that's my mistake then
should be a different op
that returns an Int, not a Num for big-ish numbers
14:58 JimmyZ joined
pmichaud I look forward to seeing the updated patch :) 14:59
[Coke]: o/
afk again for a while :-/ 15:00
moritz should use nqp::fromnum_I(..., Int)
pmichaud then nqp::fromnum_I needs to be smart enough to handle NaN/Inf, I think :) 15:02
since NaN and Inf are valid num values
15:17 tzhs joined 15:28 molaf joined 15:29 wtw left 15:30 Patterner left
PerlJam The advent calendar schedule looks empty for the next 4 days. 15:31
:(
15:32 Psyche^ joined, Psyche^ is now known as Patterner
colomon is working on an emergency post 15:33
PerlJam colomon++
colomon dunno if it will be any good or not, mind you. 15:34
PerlJam colomon: what's the topic?
jnthn I may be able to do an emergency one, but could use a topic suggestion
colomon currently "Adding a Feature to Niecza"
PerlJam who's taking on the "ecosystem update" topic? 15:35
jnthn So if there's anything you'd really like to see me write on... :)
PerlJam it's not on the scheule and I don't think I've heard anyone mention it.
jnthn tadzik++ would be the logical person for that, but I think he's quite tied up with stuff at the moment
15:36 stepnem joined
colomon isn't the ecosystem update at the moment "ecosystem just barely functional"? 15:37
I'd rather push that later and fix the ecosystem in the meantime. ;)
PerlJam sure.
15:38 molaf left
colomon nom: say 14.3.ceiling 15:40
p6eval nom 9fd40d: OUTPUT«15␤»
15:50 slavik1 joined
dalek ecza: 0c3157b | coke++ | t/spectest.data:
Run this passing test.
15:51
15:54 am0c joined 15:57 mtk left 15:58 mtk joined
Util is working on a `Idiomatic Perl 6 and Perl 6 Idioms` advent post 16:00
PerlJam Util++ 16:01
Util (I am working on-site through Thu evening, and so have not committed to a posting date) 16:02
16:02 raiph left 16:03 tzhs left 16:07 Radvendii joined
tadzik jnthn: I'll be quite free after friday 16:09
jnthn tadzik: yay! 16:10
tadzik: Do you know what blocks ecosystem bootstrap still?
Just Test::Mock tests?
tadzik json tests as well, I believe
jnthn ah, I thought moritz++ had taken care of those already 16:11
tadzik oh, maybe 16:12
16:14 alester joined 16:17 kaare__ joined
PerlJam I'm refactoring ff and adding the fff variants. Does this look like a reasonable implementation? gist.github.com/1443400 16:17
(secondly to that, when I compiled it just now and attempted to test it, I keep getting complaints: Required named parameter 'x-left' not passed So, I think I might be doing something wrong (or there's a bug)) 16:18
jnthn You can't factor out callerid like that. 16:19
It'll bet the location of the infix.
*get
And not of the thing that called it.
PerlJam I figured that :) I just haven't worked out how to fix it yet.
jnthn Doesn't fff need thunking? 16:20
PerlJam also, I'm guessing there's a problem just using calledid anyway if there are multiple ff in the same scope
jnthn ?
16:21 buubot_backup left
jnthn It's global state, per program position, no? 16:21
callerid gives you unique per bytecode location, not unique per scope..
PerlJam ah, then that's good.
TimToady it's still a hack--long term ff wants to be a macro that declares its own state 16:22
all it really needs is a text macro
PerlJam sure, I just wanted to see if I could get there without macros. 16:23
jnthn TimToady: yeahbut masak++ didn't get macros far enough just yet
TimToady also, it won't work right with cloned closures, I suspect
jnthn it's global state, no?
not unique per closure? 16:24
TimToady it's supposed to work like state vars, I think
16:24 simcop2387 left
PerlJam don't rain on my "good enough" parade. we'll get a "perfect" parade when masak is doneish :) 16:24
16:25 kaleem left
TimToady admittedly this is less than specced 16:25
but the original discussion on IRC involved state vars
PerlJam anyway, I'm curious why the code I have keeps complaining about a "required 'x-left' parameter" 16:26
16:26 simcop2387 joined
PerlJam I thought you needed a ! suffix to make named params required 16:26
jnthn TimToady: Fair enough. I'm not gonna fix it in this hack version though, I'll just wait for macros to be far enough along.
TimToady no problem 16:27
jnthn ok, my teaching is done for the day. Back to hotel...and then maybe finding something spicy to deal with my sore throat... 16:28
bbl
JimmyZ wonders how about irclog.perlgeek.de/perl6/2011-12-03#i_4786939 16:29
dalek ecs: c4882a6 | larry++ | S03-operators.pod:
ff/fff use anon state vars to clone right

  jnthn++ and PerlJam++ for the alert
16:31
TimToady JimmyZ: generally, you wouldn't put cached on a function that is not pure, so it doesn't matter whether its cache is shared if the function always returns the same thing 16:32
ff and fff, on the other hand, are intrinsically impure 16:34
(stateful)
PerlJam JimmyZ: wrap *is* called. 16:36
TimToady wonders which of those JimmyZ wonders... 16:38
16:39 buubot_backup joined
PerlJam It looks like he's confused that he never sees "process" output to the screen and so thinks wrap is never called. But wrap is called ... just on the $r inside the sub that immediately goes out of scope. 16:41
TimToady $r is the sub that was passed in, and it should wrap in place, so it should show up in output 16:43
dalek ast: 2652a39 | (Solomon Foster)++ | S32-num/ (2 files):
Refudge for forthcoming Niecza patch.
ecza: b5cc22a | (Solomon Foster)++ | / (3 files):
Properly handle NaN and +-Inf in rounding functions, add Cool.truncate, turn on S32-num/rounders.t.
PerlJam TimToady: shouldn't he need an "is ref" or "is rw" or something for that? 16:45
TimToady he's not assigning to it, he's just calling an object method that happens to be a mutator 16:46
so I doubt this routine can enforce anything on that level 16:47
PerlJam in any case ... wrap really is being called ... :-) 16:49
rakudo: rakudo: sub cached(Routine $r) { my %cache;$r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)}); say $r(1); say $r(7) }; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2);
p6eval rakudo 9fd40d: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: su"␤»
PerlJam oops
rakudo: sub cached(Routine $r) { my %cache;$r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)}); say $r(1); say $r(7) }; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2);
p6eval rakudo 9fd40d: OUTPUT«process␤2␤process␤14␤2␤4␤»
16:50 pat_js left
TimToady perl6: my $x = 2; $x //= say "hi" 16:50
p6eval pugs b927740, niecza v12-5-g0c3157b: ( no output )
..rakudo 9fd40d: OUTPUT«hi␤»
JimmyZ jnthn write a trait one, which works
TimToady you can use //= rather than ??!! after nom fixes //=
JimmyZ TimToady: gist.github.com/1423496#file_with+wrap 16:51
TimToady well, assuming 'is cached' only applies to functions returning defined values
JimmyZ it should not work with no any tips 16:53
16:54 pat_js joined
dalek ast: e993f8d | (Solomon Foster)++ | S32-num/rounders.t:
Add tests to make sure the rounding functions are not cheating.
16:54
colomon I suspect that last push may add some failing tests in Rakudo 16:55
looking at it now...
but it will take a while to rebuild
16:56 apejens left 16:57 apejens joined
JimmyZ sleeps 16:57
16:59 JimmyZ left 17:03 Trashlord left 17:04 mishin left 17:08 MayDaniel joined, serk17_ joined, serk17_ left, ab5tract joined 17:09 pat_js is now known as patjs
jnthn TimToady: There's an issue with sub foo(&r) { &r.wrap(...) } 17:10
TimToady: Because when we pass the routine it gets closure semantics, and thus is cloned
TimToady: Meaning we pass a clone that then gets modified.
e.g. even if we replace the do properly of that, as per spec, it's doing it to the clone. 17:11
dalek ast: fbba653 | (Solomon Foster)++ | S32-num/rounders.t:
Fudge for rakudo.
17:12
colomon okay, fixed rakudo's fudging.
all, this is my spare p6advent post draft: perl6advent.wordpress.com/2011/12/0...ng-niecza/ 17:14
errr, perl6advent.wordpress.com/?p=846&am...eview=true
any feedback would be appreciated. and yes, it needs a better name. 17:15
17:18 ab5tract left
colomon and a last paragraph summing it up. 17:18
jnthn #phasers is tonight, yes? 17:19
jnthn notices he's the only one who preported and is wondering if he got the rong day :)
colomon it is wednesday, I think 17:20
;)
woah, I've actually been doing p6 stuff the last week 17:21
17:23 MayDaniel left 17:25 Sarten-X left
colomon so, is #phasers in 1 minute? 17:29
or is it in two hours? 17:30
colomon is easily confused by UTC
17:30 ab5tract joined 17:32 Sarten-X joined
colomon is feeling very lonely on #phasers 17:34
17:34 wolfman2000 left
felher colomon: neither link works for me. 17:47
colomon felher: you probably need to be logged into wordpress to successfully preview.
17:48 imarcusthis joined
felher colomon: ah, you may be right about that :) 17:48
18:00 fridim_ joined 18:10 dakkar left, flussence left 18:22 mj41 left 18:24 Radvendii left 18:25 flussence joined 18:26 Trashlord joined 18:31 Chillance joined
sorear good * #perl6 18:34
18:39 hundskatt joined 18:41 takadonet joined, takadonet left
[Coke] My wife made camel-shaped sugar cookies this week without realizing the perl-significance. 18:42
18:42 icwiener left
[Coke] I was tempted to send a box to TimToady, but then realized we'd have to add butterfly ones. ;) 18:42
colomon oh, that would be awesome. :) 18:47
dalek kudo/nom: 1022412 | coke++ | t/spectest.data:
track failure modes
19:09
jnthn back 19:27
tadzik back
jnthn and now full of Indisk nom
19:28 kst left 19:33 kst joined 19:34 colorspace joined
colorspace <evalbot> bash: rakudo:: command not found ): 19:37
tadzik hm? 19:38
rakudo: say 'command found'
p6eval rakudo 102241: OUTPUT«command found␤»
colorspace oops i was messaging evalbot 19:39
benabik A bash shell in IRC? That's an interesting choice. 19:41
colorspace so im trying to do this: for 1..64 -> $x, $y, $z { $x.say; } but i get an error on the final iteration because % 3 > 0; is there a way DWIM? 19:43
a way to do what i mean, rather** 19:45
benabik nom: for 1..64 -> $x, $y = 0, $z = 0 { $x.say } 19:46
p6eval nom 102241: OUTPUT«1␤4␤7␤10␤13␤16␤19␤22␤25␤28␤31␤34␤37␤40␤43␤46␤49␤52␤55␤58␤61␤64␤»
tadzik oh, I didn't know about that :)
benabik nom: for 1..64 -> $x, $?y, $?z { $x.say }
tadzik benabik++
p6eval nom 102241: OUTPUT«===SORRY!===␤In signature parameter, '$?y', it is illegal to use '?' twigil at line 1, near ", $?z { $x"␤»
tadzik nom: for 1..64 -> $x, $y?, $z? { $x.say } 19:47
p6eval nom 102241: OUTPUT«1␤4␤7␤10␤13␤16␤19␤22␤25␤28␤31␤34␤37␤40␤43␤46␤49␤52␤55␤58␤61␤64␤»
benabik That's what I meant.
tadzik++
tadzik nom: for 1..62 -> $x, $y?, $z? { $x.say }
p6eval nom 102241: OUTPUT«1␤4␤7␤10␤13␤16␤19␤22␤25␤28␤31␤34␤37␤40␤43␤46␤49␤52␤55␤58␤61␤»
tadzik hmm
colorspace ohhh nice
tadzik nom: for 1..62 -> $x, $y = 0, $z = 0 { $x.say }
p6eval nom 102241: OUTPUT«1␤4␤7␤10␤13␤16␤19␤22␤25␤28␤31␤34␤37␤40␤43␤46␤49␤52␤55␤58␤61␤»
tadzik I'm not sure what I expect ;P
benabik colorspace: The bit between -> and { is a signature. So you can use optional and default params.
Named params are not so useful. :-) 19:48
colorspace thanks for the info! perl6 is very fun to play around with
19:48 jferrero joined, bluescreen10 left
tadzik I'm glad to hear that :) 19:48
19:50 molaf joined 19:55 ab5tract left
[Coke] bah, no readline on feather? 19:57
20:05 donri joined 20:07 ab5tract joined 20:13 colorspace left
Util (when the time comes) how do I post my day's article to perl6advent ? 20:14
felher Oh, cool, take doesn't need to have a lexical gather :) 20:16
Util felher: I just looked at that this morning. 20:18
perlcabal.org/syn/S04.html#The_gath...ent_prefix
if a gather lexically contains any take calls, it is marked as lexotic-only, and it will be invisible to a dynamic take.
If the gather contains no take lexically, it by definition cannot be the lexotic target of any take, so it can only harvest dynamic take calls.
felher yeah, that is really cute :) 20:19
Util I wanted to mix lexical and dynamic `take` within one `gather`.
To make it work, just define somthing like:
sub take-dynamic ($item) {take $item} 20:20
and use it in place of the lexical `take`
felher Util: yep, nice one :) 20:21
Util I did not actually try the code; I was just positing an example in my own notes.
dynamic `take` allows for smoother refactoring of complex list-building code. 20:22
felher yeah :) 20:26
20:26 Moukeddar joined
colomon "...though armed with mighty compilers and code weapons..." -- Grail, Elizabeth Bear, page 305 20:28
20:33 molaf left 20:36 localhost left 20:37 localhost joined
Util colomon: I bet a release manager will choose that as a epigram. 20:38
(or is that epigraph?) 20:39
Oh, it is: perl5.git.perl.org/perl.git/blob/HE...graphs.pod 20:40
20:42 daxim left 20:44 benabik left 20:47 Moukeddar left
moritz nom: my $x = (1, 2, 3); .say for nqp::p6decont($x) 20:53
p6eval nom 102241: OUTPUT«1␤2␤3␤»
moritz jnthn: that's the reason why take [1, 2] flattens
nom: my $x = (1, 2, 3); .say for $x
p6eval nom 102241: OUTPUT«1 2 3␤»
moritz take() calls decont to ensure that no lvalues are returned 20:54
and at the same time kills the "I'm a scalar" flag
moritz -> really sleep
dalek kudo/nom: 64fd762 | jonathan++ | src/Perl6/Grammar.pm:
Add back the custom operator handling as we did it in ng. It needs re-doing, but that'll take the QRegex bootstrap, which - miracles aside - isn't going to be done before the December release. In the meantime, this unregresss the feature.
20:59
tadzik jnthn++ 21:19
jnthn I'll hope @other worry about the spectests for that :) 21:20
21:31 miso2217 joined 21:32 miso2217 left
dalek atures: 9695c5a | jonathan++ | features.json:
Update nom features.
21:47
21:49 aindilis left
jnthn moritz: Example of "combinations of % and :s"? 21:50
21:50 aindilis joined
dalek p: 73e0060 | jonathan++ | src/QRegex/P6Regex/Actions.nqp:
Add missing setting of ignorecase flag.
21:58
p: 2695eea | jonathan++ | src/QAST/Compiler.nqp:
Implement ignorecase subtype in literal. Well, try to - for some reason it seems to need ICU, which I don't have to hand. :-( Testing and Rakudo version bump welcome from anyone who does.
21:59 kaare__ left
jnthn sleep & 22:07
22:12 djanatyn left 22:13 Tene left 22:16 wolfman2000 joined 22:19 djanatyn joined 22:20 Tene joined, Tene left, Tene joined 22:24 skangas left 22:29 Chillance left 22:35 alester left
tadzik nom: my @a := 1; 22:36
p6eval nom 64fd76: OUTPUT«Type check failed in binding␤ in block <anon> at /tmp/30JSV8LAgZ:1␤ in <anon> at /tmp/30JSV8LAgZ:1␤»
tadzik nom: my $a = 0; { warn "blah"; CATCH { $a++ } }; { warn "blah"; CONTROL { $a++ } }; say $a 22:39
p6eval nom 64fd76: OUTPUT«blah␤blah␤1␤»
22:42 Radvendii joined 22:43 am0c left 22:51 Radvendii left, Radvendii joined 22:53 donri left 22:54 donri joined 22:56 Sarten-X left
sorear good * #perl6 23:02
tadzik hello sorear
23:03 donri left 23:04 donri joined 23:07 Sarten-X joined
colomon \o 23:15
23:17 SHODAN joined 23:28 fridim_ left 23:29 wolfman2000 left 23:34 tokuhirom joined 23:38 huf joined 23:41 envi_ left 23:44 packetknife left 23:45 patjs left 23:50 packetknife joined 23:51 kfo left 23:52 kfo joined
[Coke] sorear: o/ 23:53
sorear decides to de-prioritized grapheme mode for now 23:58
I'll make :codes work more like UTS18
23:59 wolfman2000 joined