»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
TimToady sorear: ピン 00:14
[Coke] "Impl", "pass","fail","todo","skip","plan","spec" 01:14
# 05/27/2012 - rakudo++ (22296); niecza (91.62%); pugs (34.73%)
"niecza", 20428, 4, 743, 1451, 22626, 24117
"pugs" , 7745, 1970, 2978, 1297, 13990, 23978
"rakudo", 22296, 30, 640, 1874, 24840, 24117
(there's the long standing 30 failures in rakudo) 01:15
[Coke] r: say '(foo)' ~~ /'(' ~ ')' .*?/ 01:57
p6eval rakudo e7d4e8: OUTPUT«Unable to parse _block1011, couldn't find final ')'␤ in any FAILGOAL at src/stage2/QRegex.nqp:723␤ in regex <anon> at /tmp/O7AI_ta0jF:1␤ in method ACCEPTS at src/gen/CORE.setting:9513␤ in block <anon> at /tmp/O7AI_ta0jF:1␤␤»
[Coke] r: say "1ab2ab3c" ~~ /^ \d ** abc $/ ?? "OH NOES" !! "oh phew" 01:58
p6eval rakudo e7d4e8: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 2, near " abc $/ ??"␤»
[Coke] masak: ^^ && rt.perl.org/rt3/Ticket/Display.html?id=72440 01:58
[Coke] argh. rt just let me replace "search1" with "search2". 02:48
I was trying to copy the search.
benabik Is a test failure in nqp expected? qregex test 290 "alternation (|) - null right arg illegal" failed with 'Confused at line 2, near "|"' 03:24
diakopter benabik: that's the only failure I get that isn't marked TODO 03:55
benabik marks it TODO locally.
[Coke] anyone know how to search RT for tickets that are not testneeded? 04:27
Queue = 'perl6' AND ( Status = 'new' OR Status = 'open' ) AND 'CF.perl6.{Tag}' NOT LIKE 'testneeded' ain't it. 04:28
!= 'testneeded' also not right. 04:29
felher masak++ # for hacking and blog-posting :) 04:32
diakopter nqp: a-1 04:40
p6eval nqp: OUTPUT«Null PMC access in subtract_int()␤current instr.: '_block1000' pc 47 ((file unknown):168997876) (/tmp/Khnj0TYtE9:1)␤»
diakopter phenny: tell jnthn try ./nqp -e 'a-1' 04:41
phenny diakopter: I'll pass that on when jnthn is around.
sorear who is this Hainsworth guy and has he said anything worth reading? 04:46
if not, does he need a rebuttal? 04:47
diakopter I didn't find anything wrong with what he wrote 04:52
sorear diakopter: unsubstantiated assertion that when a group of European hackers say "typical use" they're engaging in US-centricism 05:04
diakopter I don't read him as saying that at all 05:08
moritz jnthn++ # blog 06:23
masak++ # blog
masak: in the first bullet point, A unary operator, a link is not expanded 06:24
dalek kudo/nom: d0b9784 | moritz++ | src/core/ (2 files):
typed exception for unsupported inheritance
06:27
ast: c147454 | moritz++ | S32-exceptions/misc.t:
test X::Inheritance::Unsupported
Woodi morning #
in last night backlog I saw Perl[56] discussion and no one could say for what v6 is better NOW and why it is worth learning... probably we should find few Perl6 good points good for use in not performance required cases... 06:31
diakopter runs rakudo spectest for the first time 06:37
testing better patch for nfa quant. 06:38
surely rakudo uses %/%% in places
moritz: is make spectest supposed to pass all tests? 06:43
diakopter ok, obviously it is 07:04
spacebat hai, giving R* a spin for the first time in a while 07:10
groping in the dark here, how do I enumerate the files in a directory? 07:11
diakopter I think currently you have to run ls or dir and parse the output 07:13
spacebat ah ok
diakopter I could be very wrong. 07:14
spacebat found it, its called dir 07:16
diakopter ah
spacebat I saw some old examples like "name".opendir that threwme
kinda glad "open a directory handle" is not tied to the Str type 07:17
perl6 advent calendar++
moritz spacebat: there's a dir('path') function that gives you all file name in a directory, lazily 07:27
brrt ... wow, nqp from just yesterday is too old for rakudo today
moritz brrt: yes, a big branch landed 07:28
brrt well, thats good at least
brrt leaves 07:33
diakopter moritz: u around? 07:38
moritz diakopter: yes
diakopter with latest nqp and latest rakudo, some rakudo spectests fail 07:40
moritz diakopter: which ones?
diakopter #19 on t/spec/S05-grammar/protoregex.t
oh wait
moritz my latest spectest run was all clean
diakopter nm, lemme run it again
I forgot to make install the other nqp
3 minutes
moritz no hurry :-) 07:41
diakopter nm. 5 minutes. have to rebuild rakudo too
ok, that fixed it 07:47
moritz very well
dalek kudo/nom: 3029a84 | moritz++ | src/core/ (2 files):
typed exception for "is export" name clash
07:52
ast: 5eefbf8 | moritz++ | S32-exceptions/misc.t:
test X::Export::NameClash
07:53
moritz r: say &infix:<+> 08:01
p6eval rakudo d0b978: OUTPUT«sub infix:<+>($a?, $b?) { ... }␤»
moritz r: say &infix:<+>.name
p6eval rakudo d0b978: OUTPUT«infix:<+>␤»
diakopter spectests again. takes 15 minutes. 08:07
dalek kudo/nom: 197e0bd | moritz++ | src/core/ (2 files):
typed exception when non-dwimmy hyperop has lists of unequal length
08:20
ast: 78d560a | moritz++ | S32-exceptions/misc.t:
test for X::HyperOp::NonDWIM
08:25
diakopter scratch the 15 min. 30 min. 08:30
moritz: how would I get spectest to parallelize 08:31
moritz diakopter: TEST_JOBS=4 make spectest
moritz submits another segfault ticket 08:32
diakopter nqp: a-1 # this is a weird one 08:32
p6eval nqp: OUTPUT«Null PMC access in subtract_int()␤current instr.: '_block1000' pc 47 ((file unknown):153506804) (/tmp/ZhaZW_hiBR:1)␤»
sorear plans for today/tomorrow: get v18 releasable; add handles if time permits
moritz sorear: sounds good
sergot o/ hi #perl6 ! 08:33
diakopter well, the only test the spectest failed were teh ones just added by moritz 08:34
diakopter because he pushed them while I was building rakudo, and then make spectest pulled down the latest tests :) 08:34
moritz yes, then that's kinda expected
diakopter sigh. 08:39
I committed to a branch, but I want to push the commit to master instead of to the new branch. help. 08:40
moritz go to master
and merge the branch
git merge yourbranch
or if you want just that last commit, not the whole branch, cherry-pick it
git cherry-pick yourbranch # takes the latest commit from yourbranch 08:41
dalek p: db80a11 | diakopter++ | src/QRegex/ (2 files):
get %/%% working for real this time. all nqp and rakudo spectests pass. extremely ugly code. terrible, even. but there is a lot of unexpected behavior here that I can't explain if I change little things here and there, attepmting to optimize. This ugly hot mess is the best I can do safely. apologies.
08:42
p: 2aee15e | diakopter++ | src/QRegex/ (2 files):
Merge branch 'nfaquant'
diakopter the best I can do safely, given my development cycle is, take 2-4 minutes to make a change, wait 45 minutes for tests. 08:45
moritz: do you know whether rakudo uses %/%% anywhere? 08:47
or the spectests even?
moritz diakopter: rakudo uses it in the Pod parsing code at least 08:49
diakopter: and t/spec/S05-metasyntax/repeat.t has some tests
diakopter hmm. I wonder how it was working previously, then
because %/%% wasn't working in nqp 08:50
so I assumed it wasn't working in rakudo either
diakopter moritz: I hope it won't be necessary to revert that commit. :) sleep& 08:57
masak good antenoon, #perl6 09:22
brrt good morning, masak 09:25
cognominal_ masak++ # for noting that the graph of the Hanoi Tower game is a sierpinsky triangle. If you have missed it, their is a video about that on youtube, and an associated web page : www.youtube.com/watch?v=w_3hCjE6FWU 09:27
*there 09:29
timotimo wow, that's cute 09:32
cognominal_ it seems that all videos in the fractalmath youtube channel are great. 09:34
masak cognominal_: I was walking to the store one day and I got genuinely curious. tried to work it out in my head. I got the general structure, but I didn't realize it was a sierpinski triangle until I got home and looked it up online. 09:36
[Coke]++ # been active in RT 09:38
r: class A { has $!x; method foo { say $!x } }; A.foo 09:42
p6eval rakudo 197e0b: OUTPUT«Cannot look up attributes in a type object␤ in method foo at /tmp/I8blzFbc8L:1␤ in block <anon> at /tmp/I8blzFbc8L:1␤␤»
masak r: my $foo = 'hello world'; say «$foo».elems 09:47
p6eval rakudo 197e0b: OUTPUT«===SORRY!===␤:w list value must be known at compile time␤at /tmp/YmTzn8ZLsA:1␤»
masak ses who?
masak S03 certainly doesn't mandate that the values be compile-time values. 10:00
moritz yes, bug
masak and if «» is the moral equivalent of ""...
bug, but already submat. :) 10:01
cognominal_ How come the Iterable class has no method .next and .prev? … in rakudo at least. 10:13
moritz cognominal_: because that's not how iterators work in Perl 6. 10:14
masak I like www.lostgarden.com/2012/04/loops-and-arcs.html 10:15
its definition of 'wisdom' alone is interesting:
"Loops are very good at building 'wisdom', a holistic understanding of a complex system. The player ends up with a mental model that contains a thousand branches, successes, failures and nuances that lets them approach new situations with confidence."
cognominal_ because of lazyness?
moritz?
masak cognominal_: not directly because of laziness. 10:16
moritz well, there are a lot of contraints that went into the design of iterators
masak cognominal_: the not-yet-updated S07 will have all the gory details :)
moritz laziness being one of them
cognominal_ I guess that will be a FAQ
moritz another being that for 1..* { } must be able to forget all the reified elements after they have been iterated 10:17
masak right, so .prev is quite the pessimization.
cognominal_ that's probablt a synopsys I have overlooked.
masak S07
but it's not up-to-date.
cognominal_ *synopsis 10:17
moritz roughly 25 exceptions remain in src/core/ which I need to update to typed exceptions 10:18
masak the first comment of the HN thread is interesting too: essentially, consumption is arc-y and production is loop-y. news.ycombinator.com/item?id=3907562 10:19
that's what I feel about submitting bugs. it's a little loop.
Timbus so i was testing out the gimp and um. this accidentally happened: i.imgur.com/Otnn2.png 10:29
im so sorry 10:30
is it me or does camelia have lazy eye 10:31
technically it is me. i do have lazy eye
masak too 10:36
the Camelia on en.wikipedia.org/wiki/Perl_6 is looking straight at me, though. 10:37
Timbus the more i stare, the less sure i am 10:39
moritz liked Kamelia (the KDE-styled Camelia) 10:42
frettled Timbus: so that, uhm, _thing_ flying towards us madly, grinning, is advocating something called «d9», do you know what that is? 10:45
Timbus lol 10:50
Timbus i dont know but i giggle every time i see it. 10:50
moritz and the MT... does it come out of MIT, but with the I dropped? 10:52
Timbus perhaps i should replace the wing letters with php
and it suddenly makes more sense
masak frettled: seems "d9" means a lot of different things: en.wikipedia.org/wiki/D9 10:53
Timbus Caterpillar D9 is apt
moritz Timbus: or mayb bλb
frettled I think it's short for "debiliated". 10:54
So that, uh, thing is Debilia. 10:56
Timbus excellent name 10:58
masak wonderful. Camelia now has a crazy twin sister. 11:00
Timbus i will use this logo every time i do something absurd in perl 6. like implement sleepsort 11:15
masak ;) 11:16
Timbus um, so i was asked this in regards to perl6 param passing: "is there a switch to get it to default to pass as copy?" 12:05
i figured id ask so i could at least get a bunch of good, justified ways to say 'no'
masak I think it's been discussed. 12:07
a pragma of some sort.
moritz I don't think there's an easy way
but I guess that jnthn++ could hack something extremly evil up in a few minutes or hours :-)
masak on paper, it should just be a matter of hooking into the routine-creating thingie and have it default to 'is copy'.
Timbus i dunno if the guy has a good reason to default to 'is copy'. maybe he needs to write a bunch of subs that.. uhhh 12:09
maybe ill ask
dalek ar/template: f4632b9 | moritz++ | / (4 files):
[build] add a basic template mechanism

