»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo ah, maybe 00:00
lue they ask opposing question, and lead to the same result, which is my thinking.
*questions
lue imagines that because of the obverse/reverse dichotomy, talking about logical obverses might get confusing, if his understanding of logical obversion is correct :) 00:02
BenGoldberg m: say "foobar".split("b"); say "foobar".comb("b"); 00:04
camelia rakudo-moar c00999: OUTPUT«foo ar␤Cannot call 'comb'; none of these signatures match:␤:(Cool: *%_)␤:(Cool: Regex $matcher, Any $limit = { ... }, *%_)␤:(Str:D: *%_)␤:(Str:D: Regex $pat, Any $limit = { ... }, Any :match($match), *%_)␤ in block at /tmp/ttXp__j4yx:1␤␤»
BenGoldberg m: say "foobar".split(/b/); say "foobar".comb(/b/);
camelia rakudo-moar c00999: OUTPUT«foo ar␤b␤»
timotimo yeah, comb only takes patterns
m: say "foobar".count("o")
camelia rakudo-moar c00999: OUTPUT«No such method 'count' for invocant of type 'Str'␤ in block at /tmp/TQ0Ov3VKkV:1␤␤»
timotimo is there something like that?
BenGoldberg m: say "foobar".comb(/o/).elems; 00:05
camelia rakudo-moar c00999: OUTPUT«2␤»
timotimo well, yeah 00:06
lue timotimo: something something $thing.comb.Bag ... something something
timotimo i was going to provide "foobar".how-often("o") xx "o" as an alternative implementation of .comb("o")
which is kind of pointless if you use comb to implement that :P
lue where's your bootstrapping spirit !? :P
gtodd hmm with perl5 sometimes I wish I could do tr/A-Z/1-26/ but I thought with perl6 I could use a hash as the "range" part for tr// or .trans ? where would this be documented? Is .trans a method for Str? 00:09
I found a blog posting but no official docs :) 00:10
ventica2 so, .split is about the boundaries between letters and .comb is about the letters themselves? (trying to grok the diff) 00:11
timotimo perlcabal.org/syn/S05.html#Transliteration
ventica2: aye
ventica2 nice
timotimo ventica2: well, try understanding it like this:
split matches stuff and throws that stuff away, giving you the rest
comb matches stuff and gives you that stuff, throwing away the rest 00:12
also:
m: "Hello world. How are you today?".split(/\W+/, :all).perl.say
camelia rakudo-moar c00999: OUTPUT«(("Hello", Match.new(orig => "Hello world. How are you today?", from => 5, to => 6, ast => Any, list => ().list, hash => EnumMap.new())), ("world", Match.new(orig => "Hello world. How are you today?", from => 11, to => 13, ast => Any, list => ().list, hash…»
timotimo oops ;)
m: "Hello world. How are you today?".split(/\W+/, :all).say
camelia rakudo-moar c00999: OUTPUT«Hello 「 」␤ world 「. 」␤ How 「 」␤ are 「 」␤ you 「 」␤ today 「?」␤ ␤»
timotimo m: "Hello world. How are you today?".split(/\W+/, :all)>>.Str.say
camelia rakudo-moar c00999: OUTPUT«Hello world . How are you today ? ␤»
timotimo m: "Hello world. How are you today?".split(/\W+/, :all)>>.Str.perl.say
camelia rakudo-moar c00999: OUTPUT«("Hello", " ", "world", ". ", "How", " ", "are", " ", "you", " ", "today", "?", "")␤» 00:13
timotimo :all will also give you the matched stuff
(as match objects even)
(it won't give you the stuff between the splits because there was no matching taking place there)
ventica2 grokked & 00:14
timotimo :)
ventica2 thx :)
timotimo very welcome 00:15
i'm getting a tiny bit frustrated with how the jit behaves ... it ought to not hang :) 00:17
at least the jitlog.txt doesn't continue growing, so it's probably looping in some kind of legit manner 00:18
like generating an infinite loop somehow 00:20
00:20 beastd left
gtodd timotimo: cheers thanks I was looking on doc.perl6.org/routine.html 00:38
timotimo hum. that lists a bunch of methods, but why not this one? 00:39
strange.
gtodd $string.trans(%hash); and $string.=trans(%hash); work somewhat as planned but not every element of the string is swapped
similar "space" issue as with pumpkin perl tr/a-z/1-26/ 00:40
timotimo can you give a piece of working (non-working) code as a paste on gist or something? 00:41
00:42 nbrown joined 00:46 nbrown_ joined, nbrown left
TimToady tr/a-z/1-26/ makes no sense in P5 00:46
timotimo the night shift has arrived :)
TimToady that's equivalent to tr/abcdefghijklmnopqrstuvwxyz/126/ 00:47
or is that the point? 00:48
"space" is too many final frontiers...
timotimo gnite #perl6 o/ 00:51
TimToady o/
gtodd yeah I know ... you can do: my $str="abcdefhij"; ($str=$str)=~tr/a-j/0-9/ ; print $str 00:58
00:59 nbrown_ left 01:00 xenoterracide_ joined
gtodd but not if the bits of the string and replacement differ 01:02
I thought the hash approach of perl6 might auto adjust or shift the string 01:03
TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; .=trans(['a'..'z'] => [1..26]); .say 01:07
camelia rakudo-moar c00999: OUTPUT«1234567891011121314151617181920212223242526␤»
TimToady are you trying to do that?
gtodd seems it just needs arrays :-) 01:10
got it to work :-)
oops yeah like you just did :-D
dman these multiscreen setups I should have IRC on my monitor at all times
BenGoldberg m: 'abc'.trans(/a/ => 'z').say 01:11
camelia rakudo-moar c00999: OUTPUT«zbc␤»
BenGoldberg How different is trans from s/// ? 01:12
TimToady quite
gtodd yeah ... seems very cool 01:13
TimToady s/// won't apply a mapping of characters for you unless you work hard at it
BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' . $/ . 'Z' } ).say
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/lxq7dvGuBg␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/lxq7dvGuBg:1␤------> 'abc'.trans(/(a)/ => { 'X' . ⏏$/ . 'Z' } ).say␤»
gtodd so there is tr/// and a method .trans
?
BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $/ ~ 'Z' } ).say
camelia rakudo-moar c00999: OUTPUT«XZbc␤»
BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $0 ~ 'Z' } ).say 01:14
camelia rakudo-moar c00999: OUTPUT«XZbc␤»
BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ @_ ~ 'Z' } ).say
camelia rakudo-moar c00999: OUTPUT«XZbc␤»
TimToady .trans is mostly doing string mapping, and hasn't any clue about captures on the left, since usually you have strings on the left without captures
it was only an afterthought to allow regexen on the left 01:15
TimToady is actually surprised a closure on the right works at all :)
m: 'abc'.trans(/(a)/ => -> $/ { 'X' ~ $0 ~ 'Z' } ).say 01:16
camelia rakudo-moar c00999: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in block at /tmp/Jk53ijrmqG:1␤␤»
TimToady it's just not expecting a $/ at all
BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $^a ~ 'Z' } ).say
camelia rakudo-moar c00999: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in block at /tmp/brpoaqI2sd:1␤␤»
gtodd { 'X' ~ @_ ~ 'Z' } that ort of looks like ascii art for hindu god of some kind
BenGoldberg Oh well. Maybe in the future ;) 01:17
TimToady maybe
one almost wants to allow assignment ops instead of => there 01:19
so you can do s[...] op= expr in parallel
trans is basically a parallel s///
but that tracks the LTM for you like an alternation in regex would 01:20
01:23 dayangkun joined
TimToady one could, in fact, do something like s:g [ a { make 1 } | b { make 2 } | c { make 3 } ... ] = $/.ast 01:23
m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast; .say 01:25
camelia rakudo-moar c00999: OUTPUT«123␤»
TimToady tr/abc/123/ is basically just sugar for that
m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast * 3; .say 01:27
camelia rakudo-moar c00999: OUTPUT«369␤»
TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast.ord - 16; .say 01:28
camelia rakudo-moar c00999: OUTPUT«333435␤»
TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ast.ord - 16; .say
camelia rakudo-moar c00999: OUTPUT«!"#␤»
TimToady oops
m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ord - 16; .say 01:29
camelia rakudo-moar c00999: OUTPUT«QRS␤»
TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ord - 16 - 32; .say
camelia rakudo-moar c00999: OUTPUT«123␤»
TimToady there we go :)
01:29 nbrown joined 01:30 hovercraft joined
TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; s:g[.] = $/.ord - 48; .say 01:30
camelia rakudo-moar c00999: OUTPUT«4950515253545556575859606162636465666768697071727374␤»
TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; s:g[.] = $/.ord - 96; .say 01:31
camelia rakudo-moar c00999: OUTPUT«1234567891011121314151617181920212223242526␤»
BenGoldberg m: say s:g[.] 01:32
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/5CzFLsTWOw␤Missing assignment operator␤at /tmp/5CzFLsTWOw:1␤------> say s:g[.]⏏<EOL>␤ expecting any of:␤ colon pair (restricted)␤ infix stopper␤»
BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.ord + 1; .say
camelia rakudo-moar c00999: OUTPUT«9899100101102103104105106107108109110111112113114115116117118119120121122123␤»
TimToady std: s:g[.] 01:33
BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.succ; .say
camelia std 0f2049c: OUTPUT«===SORRY!===␤Missing assignment operator at /tmp/bvVgze7MwE line 1 (EOF):␤------> s:g[.]⏏<EOL>␤Parse failed␤FAILED 00:01 122m␤»
rakudo-moar c00999: OUTPUT«No such method 'succ' for invocant of type 'Match'␤ in block at /tmp/86E0nLLerX:1␤␤»
BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.Str.succ; .say
camelia rakudo-moar c00999: OUTPUT«bcdefghijklmnopqrstuvwxyzaa␤»
TimToady try $/.Str.succ
a Match object has no successor
m: $_ = ('a'..'z').join; s:g[.] = $/.Str.succ; .say 01:34
camelia rakudo-moar c00999: OUTPUT«bcdefghijklmnopqrstuvwxyzaa␤»
BenGoldberg The s[...] = ... syntax is a bit confusing. I see what it does, but it's not intuitive.
TimToady it just makes an lvalue of the current match 01:35
you're just used to the s/// form :)
but that form is capable of only = semantics 01:36
01:36 nbrown left
BenGoldberg I'm used to an = doing only one assignment ;), whereas with :g, it is many assignments. 01:36
TimToady it's a kind of implicit loop
you already get many assignments when you do s:g///
so there's no reason s:g[] = expressoin can't do multiple assignments too 01:37
BenGoldberg Yeah, but the expression inside of the right side of s:g/// is enclosed in something (slashes, usually), whereas the assignment syntax ends with a ; 01:38
TimToady m: $_ = '123'; s:g[\d] -= 1; .say
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/zquEBcMmNA␤Malformed assignment operator␤at /tmp/zquEBcMmNA:1␤------> $_ = '123'; s:g[\d] -=⏏ 1; .say␤»
TimToady say waht?
BenGoldberg It's a match ;)
Not an Int
TimToady that's not the problem
m: $_ = '123'; s:g[\d] += 1; .say 01:39
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/yfTwAY0jKp␤Malformed assignment operator␤at /tmp/yfTwAY0jKp:1␤------> $_ = '123'; s:g[\d] +=⏏ 1; .say␤»
BenGoldberg m: $_ = '123'; s:g[\d] ~= 'A'; .say
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/Mv76nBHdAC␤Malformed assignment operator␤at /tmp/Mv76nBHdAC:1␤------> $_ = '123'; s:g[\d] ~=⏏ 'A'; .say␤»
TimToady someone seems to have busted it
n: $_ = '123'; s:g[\d] += 1; .say
camelia niecza v24-109-g48a8de3: OUTPUT«234␤»
BenGoldberg m: $_ = '123'; s:g[\d] = .~'A'; .say 01:40
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/Tmp4f6xwQe␤Assignment operator missing its expression␤at /tmp/Tmp4f6xwQe:1␤------> $_ = '123'; s:g[\d] = .⏏~'A'; .say␤ expecting any of:␤ dotty method or pos…»
BenGoldberg m: $_ = '123'; s:g[\d] = ($/~'A'); .say
camelia rakudo-moar c00999: OUTPUT«1A2A3A␤»
TimToady I think when we fixed op= to allow [op]= we mighta busted somethin
m: $_ = '123'; s:g[\d] [+]= 1; .say 01:41
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/lUdurAcfg3␤Unsupported use of brackets around replacement; in Perl 6 please use assignment syntax␤at /tmp/lUdurAcfg3:1␤------> $_ = '123'; s:g[\d] ⏏[+]= 1; .say␤ expe…»
TimToady heh
m: $_ = '123'; s:g[\d] = 1; .say
camelia rakudo-moar c00999: OUTPUT«111␤»
01:42 nbrown joined
TimToady m: $_ = '123'; s:g[\d] RR[+]= 1; .say 01:43
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/09PN0wjlHa␤Malformed assignment operator␤at /tmp/09PN0wjlHa:1␤------> $_ = '123'; s:g[\d] RR[+]=⏏ 1; .say␤»
TimToady m: $_ = '123'; s:g[\d] RR+= 1; .say
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/wWjFqETN3c␤Malformed assignment operator␤at /tmp/wWjFqETN3c:1␤------> $_ = '123'; s:g[\d] RR+=⏏ 1; .say␤»
TimToady m: $_ = 1; $_ RR+= 41; .say
camelia rakudo-moar c00999: OUTPUT«42␤»
TimToady that's okay 01:44
m: $_ = 1; $_ RR[+]= 41; .say
camelia rakudo-moar c00999: OUTPUT«42␤»
TimToady m: $_ = 1; $_ [+]= 41; .say
camelia rakudo-moar c00999: OUTPUT«42␤»
TimToady just busted under s[]
m: $_ = '123'; s:g[\d] RR[+=] 1; .say 01:45
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/twkfvAW3sV␤Malformed assignment operator␤at /tmp/twkfvAW3sV:1␤------> $_ = '123'; s:g[\d] RR[+=]⏏ 1; .say␤»
01:46 klapperl joined
TimToady jnthn: ^^ 01:46
01:46 Akagi201 joined 01:49 klapperl_ left
TimToady or the masakbot, since it's a bug :) 01:50
you'd think the regression tests shoulda caught the, er, regression... 01:51
star: $_ = '123'; s:g[\d] += 1; .say
camelia star-{m,p} 2014.04: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Malformed assignment operator␤at /tmp/tmpfile:1␤------> $_ = '123'; s:g[\d] +=⏏ 1; .say␤» 01:52
TimToady or maybe it wasn't a regression?
coulda sworn that worked, but maybe I'm remembering niecza? 01:53
01:54 PZt joined, FROGGS__ joined
TimToady nominalizations & 01:54
01:56 rindolf joined 01:57 FROGGS_ left 01:59 jnap left 02:01 xenoterracide_ left 02:04 chenryn joined
dalek rl6-bench: fc85ab6 | (Geoffrey Broadwell)++ | bench:
Don't need to limit test tags in `bench quickstart`