this grabs the {parrot,rakudo,nqp} revisions and fudges them into Configure.pl, so at least it is one less location to update
12:10
ar/template: 2663a48 | moritz++ | build/skel-template.pl:
[build] fix add a small comment
12:12
masak 'is copy' always feels like a shortcut to me.
colomon it *is* a shortcut 12:13
masak right.
well, let's put it like this. nowadays I tend towards immutability and fewer assignments. 'is copy' tells me I'm straying from that path, and that I should maybe ask myself why. 12:14
moritz jnthn, pmichaud: the 'template' branch in the star repo adds a small perl script that processes files while copying them over, and replaces some variables. It means we must update one less file manually when setting the versions. If you have no objections, I'll merge it into master 12:18
masak moritz++ 12:39
arnsholt has finally gotten around to learning Parsec 12:42
I have to admit, this is a pretty sweet a way of doing things
moritz how does it compare to p6 grammars? 12:43
moritz -> afk 12:46
cognominal_ moritz: Parsec uses combinators 13:13
so do some Scala grammar libraries 13:14
masak how do combinators compare to the rec-descent rules of p6 grammars? 13:15
cognominal_ en.wikipedia.org/wiki/Parser_combinator
masak hm, every variant of the question "how do parser combinators compare to p6 grammars?" seems to come across as "what are parser combinators?"... 13:16
I'm pretty sure the two are functionally equivalent. I know what combinators are, and I can imagine what it means to be a parser combinator. 13:17
but what does it *feel* like to use them compared to p6 grammars? 13:18
are the two isomoprhic in some interesting way?
cognominal_ I have yet to grap the differences between all the kind of parsers
masak oh btw.
#perl6, I'm taking a vacation.
if I don't show up tomorrow to nag, heckle, and troll you, don't be alarmed. it's a planned AFK time. 13:19
masak I'll miss you. 13:20
cognominal_ masak, do you have thought about a game wich states map to sierpinsky carpet, or sponge?
masak cognominal_: I hadn't. but it's an interesting thought.
Juerd masak: Enjoy your holiday 13:21
masak oh, I will. 13:22
thanks.
cognominal_ ho, that's a Menger's Sponge
pmichaud moritz: (star repo improvement) no objections here 13:35
pmichaud reads backscroll
[Coke] r: say 659-78 # open tickets - testneeded 13:52
p6eval rakudo 197e0b: OUTPUT«581␤»
masak r: say 659#`[open tickets] - 78#`[testneeded] 13:53
p6eval rakudo 197e0b: OUTPUT«581␤»
arnsholt masak: Using Parsec definitely -feels- different from using P6 grammars 13:54
bbkr_ what kind of sorcery is this ?! :P
lumi_ I think grammars are like parsers, and parser combinators are like... parameterized rules maybe? 13:57
masak Perl 6 grammars have parameterized rules :) 13:58
it's all just methods. 13:59
lumi_ masak: Well, ** and % and such are combinators with some syntax, right?
masak if ** is a combinator, then all quantifiers are. 14:01
arnsholt And when I couldn't find a combinator to do "match exactly N of parser P" it was trivially simple to write my own that did what I wanted 14:02
masak but something tells me the p6 things don't count as combinators. they can be seen as combinators, for sure, but they aren't really. 14:02
lumi_ Isn't it just because they're kind of hard-wired? 14:08
arnsholt You could probably make your own combinators in a grammar, but I think it'd require some additional legwork to get working 14:15
masak & 14:22
pmichaud [Coke]: ping 15:48
[Coke] pmichaud: pong. 15:50
pmichaud nm, I found the thread I was looking for (RT #66152, about memory consumption of a fore loop)
[Coke] perlcabal.org/syn/S09.html#Compact_arrays says "my int @ints"... is this correct and working in rakudo?
pmichaud s/fore//
[Coke] pmichaud: I'm testing that now.
pmichaud afaik, typed arrays are nyi in nom
and I'm pretty sure that compact arrays are nyi 15:51
[Coke] I put in the original code from the user's post, and it's down to about 18s in rakudo. 13 if you s/Int//
pmichaud I find the original poster's claim of "26KB RAM" to be suspect for p5. I'm not sure how one would hold 100K ints in 26KB of RAM.
[Coke] (that 5s variance might be due to compilation going on in background.) 15:53
pmichaud No, I suspect that the "Int" constraint does indeed slow things down a bit. I was going to also write in my reply that adding "Int" actually makes p6 do more work than the p5 version. 15:53
[Coke] perl 5.16.0 runs that in about 0.02s on feather.
pmichaud: sadly, adding "int" instead breaks it. 15:54
pmichaud maybe change $i++ to $i = $i + 1
[Coke] <nod>
that's a bug, yes? 15:55
pmichaud if it works, then yes.
[Coke] so, I'll let you respond to this one. I figure it's closable just by picking a better set of p6 code, rerunning the numbers and posting them.
pmichaud I mean, clearly $i++ should work on int values, if that's where the failure is occuring.
Sure, I'll do the response.
[Coke] switching to a range gets us down to a little over 1s. 15:57
pmichaud my system completes the loop in 5s 15:58
tadzik hello #perl6 15:59
pmichaud huh, removing the "Int" on my system didn't improve the speed. 16:03
at least, not by any significant amount. 16:04
diakopter nqp: /\x[23,23]/ 16:40
p6eval nqp: ( no output )
moritz r: my Str subset Foo; say Foo ~~ Str
p6eval rakudo 197e0b: OUTPUT«True␤»
diakopter r: say Str ~~ !Str 16:41
p6eval rakudo 197e0b: OUTPUT«True␤»
moritz heh 16:42
diakopter r: my Array of Int $a = Array[Int].new; say $a[0]; 16:45
p6eval rakudo 197e0b: OUTPUT«Type check failed in assignment to '$a'; expected 'Array+{TypedArray}' but got 'Array+{TypedArray}'␤ in block <anon> at /tmp/6Gq0lANGWy:1␤␤»
moritz that's a known bug 16:50
arnsholt++ discovered it during his work on zavolaj
diakopter oh 17:00
nqp: say-1 17:02
p6eval nqp: OUTPUT«Multiple Dispatch: No suitable candidate found for 'subtract_int', with signature 'PIP->P'␤current instr.: '_block1000' pc 27 ((file unknown):163005041) (/tmp/GT6GFaPLxU:1)␤»
diakopter phenny: ask jnthn also nqp: say -1 17:03
phenny diakopter: I'll pass that on when jnthn is around.
diakopter moritz: did you spectest with my patch 17:10
moritz diakopter: yes, all green 17:13
diakopter \o/
moritz diakopter: say-1 is because nqp doesn't have listops.
diakopter now for range quant, which the only way I know how to implement is to inject that number of repetitions of the pattern
moritz diakopter: it parses 'say' as a term that returns a Null or Undef PMC
diakopter: and then fails to parrot-level-multidispatch to it 17:14
diakopter a-1 seems like it would do the same thing, but NPMCA 17:15
tadzik nqp: say(-1)
p6eval nqp: OUTPUT«-1␤»
moritz nqp: &say - 1 17:18
p6eval nqp: OUTPUT«Symbol '&say' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 149 (compilers/pct/src/PCT/HLLCompiler.pir:106)␤»
moritz oh, maybe it tries to do &say - 1
so that one just multi-dispatch-fails
and the other NPMCAs
diakopter oh 17:19
moritz r: my Str subset Foo; say 1 ~~ Foo 17:20
p6eval rakudo 197e0b: OUTPUT«True␤»
moritz r: my Str subset Foo; say Any ~~ Foo
p6eval rakudo 197e0b: OUTPUT«True␤»
moritz r: my Str subset Foo; say Mu ~~ Foo
p6eval rakudo 197e0b: OUTPUT«False␤»
dalek ast: 7a70097 | moritz++ | S12-subset/subtypes.t:
test for RT #79160, "my Str subset MyStr". One fails on rakudo
17:22
jnthn evening o/ 17:49
phenny jnthn: 04:41Z <diakopter> tell jnthn try ./nqp -e 'a-1'
jnthn: 17:03Z <diakopter> ask jnthn also nqp: say -1
jnthn diakopter: "say -1" is not gonna work because NQP doesn't do listops.
a-1 is probably a NPMCA
diakopter bing 17:50
jnthn NQP ain't very smart about checking for such things at compile time. 17:51
I'm totally for improvements, but generally my "fix bugs"/"make nicer user experience" tuits end up being spent on Rakudo. 17:52
diakopter yeah
jnthn I may well do something about that one when I work on the QAST improvements though.
uh, qast migration even 17:53
[Coke] pmichaud: 5s is better than I was getting - but I'd include the 5.16.0 timings also 17:57
dalek ar: f4632b9 | moritz++ | / (4 files):
[build] add a basic template mechanism

this grabs the {parrot,rakudo,nqp} revisions and fudges them into Configure.pl, so at least it is one less location to update
18:14
ar: 2663a48 | moritz++ | build/skel-template.pl:
[build] fix add a small comment
ar: c27e2ab | moritz++ | / (4 files):
Merge branch 'template'
jnthn < pmichaud> huh, removing the "Int" on my system didn't improve the speed. 18:31
pmichaud: Type checks under 6model probably boil down to a pointer comparision in this case.
pmichaud: Or similar. They're fairly fast :) 18:32
moritz and I guess we don't have a custom postfix:<++> for Int 18:34
pmichaud actually, it's "int" in this case
not Int
I think the problem has to do with rw-ness of the int containter 18:35
gist.github.com/2820552
unless you're referring to something else wrt "Int" and postfix:<++> (e.g., the non-need to typecheck) 18:36
jnthn: when you phrase it that way -- yes, seems like typechecks aren't as expensive as they once were, at least for "simple" types
and for exact matches, perhaps 18:37
moritz yes, you need to write it as $i = $i + 1;
though since we don't have compact arrays, we box $i twice per iteration
once for the index, once for the value
pmichaud ...the index requires boxing? 18:38
I thought we multi-dispatched that on 'int' now.
(I agree the value requires boxing.)
multi method postcircumfix:<[ ]>(\$self: int $pos) is rw { 18:39
jnthn I thoguht so too. 18:40
int++ is NYI
pmichaud what's needed to YI it?
jnthn Somebody to come up with a design for implementing native "is rw" parameters that will work out nicely with inlining. 18:41
pmichaud okay, so not trivial. :-)
jnthn Aye. :-) 18:42
pmichaud perhaps we could add a stub for the int case that gives a more informative error than the one we have now.
jnthn We could indeed do that.
pmichaud because I suspect it will be quite common.
jnthn *nod* 18:43
I need to take on things like compact arrays at some point in the not too distant future too. Guess there's a bunch of natives work to do. 18:44
pmichaud: btw, I flattened out the CAPHASH and MATCH methods last night. It helped some. 18:47
pmichaud okay, I was wondering if it helped at all. "some" is useful.
jnthn r: say 61 / 64 18:48
p6eval rakudo 197e0b: OUTPUT«0.953125␤»
jnthn That much.
pmichaud about 5% then.
jnthn roughly, not very scientific, etc.
Aye.
Quite a bit of CAPHASH and MATCH themselves. And that time includes the actions time.
pmichaud I'll try to carve out some time for profiling and see if I can find places to improve things. I'm still a little surprised that it's overall slower than nqp-rx's engine was. 18:49
jnthn I looked at --rxtrace for some simple code
We call <.ws> insanely often.
pmichaud well, yes.
between each pair of tokens, essentially. 18:50
jnthn like, if you have a bunch of :my ...; declarations I think we're even calling <.ws> either side of those.
Well, I saw sequences of <.ws> calls, in the same rule, with no subrule calls between them.
That may not mean no token of course.
pmichaud yes, they're still there, although they should short-circuit at the beginning of the <.ws> rule. 18:51
jnthn They do.
Not calling them at all could be cheaper of course. :)
s/could/would/
pmichaud sure, but I wonder if the check would start to cost more than the call.
jnthn I get the impression that NFA-ing alternations would also be a saving.
Well, the check would be compile time, no?
pmichaud "compile time" confuses me. 18:52
jnthn As in, you can statically look at:
:my $x := 1;
:my $y := 2;
And see that you don't need a <.ws> call between those two. Or so I'd imagine.
pmichaud but you do need one.
to eat up the crlf, for one.
jnthn No no 18:53
I meant, if the rule we are compiling is containing the above
The compiled output of the rule need not emit a call to <.ws> between them.
pmichaud oh, you mean to .... right
jnthn Yeah. I think we're emitting more <.ws> than we need in those situations.
pmichaud I suspect it's not a huge percentage of calls, although I could be wrong about that. 18:54
I also wonder if it's possible that the thing on the rhs of the := could affect the cursor somehow, in which case you do need to pessimize the <.ws>
jnthn Hmm. 18:55
pmichaud e.g., :my $x := $cursor.something(...); my $y := ...;
there might be a rule somewhere that says that ws prior to a :my (or other declaration) isn't meta. We toyed with that in some previous discussions of the regex spec. 18:57
jnthn Well, nothing is compliant with latest spec on sigspace anyway 18:58
Not even STD.
Current rules mean that space at the start of the rule is not a call to <.ws> 18:59
So you can do LTM on rules.
s/Current rules/Current spec/
pmichaud that one is likely easy to fix, however.
jnthn I tried the patch last night.
It had fallout.
(e.g. NQP's grammar depends on the old rules) 19:00
pmichaud probably a few places in the grammar need an explicit <.ws> then.
jnthn I didn't look into how much. It didn't seem too significant, I just didn't have time to dig further.
pmichaud very likely to be tangled with the expression parser somehow.
jnthn *nod* 19:01
Expression parser reminds me I really want operator adverbs too :)
I understand that they're parsed by the call to infixish now.
pmichaud whitespace in and around expression tokens is really tricky in a few places
jnthn My head exploded when I tried to figure out how they end up associated with the correct operator in reduce... 19:02
pmichaud yeah, even spec'ing that feature causes head explosions
jnthn Yeah, I noticed the carefully planned ws calls in EXPR while updating it for QRegex :)
*carefully placed
pmichaud I'm afk for a bit 19:06
jnthn hides to try and get solutions for tomorrow's class exercises prepared... 19:07
tadzik is it TDD if you prepare solutions and then exercises? :P 19:09
jnthn :P 19:10
Half of my $course participants today were from Poland. I resisted the temptation to call a bunch of things "dupa" :P 19:13
moritz phenny: pl en "dupa"? 19:13
phenny moritz: "ass" (pl to en, translate.google.com)
jnthn It's Polish for "foo", "bar" AND "baz". Or something. :) 19:14
moritz ah
jnthn irclog.perlgeek.de/perl6/2012-03-14#i_5294394 ;-) 19:15
The things you learn on #perl6... :)
moritz :-)
tadzik :P
moritz
.oO( "thingy" )
sergot ;) 19:17
sorear good * #perl6 19:22
moritz \o sorear 19:23
TimToady \o from TO
moritz tokio? toronto? tornado island?
TimToady thousand oaks 19:24
benabik Tongo
moritz close :-)
benabik Sorry, .to is Tonga
sorear is Tokio how they call it in .de?
TimToady Tokjo surely :) 19:25
moritz sorear: yes 19:26
sorear wonders if TimToady has figured out yet what sorear was up to this morning
moritz can we please get rid of S02:1494, 'my Str subset Str_not2b where /^[isnt|arent|amnot|aint]$/;' 19:28
not only is it a PITA to implement in Rakudo, it is also rather inconsistent 19:29
TimToady sorear: nope, I'm not really a stalker, all appearances to the contrary notwithstanding...
moritz because 'my <type> ...' typically constrain what can be returned
moritz *constrains 19:30
jnthn moritz: What makes it a pain to implement ooc?
Is the type not in $*OFTYPE or some such? 19:31
moritz jnthn: oh, it might be
moritz turns out I don't understand how the subset actions work 19:34
it seems taht $refinee is always Any
jnthn moritz: uh, wtf, it seems that way to me too 19:35
moritz r: subset Foo of Str; multi f(Foo) { 'foo' }; multi f(Cool) { 'cool' }; say f 'some string' 19:40
p6eval rakudo 197e0b: OUTPUT«foo␤»
TimToady yes, Camelia is intentionally very slightly, er, wall-eyed...
moritz then how does the Foo-candidate sort tighter than the Cool candidate?
jnthn r: subset Foo of Str; say Foo.^mro 19:41
p6eval rakudo 197e0b: OUTPUT«No such method 'mro' for invocant of type 'Perl6::Metamodel::SubsetHOW'␤ in block <anon> at /tmp/OwVec1wcHm:1␤␤»
moritz oh
jnthn r: subset Foo of Str; say Foo.^base_type
p6eval rakudo 197e0b: OUTPUT«No such method 'base_type' for invocant of type 'Perl6::Metamodel::SubsetHOW'␤ in block <anon> at /tmp/cleVDw0QpG:1␤␤»
jnthn grr, how's this work again... :)
moritz r: subset Foo of Str; say Foo.^refinee
p6eval rakudo 197e0b: OUTPUT«Str()␤»
jnthn oooh
moritz it's the 'of' trait
jnthn It's right there in le comment!
Right :)
moritz it calls .^set_of 19:42
jnthn # We refine Any by default; "of" may override.
moritz so if there is an $*OFTYPE, we default to instead of Any 19:43
jnthn Would seem to work, yes
moritz how do I check if it's there? .defined won't work :-)
nqp: my $*OFTYPE; say(pir::null($*OFTYPE)) 19:44
p6eval nqp: OUTPUT«␤»
moritz nqp: my $*OFTYPE; say(pir::typeof__SP($*OFTYPE))
p6eval nqp: OUTPUT«Undef␤»
moritz or do we have an op that checks if something is a 6model object? 19:45
adu is 6model written in C?
jnthn moritz: $*OFTYPE is a match object. 19:47
moritz: You check if it's true, and if it is, then $*OFTYPE.ast to get the type
adu: The 6model core is implemented in whatever makes most sense on the platform/VM it's being implemented for. The Parrot implementation is written in C. 19:48
The prototype CLR one was done in C#, and I expect I'll be working on a JVM one soon, which I guess I have the joy of writing in that oh so expressive langauge, Java. :)
adu jnthn: can I help? 19:49
I'm quite familiar with Java
adu is also an Android developer
jnthn adu: Help will be most welcome. :) 19:50
adu (during the day, that is, at night I work on whatever I want :)
is the java version going to be called something different? or niecza-j? 19:51
diakopter nqpjvm? 19:52
TimToady jakudo :)
adu haha
crab2313 .
TimToady rajudo
rakujo
jajujo
adu lol 19:53
jnthn :P
Rakudo will remain called Rakudo, and NQP will remain called NQP. GCC is still called GCC whether you're targeting ARM or x86. :)
Or such is my current thinking.
jnthn tries to stop being distracted by this and actually do the $dayjob stuff he's badly behind with. 19:54
adu so it will be a rakudo backend?
jnthn adu: Yes
adu is niecza a rakudo backend?
jnthn No :)
crab2313 no
adu why not?
jnthn Niecza is a completely separate Perl 6 implementation written by sorear++
Probably because sorear felt Rakudo wasn't the right starting point when starting to work on Niecza. And at the time Niecza started, that was a good call. 19:55
Rakudo was nowhere near being in a place to contemplate another backend a couple of years ago. 19:56
These days, it feels much closer to me...but the proof will be in the pudding. :)
sorear with luck I will actually get the release done today... 10-hour power outage ate into my times 19:57
jnthn ouch :( 19:58
adu how about "earlj bjrd" 19:59
sorear: where do you live? 20:00
TimToady sorear++ lives near San Diego 20:01
adu I see it rained there too 20:11
I'm on the east coast (DC), it rained here too
we lost power for 1 second
jnthn I'm in Sweden. Sunny all day!
jnthn Which makes a change. :) 20:11
Thanks for looking the bad weather for a bit. :) 20:12
benabik Upstate NY. Sunny and warm, I'm have no idea what's going on.
[Coke] oh, right, you're the guy who's "right next door" 20:17
benabik Compared to many of these others, yes. 20:19
Would have been closer, but I decided not to go to RPI. 20:20
dalek href="https://perl6.org:">perl6.org: e00fd72 | (Filip Sergot)++ | source/getting-started/involved.html:
fixed broken link
[Coke] benabik: that's the only reason I live in this area, because I did pick RPI. 20:23
[Coke] In a world with skype, There's no reason for me to have done that. 20:24
benabik UR seemed like the better program... Although not selling the house is definitely a bonus.
tadzik Raspberry Pi?
that doesn't make sense. What's RPI? 20:25
[Coke] rensselaer polytechnic institute
adu raspi rocks
sergot good night #perl6 !:)
[Coke] ~~ 20:27
adu brb 20:28
tadzik bye bkye 20:28
diakopter moritz: (or anyone) do you know whether ranged quantifiers are used anywhere in rakudo's grammar? 20:29
moritz diakopter: I doubt it 20:30
diakopter wow, vmware player just added two more cpus to my ubuntu VM while it was running. I guess I can imagine that being allowed/possible. 20:44
jnthn Core blimey! 20:45
moritz linux supports CPU hotplugging
diakopter cool.
dalek p: 6aef784 | diakopter++ | src/QRegex/NFA.nqp:
implement NFA builder for ranged quantifiers. npq/rakudo spectest all green.
20:47
jnthn diakopter: Any chance you can add a spectest to cover that? :)
moritz can 20:48
jnthn doesn't mind who++ does it :) 20:49
diakopter to cover what? I saw some spectests in S05-metasyntax/repeat.t for ranged quantifiers
jnthn diakopter: LTM
diakopter: That is, that ** contributes to being a longest prefix. 20:50
moritz ... but probably not today
diakopter doesn't know how/why it wouldn't already contribute. 20:51
jnthn diakopter: Before the changes you did then:
jnthn r: grammar G { proto token TOP { * }; token TOP { aa }; token TOP { a**4 } }; say G.parse('aaaaa') 20:52
p6eval rakudo 197e0b: OUTPUT«===SORRY!===␤Method 'match' not found for invocant of class 'String'␤at /tmp/PWQ3eLnHOM:1␤»
jnthn Uh. What.
sorear adu: Niecza is not a Rakudo backend. In fact, I initially considered making Niecza target Parrot 20:53
moritz r: grammar A { proto token a:sym<1> { a**1..10 }; proto token a:sym<2> { aa } }; A.parse('aaaa', :rule<a>)
p6eval rakudo 197e0b: OUTPUT«===SORRY!===␤Proto regex body must be {*} (or <*> or <...>, which are deprecated) at line 2, near "; proto to"␤»
sorear I wanted to write a front end
jnthn oh, of course
moritz r: grammar A { token a:sym<1> { a**1..10 }; token a:sym<2> { aa } }; A.parse('aaaa', :rule<a>)
p6eval rakudo 197e0b: OUTPUT«No such method 'a' for invocant of type 'A'␤ in method parse at src/gen/CORE.setting:9537␤ in block <anon> at /tmp/gsu96cJUNU:1␤␤»
jnthn r: grammar G { proto token TOP { * }; token TOP:sym<x> { aa }; token TOP:sym<y> { a**4 } }; say G.parse('aaaaa')
p6eval rakudo 197e0b: OUTPUT«q[aa]␤␤»
moritz r: grammar A { proto token a {*}; token a:sym<1> { a**1..10 }; token a:sym<2> { aa } }; A.parse('aaaa', :rule<a>) 20:53
p6eval rakudo 197e0b: ( no output )
moritz r: grammar A { proto token a {*}; token a:sym<1> { a**1..10 }; token a:sym<2> { aa } }; say ~A.parse('aaaa', :rule<a>)
p6eval rakudo 197e0b: OUTPUT«aa␤» 20:54
jnthn diakopter: Presumably, with your improvements, the above now prints aaaa instead of aa
diakopter jnthn: ah, I see
I'll try it
sorear but that was two years ago. Today niecza's core mission is being the most awesome possible C# backend for Perl 6, and the frontends have converged to the point where it would not be quite entirely unreasonable to build a rakudo/clr on the niecza backend
diakopter hm, no 20:55
diakopter (to myself) 20:55
oh, I wonder how rakudo signifies Inf range 20:56
in the AST
in nqp it's with an undefined value for the end
moritz r: say (1..*).perl 20:57
p6eval rakudo 197e0b: OUTPUT«1..Inf␤»
diakopter inf range for quantifier
sorear diakopter: are you actually talking about Ranges? 20:58
ah, nm, I see 20:59
diakopter how would I know
moritz I think inside the regex engine it's exactly the same as in nqp
sorear presumably you of all people would know what you are talking about. :D
moritz and since the ** {1..*} case is NYI, nobody had to deal with the rakudo <-> nqp type mismatch so far
jnthn I think PerlJam++ was trying to :) 21:00
diakopter well, I just tried the same example in nqp, and it worked there
moritz it also works in rakudo
moritz just tried
diakopter didn't for me 21:01
jnthn moritz: Rakudo with diakopter++'s patch?
moritz jnthn: yes
jnthn diakopter: You certainly make install'd NQP? :)
diakopter sigh.
you're right.
jnthn Before rebuilding Rakudo?
Heh.
moritz anyway, prints q[aaaa]
diakopter nope, didn't. retrying.
jnthn At least your aptch works :)
moritz aye. diakopter++ 21:02
diakopter does it work with **1..5
and **4..* 21:05
moritz yes and yes 21:06
moritz -> sleep
diakopter interesting. I must admit I'm surprised. thanks for testing those 21:07
jnthn sleep well, moritz 21:09
diakopter hm, what else needs LTMing 21:10
diakopter spectests the new nqp 21:16
jnthn: does rakudo's nqp require version need bumped? 21:22
jnthn diakopter: If you want others building Rakudo to get the NQP changes you've done, yes.
diakopter assuming this spectest finishes green.
jnthn (Which I figure you do :)) 21:23
diakopter yeah; maybe I can learn how to run autounfudge
or so [Coke] can do it :) 21:24
jnthn I'm not convinced we've got anything in the spectest suite to cover what you just implemented.
diakopter oh 21:25
jnthn Thus my suggestion to add a test. ;)
diakopter n: grammar G { proto token TOP { * }; token TOP:sym<x> { aa }; token TOP:sym<y> { a**4 } }; say G.parse('aaaaa') 21:27
p6eval niecza v17-50-gdf795e6: OUTPUT«===SORRY!===␤␤Quantifier quantifies nothing at /tmp/BuPMG0EHon line 1:␤------> grammar G { proto token TOP { ⏏* }; token TOP:sym<x> { aa }; token TOP:␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/li…
jnthn Oh, it doesn't like spaces around in proto tokens 21:28
Needs to be proto token TOP {*} for Niecza
diakopter n: grammar G { proto token TOP {*}; token TOP:sym<x> { aa }; token TOP:sym<y> { a**4 } }; say G.parse('aaaaa')
p6eval niecza v17-50-gdf795e6: OUTPUT«Match()␤»
jnthn OK, that surprises me... 21:29
diakopter I don't know to get at what matched
jnthn It returned the Match type object, which indicates no match.
diakopter oh :) 21:30
jnthn $dayjob stuff done, but no time/energy for Perl 6 stuffs today. :( 'night o/ 22:26
dalek ecza: dbd3ad3 | sorear++ | lib/JSYNC.pm6:
Track newscalar removal in JSYNC.pm6
23:12
[Coke] You can't hide, Guest8286. 23:29
Guest8286 what am I hiding from?
geekosaur nickserv? 23:30
sorear nickserv! it's a truly ugly hack in the freenode chat system: the account registration and login module pretends to be a bot because extending the protocol honestly is so hard 23:33
geekosaur meant that more in respone to "what am I hiding from?" actually. misaimed humor... 23:34
sorear geekosaur: I read your line twice and interpreted it that way the first time and "nickserv? what's that?" the second :| 23:35
seems I've been having reading issues this month, wonder why
diakopter has been reading blob.perl.org/perlweb/dev/perl6/tal...-Perl6.pdf for 30 minutes 23:50