This is no longer needed now that --skip-incomplete exists and is default. It could save some testing time if the user only ever wanted to compare against NQP, but it seems more useful to default to testing everything that can be tested for each compiler, and let `analyze` decide what data to use.
02:04
02:07 xenoterracide_ joined 02:08 hovercraft left 02:10 cooper- joined
dalek rl6-bench: e7919ed | (Geoffrey Broadwell)++ | analyze:
Fix old copy pasta in HTML table generation
02:15
02:16 lustlife joined 02:18 noganex_ joined 02:21 noganex left 02:30 xenoterracide_ left 02:33 jnap joined 02:37 thou joined 02:41 thou left 02:46 xenoterracide_ joined 03:03 Woodi joined 03:18 jnap left 03:19 gdeepi__ joined, btyler left 03:20 ventica joined, ventica2 left 03:29 hoverboard joined, water joined 03:31 hoverboard is now known as Guest34997, Guest34997 left, water is now known as hoverboard 03:48 ventica2 joined, ventica left 03:49 nbrown left 03:50 nbrown joined 03:54 BenGoldberg left, nbrown left 03:56 gdeepi__ left 03:57 slavik left 04:00 kurahaupo joined 04:02 kaare_ joined 04:10 slavik joined 04:19 chenryn left 04:23 dwarring left 04:25 thou joined 04:28 [Sno] left 04:29 raiph left 04:30 thou left 04:39 labster left 04:42 ventica joined 04:43 ventica2 left 04:47 kaare_ left 04:50 chenryn joined 04:55 labster joined 04:56 chenryn left 05:13 chenryn joined 05:14 thou joined 05:15 gfldex joined 05:19 kaare_ joined, water joined 05:20 hoverboard left 05:21 water is now known as hoverboard 05:23 Rotwang left 05:49 kurahaupo left 05:51 hoverboard left 05:52 rindolf left 05:55 [Sno] joined 06:01 denis_boyun_ joined 06:03 SamuraiJack joined 06:06 chenryn left
dalek rl6-bench: 563ba46 | (Geoffrey Broadwell)++ | analyze:
Draft implementation of summarize_results_html_history
06:16
06:19 ssutch left, gfldex left 06:21 perlfan left, perlfan joined
sergot timotimo: yeah I do 06:27
06:29 perlfan left 06:31 perlfan joined
sergot timotimo: HTTP::UserAgent (with (Open)SSL/TLS support) is usable, I'll write a blogpost about this today 06:31
06:31 darutoko joined
sergot timotimo: a lot of work left, but anyway, it is something :) 06:32
06:36 hoverboard joined 06:47 gamo joined 06:48 purkinje joined 06:58 SamuraiJack left 06:59 purkinje left
moritz \o 07:01
sergot++ # lot of work
sergot hi moritz 07:02
thanks :)
07:04 zakharyas joined 07:07 chenryn joined
ventica m: say 'a'.ord; 07:11
camelia rakudo-moar c00999: OUTPUT«97␤»
ventica m: say 0x61.char;
camelia rakudo-moar c00999: OUTPUT«No such method 'char' for invocant of type 'Int'␤ in block at /tmp/9wKhLKodwU:1␤␤»
ventica m: say 0x61.chr;
camelia rakudo-moar c00999: OUTPUT«a␤»
07:12 chenryn left
ventica m: print "foo"; 07:12
camelia rakudo-moar c00999: OUTPUT«foo»
07:15 silug left
ventica m: for 0x2f X (0x40, 0x0) -> $b, $c { print ($b+$c).chr } 07:15
camelia rakudo-moar c00999: OUTPUT«o/»
07:21 FROGGS__ is now known as FROGGS 07:22 synthetic-sky joined 07:27 dayangkun left, silug joined 07:28 Ven joined 07:29 dayangkun joined, hoverboard left 07:31 thou left 07:34 silug left 07:39 VitaoDoidao joined
VitaoDoidao people, may anybody help me ? how can I send the variable 'nick' of the hash 'bot' to the sub ? i've tried: irc::raw("NICK $bot{nick}"); 07:39
Ven VitaoDoidao: %bot<nick> ? are you sure it's $bot ? 07:40
or is it an object, and you're looking for $bot.nick ?
VitaoDoidao Ven I mean this: $bot{'nick'}='TESTEVD';
Ven VitaoDoidao: then $bot<nick>, but that probably should be %bot :).
VitaoDoidao Ven yes, 'nick' inside %bot 07:41
how can I send to irc::raw ? irc::raw("NICK $bot{nick}") didn't work =/
Ven VitaoDoidao: I'm guessing you're a p5er. Perl6 has sigil invariance - if you want the element 0 of an array "@a", it @a[0], not $a[0] (the sigil is a part of name) 07:42
so if you have a hash, you access it with `%bot{'nick'}`, or as a shortcut, `%bot<nick>` 07:43
FROGGS VitaoDoidao: what perl version are you using? 07:44
07:46 chenryn joined, silug joined 07:49 rindolf joined, ventica2 joined 07:51 synthetic-sky left 07:52 ventica left
gamo m: what is a postfix? 07:56
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/52ldnfiLDV␤Two terms in a row␤at /tmp/52ldnfiLDV:1␤------> what is a postfix⏏?␤ expecting any of:␤ argument list␤ postfix␤ infix stopper␤…»
FROGGS m: my $x; say $a++; # gamo: the ++ is a postfix, like [] on arrays is 07:57
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/y75aGgcPKM␤Variable '$a' is not declared␤at /tmp/y75aGgcPKM:1␤------> my $x; say $a++⏏; # gamo: the ++ is a postfix, like [] o␤ expecting any of:␤ postfix␤»
FROGGS m: my $x; say $x++; # gamo: the ++ is a postfix, like [] on arrays is
camelia rakudo-moar c00999: OUTPUT«0␤»
gamo thanks. I have an error in EOF line which doesn't make sense, then. 07:58
FROGGS gamo: can you put that code in a gist? 07:59
my guess is that there is a missing parentheses or curly
gamo Unable to parse quote-words subscript; couldn't find right angle quote
FROGGS please show me your code :o) 08:00
moritz gamo: it could be that you're writing $a < $b as $a<$b, and thus the < is parsed as a subscript
gamo It's a long code
moritz like in %hash<key>
copy & paste for the win!
(into gist.github.com/, not into the channel)
FROGGS TimToady: in my v5 grammar (branch nqp_to_perl6) I have the problem that the 'my' in 'my $a = 42' ends up being a <name> when it should be a scope_declarator... What is responsible for that choice? 08:04
gamo gist.github.com/99af027472f5b0d4917b.git 08:05
FROGGS TimToady: when I put a <!before 'my'\s> in term:sym<name> it works correctly... Does that mean that my precedence parser is borken?
gamo: here: gist.github.com/anonymous/99af0274...5e-pl-L123 08:06
and the line below
what moritz++ said
put space around infix operators, like $j + 1 <= $L instead of $j+1<=$L 08:07
08:09 dmol joined, novice3141592 joined
Ven that's some p11 code right here :) 08:09
FROGGS Ven: which is valid :o) 08:10
Ven definitely valid
08:11 woosley left 08:12 ssutch joined
VitaoDoidao how can I send keys to subroutines ? it isn't working: IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>$server{'address'},PeerPort=>$server{'port'}) 08:12
moritz VitaoDoidao: Perl 6 uses . for method calls, not -> 08:13
novice3141592 how to start perl6 aside rakudo directory ( error is: "Could not find or load main class perl6") ?
FROGGS VitaoDoidao: what version of perl are you using?
moritz novice3141592: you install rakudo ("make install")
FROGGS novice3141592: that should just work... what version of rakudo do you have?
VitaoDoidao FROGGS This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-thread-multi 08:14
novice3141592 last
gamo ok, how can I write "------> return @cand[int ⏏(@cand*rand)];
novice3141592 This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-thread-multi-2level
FROGGS VitaoDoidao: that's a Perl 6 channel...
VitaoDoidao k sry
FROGGS VitaoDoidao: np :o)
novice3141592: no, in the rakudo dir, run ./perl6 --version
Ven why not try out Perl 6 :) ?
novice3141592 This is perl6 version 2014.07-62-gc00999a built on JVM :)) 08:15
FROGGS novice3141592: nice, very recent :o) 08:16
novice3141592: yeah, make install should do
also, put the directory it installs the perl6-j and perl6 binary to into your PATH
novice3141592 i understand, but i did make install
FROGGS what gives you `which perl6` ? 08:17
does that point to the same directory?
moritz novice3141592: by default, 'make install' installs it into the install/bin/ subdirectory of the rakudo dir 08:18
novice3141592: that is, unless you specifified a --prefix= in the Configure.pl invocation 08:19
novice3141592 ok
08:23 chenryn left
Ven (don't make the same mistake I did, don't add rakudo to your path :P) 08:24
moritz Ven: there's nothing wrong with putting rakudo in your path 08:25
Ven moritz: yes it is, you can't use perl 6.
moritz Ven: you cannot? care to elaborate?
Ven it'll error out if you add rakudo to your path instead of install/bin/
moritz oh, you mean the source dir 08:26
yes, that's a bad idea indeed
08:26 telex left
moritz I misunderstood 08:26
FROGGS yeah, that makes sense :o)
Ven would be surprising if I was saying "don't use perl 6", kinda.
gamo error: ------> return @cand[int ⏏(@cand.elements * rand)]; 08:27
moritz int is a type, not a prefix 08:28
gamo: you can say (...).Int
gamo: or
return @cand.pick
08:28 telex joined
moritz same thing, more idiomatic :-) 08:28
m: say (1..20).pick
camelia rakudo-moar c00999: OUTPUT«17␤»
moritz m: say (1..20).pick
camelia rakudo-moar c00999: OUTPUT«16␤»
gamo thank you! 08:29
moritz m: say ('a'...'z').pick
camelia rakudo-moar c00999: OUTPUT«l␤»
Ven
.oO( is this jnthn's 5-to-6 slides :P ?)
masak good antenoon, #perl6
moritz good masak, antenoon 08:30
08:30 virtualsue joined
masak good, antenoon also pretty OK 08:31
oh, and everyone except me prefers .pick for the one-element case, but I prefer .roll ;) 08:32
Ven (roll with it !)
masak (as I prefer not to bring in the whole "without replacement" machinery unless I have to)
08:33 dakkar joined 08:36 novice3141592 left
gamo now, ./perl6 5x5e.pl hangs 08:37
moritz debug it! 08:39
08:40 kivutar joined
Ven perl6-debug to the rescue 08:42
08:42 t__ joined 08:43 dmol left
moritz or simply say()-statements 08:43
08:44 Woodi left
moritz oh, a common case for hanging is quantifying zero-width matches in a regex 08:44
Ven who does that ?
moritz
08:44 Woodi joined
moritz I'm not the debugger kinda guy 08:44
08:48 tgt joined, t__ left
Ven that's sad, in 2014 :( 08:49
moritz debuggers aren't a 2014 thing :-)
Ven that only makes it even worse. 08:50
masak I rely on say() statements a lot, too.
but that's after writing plenty of tests.
moritz why? because I debug different from the way you do it?
do you also feel sad for people using different OS or different editors than you do?
Ven no, they do them. I switch from one to another often enough. 08:51
08:52 salv0 left
Ven debugging with say is just being locked in the past. I don't remember how far perl6-debug goes, but a "real"® debugger that allows you to see code, evaluate expressions at a point of time, and jump from one callframe to another will always be better than just say()s 08:52
masak I politely disagree. 08:53
Ven but I'm definitely a beaten horse there :).
moritz if you say, it must be like that.
08:53 chenryn joined
FROGGS I'm also a say() guy 08:53
Ven beating a dead horse, even
masak I'm not sure where the "debuggers are better than say()" elitism comes from, except that if I didn't know it existed and someone told me it did, I probably wouldn't have been that surprised. 08:54
Ven you're being judgmental by calling it "elitism", though :) (not saying i'm not when I say it's being locked in the past, though) 08:55
moritz I think the argument is simply "it gives you more options, so it's better" 08:56
Ven it's not about options. It's about being tied vs being free
moritz is free to debug with say() as long as he wants, and use other tools when say() isn't appropriate anymore 08:57
freedom!
Ven you're free to answer with a non-argument, yes :-)
moritz Ven: I'm not tied if nobody or nothing ties me 08:58
08:58 chenryn left, pmurias joined
pmurias what package do I need under debian to get the icu required for parrot? 08:58
moritz pmurias: libicu-dev iirc
Ven moritz: you're tired because, once your program is started, you can't add, change or remove a say. You can't replace a function at runtime to test its behavior. You can't get additional informations from other variables you didn't say. You can't jump between call frames to say() other variables at previous point of time
tied*. 08:59
08:59 salv0 joined
moritz pmurias: should be documented in rakudo's README somewhere 08:59
Ven: but I'm also free to launch the program under the debugger the next time, should I chose to do so
Ven yes. But then, you're using the debugger, and your points don't hold true anymore.
moritz Ven: which point?
Ven "I can do that with say" 09:00
moritz Ven: my point is that, 95% of the time, say() is just fine
Ven: and when I need the debugger in the other 5%, it is available to me just as it is to you
Ven Then we just disagree :-). say is fine 10% of the time, when the code just goes on after some error 09:01
moritz I'm not fighting a war against debuggers; I'm just not using them most of the time
Ven i.e. when I'm doing rails and some exception pops up, I just get a page with my call stack / the framework's, a REPL where I can type code evaluated in that one callframe, the code around that line in the callframe, the environment with params etc, ... 09:02
pmurias I'm having the icu header in /usr/include/x86_64-linux-gnu/unicode and parrot is searching in /usr/include/unicode
moritz and now we're just in the realm of personal preferences
pmurias: yes, needs a symlink; either parrot's configure is broken, icu's config introspector
09:03 Vlavv left
FROGGS that was meant to be fixed... :/ 09:03
(by parrot)
Ven (")
09:04 thou joined
Ven (you can say all you want in a breakpoint, you can't debug in a say, that's all) 09:04
pmurias FROGGS: I'm using an old parrot
FROGGS ahh
yeah, symlink ftw :o) 09:05
pmurias FROGGS: I haven't update nqp-js to the newest nqp yet
* updated
FROGGS pmurias: though you could build and use a parrot 6.6.0 without problems
pmurias I'm trying to get 'perl Configure.pl --backends=parrot,js';make;make install; nqp-js -e 'say("Hello World")' to work 09:06
FROGGS: s/perl Configure.pl/perl Configure --gen-parrot/ 09:07
FROGGS that sounds lovely :o)
09:08 thou left
jnthn One of the reasons perl6-debug has tracepoints as well as breakpoints is because some problems are much easier to work out if you've a dump or log and can read through it. 09:09
FROGGS pmurias: when I configure for --backends=js only, it still builds pir stuff 09:12
ahh, it cross compiles... (still)
09:15 Vlavv joined
pmurias FROGGS: currently the build process is a bit complex 09:15
FROGGS: it uses a installed nqp-p which I think needs to be built from the nqp-js repo
FROGGS ahh
pmurias I'm working on getting <perl Configure.pl --backends=parrot,js;make;make install; nqp-js -e 'say("Hello World")' > to work 09:16
FROGGS is it planned to be self hosting?
pmurias it's planned to be bootstraped at some point 09:17
FROGGS k
pmurias but the performance will likely have to be improved before it's the default option
FROGGS yeah, I see
nwc10 does that matter? How many end users build, versus how many download?
FROGGS good point 09:18
for compiler dev purposes it matters though
nwc10 yes, good point 09:19
FROGGS you dont wanna wait 15 minutes for a single change
nwc10 fastest compiler dev backend is Moar
pmurias how much faster then parrot is it?
nwc10 IIRC for compiling the setting, factor of 2 or 3 09:20
not sure about "this week"
jnthn lopped a couple more seconds off on Sunday
09:24 Mouq left
sergot m: grammar A { token TOP { <a> } token a { a } }; say A.parse("a"); 09:27
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/52lDSRGbC5␤Two terms in a row␤at /tmp/52lDSRGbC5:1␤------> grammar A { token TOP { <a> } ⏏token a { a } }; say A.parse("a");␤ expecting any of:␤ statement li…»
sergot m: grammar A { token TOP { <a> }; token a { a } }; say A.parse("a"); 09:28
camelia rakudo-moar c00999: OUTPUT«「a」␤ a => 「a」␤␤»
sergot m: grammar A { token TOP { <a> }; token a { a } }; say A.parse("bab");
camelia rakudo-moar c00999: OUTPUT«(Any)␤»
sergot m: grammar A { token TOP { .*? <a> .*? }; token a { a } }; say A.parse("bab");
camelia rakudo-moar c00999: OUTPUT«(Any)␤»
sergot why doesn't it work?
does it not
09:32 Ven left
FROGGS sergot: .*? is non-greedy, and thus it is happy to match nothing 09:33
09:34 chenryn joined, virtualsue left
FROGGS m: grammar A { token TOP { ^ .*? <a> .*? $ }; token a { a } }; say A.parse("bab"); 09:34
camelia rakudo-moar c00999: OUTPUT«「bab」␤ a => 「a」␤␤»
FROGGS this way you force it to try to match from beginning to end 09:35
your version was happy to match 'a' alone, and then failed because .parse is meant to match everything 09:36
m: grammar A { token TOP { .*? <a> .*? }; token a { a } }; say A.subparse("bab"); # in opposite to this
camelia rakudo-moar c00999: OUTPUT«「ba」␤ a => 「a」␤␤»
sergot FROGGS++ 09:39
thanks! :)
m: grammar A { token TOP { <a> }; token a { a } }; say A.subparse("bab");
camelia rakudo-moar c00999: OUTPUT«#<failed match>␤»
09:41 dmol joined 09:44 liztormato joined 09:47 liztormato left 09:55 kurahaupo joined
pmurias what could be causing: pastie.org/9429047? 09:57
it works if I remove the --module-path from "./nqp-p --target=pir --module-path=gen/js/stage1/ --output=gen/js/stage1/QAST/Compiler.pir --encoding=utf8 src/vm/js/QAST/Compiler.nqp" 09:58
but gen/js/stage1 is empty
10:02 xinming left
FROGGS that looks very different from my nqp... i.e. I have no QAST subdir 10:04
10:04 VitaoDoidao left
FROGGS but, I'd expect that QRegex.pir would be in stage1, because the file you compile wants it 10:04
so the error you see might very well be just caused by the missing QRegex 10:05
pmurias QRegex? 10:06
FROGGS yes 10:08
your backtrace points to nqp/src/HLL/Grammar.nqp:614: ParseShared, '%!marks'); 10:09
10:10 virtualsue joined 10:15 rindolf left 10:16 rindolf joined
pmurias is it possible to add a second directory to the search path? 10:17
masak Ven: these two facts can co-exist in the same universe: (a) debuggers are just as great as you feel they are. (b) most of the time for most of the code moritz and I debug, a debugger feels like overkill. 10:20
Ven: you're being hypocritical by pointing out that your counterpart is being judgemental. this discussion started out by you stating matter-of-factly that say() has no place in 2014. 10:39
10:43 xragnar_ joined, xragnar is now known as Guest72953, Guest72953 left, xragnar_ is now known as xragnar
colomon printf / say debugging frequently is wildly better than using a debugger. it depends on the kind of problem. 10:48
10:52 thou joined
masak ah, finally the "it's context-dependent" cavalry arrived. 10:53
maybe Ven does a whole lot of web development, where it makes more sense to use a debugger most of the time. 10:55
10:56 thou left 10:59 chenryn left 11:04 takesako left 11:10 fhelmberger joined 11:12 FROGGS[mobile] joined 11:15 chenryn joined
carlin the debugger has been very useful the few times I've used it 11:18
and the pretty colours. it's very well put together
11:19 takesako joined
colomon masak: problems that involve a lot of processing are frequently better handled by dumping output via say and then going over it with grep or a small perl script. On the other hand, one time problems like a seg fault are frequently easily handled by the debugger. Knowing what tool to use when is quite valuable. 11:34
masak *nod* 11:39
thinking back at the situations I use say(), I realize I probably should use assert() more. 11:46
rindolf Hi all. 11:47
TimToady: hi! Please let me know when you can chat. 11:48
masak rindolf: or you can just write stuff here, and TimToady will backlog over them.
rindolf masak: OK.
Well, I hope TimToady is feeling better. 11:49
masak last I heard, he still has a bubble on his eye.
he's stable, but couldn't change altitude, so no OSCON and no YAPC::EU.
timotimo, lue: [backlog] .comb is the "complement" of .split -- because together, they make up the whole original string. 11:51
rindolf And I'd like to tell him that I recently reached the realisation that both he and I used to be the Hacker King (see plus.google.com/+ShlomiFish/posts/gyrcAfAASev ) but by the time I realised it, I ended up passing the button to someone else (see the link), but I appreciate the wonderful experience of being that, and TimToday inspired me a lot.
masak similarly, infix:<%> is the complement of infix:</>.
though the operations for getting the original thing back differ ;) 11:52
rindolf Timbus: and also see www.shlomifish.org/me/rindolf/#rind...h_hitlower
11:52 nbrown joined
rindolf TimToady: and also see www.shlomifish.org/me/rindolf/#rind...h_hitlower 11:53
Timbus been a while since that's happened 11:55
masak m: $_ = '123'; s[\d] = 7; .say 11:56
camelia rakudo-moar c00999: OUTPUT«723␤»
masak m: $_ = '123'; s:g[\d] = 7; .say
camelia rakudo-moar c00999: OUTPUT«777␤»
masak m: $_ = '123'; s:g[\d] += 1; .say 11:57
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/0Ia20teBXj␤Malformed assignment operator␤at /tmp/0Ia20teBXj:1␤------> $_ = '123'; s:g[\d] +=⏏ 1; .say␤»
11:57 chenryn left
masak submits rakudobug 11:57
m: $_ = '123'; s[\d] += 1; .say 12:00
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/oc6TodPR96␤Malformed assignment operator␤at /tmp/oc6TodPR96:1␤------> $_ = '123'; s[\d] +=⏏ 1; .say␤»
masak n: $_ = '123'; s[\d] += 1; .say
camelia niecza v24-109-g48a8de3: OUTPUT«223␤»
masak n: $_ = '123'; s:g[\d] += 1; .say 12:04
camelia niecza v24-109-g48a8de3: OUTPUT«234␤»
rindolf Timbus: what a mis-addressing? 12:06
dalek p-js: 22b6db7 | (Pawel Murias)++ | .gitignore:
Remove bin from .gitignore as it's causing trouble with src/vm/js/bin.
p-js: 7f3222b | (Pawel Murias)++ | / (2 files):
Add missing file and add node_modules to .gitignore.
12:13 mr-foobar left 12:14 mr-foobar joined
gtodd argh how do a I read STDIN into an array? I'm doing: for my @i = lines() {.... } I'm actually not using @I for anything directly I think I need it so that $_ does what I want inside the block 12:15
masak m: my @lines = lines(); say @lines.elems 12:16
camelia rakudo-moar c00999: OUTPUT«20␤»
masak gtodd: you don't need a for loop.
12:16 nbrown left
masak or, at least, this answers your question "argh how do I read STD into an array?" 12:16
if you need the for loop, please ask a new, more specific question ;) 12:17
12:17 Alula_ left
carlin m: for lines() { say $_ } 12:20
camelia rakudo-moar c00999: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
colomon Huh, weird failure messages in the panda rebootstrap stage of the smoke test overnight. Don't seem to have messed anything up, mind you…. 12:21
# Failed test 'Array of Num'
# at t/04-roundtrip.t line 39
# got: [1.3, 2.8, 32323423.4, 4]
# expected: [1.3, 2.8, 32323423.4, 4.0]
FROGGS colomon: I've seen that too! 12:24
like one or two days ago...
(with an old panda checkout)
dalek p-js: 534520d | (Pawel Murias)++ | / (3 files):
Support building a nqp-p instead of using the installed one.

Also now installs all the resulting .js code into node_modules when necessary.
  "perl Configure.pl --gen-parrot --backends=parrot, js; make; make test" - should work
  (It seems to fail one parrot test for some reason)
12:25
masak pays attention to perldoc.perl.org/perlsub.html#Signatures for the first time
hm, needs to be enabled manually. pity, but maybe necessary.
pmurias does our v5 mode support the new signatures? 12:26
masak bare '$' sigils and default parameters, straight from Perl 6. 12:27
slurpy paramaters too, but without the * before. makes sense in a Perl 5 context where everything flattens all the time.
pmurias masak: they are still experimental, there have been problems with ~~ in perl5 so they are likely trying to avoid such a situation
masak aye.
they are experimental, so you enable them manually, and *then* you get a warning :) 12:28
(which can be turned off)
FROGGS pmurias: no, not yet
masak I'm surprised they didn't go with '$param?' too -- they seem to write it as '$param=', which is just ugly. 12:29
12:29 denis_boyun_ left, huf_ is now known as huf
masak but I may misunderstand that part. their only example is '$=', which I first read as, well, the variable $= 12:30
so it's possible this doesn't work for named parameters.
dalek p-js: e06cb9c | (Pawel Murias)++ | / (4 files):
Some missing changes for the previous commit.
12:31
12:32 Alula_ joined, denis_boyun_ joined
gtodd masak: heh I want a for loop to run through an array of lines and transmogrify ;-) each line with magic .. I want to get he array from a file I guess no need for stdin perse 12:34
masak gtodd: for $filename.IO.lines -> $line { transmogrify($line) } # profit! 12:36
gtodd plus I'm golfing ... so I wanted ot do something like IO:All in perl5
yeah THAT! :-D
whee
masak not golfed at all. it's how I would do it on a normal Tuesday. 12:37
gtodd heh
I wonder if me splatting silly code around in public while learning perl6 is a good thing :-| 12:38
masak don't sweat it :) 12:39
we're all on some path or other.
searched Gmail for 'to:rakudobug@perl.org from:cmasak@gmail.com' -- 1684 hits.
in two years or so, I can give a '2k RT tickets' talk ;)
gtodd hahaha
masak also, seems I started prepending '[BUG] ' to things back in June 2009.
12:40 jnap joined, thou joined
masak my first actual bug report is titled "There's no way to do .elems on a List of positional captures, because internals are poking out of the Match" 12:40
I see I didn't have brevity down pat back then :P
gtodd errm
masak clearly that title should be "[BUG] can't do Match.elems in Rakudo" :P 12:41
gtodd compared to the past version of masak I have the advantage of better docs :-)
masak well, not even better docs will make someone an expert overnight. 12:44
12:44 thou left 12:45 raiph joined 12:47 nbrown joined
gtodd hmm so when I read a list of IBAN numbers and validate them like this: codegolf.stackexchange.com/a/35323/20338 12:47
it works relaitively nicely
masak why do you insist on the 'my @i ='. you're not using the array anywhere. 12:48
s/\./?/
also, duplicate 'say ' on the second-last line -- could be factored out to the beginning of the line. 12:50
12:53 grondilu joined
grondilu logged in after reading about the IBAN code in the log 12:53
12:53 nbrown left
grondilu is confused by s///.uc 12:54
r: $_ = "foo"; say s/foo/bar/.uc
camelia rakudo-jvm c00999: OUTPUT«(timeout)»
..rakudo-{parrot,moar} c00999: OUTPUT«BAR␤»
12:55 xinming joined
grondilu did not know that was possible, thought .subst was necessay for that. 12:55
12:57 nbrown joined
psch hi #perl6 12:57
gtodd masak: yeah that duplicate say I knew I could do that somehow ;-) I just stuck the /\s|\-|\./ inthere to strip out the spaces "-" and "." from the string
psch the s///.uc thing there is interesting
apparently 's///.uc' is equivalent to $_ ~~ (s///.uc), which surprised me
colomon m: $_ = "foo"; say s/foo/bar/.uc; .say 12:58
camelia rakudo-moar c00999: OUTPUT«BAR␤bar␤»
colomon s/// returns result of substitution, .uc uppercases that result 12:59
but doesn't change $_
gtodd masak: If I do 'my @i =' (even if I'm not using @i) then $_ is mutable if I do " for lines() { ...} then I get an error about an immutable Str
psch m: my $foo = "foo"; say ($foo ~~ s/foo/bar/).uc
camelia rakudo-moar c00999: OUTPUT«TRUE␤»
psch ^- that kinda explains where i drew my conclusion from i think?
gtodd masak: I realize these are sloppy "baby perl6" workarounds for problems I am creating for myself ... but that's how idioms are invented isn't it ? ;-) 13:01
carlin m: for lines () { say s/(.*)/$//.uc }
camelia rakudo-moar c00999: OUTPUT«Cannot call 'lines'; none of these signatures match:␤:(Cool:D: *%_)␤ in sub lines at src/gen/m-CORE.setting:14465␤ in block at /tmp/JhDRT9bQJD:1␤␤»
carlin m: for lines() { say s/(.*)/$//.uc }
camelia rakudo-moar c00999: OUTPUT«Cannot modify an immutable Str␤ in sub infix:<=> at src/gen/m-CORE.setting:17044␤ in block at /tmp/0fuzFMIyys:1␤␤»
carlin m: for my @a = lines() { say s/(.*)/$//.uc }
camelia rakudo-moar c00999: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
masak m: for my @ = lines() { s/.//; .say } 13:02
camelia rakudo-moar c00999: OUTPUT«éad slán ag sléibhte maorga Chontae Dhún na nGall␤gus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤uair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤ mo dhiaidh bhí gleanntáin ghlas’ Ghaot…»
masak gtodd: I see. you still don't need to name the array, though.
m: for [lines] { s/.//; .say } 13:03
camelia rakudo-moar c00999: OUTPUT«éad slán ag sléibhte maorga Chontae Dhún na nGall Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll; Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth D…»
masak gtodd: that also works, and is shorter.
13:03 nbrown left
gtodd oh nice 13:08
[Coke] watched the first episode of Fringe last night, and comes in to see liz getting on a plane. yikes.
grondilu m: .say for q{s/(.**4)(.+)/$1$0/}, q{.=comb.rotate(4).join}; 13:09
camelia rakudo-moar c00999: OUTPUT«s/(.**4)(.+)/$1$0/␤.=comb.rotate(4).join␤»
gtodd masak: I was looking for @_ but it won't work in the "mainline" of a script
grondilu m: say .chars for q{s/(.**4)(.+)/$1$0/}, q{.=comb.rotate(4).join};
camelia rakudo-moar c00999: OUTPUT«18␤21␤»
masak I don't think that .= does what you think it does. 13:10
it only applies to the first method call, not to the entire chain.
grondilu oh yeah, forgot about that 13:11
masak m: say "abcdefghijk".comb[4..*,^4].join
camelia rakudo-moar c00999: OUTPUT«efghijk␤»
masak hm. 13:12
m: say "abcdefghijk".comb[4..10,^4].join
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
dalek p-js: a11e3df | (Pawel Murias)++ | tools/build/ (2 files):
Avoid unnecesarry installation of node modules.
13:13
grondilu m: say "abc def ghi jk".comb[4..10,^4].join
camelia rakudo-moar c00999: OUTPUT«def ghiabc ␤»
grondilu m: say "abc def ghi jk".comb(/<alpha>/)[4..10,^4].join
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
grondilu isn't there a shortcut for <alpha>? 13:14
pmurias FROGGS: 'perl Configure.pl --backends=parrot,js;make;make test' should now work correctly
moritz \o/
grondilu m: say "abc def ghi jk".comb(/\a/)[4..10,^4].join
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/6AmKPe7V9i␤Unrecognized backslash sequence: '\a'␤at /tmp/6AmKPe7V9i:1␤------> say "abc def ghi jk".comb(/\⏏a/)[4..10,^4].join␤ expecting any of:␤ method argu…»
masak grondilu: \w is close but not the same.
FROGGS pmurias: nice! lemme test it :o)
masak pmurias: wow! pmurias++ 13:15
grondilu oh, javascript backend now??
pmurias it's not yet complete and it currently emits horrible code 13:16
grondilu will it be visible on github.com/coke/perl6-roast-data/b..._rates.csv soon?
pmurias it's only for nqp atm
grondilu ok
pmurias++ anyway
13:16 kaare_ left
grondilu m: say "abc def ghi jk".comb(/\a/)[4..*,^4].join 13:17
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/9F1sYlexzv␤Unrecognized backslash sequence: '\a'␤at /tmp/9F1sYlexzv:1␤------> say "abc def ghi jk".comb(/\⏏a/)[4..*,^4].join␤ expecting any of:␤ method argum…»
grondilu m: say "abc def ghi jk".comb(/\</)[4..*,^4].join
camelia rakudo-moar c00999: OUTPUT«␤»
grondilu m: say "abc def ghi jk".comb(/\w/)[4..*,^4].join
camelia rakudo-moar c00999: OUTPUT«efghijk␤»
grondilu m: say "abc def ghi jk".comb(/<alpha>/)[4..*,^4].join
camelia rakudo-moar c00999: OUTPUT«efghijk␤» 13:18
grondilu meh
masak yeah, I expected that to work.
grondilu m: say (my @ = ^10)[3..*,1,2]
camelia rakudo-moar c00999: OUTPUT«3 4 5 6 7 8 9␤»
moritz sorry, I'm late for the fun; what do you want to achieve?
pmurias FROGGS: if you encounter any problems mention them, as I have only tested it on my machine so there might be portability problems
masak moritz: golfed way to "rotate" first four chars to the end of string. 13:19
grondilu moritz: golfing IBAN code
moritz m: say 'abcdefghijk'.comb.rotate(4).join
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
moritz m: say 'abcdefghijk'.ords
camelia rakudo-moar c00999: OUTPUT«97 98 99 100 101 102 103 104 105 106 107␤»
moritz m: say 'abcdefghijk'.ords.rotate(4).chrs
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
masak heh, same length ;) 13:20
moritz m: say chrs 'abcdefghijk'.ords.rotate(4)
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
grondilu m: say ~'abcdefghijk'.ords.rotate(4) 13:21
camelia rakudo-moar c00999: OUTPUT«101 102 103 104 105 106 107 97 98 99 100␤»
grondilu oops
m: say ~'abcdefghijk'.comb.rotate(4)
camelia rakudo-moar c00999: OUTPUT«e f g h i j k a b c d␤»
grondilu * 13:22
moritz m: say !'abcdefghijk'.comb.rotate(4) 13:23
camelia rakudo-moar c00999: OUTPUT«False␤»
moritz m: say |'abcdefghijk'.comb.rotate(4)
camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:23 chenryn joined
moritz wrong rod the first time :-) 13:23
timotimo pmurias: way cool that we can now test it easily :)
grondilu there is a prefix:<|>? 13:24
moritz to interpolate stuff into argument lists
masak m: say (|'abc'.comb).^name 13:25
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/suqOKYTh2L␤Variable '&prefix:<|>' is not declared␤at /tmp/suqOKYTh2L:1␤------> say (⏏|'abc'.comb).^name␤»
masak oh, right.
m: say |'abc'.comb
camelia rakudo-moar c00999: OUTPUT«abc␤»
grondilu oh yeah, I don't use that often
masak moritz++
13:26 isBEKaml joined
grondilu not sure why that glues everything when converting to a string, though. 13:26
sergot m: my %l = (<a b>, <c d>).map({ $_[0] => $_[1] }); say %l.perl; 13:27
camelia rakudo-moar c00999: OUTPUT«("c" => Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => 0..0, comment => Any)), "a" => Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => 0..0, comment => Any)), "d" => Failure.new(exception => X::…»
masak grondilu: because `say 'a', 'b', 'c'` does, too.
moritz it doesn't convert to a string :-)
sergot oh, it wasn't a priv msg to camelia
grondilu oh yeah, my bad
so it's actually called for what it's made for. Neat. 13:28
moritz (golfing is really just cheating as an art form)
grondilu well, the problem is that we wanted to change $_ at this point, not just print it. 13:29
so you do want a side-effect, I think. 13:30
anyway if you guys find a nice golf for IBAN, let me remind you there's a RC entry about it: rosettacode.org/wiki/IBAN#Perl_6 13:31
13:32 Ven joined
gtodd grondilu: I put one there just now 13:32
Ven masak: indeed, my internship is web dev. 13:33
masak gtodd: not gonna write your golf for you, but I think your best chance to make it short is to make it one single statement: `say ... ?? ... !! for [lines]`
Ven but even when I do C, scala, C#, or the like, I keep being in a debugger ...
gtodd grondilu: trying to shorten it .... ( s:g/\s|\-|\.// ) sigh
isBEKaml Hmm - I didn't expect to see camelia singing an Irish song. What happened to the Austrian national anthem? :-)
masak isBEKaml: Austrian national anthem is so 2009 ;) 13:34
gtodd masak: yeah I tried that (to get rid of the {} etc) but it gives me errors ... similar to what happens when there's invalid data ...
13:34 FROGGS[mobile] left
isBEKaml masak: hey, that's a national anthem! It can never go out of vogue :) 13:34
Ven masak: they went with $= or $abc = because it's just "a default but you don't actually assign a value" 13:35
$a = null, if you will
sergot people, who want to help me with this: github.com/sergot/p6-rosettacode-test ? :) 13:36
Ven ooh :)
sergot a future project, just wanted to give an idea
any volunteers? 13:37
carlin does rosettacode run mediawiki?
sergot yes
masak Ven: yes, I see that rationale. still, an infix op with no rhs is... un-Perlish, if you will.
13:37 erkan joined, erkan left, erkan joined
Ven masak: yes, yes. I'm just explaining because I learned about it during YAPC::NA 13:38
carlin sergot: it looks like you're parsing the HTML you could use the API to get the pages
masak Ven: we had that in Perl 6 once (infix:<..> for infinite ranges), but we realized it was a Bad Idea.
13:38 smash_ is now known as smash
moritz s/infix/postfix/ 13:38
Ven sergot: you want to download each of them every X time, and run them every Y ? or at the same time ?
moritz if the RHS is missing, it's a postfix 13:39
13:39 dmol left
masak moritz: that sounds like multi-pass parsing to me. 13:39
moritz: no, it was literally an infix op where you could skip the rhs.
Ven LL(*) :P
masak moritz: clearly this was before TimToady realized the importance of self-clocking :P
Ven realizes again the irclog is 2 hour before him 13:40
moritz masak: independently of how you implement it, you don't know if there's a term or an infix expected after it
pmurias masak: self-clocking? 13:41
sergot carlin: oh, nice idea
masak pmurias: intricate dance of terms and ops, orchestrated by operand type.
sergot Ven: I've just created this repo, wanted to test HTTP::userAgent in action
masak er, *operator type 13:42
sergot Ven: I have no specific plans, but the first idea was to capture every P6 code from particular task and run it
or save it into t/ dir and then run it using prove
carlin sergot: rosettacode.org/mw/api.php?action=q...ormat=json 13:43
13:43 isBEKaml left
Ven no timestamp,tho :) 13:43
sergot carlin: nice 13:44
carlin: would be great if we could get only the p6 code from particular task :)
but I doubt it's possible using api 13:45
carlin it is possible to get the text for a specific section 13:49
eg. rosettacode.org/mw/index.php?title=...ection=146
and then mayne parse the code between <lang perl6></lang> blocks
*maybe
trying to remember the tricks, been ages since I've used this API 13:50
sergot oh, that's nice 13:52
carlin++
carlin rosettacode.org/mw/api.php?action=q...ormat=json 13:53
sergot carlin++
awesome!
the project is really easy now :) 13:54
and relatively fast
13:54 molaf joined
carlin trick is finding the section number for "Perl 6" on each page, I'm sure there's an easy way to get the section number by title 13:57
13:57 btyler joined
carlin but I can't remember or figure out how 13:57
13:59 thou joined, nbrown joined
carlin tehre we go 14:01
rosettacode.org/mw/api.php?action=p...ormat=json
you do text={{:page_name}}
{{ }} imports the text from the page
:page_name tells it to get "page_name" from the default main namespace
by default {{ }} imports from the Tempalte: namespace
14:02 Alula_ left, Alula_ joined 14:04 nbrown left
Ven carlin: that's dogslow tho 14:04
sergot yeah 14:05
gtodd grondilu: the country code validator part of my perl6 IBAN codegolf is going to add 300 chars to my answer :-D ... I think ...
grondilu: I started it in perl5 since I was going to do the whole thing in perl5 until I noticed I'd need bignum (not allowed?!) or 100 chars of my own function to do mod 97 ... 14:06
14:07 chenryn left
gtodd grondilu: I just read numbers and two letter country code sequences into a hash for verification $c{$2}=$1while("SUPER LONG STRING HERE")=~/(\d.)(\D*)/g) ... so will want to do that in perl6 too ... 14:10
sergot carlin: thanks, if you have some free time, feel free to join me 14:12
carlin: I won't be able to finish this project until 19th Sep tho
of* 14:13
Aug*
carlin there doesn't seem to be a way to get section numbers without doing parse, which is odd :/ 14:14
PerlJam Too bad rosettacode doesn't have it's own API that sits atop mediawiki's. 14:16
gtodd PerlJam: isn't there a perl5 module that lets you fiddle with rosettacode?
PerlJam: oh wait it just lets you fiddle with a local copy
masak PerlJam: never too late to create an API on top of another ;) 14:21
hoelzro does this seem like a reasonable use of leading comments? sub foo(#|{one} Str $first, #|{two} Int $second) {...} 14:25
14:25 spider-mario joined
masak yes. 14:27
I think that kind of thing is even in S26, no? 14:28
or is the example only lagging comments?
hoelzro leading comments are specified to associate with the declaration beginning on the next line, iirc 14:32
I think that the usage makes sense as well, but I wanted others' input
14:33 treehug88 joined
masak yes, I think it makes a whole lot of sense. 14:33
PerlJam makes sense but isn't very readable :)
masak I see that S26 talks about "the start of the line immediately [before/after] [the declarator comment]" 14:34
PerlJam also, S26:288 does say that ... what masak just said
synopsebot Link: perlcabal.org/syn/S26.html#line_288
mathw I have no idea what they tell me
masak I think that makes sense for #| and #= but not for #|`() and #=`()
but OTOH, I don't have an immediate fix. 14:35
PerlJam er, #|`() ?
masak oh, er, no ` 14:36
PerlJam I wonder if that might lead to some confusion
14:36 chenryn joined
masak yeah. 14:36
[Coke] pmurias, grondilu: I will add it the minute it can run any spec tests. :)
masak we should find something that's easy to reason about. 14:37
14:39 jnap1 joined 14:40 chenryn left, jnap left, pecastro left 14:42 pecastro joined 14:43 kivutar left 14:44 chenryn joined
dalek kudo-star-daily: 00e340d | coke++ | log/ (14 files):
today (automated commit)
14:45
rl6-roast-data: ff0e611 | coke++ | / (5 files):
today (automated commit)
14:46 raiph left
[Coke] pmurias: do you have a "how to build the cross compiler" readme somewhere? I can see if you happen to run any tests yet. :) 14:46
(host07 has node already, yah.) 14:48
carlin would Test.pm work yet?
Ven it's nqp-only, afaik
[Coke] ah, right, still early days. 14:49
14:54 timotimo left 14:59 hoverboard joined
[Coke] jvm down to 20 failures, moar is clean, parrot is up to 1708 failures. 15:02
15:05 fhelmberger left
carlin oh dear 15:05
is parrot at "nailed to the perch" stage yet?
15:06 woolfy joined
tadzik it's sleeping 15:07
PerlJam carlin: no, it still has active developers. 15:08
maybe "developer"
moritz one gsoc student, one mentor
15:08 robinsmidsrod left 15:09 denis_boyun_ left
moritz and some release manager(s) 15:09
15:09 Possum left
pmurias what is the parrot gsoc project? 15:09
carlin oh wait, parakudo had 0 fails yesterday?
15:09 treehug88 left 15:10 robinsmidsrod joined
Ven pmurias: vtable opt, or something. 15:11
[Coke] yes.
Ven pmurias: www.google-melange.com/gsoc/projec...1485874176
[Coke] carlin: puts is dead. niecza is in a coma. rakudo.parrot was just hit by a bus today.
*pugs
Ven [Coke]: how many parrot failures yesterday :) ?
[Coke] 11:09 < carlin> oh wait, parakudo had 0 fails yesterday? 15:12
Ven hahaha then it's alright, a bus can be fixed :P
[Coke] 7/27, not quite yesterday.
between rakudo 8db87b5 and 319a78b, the number of failures jumped. 15:13
Ven well, it'd be surprising if so much stuff changed in how perl 6 should behave, right ?
might be a parrot-specific bit missing ? Just a bold guess
[Coke] um, what happened to commit 319a78b ?? 15:14
did somebody force push to nom?
FROGGS [Coke]: I know that timotimo did once a few days ago... but I can see that commit on github 15:15
pmurias [Coke]: hit by a bus? it lost it's main developer?
[Coke] ah, whew.
pmurias: NO
it was merely colorful language. parrot tests started failing 2 days ago. 15:16
pmurias I misread it "as parrot was just hit by a bus"
[Coke] went from 0 fails to 1856 fails to 1708 fails.
no, that's what I meant to say, yes. but just in the context of github.com/coke/perl6-roast-data/b..._rates.csv
and esp. with the comparison with the other two.
and I hadn't git fetch'd, duh. 15:17
(whew)
most likely culprit is 9515bb7
15:18 kaare_ joined
pmurias FROGGS: did building nqp-js work? 15:19
[Coke] starts a bisect. 15:20
FROGGS pmurias: sorry was away... running 'make' right now
[Coke]++
15:21 xinming left, xinming joined
FROGGS pmurias: 15:24
mkdir -p gen/js/stage2
./nqp-p src/vm/js/bin/cross-compile.nqp gen/js/stage2/QRegex.nqp gen/js/stage2/ QRegex NQPCORE 1
"load_bytecode" couldn't find file 'QAST/Compiler.pbc'
:o(
15:27 Ven left 15:28 xinming left 15:29 MilkmanDan left, xinming joined 15:30 MilkmanDan joined 15:31 treehug88 joined, zakharyas left 15:32 cognome left 15:33 dayangkun left, cognome joined 15:34 Akagi201 left 15:35 Akagi201_ joined
pmurias FROGGS: hmm, looking into that 15:38
15:40 Akagi201_ left
pmurias FROGGS: ls gen/parrot/QAST? 15:42
FROGGS: Could you run "ls gen/parrot/QAST"
FROGGS pmurias: there is no QAST subfolder 15:43
pmurias: but I've got a gen/js/stage1/QAST/Compiler.pbc 15:46
15:46 [Sno] left
pmurias it seems so files disappeared 15:47
s/so/some
did you start with a clean checkout?
15:48 dmol joined
FROGGS pmurias: yes 15:48
pmurias you didn't delete gen/parrot? 15:49
FROGGS no :o)
nqp-js$ LC_ALL=C git status 15:50
# On branch master
nothing to commit, working directory clean
pmurias what happens if you 'rm -fr gen/js/stage1' and run make again? 15:52
15:52 dmol left
FROGGS (it still compiles) 15:54
pmurias: that seems to do the trick 15:55
15:55 chenryn left
FROGGS now I get to: sh: 1: npm: not found 15:55
(installing it now)
15:59 chenryn joined 16:00 aoseki joined 16:02 akaseki left 16:03 rurban joined, rurban left 16:04 btyler_ joined 16:07 btyler left
FROGGS pmurias: Error: Cannot find module '/home/froggs/dev/nqp-js/node_modules/nqp-runtime-node/node_modules/sleep/build.js' 16:08
pmurias: gist.github.com/FROGGS/cb1f2ab1fb5da325663a
16:09 chenryn left 16:10 chenryn joined 16:15 chenryn left, tgt_ joined 16:16 tgt left, virtualsue left, spider-mario left, tgt_ left
psch FROGGS: you might have to symlink nodejs to node in your PATH - i know i had to do that, with the error "npm WARN This failure might be due to the use of legacy binary "node"" 16:17
16:17 tgt joined, ventica2 left
psch pmurias: i get as far as you pasted here a bit ago: 'Can not get attribute '%!marks' declared in class 'ParseShared' with this object' 16:18
16:19 tgt left, tgt_ joined 16:20 tgt_ left 16:21 tgt joined
pmurias psch: could you paste the entire output from the 'make' command so I can see when it fails? 16:21
FROGGS TimToady: for 'my $a' the EXPR will just parse it as termish which invokes <term>... so I wonder why term:sym<name> is preferred over term:sym<scope_declarator> :/ 16:22
psch pmurias: make works for me. it fails when i try to run the "it has to be run like this" command from the README
FROGGS psch: ahh, and I installed node right before that :o)
I'll uninstall node then and do the symlink... though that should not be the solution 16:23
psch FROGGS: you need node, but debian supplies /usr/bin/nodejs instead of /usr/bin/node
i symlinked /usr/bin/nodejs to ~/bin/node, fwiw
pmurias the debian package node is some strange ham radio thing that 3 people use 16:24
16:25 denis_boyun_ joined
FROGGS psch: I see 16:25
psch FROGGS: the alternative is apparently nodejs-legacy, which does the symlinking itself 16:26
FROGGS but still, can't we use nodejs instead?
psch (i just found that out from here: groups.google.com/forum/#!topic/No...F8uDXY8XE)
apparently the node-people themselves aren't unified in whether debian is wrong or not
16:27 timo joined, timo is now known as Guest92376, Guest92376 is now known as timotimo 16:28 xinming left
FROGGS :/ 16:28
pmurias FROGGS: your problem is that some packages seem to be broken on nodejs
FROGGS: did symlinking fix the problem? 16:30
timotimo hm, my screen session died 16:31
what did i miss?
pmurias FROGGS is trying to build nqp-js
but some node.js modules don't built 16:32
likely due to debian developers crippling his node.js
timotimo mhm :\ 16:33
16:35 colomon left
pmurias FROGGS: I could try to make those modules optional but it seems something is wrong with your node.js? 16:37
FROGGS: maybe you could try installing node.js from source?
16:39 sjn_roadie joined 16:40 dmol joined 16:45 beastd joined 16:46 takesako left
psch FROGGS: this might be obvious by now, you need the package nodejs or nodejs-legacy to get the node.js interpreter, which the former supplies as /usr/bin/nodejs and the latter as /usr/bin/node as a symlink to /usr/bin/nodejs 16:51
pmurias psch: his problem seems to be that node modules with a C part don't work 16:56
psch pmurias: that might be as well, i'm just adding what i did to make it work on debian 16:57
fsvo "work"
gist.github.com/peschwa/edaa138349b060598488 <- this value of "work", actually 16:58
installing libgmp was another thing i had to do iirc
17:01 dmol left, takesako joined 17:02 dmol joined, nbrown joined 17:05 Rotwang joined 17:06 nbrown left 17:07 sjn_ joined
timotimo www.reddit.com/r/perl/comments/2bzu...o_pasture/ - i think this ought to properly explain to people what's going on, eh? 17:08
17:09 sjn_roadie left 17:10 pippo joined
pippo o/ #perl6! 17:10
m: my $b = 10; 'a' x 10 ~~ /a ** $b/; 17:11
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/bWS9wxLHJ8␤Quantifier quantifies nothing␤at /tmp/bWS9wxLHJ8:1␤------> my $b = 10; 'a' x 10 ~~ /a ** ⏏$b/;␤ expecting any of:␤ postfix␤ infix stopper…»
17:11 dakkar left
pippo m: 'a' x 10 ~~ /a ** 10/; 17:11
timotimo (if you looked at that link a few minutes ago, refresh. i posted another bit of text)
camelia ( no output )
pippo m: 'a' x 10 ~~ /a ** 10/; say $/;
camelia rakudo-moar c00999: OUTPUT«「aaaaaaaaaa」␤␤»
pippo timotimo: yes I did!! :-)) I am refeshing now... 17:12
o/ 17:16
17:17 pippo left 17:19 bjz_ joined, gamo left
carlin carlosdelrey sure is commited to hating perl6 for some reason :/ 17:21
17:22 bjz left, akaseki joined 17:24 aoseki left 17:26 sjn_ is now known as sjn_roadie 17:27 Akagi201 joined 17:29 yeltzooo4 left 17:30 sjn_roadie left, sjn_roadie joined
TimToady s///.uc if relying on buggy, non-spec behavior, and will break in the future if you expect it to return the entire string rather than the Match 17:31
s/if/is/
17:31 yeltzooo joined
timotimo carlin: yup, "redditor for 2 months" and exclusively comments about spreading hateful speech about perl6 17:32
and it seems to be the case that that's the same person who's been trolling on perlmonks for quite a while
flussence don't worry, his head will explode sooner or later, either from his ego or a vein popping 17:34
TimToady
.oO(...then you win.)
17:35
timotimo i wouldn't wish that upon them
17:35 sjn_roadie left
timotimo i wish that person finds a better meaning in life than to spread hate about other people's work 17:35
TimToady well, not the first illigitimi we've non-carborundumed... 17:36
timotimo i wonder if we should upvote that post just so that people see how ridiculous carlosdelreys trolling is ... will people actually read the comments rather than just the title?
TimToady s/illigitimi/illigitimus/ I guess 17:38
flussence I wonder if someone should just poke the reddit admins about this, since I've observed anyone that doesn't agree with this person seems to end up with a disproportionately massive number of downvotes over the space of a few minutes. 17:39
TimToady So put it in the quotes files as: Well, he's not the first illigitimus we've non-carborundumed. :)
unless it's a she 17:40
PerlJam she's the first illigitimus we've non-carborundumed? 17:41
;)
TimToady we've had she's before too 17:42
but it's mostly he's
timotimo m: say "he's".comb.rotate(1).join 17:43
camelia rakudo-moar c00999: OUTPUT«e'sh␤»
timotimo m: say "he's".comb.rotate(-1).join
TimToady 'sides, she wouldn't be an -us
camelia rakudo-moar c00999: OUTPUT«she'␤»
TimToady illigititma or some such
*illigitima 17:44
PerlJam freudian slip?
TimToady
.oO(freudian typo)
carlin "... who edits out everything from the IRC logs that could possibly make anyone in the inner circle look bad" 17:45
^ 5 upvotes
how does anyone take this person seriously?
flussence those 5 upvotes are all from the same sockpuppet accounts they use to downvote everyone else; nobody right-minded could agree with that :) 17:46
17:49 [Sno] joined 17:51 tgt left
PerlJam #perl6-- (now I'm reading the thread too) 17:57
FROGGS pmurias: I was able to 'make' it after installing nodejs-legacy 17:59
m: my regex foo { <?{ say &?ROUTINE }> <?> }; say "foo" ~~ foo 18:04
camelia rakudo-moar c00999: OUTPUT«foo␤Not enough positional parameters passed; got 0 but expected 1␤ in regex foo at /tmp/nzwnIr5byb:1␤ in block at /tmp/nzwnIr5byb:1␤␤»
vendethiel
.oO( somebody edits the IRC logs ? Can I ask him to make me sound smart, pretty please ? )
18:05
FROGGS *g*
TimToady FROGGS: see S05:45; either you're losing under some tiebreaker, or rakudo's tiebreaking is buggy 18:06
synopsebot Link: perlcabal.org/syn/S05.html#line_45
TimToady (adding \s is specifically invoking rule 1 wrt normal identifiers)
but STD's my doesn't win that way
it's probably losing under rule 3 or 4 18:07
FROGGS hmmm
it is all declared in on grammar though... 18:08
18:08 go|dfish joined
masak moritz: if I make a custom class, and I want objects of that class to serialize themselves when encountered by to-json, what do I do? 18:08
FROGGS and term:sym<name> is declared later
maybe it is number 5... 18:09
vendethiel TimToady: I kinda recall a case where STD had a very good parsing of <> and rakudo was failing ? I think rakudo was seeing the qw operator then a term (2 terms in a row); but STD managed to parse it well. some memory of that ?
FROGGS though I still don't understand why it worked when it was an nqp module... the regex engine is identical
the difference now is that my grammar does not inherit from HLL::Grammar anymore 18:10
TimToady as I say, could be a bug in the impl of the rules too
FROGGS yeah... too many possibilities :/
grammar debugger does not work for slangs unfortunately 18:11
PerlJam vendethiel: you mean like in RT #121843 ? 18:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121843
jnthn Oh, for fucks sake. Rakudo JVM is *not* put out to pasture. The last major new backend specific feature added to Rakudo was async sockets, which Rakudo JVM had within a month of Moar and they actually *work better* on the JVM than they do on Moar. 18:13
Talk about selective quoting.
masak moritz: ah, found it. "just declare another multi to-json" :)
jnthn Or crappy research.
masak moritz++
jnthn Or, well, utter malice, given who we're talking about.
masak supernovus: ping 18:17
jnthn: please let us help you shield you from trolls. don't want you to waste cycles on them :/ 18:18
TimToady 1: First they ignore you. 2: Then they laugh at you. 3: Then they fight you. 4: ??? 5: Profit! <-- We're at stage 4. :) 18:19
FROGGS: you'll have to use a 'say' :P 18:20
nwc10 I hope this doesn't involve stealing more than 100% of the world's underwear supplies
FROGGS TimToady: guess what :P
nwc10 someone at the startup I was working for in 2000 calculated that we could be profitable, but only if we cornered 120% of the market 18:21
at least, for socks
masak well, aim high, that's what I always say. 18:22
TimToady socks are usually low
ever since the last sock market crash
FROGGS jnthn: where are the rules shown at S05:45 implemented? 18:23
synopsebot Link: perlcabal.org/syn/S05.html#line_45
nwc10 I see many puns looming in our near future
and most are going to be pants
jnthn FROGGS: In the NFA impl, largely. Though 5 is a case of "wtf, I don't even..." 18:24
And I'm not sure if we get 2 right
TimToady and that could be the difference here
FROGGS jnthn: and we do 3?
TimToady 'my' should win over \w\w 18:25
jnthn FROGGS: I think that falls out of normal method dispatch semantics
FROGGS starts to cry
ahh
TimToady or at lest over \w+
jnthn FROGGS: The NFAs are caulcuated per class
TimToady *least
jnthn And I think we take care to visit/add things in a sensible enough order.
carlin it's a good thing that Perl6 doesn't have enough valid criticisms that they have to fabricate some 18:26
FROGGS m: grammar G { proto token foo {*}; token foo:sym<name> { <?{ say "&?ROUTINE.name()" }> \w+ }; token foo:sym<my> { <?{ say "&?ROUTINE.name()" }> <sym> } }; say G.parse('my');
camelia rakudo-moar c00999: OUTPUT«No such method 'TOP' for invocant of type 'G'␤ in method parse at src/gen/m-CORE.setting:13266␤ in block at /tmp/FlNWZSRofi:1␤␤»
FROGGS m: grammar G { token TOP { <foo> }; proto token foo {*}; token foo:sym<name> { <?{ say "&?ROUTINE.name()" }> \w+ }; token foo:sym<my> { <?{ say "&?ROUTINE.name()" }> <sym> } }; say G.parse('my'); 18:27
camelia rakudo-moar c00999: OUTPUT«foo:sym<name>␤「my」␤ foo => 「my」␤␤»
FROGGS ha!
TimToady p6: 'my' ~~ / \w* {say 1} | 'my' {say 2} /
camelia rakudo-{parrot,jvm,moar} c00999: OUTPUT«1␤» 18:28
..niecza v24-109-g48a8de3: OUTPUT«2␤»
TimToady niecza++
FROGGS sometimes I hate niecza :/
(for being that good)
jnthn Oh 18:29
I know a hack approach to impl that.
FROGGS jnthn: the decision what rule to choose is done in the C code, right?
jnthn No
Well, yes
But don't change it there
FROGGS okay... 18:30
jnthn Just hack the NFA builder to look at the alternatives for literal prefixe
*prefixes
18:30 aoseki joined
jnthn And then add them in order of longest literal prefix 18:30
Hmm
Maybe :)
FROGGS err
18:30 brrt joined
jnthn Or mebbe we should do it in the NFA thing. 18:30
FROGGS reads that again
jnthn Yeah, the transtivie thing may get us in trouble
TimToady n: 'my' ~~ / m\w {say 1} | 'my' {say 2} /
camelia niecza v24-109-g48a8de3: OUTPUT«2␤» 18:31
jnthn Not sure how longest literal prefix rule interacts with transitivity? TimToady? :)
18:32 akaseki left
TimToady doesn't see the problem, offhand 18:32
FROGGS jnthn: do you mean mergesubrule by nfa builder?
or mergesubstates perhaps 18:33
jnthn token foo { 'b' <bar> | \w+ }; token bar { ar }; 'bars' ~~ /<foo>/
uh, 'bar' :)
TimToady looks like 3 literal chars to me
jnthn OK
masak tadzik: ping 18:34
jnthn Then we probably will most cleanly handle it in the NFA interpreter.
18:34 yeltzooo left
FROGGS jnthn: can you point me towards it? ó.ò 18:35
18:35 yeltzooo joined
masak tadzik++ :D 18:35
tadzik :) 18:36
masak tadzik: that was the quickest merge I've ever seen.
TimToady but if you hadn't changed 'bars' to 'bar', the \w+ would win, of course
tadzik I get my emails quickly :D
masak tadzik: thanks; we needed this for a sekkrit project.
tadzik I just saw the subject line and said "ok, fairy nuff" :)
18:37 raiph joined
masak haha 18:37
it was an easy change.
jnthn TimToady: Yes, realized that just after I wrote it :) 18:38
FROGGS: NFA.c or so in MoarVM
18:38 denis_boyun_ left
vendethiel PerlJam++ # wow, don't know how you managed to find it 18:38
18:38 ventica joined 18:39 denis_boyun joined 18:40 Possum joined
PerlJam vendethiel: complete luck. I was reading RT earlier today and looked at that ticket. 18:40
18:40 Possum left
FROGGS ahh! comments ftw! 18:41
18:41 Possum joined
FROGGS /* If we got multiple fates at this offset, sort them by the 18:41
* declaration order (represented by the fate number). In the
* future, we'll want to factor in longest literal prefix too. */
PerlJam FROGGS: so ... it's the future? :)
18:42 ventica2 joined
FROGGS PerlJam: depends... I mean, first I must solve this puzzle 18:42
18:42 dmol left 18:43 dmol joined
TimToady FROGGS++ is trying to redistribute the future more equitably :) 18:43
18:43 ventica left
[Coke] finds that one of his github commits is linked to from r/perl6. huh. 18:45
FROGGS [Coke]: about pugs? 18:46
18:47 brrt left
raiph .tell timotimo timotimo++ # p6weekly ... week 28 ... week 30+31 two weeks later ... should that be week 29+30?) 18:47
yoleaux raiph: I'll pass your message to timotimo.
timotimo oops :) 18:51
yoleaux 18:47Z <raiph> timotimo: timotimo++ # p6weekly ... week 28 ... week 30+31 two weeks later ... should that be week 29+30?)
raiph timotimo++ # for reddit responses
18:52 SamuraiJack joined
vendethiel raiph++ # posting my tutoriel to /r/perl6 18:52
I actually was just checking out since you guys were talking about reddit earlier ...
18:53 btyler_ left 18:54 brrt joined, btyler joined, yeltzooo left 18:58 yeltzooo joined, ventica2 left, ventica2 joined 18:59 gfldex joined 19:02 Ven joined
Ven To mark a class "abstract, I should just make it a role ? 19:04
masak moritz: my to-json idea didn't pan out, for obvious-in-retrospect reasons :( 19:05
19:06 ventica2 left
Ven m: role A { method m { say 1 } }; class B { method m { say 2 } }; B.new.m # shouldn't this error out ? 19:07
camelia rakudo-moar c00999: OUTPUT«2␤»
Ven it's only in the case of a multi dispatch ?
FROGGS Ven: why?
should B do A?
Ven I forgot the does. my bad
PerlJam Ven: no, even assuming you meant to say "class B does A" 19:08
Ven m: role A { multi method say { say 1 } }; class B does A { multi method say { say 2 } }; B.new.say
camelia rakudo-moar c00999: OUTPUT«Ambiguous call to 'say'; these signatures all match:␤:(B: *%_)␤:(B: *%_)␤ in block at /tmp/sra0igDfM2:1␤␤»
FROGGS only for multis, yes
jnthn Yeah, bringing in multis from a role adds them to the candidate list 19:10
That said, we could make it a compile-time error at compose of the class rather than waiting until runtime given those are clearly in conflict. 19:11
PerlJam btw, is the COMPOSE phaser implemented? 19:12
TimToady ny
Ven isn't 19:13
19:21 darutoko left
hoelzro .oO( we are the knights who say NYI ) 19:22
moritz masak: what was your to-json idea? 19:27
masak moritz: to simply add a new 'multi to-json' for my own data type.
moritz: but it doesn't work out, because the scope in my code and the scope in JSON::Tiny are different.
19:32 brrt left
Ven m: lazy for ^3 { say 1}; 1 19:32
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
Ven m: @m := lazy for ^3 { say 1}; 1
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/EkbGWmWkWp␤Variable '@m' is not declared␤at /tmp/EkbGWmWkWp:1␤------> @m⏏ := lazy for ^3 { say 1}; 1␤ expecting any of:␤ postfix␤»
Ven m: my @m := lazy for ^3 { say 1}; 1 # ENOMY
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
Ven doesn't really understand lazy, then. 19:33
m: gather for ^3 { say 1 }; lazy gather for ^3 { say 2 }; # ?
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤2␤2␤2␤»
TimToady suspects lazy is parsed but nyi 19:34
it's kinda waiting on the list context refactor
Ven TimToady: should *all* my examples work, though ? 19:35
that also means eager is kinda useless, uh ? except for `eager 1..*` :P
TimToady at the moment, it's usually better to stick with the implicit context, and not try to brute force it differently 19:36
Ven I'm just wondering if eager brings something to the table *right now*, not what it should do in specs :). I'm sure they have a purpose
TimToady unless you really need to force order of side effects
but in FP you don't usually use side effects, so in FP 'eager' is useless, theoretically speaking :) 19:37
Ven m: my @a = 1, 2, { say "fetch"; $^a + $^b } ... * > 30; say "alive"
camelia rakudo-moar c00999: OUTPUT«fetch␤fetch␤fetch␤fetch␤fetch␤fetch␤alive␤»
Ven uh.
TimToady and even if you put a 'lazy', a sink context outside of that will make it eager again, probably
but I think your 'my @m' above indicates a bug, or a nyi 19:39
m: @m := (for ^3 { say 1}); 1 19:40
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/LkRQkgXTrd␤Variable '@m' is not declared␤at /tmp/LkRQkgXTrd:1␤------> @m⏏ := (for ^3 { say 1}); 1␤ expecting any of:␤ postfix␤»
TimToady m: my @m := (for ^3 { say 1}); 1
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
TimToady that seems like a bug
constant thrice = do for ^3 { say 1}; 1 19:41
m: constant thrice = do for ^3 { say 1}; 1
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
TimToady n: constant thrice = do for ^3 { say 1}; 1
camelia niecza v24-109-g48a8de3: OUTPUT«1␤1␤1␤»
TimToady m: constant thrice = do for ^3,3 { say 1}; 1 19:42
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤1␤»
TimToady m: constant thrice = lazy for ^3,3 { say 1}; 1
camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤1␤»
TimToady m: constant thrice = gather for ^3,3 { say 1; take $_ }; 1 19:43
camelia ( no output )
TimToady well, you can force it lazy with gather/take anyway 19:44
cognominal 2014.jsconf.eu/speakers/vyacheslav-...ic-js.html 19:46
19:46 SamuraiJack left 19:48 Ven left
tony-o is that you? 19:52
TimToady sometimes
oh, you're talking to cognominal, so not this time :)
tony-o haha :) 19:53
19:57 colomon joined, anaeem1 joined 20:04 nbrown joined 20:09 nbrown left 20:13 Akagi201 left 20:31 brrt joined 20:33 kaare_ left 20:35 dwarring joined
pmurias FROGGS: does 'make test' pass tests? 20:36
FROGGS pmurias: All tests successful. 20:37
pmurias++ 20:38
dalek ast: 6afa585 | (David Warring [email@hidden.address] | integration/99problems-41-to-50.t:
unfudged P46. Switched from p5 regex to grammars
20:39
20:41 denis_boyun left
dalek p-js: 1256c3f | (Pawel Murias)++ | README.pod:
Update README.
20:42
hoelzro FROGGS, pmurias: is that for nqp-js?
(the tests, I mean)
FROGGS hoelzro: yes
pmurias it's a subset of nqp-js tests
hoelzro cool
pmurias * a subset of nqp test 20:43
hoelzro I unfortunately couldn't get it to build on my machine last night =(
psch pmurias: i get 1/47 failed for 60-bigint.t
hoelzro pmurias: do you intend to rebase on origin/master? I think the branch diverged in January, right?
20:44 Akagi201 joined
pmurias hoelzro: yes 20:44
hoelzro: the build process last night was really crazy 20:45
psch: could you nopaste the result of './nqp-js t/nqp/60-bigint.t?' 20:46
psch pmurias: not ok 22 - pow 0 ** large_number # maybe architecture?
pmurias psch: re the problem with the command from the readme, I'm sorry, I forgot to update the README 20:47
raiph
.oO( p6re ... rakudo packaged so that by default it ignores {braced content} that doesn't start with `use v6;` or more generally `use langx;`)
hoelzro maybe I'll try rebasing tonight; I think that the version of parrot nqp-js needs is too old for my system
psch pmurias: gist.github.com/peschwa/150ce4c48f64247c6b7c # complete output 20:48
20:48 Akagi201 left
pmurias psch: what architecture do you use? 20:49
hoelzro: that would be great
psch pmurias: i'm on 32bit 686-pae 20:50
pmurias it's 64bit here
psch: pastie.org/9430104 20:57
psch: you could try running it with './nqp-js pasted-file.nqp'
psch $ ./nqp-js pastie.nqp 20:59
not ok 1 - pow 0 ** large_number
# 1
[Coke] haters gonna hate. 21:02
avuserow pmurias++ # nqp-js hacking 21:04
21:05 beastd left
FROGGS it looks like we do the opposite of #4 of S05:45 :o( (from debugging the NFA) 21:07
synopsebot Link: perlcabal.org/syn/S05.html#line_45
jnthn oh... 21:08
wait, *earliest* wins?
Bah. :)
Well, we keep track of the order methods are added. Will just have to iterate them in reverse. :)
FROGGS jnthn: doing it in reverse order breaks my one-liner :/ 21:09
but I'd also guess that my topmost rules win :o) 21:10
and btw, the NFA picks the rule I want, but it doesn't get run
21:14 Akagi201 joined, hoverboard left
pmurias psch: could you try that? pastie.org/9430174 21:15
what architecture does camelia run under? 21:16
avuserow m: say $*OS.perl 21:17
camelia rakudo-moar c00999: OUTPUT«"linux"␤Saw 1 call to deprecated code during execution.␤================================================================================␤$*OS called at:␤ src/gen/m-CORE.setting, line 6255␤Please use $*DISTRO.name instead.␤---------------------…»
avuserow m: say $*DISTRO.perl
camelia rakudo-moar c00999: OUTPUT«Distro.new(release => "3.8.0-19-generic", is-win => Bool::False, path-sep => ":", name => "linux", auth => "unknown", version => Version.new('3.2.0.37.generic'), signature => Blob, desc => Str)␤» 21:18
pmurias 64 or 32 bit?
avuserow was hoping that'd be in there :)
psch pmurias: i've updated the gist; the output of the latest pastie of yours is at the bottom. i also fiddled a bit with iterator the exponent downwards, that's the second file
avuserow m: my int $i = 0; say +~$i
camelia rakudo-moar c00999: OUTPUT«0␤»
psch s/iterator/iterating/
21:19 Akagi201 left
[Coke] oh. I wonder if I can incorporate the rakudo-jvm-in-eclipse work to run perl6 from coldfusion. 21:19
psch pmurias: maybe 5.97**18 is meaningful to you - i don't really see why that's when it should start working though
eh, nvm, gisthub orders the file by name... the latest pastie is at the top then :) 21:21
pmurias psch: it's the same big number I get 21:22
21:22 Ven joined
FROGGS jnthn: ahh, now I understand why the reverse order fails... it does not think 'use v5' is about a version anymore, but it thinks it is a longname 21:23
and thus fails to load v5 aka Perl5.pm
vendethiel TimToady: uh. adding something to the range made it lazy ... ??? 21:24
or was it the $_ inside
raiph Q to #perl6: How might I do slurpandparseurl("pastebin.com/kp4eECVk") where the functionality is to get the CSV data (not the whole web page) turned in to a list of lists or somesuch? I gotta run now but hope to have a go tomorrow and will look for answers. tiafaa.
avuserow pmurias: looks like 64-bit on camelia, though I'm unsure what perl6 variable exposes that. I cheated to find out :)
21:24 virtualsue joined
jnthn FROGGS: Ah...hmmm 21:25
21:25 anaeem1 left
jnthn FROGGS: I guess the current setup works well for alternations but not methods... 21:26
FROGGS probably... 21:27
21:27 hoverboard joined
FROGGS but I don't get that: 21:27
2 fates[0]=21, edge_info[0].act=2
...
2 fates[7]=22, edge_info[7].act=2
QRegex::Cursor:323 #22 invoking term:sym<name>
number 21 is the term:sym<scope_declarator>
so in theory it would run that first
but the code in NQP just runs the last candidate... 21:28
21:31 pmurias left
FROGGS also MVM_nfa_run_proto returns an array with 21 in slot 0 and 22 in slot 7 21:31
avuserow m: say $*KERNEL.perl # looks like arch is NYI :(
camelia rakudo-moar c00999: OUTPUT«Kernel.new(release => "#30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013", name => "linux", auth => "unknown", version => Version.new('30.Ubuntu.SMP.Wed.May.1.16.35.23.UTC.2013'), signature => Blob, desc => Str)␤»
FROGGS ahh wait, the code in NQP pops >.< 21:32
jnthn: so the order is fine and according to spec...
jnthn oh, and then we traverse it in the wrong order? :) 21:33
FROGGS no, all is good
jnthn ah :)
heh
I'm actually looking at alternation code-gen at the moment
FROGGS except that the rule I want should be in slot seven, but is not
avuserow oh! 21:35
m: say $*KERNEL.arch
camelia rakudo-moar c00999: OUTPUT«x86_64␤»
timotimo heyo avuserow :) 21:37
21:38 itz joined
carlin m: say $*KERNEL.^methods 21:39
camelia rakudo-moar c00999: OUTPUT«BUILD name version release hardware arch bits signals gist Str <anon> <anon> <anon>␤»
Ven m: quietly 1
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/zFk8CnMRBi␤Undeclared routine:␤ quietly used at line 1␤␤»
Ven oh :(
masak m: undeclared 1 21:40
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/Rsp3Lwg4tv␤Undeclared routine:␤ undeclared used at line 1␤␤»
21:43 Ven left, cooper_ left 21:46 cooper_ joined 21:49 raiph left 21:52 cooper_ left, cooper_ joined
FROGGS jnthn: I found it 21:53
dalek ast: 2a9f6c1 | (David Warring [email@hidden.address] | integration/99problems-61-to-70.t:
is() => is_deeply + tweaks
21:54
FROGGS jnthn: the condition here is too restrictive when one candidate joins a list of fates: github.com/MoarVM/MoarVM/blob/mast...NFA.c#L482
avuserow o/ timotimo 21:55
jnthn Too restrictive in what sense? 21:56
FROGGS jnthn: it does not resort the list of candidates if only one is added
jnthn But the logic in there is only sorting the new ones 21:57
FROGGS and if the new one is declared later in your code it should go into slot zero so it is the last thing we run 21:59
but it won't go in slot zero because we do not sort beginning from zero
[Coke] .tell jnthn 22:00
yoleaux [Coke]: I don't know what you want me to say to jnthn.
[Coke] .tell jnthn st07:~/sandbox/perl6-roast-data/rakudo.parrot$
yoleaux [Coke]: I'll pass your message to jnthn.
FROGGS O.o 22:01
he is right here
TimToady um, yeah
[Coke] bad paste.
jnthn: the recent massive parrot failures are coming from:
FROGGS .tell [Coke] he is right here :P
yoleaux FROGGS: I'll pass your message to [Coke].
[Coke] 9515bb7636d2352a68bf770d80964f5907526fbc
yoleaux 22:01Z <FROGGS> [Coke]: he is right here :P
22:03 Mouq joined, lustlife left 22:07 lizmat joined
FROGGS damn, it fails to build nqp when I let it sort all fates :o( 22:08
TimToady it's not bug compatible! 22:09
FROGGS so, is it wrong to sort all fates?
jnthn FROGGS: I think so 22:10
yoleaux 22:00Z <[Coke]> jnthn: st07:~/sandbox/perl6-roast-data/rakudo.parrot$
FROGGS okay, then I turn around that fate list and then shift instead of pop in NQP...
I dunno how that works out with the stage0 22:11
yeah, explodes 22:12
TimToady is there a parallel structure somewhere that needs to stay in sync? 22:13
FROGGS probably in nqp
TimToady fates are kinda like actions, and attach to a particular matcher
FROGGS the $!states in NFA.nqp
I also wonder about that here: 22:14
MVMint64 char_fates = total_fates - prev_fates;
for (i = total_fates - char_fates; i < total_fates; i++)
TimToady sure looks like it's traversing the final n 22:15
22:15 Akagi201 joined
FROGGS i is prev_fates initially, no? 22:15
22:15 Possum left
TimToady hmm, yeah, that's a bit stinky 22:16
FROGGS and total_fates - char_fates appears three times
22:16 treehug88 left
TimToady why are we calculating char_fates, only to use it to get back to prev_fates? 22:16
FROGGS github.com/MoarVM/MoarVM/blob/mast...NFA.c#L482 22:17
TimToady unless something was inserted at the front
FROGGS char_fates itself is used once
22:17 itz left, Mouq left 22:20 Akagi201 left
dalek p: a2a5b72 | jnthn++ | src/vm/moar/QAST/QAST (2 files):
Build alternation offset arrays statically.

Before, we built them each time we wanted to evaluate an alternation. This cuts nearly 800,000 object allocations out during the compilation of CORE.setting, which is a measurable improvement.
22:22
FROGGS ohh wow 22:23
hoelzro holy crap 22:25
22:26 rindolf left, cooper_ left 22:28 cooper_ joined
jnthn [Coke]: I don't immediately see why that patch should work any differnet on Parrot. I've put it on my todo list to look into it 22:29
22:30 cbk1090 joined
cbk1090 Hello everyone 22:30
FROGGS hi cbk1090
timotimo wowza! 22:31
cbk1090 So I did this and need some help with what it is and how it works....
@tableObj[0].record.push( Record:data => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"});
two classes Table and Record
and Table does Record 22:32
FROGGS m: my @a; @a.push( Record:data => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"}); say @a
camelia rakudo-moar c00999: OUTPUT«===SORRY!=== Error while compiling /tmp/BGfT1gOCPw␤Preceding context expects a term, but found infix => instead␤at /tmp/BGfT1gOCPw:1␤------> my @a; @a.push( Record:data =>⏏ { index => 4, topic => "TEST", remarks [0…»
cbk1090 the output is Record => {"index" => 4, "topic" => "TEST", "remarks" => "A new record has been added!!!"}
TimToady weird, I do config with --get-nqp=master, but it keeps knocking my head off anyway
FROGGS m: my @a; @a.push( 'Record:data' => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"}); say @a
TimToady *gen
camelia rakudo-moar c00999: OUTPUT«"Record:data" => {"remarks" => "A new record has been added!!!", "topic" => "TEST", "index" => 4}␤»
FROGGS cbk1090: try quoting Record:date 22:33
data*
TimToady: --geN-nqp
TimToady was just a typo
FROGGS ahh :/
TimToady I actually . config.status
which has it correct 22:34
FROGGS will test that tomorrow... too sleepy right now 22:35
TimToady yes, about 8% faster
cbk1090 FROGGS, so why do I have to do the quoting and what does it do for the parent object. 22:36
TimToady it's a named argument otherwise 22:37
cbk1090 I guess I'm asking what does the Record:data part mean?
FROGGS cbk1090: you have to quote it so it is clear it is a hash/pair key
it is an identifier with an adverb
cbk1090 I guess I'm asking what does the Record:data part mean?
sorry bout that last one..
FROGGS :o)
TimToady though possibly it's misparsed 22:38
timotimo what is about 8% faster? 22:39
TimToady in fact, looking at your output, it is misparsed
22:39 virtualsue left
TimToady parsing the setting after jnthn's 800000 patch 22:39
timotimo oh, neato :)
cbk1090 TimToady, yes I'm sure it is. I really have no idea what I'm doing. Im just trying to put my ideas into Perl6 and see if they work, or move thing around till they work. 22:40
TimToady rakudo has a known bug parsing names with adverbs attached
flussence from reading the Configure.pl stuff, it appears --gen-nqp=$anything is completely ignored
TimToady huh
timotimo flussence: did you also look into the included nqp configure library?
i think it just gets passed on in @options or something
flussence yeah, it's hardcoded to use the value from tools/build/NQP_REVISION regardless. 22:41
FROGGS that can't be true
flussence well I might be misreading it, someone double check for me :) 22:42
22:42 cbk1090 left
masak 'night, #perl6 22:42
flussence o/ 22:43
FROGGS flussence: you are right :/ 22:44
dalek kudo/nom: 820565b | (Tobias Leich)++ | tools/lib/NQP/Configure.pm:
use --gen-nqp=<branch> if provided
22:46
FROGGS not tested, but should do
TimToady there's my good deed for the day, now I can go be bad... :) 22:47
flussence r-m: say 65/77*100
camelia rakudo-moar c00999: OUTPUT«84.415584␤»
flussence (~15% speedup for me :) 22:48
timotimo thank you, froggs! 22:49
that's kind of a bad bug :|
or was
or missing feature
or something
22:49 cbk1090 joined 22:50 cbk1090 left 22:51 cbk1090 joined
carlin on this subject... 22:51
it seem if I do: perl Confgure.pl --gen-moar --backends=moar --moar-option='--cc=clang', the moar-option doesn't get passed up to moar's configure
timotimo damn, i thought i fixed exactly that recently! 22:53
is that in nqp's or rakudo's configure? 22:54
carlin rakudo's
timotimo ah, hmm
FROGGS carlin: it looks good from glancing at rakudo/tools/lib/NQP/Configure.pm:438
timotimo i may only have fixed it for nqp
flussence relevant feature request: make moar's Configure.pl read a config.default like the rakudo/nqp ones do :)
22:55 cooper_ left, brrt left 22:57 cooper_ joined 22:59 ashleydev left
TimToady hmm, only about 1.3% faster on my other computer 22:59
23:00 btyler left
[Coke] jnthn: working on a ticket. 23:03
carlin it looks like the gen_moar() in rakudo's NQP/Configure.pm never gets run 23:04
NQP's does
github.com/rakudo/rakudo/blob/nom/...re.pm#L473
23:04 cbk1090 left
carlin that line never gets hit as far as I can tell 23:04
FROGGS ahh, that explains it 23:05
so we need to pass the moar options along
TimToady but rerunning on my first computer gets about 19% faster, so maybe some caching effects going on here 23:06
FROGGS O.o
TimToady faster than it was yesterday, not comparing specific versions
23:07 nbrown joined
[Coke] r: use Test; is(:10('01110') , 0d1110, ":10('01110') is default decimal"); 23:10
camelia rakudo-{jvm,moar} c00999: OUTPUT«ok 1 - :10('01110') is default decimal␤»
..rakudo-parrot c00999: OUTPUT«(signal )»
[Coke] jnthn: ^^
23:11 nbrown left 23:12 [particle] left 23:16 Akagi201 joined
FROGGS p: use Test; :10('01110') 23:17
camelia rakudo-parrot c00999: OUTPUT«(signal )»
23:17 ashleydev joined
TimToady p: :10('01110') 23:19
camelia ( no output )
TimToady p: use Test; 42
camelia ( no output )
TimToady p: use Test; :2('01110') 23:20
camelia rakudo-parrot c00999: OUTPUT«(signal )»
TimToady p: use Test; :2<01110>
camelia ( no output )
23:20 Akagi201 left
[Coke] RT #122436 23:20
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122436
23:22 ashleydev left 23:32 ashleydev joined 23:36 hoverboard left 23:38 FROGGS left 23:47 raiph joined 23:49 aoseki left
dalek p: 1a78f63 | jnthn++ | src/QRegex/Cursor.nqp:
Cache the reversed string for <after ...>.

We spent around > 0.5% of CORE.setting compilation time reversing the string each time we wanted to do <after ...>. Cache it once we've done it. Means MVM_string_flip becomes too low to make the profile now.
23:50
jnthn sleep & 23:55
23:57 ivanshmakov left