»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
00:00 nihiliad left 00:13 payload joined
diakopter std: say((3 and 4)) # TimToady 00:23
p6eval std 28969: OUTPUT«ok 00:01 106m␤»
diakopter std: say(3 and 4)
p6eval std 28969: OUTPUT«===SORRY!===␤Unable to parse argument list; couldn't find final ')' at /tmp/aniI3Vi6c4 line 1:␤------> say(3 ⏏and 4)␤ expecting an infix operator with precedence tighter than list infix␤FAILED 00:01 104m␤»
diakopter std: say (3 and 4) 00:30
p6eval std 28969: OUTPUT«ok 00:01 106m␤»
jnthn pmichaud: btw, I won't be doing much more today. prob will do some more bits tomorrow...and count today + tomorro's bits as a Rakudo day. 00:31
Thus will do an ng status blog post tomorrow.
Let me know if there's anyting particular you want me to look at tomorrow (whenver you think of it...I'll backlog) 00:33
diakopter jnthn: g'nite 00:36
jnthn diakopter: not gone quite yet, just not got the brain cycles available to write code any more today either. ;-) 00:37
s1n hehe
s1n.dyndns.org/index.php/2009/10/31/pump-king/
00:37 orafu left, OuLouFu joined, OuLouFu is now known as orafu
jnthn cooool! 00:38
s1n++
s1n :)
diakopter flame on flame
s1n that middle part removes, but it doesn't look true to the logo without it (and the narrow line is too narrow) 00:39
00:45 lichtkind left 00:48 alester left 00:49 brunov joined
diakopter the first terminal in STD.pm is token endid. I suppose I'll start there. :) 00:50
oh. a lookahead. har. 00:51
diakopter makes the commitment to track STD.pm's grammar changes from r28967... and proceed with a hand-translation to jsmeta... while also wedging/refactoring jsmeta's parsers into sprixel's runloop, since it's much better than jsmeta's 00:54
(the alternative was an automatic translation from the AST produced by viv from STD.pm... but the AST is just too large :) 00:55
(and there are too many spots that would have needed hand-translating anyway..)
here goes nothing
for those curious, jsmeta is roughly analogous to pge, and sprixel-rx is roughly analogous to nqp-rx... 00:57
01:03 iGhost left 01:10 NorwayGeek joined
diakopter std: /''/ # null pattern? 01:24
p6eval std 28969: OUTPUT«ok 00:01 103m␤»
jnthn diakopter: well, maybe ;-) 01:25
diakopter rakudo: say ('a' ~~ /^^''$$/ and True); say ('' ~~ /^^''$$/ and True) 01:28
p6eval rakudo d154eb: OUTPUT«␤1␤»
jnthn heh 01:29
Well, I don't really think we want to get in to exploring all of the possible patterns you could write that match an empty string. :-)
I think the point was that // was not an OK regex. :-) 01:30
std: "foo" ~~ //
p6eval std 28969: OUTPUT«===SORRY!===␤Null regex not allowed at /tmp/ud8pAa2f5y line 1:␤------> "foo" ~~ //⏏<EOL>␤FAILED 00:02 104m␤»
diakopter sets a new personal best for extent of S05 hand-waved/read in 1 sitting... (about 1/4) :D
jnthn The NEW endurance sport! 01:31
nqp: my $x := pir::box__PS('5 birds'); pir::say(pir::set__NP($x)) 01:45
p6eval nqp: OUTPUT«0␤»
pmichaud nqp: my $x := pir::box__Ps('5 birds'); pir::say(pir::set__NP($x)) 01:47
p6eval nqp: OUTPUT«0␤»
diakopter what's set__NP
pmichaud it's the set $Nx, $Px opcode 01:48
jnthn diakopter: set opcode, specifying arg types.
pmichaud: btw, I like that syntax. :-)
pmichaud jnthn: thanks. It's just the signature syntax from PAST, replacing the space with a double-underscore.
although I wonder if I should come up with identifier-versions of the *, :, +, and ~ keys
jnthn pmichaud: Oh, I figured it was easy to add based on what PAST already gave. But X being not so hard doesn't mean X isn't something that you'd think of doing. :-) 01:49
pmichaud well, while writing NQP there were several times where I thought "I just need one opcode, why do I have to write all of this other stuff around it?" 01:50
Juerd diakopter: Oh, just read the first version. Much easier ;)
01:50 IllvilJa joined
pmichaud so I decided that had to be fixed 01:50
jnthn Yeah
I've used it multiple times alreayd.
*already
Juerd diakopter: Though keeping track of the changes became way too much for me 01:51
pmichaud it also means there's at least a chance that someone could write a pir:: emulation library for non-parrot platforms :-)
which will be far simpler than parsing the internals of Q:PIR { ... } :-)
jnthn Well, we'll deal with such things when we or someone else gets to doing a port to another platform.
Well, backend for, not port to. 01:52
I hope.
That is, I'd hope we'll be able to keep multiple backends as build options in one code base, rather than having forks. But that'll take effort.
pmichaud bbiab
jnthn bbitm ;-)
o/ 01:53
01:54 nihiliad joined
diakopter bye 01:54
Juerd: oh :)
luckily for me, Microsoft's MGrammar grammar-language (which jsmeta implements) is remarkably similar in overall expressiveness to Perl 6 regexes 01:55
and lexical scoping of names 01:58
01:59 nihiliad1 joined 02:00 nihiliad left
pugs_svn r28970 | kyle++ | [Test::Util] a little refactor 02:04
02:25 TiMBuS joined 02:47 xabbu42 left
carlin Argh, trying to parse RSS is turning out to be a real pain 02:52
pmichaud ...implemented assignops, using infix_postfix_meta_operator instead of pre-generating them all at startup. :-) 02:58
03:13 Psyche^ joined 03:24 Patterner left, Psyche^ is now known as Patterner 03:32 jaldhar joined 03:55 fax joined 04:26 tak11 joined 04:40 brunov left 04:47 nihiliad1 left 04:51 mepplock joined
carlin \o/ I can successfully parse use.perl RSS feeds 04:54
04:54 envi^home joined
carlin ... and wordpress feeds :D 04:55
and moritz's feed worked too. Fantastic. 04:56
04:58 meppl left, mepplock is now known as meppl 05:12 fax left 05:35 tak_ joined 05:42 tak11 left 06:13 eternaleye left 06:19 envi^home left 06:21 justatheory left 06:51 Chillance left 07:03 nbrown joined 07:07 eternaleye joined 07:29 PZt joined 07:48 quuxx left, quuxx joined 08:14 iblechbot joined 08:26 bpetering joined 08:29 silug joined 08:34 tak11 joined, wolverian joined, tak_ left 08:35 carlin_ joined, carlin_ left 08:36 mberends left 08:46 mberends joined 08:55 silug left 09:03 tak11 left 09:05 Su-Shee joined
Su-Shee good morning. 09:05
carlin o/
09:08 quuxx left
carlin Argh 09:09
09:09 quuxx joined
carlin quuxx: stop segfaulting please :-) 09:09
09:09 rfordinal joined
sjohnson hi 09:13
09:15 am0c joined 09:45 meppl left 10:01 kidd joined 10:02 carlin sets mode: +v quuxx 10:08 iblechbot left 10:28 am0c left 10:29 TopoMorto joined 10:36 TopoMorto left
jnthn o/ 10:43
carlin \o
10:53 TiMBuS left 11:05 pmurias joined
pmurias diakopter: backlogging, i'm not sure if i understand your plan to hand translate STD into jsmeta? 11:07
11:37 ejs left 11:55 ejs joined 12:01 Schwern left 12:02 mjk joined 12:13 rfordinal left, mjk left 12:19 redicaps joined 12:20 envi^home joined 12:22 redicaps left 12:56 pnate2 joined 12:57 pnate left 13:00 fax joined 13:05 desertm4x joined 13:06 Whiteknight joined
quuxx masak++ blogged "Here we go again; another full month of November": use.perl.org/~masak/journal/39825?from=rss 13:14
13:15 masak joined
masak greetings, #perl6-lings. 13:16
carlin o/ 13:20
masak quiet Sunday in here today.
colomon It's been ten whole hours since someone pushed to the ng branch. :) 13:21
masak oh, is that the branch I think it is?
I still am note done backlogging...
colomon yes it is. 13:22
amazing, amazing progress so far. 13:23
masak I've been gone a day, and I find myself thinking "I've been gone too long..." :)
jnthn colomon: Oh, it's just the calm before the storm. :-) 13:24
colomon jnthn: I hope so!
jnthn colomon: And also on my part, just needing a day doing something other than writing code. :-) 13:25
Well, part of a day doing something other than... :-)
colomon Watching you guys at work it yesterday was a lot more entertaining than the watching the football game... :)
13:27 Patterner left
colomon Hey, sweet, I wasn't aware we had working perl 6 library repositories in rakudo now. (Following masak++'s links all around.) 13:28
13:28 Psyche^ joined
masak colomon: we have what? :P 13:29
13:29 zaslon joined, Psyche^ is now known as Patterner
carlin Here's my progress from today 13:29
zaslon: ohhai
zaslon Sorry, I don't understand that command
carlin zaslon: link masak
zaslon masak's blog is at use.perl.org/~masak/journal/
colomon .perl6lib automatically in the library path, mostly.
carlin zaslon: remove masak
zaslon I am no longer following masak's blog
jnthn zaslon: link jnthn
zaslon jnthn's blog is at use.perl.org/~JonathanWorthington/journal/
carlin zaslon: link masak
zaslon Sorry, I don't know who masak is
carlin zaslon: add masak use.perl.org/~masak/journal/rss
This takes a while 13:30
masak carlin: cool. what's the bot written in?
zaslon I am now following masak's blog
colomon masak: you linked to the commit in the cheese speleology post you linked to today. :)
carlin zaslon: link masak
zaslon masak's blog is at use.perl.org/~masak/journal/
masak colomon: yes. what does it say we have?
carlin masak: perl6 of course :-)
masak carlin: really? carlin++
jnthn is impressed too :-)
carlin++
masak that is just amazingly cool.
jnthn It's kinda useful *and* written in Perl 6!
colomon masak: "preload $HOME/.perl6lib and languages/perl6/lib in @*INC"
masak colomon: ah. yes. 13:31
colomon obviously proto doesn't work yet, but I can put things there by hand. (haven't actually tested yet...)
carlin tomorrow's job is getting zaslon to poll the feeds and alert when there's an update and then quuxx can be retired 13:32
masak \o/ 13:33
where does the name 'zaslon' come from?
carlin masak: zaslon radar
masak ah. cool. 13:34
colomon (one wikipedia check later) Flash Dance! :) 13:35
carlin: I trust this means yesterdays RSS grammar writing went well? 13:36
carlin heh
masak another XML grammar? :P
carlin The RSS part is called RSS::Hacks
I couldn't get any sense out of the xml grammar on proto :/ 13:37
masak sorry to hear that. 13:38
it's also not very active, I fear.
haven't seen krunen around here since NPW.
colomon I was poking around in proto and some of the projects yesterday as well. I think getting the installed modules branch working well will be a big step forward... 13:39
masak nod.
slavik so, when will rakudo get a smart make install? 13:40
colomon slavik: for rakudo itself?
slavik yes
masak slavik: it could be argued that it's not Rakudo's responsibility... 13:41
just as the python executable doesn't have a smart install, etc.
13:41 jan_ left
colomon my guess is pretty soon, but almost certainly not this month. 13:41
masak oh, maybe I misunderstood.
slavik masak: then I'd like packages. :)
colomon masak: (or maybe I'm misunderstanding...) 13:42
masak what would a smart 'make install' entail? 13:43
jnthn What's wrong with Rakudo's current make install, btw? 13:44
(I don't doubt it has issues, just curious what they are.)
colomon doesn't install it in your path.
jnthn Well, sure, by default. 13:45
I think that's more a configuraiton issue though?
Or more to the point, it'll install it where Parrot was configured to put binaries.
masak my 'make install' installs a 'perl6' in my path. but I don't do --gen-parrot 13:46
colomon rakudo: my $a = 2 < 3 ?? 42 !! 69; say $a; 13:47
p6eval rakudo d154eb: OUTPUT«42␤»
jnthn masak: Aye.
masak I knew it would pay off one of these days! :P
jnthn Well, --gen-parrot is great if you just want something self-enclosed to play with. 13:48
If you're trying to get something installed to system paths, then it'll need a couple more flags, of preferably a ready-installed Parrot to configure against.
colomon jnthn: sure, and it's certainly not bothering me now, but by Rakudo * it probably ought to default to installing in the path. 13:51
If you follow the default instructions for building and installing and it doesn't, people's first impression of Rakudo will be bad.
13:53 envi^home left
jnthn Sure - we'll have to consider what instuctions to give and what the defaults should be for that. 13:53
carlin github.com/carlins/rssbot # pushed today's work
13:54 zaslon left
colomon carlin++ 13:54
carlin it is quite rough in places, especially around anything to do with parsing the RSS 13:55
13:56 zaslon joined
jnthn Heh. It's probably still better than the lolsql code. :-) 13:56
13:56 desertm4x left 13:57 zaslon left
Juerd Was there a lolsql parser in perl6 yet? 13:57
carlin Yip, jnthn++ wrote one 13:58
Juerd url? :)
carlin github.com/jnthn/lolsql
Juerd Thanks
carlin A proto IRC-bt might be nice; "proto: link lolsql" 13:59
*bot
masak jnthn++
jnthn: no tests? :)
Juerd jnthn++ 14:00
14:00 zaslon joined
masak also, it could be argued that "UR DOIN IT RONG" is a LTA error message... but you know that. :) 14:01
I see I have a few things to add to proto's projects.list...
14:02 zaslon left
jnthn jnthn: :-P 14:02
masak: Heh, I wrote it in just over an hour while watching other people's talks. :-)
colomon Isn't "UR DOIN IT RONG" in the lolsql spec?
jnthn colomon: no, but it felt appropriate :-) 14:03
masak jnthn: it's way cool.
jnthn masak: Well, if you want to add good parse fail errors... It's fine if they're in lolspeak. ;-)
masak jnthn: 'Be gud kitteh...' jnthn++
Juerd Srsly lex and yacc are SO pwned now. ++ 14:04
masak yup. that's the gist of Perl 6 grammars.
colomon I really need to sit down and learn to use grammars. 14:06
carlin
.oO( Must get around to figuring out how to write propper grammar one day... )
14:12 brunov joined 14:15 rfordinal joined 14:21 nihiliad joined 14:27 zaslon joined, zaslon left 14:28 scallop joined 14:30 NorwayGeek left, NorwayGeek joined
pmichaud good morning, #perl6 14:34
jnthn afternoon, pmichaud 14:35
14:36 rfordinal left
pmichaud oh, I forgot to push my commits! 14:37
pmichaud pushes 4 commits.
...we can haz lazy lists. 14:38
jnthn omg!
pmichaud++ for 1...;
pmichaud we'll also get lazy ranges and lazy IO shortly. 14:39
also, arrays are now called Array. Not Perl6Array. Array>
*Array. 14:40
jnthn Wow. Unexpected.
But very nice. :-)
BTW, I note you do:
$P0 = get_hll_global ['Bool'], 'True'
setprop parcel, 'flatten', $P0
pmichaud yes 14:42
jnthn If you are just going to use a "did we get a null back" to test this, then you can just do setprop parcel, 'flatten', parcel ;-)
14:42 icwiener joined
pmichaud oh, true 14:42
jnthn Since it doesn't matter what you stick in there.
pmichaud I use that trick a few other places in the regex engine
jnthn Yeah, I've used it in Rakudo a bit before.
Thing is, if we start sticking bools in places, then we not only have to do a null check, but should perhaps be checking for truth too. 14:43
pmichaud question: We currently store type constraint information in the 'type' property. Should that be more properly named 'of' ?
jnthn Good question.
Well, for parametric arrays and hashes, the .of is really just coming from it being like
pmichaud (bools): well, I was using bools under the assumption that someday we might need to have the property present but still be able to indicate 'false' 14:44
jnthn role Positional[::T] { method of() { T } ... }
For scalars we kinda stash it away.
pmichaud so, should we stash it somewhere named 'of' ? ;-) 14:45
instead of 'type' ?
jnthn We can.
pmichaud I think I would prefer that. 'type' is sometimes too overloaded a term
jnthn But my point was more, the T in the role decl is more an implementation detail.
pmichaud right
jnthn The .of is what's exposed.
pmichaud right
I think I follow the implementation, I'm just asking about where we stash it :) 14:46
jnthn And $scalar.VAR.of is probably the related thingy here.
Well, my point is that it kinda doesn't matter. ;-)
I can go with of. It's 2 less chars to type. :-)
pmichaud it does in the code when I go to ask for 'type'
jnthn Well, yes, true. :-)
pmichaud somehow the word "of" tells me more directly what I'm asking for (in this case, a type constraint, or the 'of' property) 14:47
jnthn I menat doesn't matter in that it's guts, not user-visible.
pmichaud right
jnthn Anyway, let's go with "of"
pmichaud I'm thinking strictly in terms of code maintenance for the compiler writers
jnthn type is quite overloaded.
And after all, it's exactly what gets stored for my $x of Int;
pmichaud whenever there are two items that refer to the same concept, I like them to be similarly-named
jnthn (which my Int $x is just sugar for) 14:48
masak lazy lists! wicked! pmichaud++
jnthn OK. Let's go with that. :-)
BTW, put in the checking code now if you like, but I suggest not hacking in something to set the of property unless you really need it. 14:49
(It needs to be done by a trait_mod:<of> dispatch)
(And we can probably parse and run those soon.) 14:50
pmichaud I'm only hacking in the things needed to pass tests, not features-for-features sake
jnthn nod
pmichaud and like the assignop code, when I can do it "the right way" I'm tending to go ahead and do that
oh, nopaste coming
gist.github.com/223545 # assignment metaop code generation 14:51
jnthn niiice! 14:52
If I do it in an eval, will it keep track of what ops we already generated and not re-do them? 14:53
pmichaud yes.
well, I'll rephrase.
jnthn Brilliant.
pmichaud it will still generate the call to !gen_assign_metaop. But !gen_assign_metaop will notice that the operator already exists and short-circuit. 14:54
jnthn ah, ok
That'll do for now.
It's a huge improvemnet on generating them all.
pmichaud thus if someone has a custom infix:<+=>, that gets used in preference and not overwritten
the call to !gen_assign_metaop is cheap, anyway.
colomon how does that relate to overloading? 14:55
jnthn nod
pmichaud colomon: I haven't worked out the overloading details quite yet, but that should be simple also.
and we know where to put that code (in gen_assign_metaop)
colomon I mean, if I define a custom infix:<+=> for my matrix class, I don't want it mucking up += for Int.
jnthn Are folks allowed to define custom meta-op variants to make the set of meta-ops irregular? 14:56
pmichaud colomon: right -- we'll want to switch it to be a multi. There's even a "XXX" marker in the gen_assign_metaop code that says "this should be a Perl6MultiSub"
jnthn: yes, I believe so.
jnthn ah, ok
I think I read of some restriction at one point, but may be mis-remembering.
pmichaud anyway, yesterday was nicely productive.
jnthn Yes, indeed. 14:57
pmichaud I'm looking at the level 1 things we're starting to knock off the roadmap :)
laziness... check.
real constants ... check
oh, and the array code also fixes the auto-vivification problem
jnthn STD-like grammar ... well on the way :-)
pmichaud if you say @a[3] and @a[3] doesn't exist, it's not auto-bound into the array until you assign to it 14:58
jnthn Great.
That's another nasty gone.
pmichaud and I think that even @a[3][4] will work now, to auto-vivify @a[3] into an array
pmichaud tests
oh, not yet 14:59
need to handle undefs still
which brings up a question... is Failure a class, or is it a Role punned into a class ?
jnthn This is especially nice because generating hundreds (thousands?) of unused meta-op variants that we never used and making calls to !TOPERL6MULTISUB were two of our biggest startup costs, and we are eliminating both. 15:00
pmichaud more generally, what exactly do I get with undef() ?
jnthn I've heard it talked about muchly as a Role.
15:00 pointme joined
jnthn That can be mixed in to things. 15:00
15:00 clkao joined
jnthn undef is probably giving you the pun. 15:00
pmichaud I'm fine with that... what does undef() return then?
it's just a generic Failure object? 15:01
hmmmm
carlin pointme: lolsql
pointme jnthn's lolsql is at github.com/jnthn/lolsql/
carlin pointme: http-daemon
pointme mberends's http-daemon is at gitorious.org/http-daemon/
15:01 envi^home joined
jnthn pontme: complete-perl-6-implementation 15:01
pointme: complete-perl-6-implementation
pointme Sorry, I don't know anything about that project
jnthn aww!
15:02 NorwayGeek left
masak someone should start such a project. :P 15:02
pmichaud not me! waaaaay too difficult!
jnthn Yeah!
carlin pointme: all
pointme Sorry, I don't know what just happened
jnthn Me either!
pointme++ # error WIN
pmichaud: What's bothering you about the generic Failure object? 15:03
pmichaud just putting together a plan for it
jnthn OK.
pmichaud how do I create a role in PIR ?
and how much of roles are in place in ng ?
(or, more precisely, "what are we missing?"
jnthn pmichaud: Approx nothing of roles has gone back in yet.
pmichaud: Apart from one dynpmc. 15:04
pmichaud okay
jnthn pmichaud: Creating a role from PIR is simple though, in that there's a helper for it.
15:04 pointme left
jnthn !create_simple_role('Failure') or so. 15:04
carlin tomorrow's job is making the bot(s) respond to pings so they don't timeout
'night all
jnthn carlin++ # night!
pmichaud carlin++ # excellent work
carlin++ # please blog it!
jnthn yes! 15:05
carlin oh good idea
Tomorrow :-)
jnthn pmichaud: Again, some of it is in guts.pir. 15:06
pmichaud: They probably want to be extracted.
pmichaud jnthn: that's what I was thinking :-) 15:07
jnthn hopes guts.pir can just die
Because we already ripped out the things in it.
pmichaud I've been reluctant to pull in guts.pir all-at-once
jnthn Don't.
We'll take bits from it as we need it.
pmichaud I'm not in a rush for it
(well, not too much of a rush)
jnthn And if we end up passing the spec tests with some stuff still left in there, well, we found dead code. ;-)
pmichaud today I'll work on getting the other primitive types in place 15:08
jnthn OK, sounds like a plan.
15:08 NorwayGeek joined
pmichaud I think it's very likely we'll have Test.pm by tonight 15:08
jnthn What do we need beyond those to get us running the sanity tests?
pmichaud not sure... looking
jnthn OK. I can hack a bit on ng today too.
pmichaud 'try' looks like it might be the most challenging item left. 15:10
everything else looks.... trivial
(well, relatively trivial)
masak likes to try to say 'ng'
15:11 NorwayGeek left
pmichaud I'm also reorganizing the sanity tests a bit, and eliminating things that aren't really needed for Test.pm 15:12
15:12 NorwayGeek joined 15:13 lidden joined
jnthn masak: Unfortunately, there's not a chemical element Ng, which you coulda used instead. :-) 15:13
pmichaud I did think of that possibility...
masak jnthn: ŋ
pmichaud I just knew that "usenqprx" was going to get tedious for me to type for a while
masak 'ng' is very cute as a name. 15:14
jnthn There is a Pm in the periodic table though. ;-)
pmichaud anyway, I'm hoping that within a week or so 'ng' will be better known as 'master'
jnthn: yes, one of my favorite elements.
colomon a week!?!!!!! 15:15
jnthn luminesent in the dark, according to Wikipedia. ;-)
pmichaud named after Prometheus, the bringer of fire and knowledge to mankind 15:16
I like the parallels. :)
jnthn Fitting. :-)
pmichaud heh
masak 哈哈
pmichaud very interesting parallels when one compares the myth to Perl 6 15:17
masak "It was foretold in the table of the Elements..."
pmichaud so, I'm responsible for bringing fire and knowledges from the gods (TimToady++) to everyone else, and for my impertinence I get to spend every day chained to a rock and be tormented
(since Perl 6 exists to torment the implementors) 15:18
masak there certainly are parallels.
pmichaud s/6//
masak also, Perl 6 rocks. 15:21
15:26 simcop2387 joined 15:30 rfordinal joined 15:31 pmurias left, Psyche^ joined
dalek p-rx: 7df80c2 | pmichaud++ | README:
README update with note that double-quoted strings now interpolate $-vars.
15:32
p-rx: 2a9430b | pmichaud++ | src/HLL/Actions.pm:
EXPR should prefer $/.ast to $<OPER>.ast when building node.
15:33 Patterner left, Psyche^ is now known as Patterner 15:34 tak11 joined 15:36 icwiener left 15:42 justatheory joined
dalek p-rx: fd51bde | pmichaud++ | src/cheats/hll-grammar.pir:
Eliminate bogus debugging 'say' in cheats/hll-grammar.pir .
15:43
p-rx: 1ee030e | pmichaud++ | src/stage0/ (3 files):
Update stage-0 files.
15:45 envi^home left
jnthn grabs the nqp-rx updates 15:46
pmichaud note also that by adding the & sigils, we tend to avoid the imcc bug that sticks methods in namespaces :) 15:51
(because our method names don't have the & sigil)
jnthn pmichaud: I've been pondering that.
pmichaud: Method generation that is.
May just bit the bullet and make it all meta-class invocations like it should be.
pmichaud I'd probably be okay with that :) 15:52
jnthn Well, if we don't do it now, we probably need to at some point.
I suspect done right it'll make things cleaner for multi handling too. 15:53
I was pondering having some helper class, like I do for signatures and parameters.
That can collect together various details about the package.
It'll make various bits of analysis easier.
pmichaud ooc, what's the difference between Perl6::Compiler::Signature and just a plain signature?
(haven't looked, just curious) 15:54
jnthn Perl6::Compiler::Signature is the compile-time object representing a signature.
It actually just generates PAST in the end to build the signature.
But keeps all the details of that out of actions.pm.
pmichaud works for me
jnthn It's only involved at compile time.
pmichaud I wonder if (someday) PAST will want to have PAST::Signatre 15:55
*PAST::Signature
to handle multi-methods at the parrot level
(rakudo won't use it, but others might)
jnthn Possibly.
My motivation for doing it was...well, a few things. One was that I wanted to encapsulate signature code generation. 15:56
pmichaud sure, I understand it now.
jnthn Another was that we often have to tweak a signature before we emit it.
15:56 pmurias joined
pmichaud Just like we have PAST::Block to represent compile-time blocks, Perl6::Compiler::Signature represents compile-time signatures 15:57
jnthn Right.
pmichaud wfm
jnthn Another thing - more a future concern - is that I think we're going to want to be able to look at these things in a sane way in, say, an optimizer stage.
pmichaud sure, that makes sense also
jnthn I'm quite keen to do similar for package. 15:58
So we have an easy way of getting hold of the package's methods table, or attributes.
pmichaud package might be an even bigger candidate for a custom PAST type
jnthn Yeah.
I guess we can see how it works in Rakudo and extract the commonalities that could apply elsewhere.
pmichaud > my $a = 3,4,5; say $a.WHAT 15:59
List()
> my $a = [3,4,5]; say $a.WHAT
Array()
>
lambdabot <no location info>: parse error on input `='
not an expression: `'
pmichaud yay
masak lambdabot--
pmichaud ...do we get any value out of lambdabot on the channel any longer? 16:00
jnthn Excellent.
pmichaud: Only karma.
masak pmichaud: karma.
jnthn karma++
masak but today we've seen p6bots here, so...
it won't be long now.
jnthn karma lambdabot
@karma lambdabot
lambdabot lambdabot has a karma of 41
jnthn how?!
masak long and faithful service. :)
pmichaud > my @a = 3,4,5; say @a.elems;
3
> my @a = [3,4,5]; say @a.elems;
1
>
lambdabot <no location info>: parse error on input `='
not an expression: `'
jnthn masak: Yes, but I haven't seen it ++'d in quite a while. ;-) 16:01
masak jnthn: yes, but she's old here.
jnthn Ah, true.
pmichaud the use of a "flatten" flag makes the code muuuuuch simpler. TimToady++
masak jnthn: also, she frequents other channels.
@seen lambdabot
lambdabot Unknown command, try @list
jnthn lol
pmichaud: Yes, I'm glad that was suggested.
TimToady++
That discussion was useful in many ways. :-)
masak flattening will get you anywhere. 16:02
jnthn notes to flatten his admiree in the future, rather than flatter her, which has got him nowhere.
masak I take no legal responsibility. 16:03
jnthn What could possibly go wrong? ;-)
masak: ohbtw
masak: Did you do your fligg for Riga yet?
masak I did.
jnthn If so, what day(s) you there? I can book mine today and match up. 16:04
masak arriving on the 19th, departing on the 23rd.
jnthn 'k
masak I haven't booked the hotel yet.
pmichaud jnthn: oh, I have an important question 16:05
jnthn Me either. Apparently the hotel where the conference is discount has for conference attendees.
pmichaud how hard would it be to get method dispatch on parcel to itemize it first ?
jnthn masak: erm, that sentence was so grammar fail
masak jnthn: yes. I noticed that. don't know exactly how to secure a room, though. 16:06
jnthn pmichaud: Heh, well, we already did special stuffs for Whatever...
pmichaud that's becoming a big blocker for me :-(
jnthn masak: Ah, I didn't get so far as looking at that.
16:06 lichtkind joined
jnthn pmichaud: OK, so what you need to happen? 16:06
pmichaud: I just detect parcel on the invocant and then .item it? 16:07
pmichaud that would work
jnthn pmichaud: OK, another question.
pmichaud: Does just the dispatcher need to see it as the unbound thing, or does it need to modify the actual thing?
pmichaud: Put better, do you also need me to .item invocants that are Parcels when we bind the signature? 16:08
pmichaud let's back up just a sec
jnthn OK 16:09
pmichaud currently Parcel has two methods
jnthn There's a couple of issues here, that's all.
pmichaud .item and .list
jnthn OK.
pmichaud both of them mutate the parcel into being whatever was requested
so, if you call .list on a Parcel, it actually becomes a List at that point
jnthn pmichaud: mutate? 16:10
pmichaud yes, mutate
jnthn pmichaud: What does that actual mean?
pmichaud what I just said.
jnthn pmichaud: Do you mean, it changes itself in place?
pmichaud yes.
jnthn oh
Well, that makes it all much simpler then. :-)
16:10 parduncia joined
pmichaud if you call .item on a Parcel, its behavior depends on the contents 16:10
if the parcel contains exactly one element, then it becomes an ObjectRef to that element 16:11
otherwise, the parcel calls .list on itself and becomes a List
jnthn OK. 16:12
I only worry a tiny bit we're about to open another can of worms.
pmichaud possibly
jnthn Because in master, method invocation always does a deobjectref on the invocant.
And dispatches on that.
pmichaud that should be just fine
that's actually the desired behavior here, I think. 16:13
jnthn Well, not really, if the dispatcher in find_method is calling .item
Because then we're already in find_method.
Whereas now we actually invoke the dynop before we start.
pmichaud that's why I wanted to back up a second
it may be that the dispatcher needs to duplicate the .item logic for Parcel without calling .item 16:14
I'm totally open to other approaches btw -- this is just how it's set up now. 16:15
and keep in mind that Parcel isa RPA, if that makes things any simpler
jnthn OK.
Erm
How are we going to call .item and .list on the parcel? :-)
If the method dispatcher is like "oh, you're calling a method on a parcel..." :-) 16:16
pmichaud in some sense I don't really need to do that, if the dispatcher is doing it for me (more)
more details....
in general, I think dispatch on parcel is a bit "special" to begin with. do you agree?
jnthn Yes. 16:17
Somewhat.
pmichaud okay
then there's nothing that says that "itemize a parcel" and "listify a parcel" have to be methods on the parcel
jnthn In the same way that dispatch on Junction and Whatever and a role also is...
pmichaud they could just be private subroutines
I've done them as methods for now because that's the model we've been used to working with, but parcel is special 16:18
jnthn We'll need ".Capture" later too perhaps, but yes.
They could become subs.
pmichaud so then the dispatcher could invoke the sub rather than a method dispatch
jnthn Heck, we can cache the sub PMCs for those and we might even manage to be efficient.
pmichaud actually 16:19
I wonder if there are any places that I currently call .list or .item on a parcel anyway
I think possibly not.
jnthn ah, interesting.
pmichaud well, I must do it somewhere, to get the Parcel->List behavior 16:20
jnthn What happens in my @a = 1,2,3; ?
pmichaud yeah
jnthn Yeah, that's what I was wondeirng. :-)
pmichaud oh, it's in the !FETCH method for Parcel
it itemizes the parcel and returns that 16:21
jnthn erm, there's a !FETCH method on Parcel too?
Will that object to the parcel being mutated first?
pmichaud it's actually not an issue (more)
(you'll like this)
the default behavior for parcel's !FETCH is to itemize the parcel and return an objectref to it 16:22
jnthn oh
:-)
pmichaud that's also the default behavior for List
(I think)
so.... guess what?
if you itemize the parcel, and then dispatch !FETCH to the resulting List.... it's the same thing. 16:23
jnthn oh!
whee
OK, so are we going to make Parcel itemization be a special-case method call, or are we going to make it a sub call? 16:24
jnthn has the dispatcher open ready to hack on
pmichaud I prefer subcall
at the moment I'd like the idea of not having method calls on Parcel
jnthn OK.
pmichaud however, if having a special list of methodcalls is easier, I'm fine with that also
jnthn Fix that, and tell me the names of the subs.
I'll do the easiest impl that works for now. 16:25
pmichaud okay
jnthn And we can optimize later.
pmichaud well, it may be that later we discover there are other things that really need to be methods on Parcel...
but somehow I'm hoping not
jnthn oh btw
oh crap, I forgot what I was going to say...
...it'll come back...
pmichaud okay. I need a dr pepper and then I'll make the switch. Should be very quick. 16:26
16:26 iblechbot joined
jnthn oh! 16:26
I remembered.
transform_to_p6opaque 16:27
Needs to have been called on the object.
If you copied the .new stuff and are creating the Parcel through a .new call that happens automatically.
pmichaud oh, please no
.new is hugely expensive for every parcel
jnthn That's fine. 16:28
transform_to_p6opaque it then.
pmichaud okay
jnthn That way, we end up in the correct dispatcher.
Oh, wait...is this a PIR subclass?
pmichaud right now &infix:<,> is the parcel constructor, I'll do it there
yes, it's a PIR subclass
jnthn phew.
pmichaud it's subclass of Any
jnthn Good.
16:29 crazed joined
jnthn ok, go grab your dr pepper :-) 16:29
pmichaud (basically the same structure List has in master... subclass of Any and RPA, RPA looks like a Parcel)
crazed dr pepper?
shti now i want one
jnthn makes a cup of fruit tea...SO healtheir ;-) 16:31
crazed so perl6, what's the main difference that everyone should know
i'm reading the 5 to 6 document slowly
avar That unlike 1-5 it's a different language on a different implementation 16:33
crazed completely rewritten?
avar yes
pmichaud jnthn: is it just "transform_to_p6opaque $P0" ?
jnthn pmichaud: yup 16:34
pmichaud: in-place vtable swap.
pmichaud okay
crazed hmm interesting
why the decision to rewrite?
16:34 brunov left
pmichaud it was felt we had reached the limits of being able to extend Perl 5 16:35
16:35 am0c joined
pmichaud (at least, to be able to extend it in new ways we wanted to go) 16:35
jnthn crazed: It's hard to say there's a single "main difference". There's a lot of differences, ranging from small to large, that together make the coherent Perl 6 whole. :-)
crazed ah interseting looks more object oriented? 16:36
mberends wow, afk for a few hours and so much shiny appears in the backlog :-)
16:36 nihiliad left
Su-Shee crazed: in short: it tastes and feels like perl and yet somehow it has more chocolate chips and the cream is organic and it's real vanilla in it and the nuts are roasted crunchy..;) 16:37
pmichaud mberends: you've not seen anything yet :-)
jnthn crazed: Of note: grammars, new object model, mutable grammar (Perl 6 parses itself and it's easy to tweak the parser), cleaner syntax...
New data structures (e.g. junctions)
mberends pmichaud: I can imagine :-)
jnthn Multiple dispatch too.
Su-Shee more operators than you can carry.. ;) 16:38
crazed it looks pretty cool to me
i may have to install it in a VM and start playing around
jnthn crazed: It can build itself pretty self-contained anyway, and even if you do Configure it so it will make install to your bin directory, it goes in as perl6, and leaves your Perl 5 well alone. :-) 16:39
So if VM is just for "don't screw my p5 installation up" you'll be fine. :-)
16:40 meppl joined
crazed haha nice but still i have enough room on my xen server and need reasons to use it up 16:40
jnthn hehe ;-)
crazed 2.7TB and 8gigs of ram
jnthn pmichaud: Got me a name yet?
avar I already bought this hammer...
jnthn ...i can has nailz? 16:41
16:41 nihiliad joined 16:43 nihiliad left, desertm4x joined
Su-Shee a 4 steak knives set. 16:43
16:44 rfordinal left
jnthn mmm...stejk. :-) 16:44
pmichaud jnthn: it'll be '!parcel_item' in the Parcel namespace
I'm having to work out a couple of issues on this end 16:45
jnthn pmichaud: kk 16:46
16:47 nihiliad joined 16:50 lichtkind_ joined, nihiliad left
pmichaud I think I may break the RPA masking in Parcel 16:50
i.e., Parcel isa RPA, but RPA doesn't think it's a Pacel
*Parcel
(shouldn't affect what you're doing)
jnthn pmichaud: pushed 16:51
obviously, untested. ;-)
pmichaud jnthn++
np, I can get it from here :)
many thanks
jnthn np, 'twas easy.
pmichaud I figured it would be (for you)
16:53 icwiener joined, nihiliad joined
pmichaud ...which is cheaper, an 'isa' check for RPA, or invoking a method on it? 16:54
...I'm going to guess that the isa check is cheaper.
jnthn I'd hope the isa check is cheaper. 16:55
pmichaud (no pcc overhead)
okay
that lets me avoid a cheat :)
what's a little weird about this implementation now is that we convert RPAs to be Parcels to get the Parcel semantics, but as soon as it's placed in context the Parcel turns back into an RPA 16:56
(the Parcel's contents, that is)
jnthn hmm
pmichaud oh well, we'll go with that for now
jnthn that's a lot of fiddling. 16:57
pmichaud oh, wait
I don't need to do that
instead of Parcel isa RPA, I'll do Parcel has-a RPA
then there's no fiddling required, and Parcel is just an RPA wrapper
that's muuuuch cleaner 16:58
just a sec while I work this out :) 16:59
flattening is much nicer in the new implementation as well. it's just a flag check
no isa checks
17:01 Chillance joined
jnthn :-) 17:01
yay, isa relationships are dieing all around us!
pmichaud (and it's lazy, too)
jnthn pmichaud: BTW, for creating arrays and lists, you do .new there, or new ['...'] ? 17:02
pmichaud new ['...'] currently
jnthn hmm
pmichaud I'll be sure to p6opaque those also
jnthn That *might* hurt us later.
Well, it's not that.
It's that if you grab the proto and .new on it, it's like "oh lol I'm a role, let me do something punny" 17:03
That is, if Array is a role.
pmichaud okay, we can fix that when we make these into roles
jnthn Whereas here you're trying to instantiate a Role.
Well
Doesn't new call VTABLE_instantiate anyway?
If I just implement that... ;-)
pmichaud I don't know for sure what opcode new calls 17:04
jnthn checking
pmichaud i just know that .new is *really* expensive for what we want
I suspect what we really need is BUILD
I just need to have an object of the appropriate type created
jnthn yeah 17:05
oh hmm
so
pmichaud but I don't want any attribute initialization, because I'm about to do that myself
jnthn If Parrot_oo_get_class returns something, we call VTABLE_instantiate.
So should be able to do something. 17:06
Anyway, we'll cross that bridge later on.
17:07 lichtkind left
pmichaud oh, hey 17:09
hmmmmm
nm
jnthn was temporarily excited
pmichaud ...would a check for a 'parcel' flag be better than an isa check?
it occurs to me that a Parcel is just a List with a 'parcel' flag attached :-) 17:10
both of them have RPAs 17:11
and the only reason for a Parcel at the moment is to become a List
so maybe it should just be a List to start with :-)
17:12 brunov joined
pmichaud s/reason/purpose 17:12
jnthn pmichaud: lol 17:13
pmichaud I'll keep them separate for now. We might look into unifying them a bit later
jnthn pmichaud: Yeah.
pmichaud I keep wondering if Parcel is in fact just a special form of List
jnthn pmichaud: If they're different types, you can have the multi-dispatcher treat them trivially as separate things. I dunno if we need to do that though.
pmichaud that's true'
it may be that someday I do Parcel isa List 17:14
jnthn aye
Maybe separate is simpler for now though.
pmichaud certainly better not to conflate things that perhaps ought not be conflated
jnthn Especially as that bit of the spec is potentially fluid-ish, but I hope us having an implementation might change that.
pmichaud easier to conflate later :)
I'm thinking this will do that.
this is going together far simpler than previous designs.... and we have laziness to boot :) 17:15
jnthn The laziness is a wonderful win.
I'm really happy we're doing it now though.
pmichaud same here
jnthn Even if it makes this branch last a couple of days longer, it's still better than breaking everything list-related again at some point in the future.
pmichaud I briefly considered the non-lazy form last night, then said... no, let's try it now
I think it won't significantly delay the branch 17:16
besides, it knocks off a huge item on our roadmap
jnthn Right, and tbh I'm happy enough with the pace of development on the branch so far.
That it's not heading for drawn out.
pmichaud it also makes things a lot faster overall, because we're not flattening things that we might never use anyway
jnthn speeeeed 17:17
we needs it
pmichaud well, maybe not a lot faster
jnthn Yeah
pmichaud but certainly a little faster :)
we're definitely avoiding unneeded work
jnthn I like avoiding unneeded work. :-) 17:18
Just moving parse_name into Grammar now.
pmichaud oh, nice 17:19
17:19 NorwayGeek left
jnthn Then I'll fix name parsing. 17:19
pmichaud I'm going to steal a simpler version of that code into NQP
then NQP can handle @Other::Package::var
17:21 __ash__ joined
pmichaud oh, maybe I do want Parcel isa RPA 17:21
:-)
pmichaud keeps playing with configs
17:22 NorwayGeek joined 17:24 Kodi joined, pmurias left
Kodi In March, `eigenstates` was re-specified to be a private method of the junction class, but we've still got a bunch of tests of it in t/S03-junctions. Should those tests be thrown out? 17:27
17:27 nihiliad left 17:28 __ash__ left 17:29 __ash__ joined, icwiener_ joined 17:30 icwiener left 17:33 leedo joined, fridim_ joined
colomon Kodi: where is the change to the spec? 17:35
crazed shit there's types now
cool
Kodi colomon: r25891 17:37
"+Note this is a private method; you must arrange for yourself to be trusted
+by the junctions class in order to call it, which probably involves evil
+MONKEY_PATCHING."
That was from S32-setting-library/Containers.pod. 17:38
colomon Danke. 17:39
Kodi: seems to me those tests should be changed to use monkey typing, and an additional test should be written to make sure eigenstates is private. 17:40
colomon has no idea whatsoever how to do monkey typing... 17:41
Kodi Ha, I was just about to ask how.
Anyway, I agree about the additional test.
crazed sweet! subs are much better now. i never liked the whole @_ thing 17:42
colomon crazed: couldn't agree more.
Kodi crazed: *And* it's still there if you want it, which, yes, does happen. Or at least I find it convenient sometimes.
Su-Shee well if I stuff an array in anyway.. 17:43
crazed yeah perl6 is looking pretty nice so far
17:44 nihiliad joined
pmichaud man, I've messed something up here locally 17:44
jnthn pmichaud: lol same 17:45
pmichaud: Well, I think I fixed it.
I replaced a token...apart from I didn't delete the previous definition.. :-/
colomon Kodi: is "monkey typing" even a thing? My web search seems to turn it up as a mistake where "monkey patching" is meant.
Kodi colomon: Hey, you brought it up!
I thought you just meant "cheat the typing system, somehow". 17:46
colomon Kodi: Oh, so it's my brain-o! I see.
jnthn colomon: monkey typing is a much funnier mental image though. ;-)
colomon I just miscopied monkey patching.
Kodi Not to be confused with a thousand monkeys typing Shakespeare.
colomon Monkey patching is just adding "is also", no? (Well, "auguments" in theory.)
17:46 lilstevey joined
Kodi Although they could probably be represnted rather well with a junction. 17:46
jnthn colomon: kinda, ish.
colomon: I think there's been some back and forth on the spec there... 17:47
Kodi jnthn: But it's intended that there be some way to access somebody's private method if you need to, right?
jnthn pmichaud: aww crap, I did a grammar change and now we have a stack overflow and segv. 17:48
Kodi: $obj!method iirc. 17:49
Kodi: Or at worst, just find it via introspection.
Kodi Oh, very good. Then we can test the eigenstates method with (1|2)!eigenstates. 17:50
colomon that can't be right, can it? what's the point of being private then?
17:50 brunov left
jnthn Kodi: Only if the caller is trusted though, iirc. 17:50
colomon rakudo: say (any(1,2)).WHAT 17:51
p6eval rakudo d154eb: OUTPUT«Junction()␤»
Kodi eigenstates is still public in Rakudo. 17:52
jnthn: Any idea how we can get the eigenstates class to trust us? Otherwise, I guess I'll research privacy in the Synopses. 17:53
pmichaud oh, suuure... *now* it works, and I have no idea why.
Kodi: I don't think it's well specced at the moment
jnthn Kodi: Rakudo doesn't implement "trusts" yet
pmichaud: OK, so if I take out...
token name { <identifier> ** '::' }
And add in
Kodi pmichaud: Ah. Very well, then. 17:54
jnthn token name { [ | <identifier> <morename>* | <morename>+ ]
}
token morename { '::' <identifier>
}
We stack overflow (at C level, not PIR!)
Is there something very stupid I'm doing?
17:54 nihiliad left
pmichaud I'd look into the actions a bit and see what's happening there 17:54
jnthn There's no action for name.
pmichaud there might be in the HLL grammar 17:55
jnthn HLL grammar?
colomon Is there a reason we can't just say "class Junction is also" and add a method to get at !eigenstates there?
pmichaud some actions we inherit from HLL::Grammar
(see the top declaration)
for example, the actions for handling expressions, integer literals, strings, etc.
jnthn You mean HLL::Actions ?
pmichaud yeah, HLL::Actions
looking 17:56
no, nothing there
hmmm
crazed damn the more i read about perl6 the less i want to use 5
pmichaud jnthn: I don't see anything obviously wrong with what you're doing
jnthn pmichaud: ouch. 17:57
I prefer it when I do something stupid...
pmichaud oh, yes I do
look for instances of $<name> in the grammar
Kodi crazed: Use Perl 5.10!
pmichaud especially $<name><identifier>
they're expecting an array
jnthn oh
pmichaud but you've changed it to be a not-array
(which is what STD.pm does, yes)
jnthn well, the main reason I changed it is so ::T parses too... 17:58
pmichaud right
no problem
just fix the part that is expecting <identifier> to be an array :-)
jnthn good job I just moved parse_name into the right place. :-)
pmichaud I can do it after I'm through working out Parcel :) 17:59
17:59 nihiliad joined
jnthn I'll have a crack, I didn't realized things were digging into the name rule. 17:59
pmichaud yeah, it's the cheap way to split up a name when you don't have parse_name :) 18:00
jnthn ;-)
** '::' is really cute
Too bad we can't keep it. :-)
pmichaud okay, time to try out the shiny new dispatcher :) 18:01
(the one that fixes my parcels for me) 18:02
jnthn The one I hope doesn't blow up. :-)
pmichaud we'll know soon.
jnthn
.oO( somebody set up us the parcel bomb )
18:03 __ash__ left 18:04 Kodi left
pmichaud jnthn: hmmm, doesn't quite work 18:04
jnthn FAIL. 18:05
In what way?
18:05 am0c left
pmichaud still investigating 18:05
the dispatcher does appear to be correctly getting the item
but then it can't find any of the item's methods
perhaps it needs to re-fetch a method table or something like that? 18:06
i.e., perhaps it thinks it still has a Parcel, even though the Parcel's type has changed?
jnthn hmm...thought I'd taken care of that...
oh wait, no
silly me.
18:07 payload left
pmichaud goes to look at the commits 18:08
jnthn pmichaud: pushed
pull and try again.
pmichaud pulling, trying again 18:09
jnthn I hadn't noticed we init'd a couple of things right up top in the decls.
18:09 lambdabot left, payload joined
pmichaud WIN! 18:10
jnthn++
jnthn yay
mberends applauds 18:12
pmichaud oh this is sooo cewl
18:13 fax left
jnthn hehe 18:13
With a *slight* dash of evil mixed in on the !FETCH. :-) 18:14
pmichaud actually, it's pretty natural
colomon mberends: Isn't watching this inspirational? 18:15
pmichaud it'd be more inspirational with commit messages on the channel :) 18:16
18:16 araujo joined
pmichaud pushed 18:16
jnthn pmichaud: nice
pmichaud: I guess we have arrays and for loops and stuff soon out of this? 18:17
pmichaud yes
well, we have arrays now
jnthn huh...why does git think I'm already up to date... :-/
pmichaud oh, failed to push here
jnthn ah, that's why.
pmichaud apparently another commit landed
merging
18:17 lilstevey left
jnthn neh neh! 18:17
pmichaud done
testing
(rebuilding) 18:18
jnthn: are you in the mode (like me) of wanting to push commits quickly so that the other guy has to deal with the merge? ;-)
jnthn pmichaud: yes
;-)
pmichaud source code control as a motivational tool 18:19
jnthn But I feel less bad about it now that I know you're doing that too.
mberends colomon: totally inspirational. What's also nice is how the process whirlpools back into the specs, and thus into the other implementations via STD :)
18:20 stepnem left
pmichaud pushed, for real this time 18:20
pmichaud looks around the house and thinks that perhaps he really should do some laundry and/or wash some dishes... 18:21
jnthn I hate it when I want food and it's like, ENOCLEANDISHES. 18:22
Well actually that doesn't happen much, I have lots of didhes.
It's like ENOCLEANSAUCEPAN
pmichaud same here, but in my case I'm not the primary culprit of ENOCLEANDISHES
colomon It's amazing (or perhaps sad) how many times when I set out to cook, the first thing I do is the dishes.
I think what bugs me is ENOPLACETOPUTDIRTYDISHES. 18:23
18:23 lambdabot joined
moritz_ good localtime() everybody 18:23
jnthn pmichaud: Suspect inbalance of clean dish consumers and producers. ;-)
pmichaud moritz! wb! 18:24
jnthn moritz! \o/ 18:25
moritz_ looks like a fairly big backlog :) 18:27
pmichaud it is
but nothing much has happened
well, other than....
jnthn has the multisub dispatcher working in the rakudo ng branch
we now have lazy lists
arrays vivify properly
we now generate inplace operators dynamically
lexicals are initialized properly 18:28
colomon The ng branch commit log on github is both shorter than the #perl6 backlog and shockingly awesome.
pmichaud package vars are initialized properly
lexical subs and multisubs are "done right" 18:29
moritz_ you're kidding, are you?
pmichaud no
moritz_ WE HAVE LAZY LISTS?
pmichaud we do
18:29 dalek left
pmichaud soon we'll have lazy ranges and lazy IO to go along with them 18:29
colomon does the lazy dance! 18:30
18:30 dalek joined
pmichaud of course, we don't even parse and/or run Test.pm yet, so.... 18:30
take all of the above with a grain of salt :)
jnthn Oh, don't forget we're already using the shiny signature binder too. :-) 18:31
colomon Is !FETCH what provides the laziness?
pmichaud no
the laziness is built into the List object itself
and !generate handles the converting of lazy values into generated ones
moritz_ so it now has-a RPA?
pmichaud yes
moritz_ instead of is-a?
wow
pmichaud parcel isa RPA now
and parcels get lazily flattened 18:32
there's a very good chance I'll do lazy gather+take in the next day or so. Perhaps even before for loops.
jnthn well, depends how soon we want the test harness running. 18:33
jnthn isn't sure how high a priority that is
pmichaud well, ultimately I want for() to just be map()
jnthn yes
pmichaud I might just write map eagerly for now, though.
jnthn That means we need to deal with void context.
pmichaud I don't see that as being too difficult either 18:34
jnthn pmichaud: Is it helpful if I focus on getting class and role decls back in place?
pmichaud roles, definitely
I'm doing Str now
jnthn pmichaud: So we can start building things back in the setting again...
pmichaud oh, you mean the decls
jnthn Yeah
pmichaud yes.
jnthn ah, you wanted to be able to do roles again from PIR, didn't you...
pmichaud right
so I can do Positional 18:35
and Failure
jnthn I'll sort that out for you real soon now.
pmichaud but I figure if you do role/class decls, you'll solve my want for roles in PIR :)
jnthn heh
pmichaud anyway -- yes, role+class decls would be good
jnthn I don't see me finishing up role + class decls today
pmichaud that's fine
jnthn Well, I guess I could not sleep... ;-)
pmichaud I have more than enough on my plate at the moment, I'm not truly blocked on anything 18:36
the role stuff would be nice-to-have
but isn't blocking
moritz_ non-blocking roles ;-)
jnthn I akshually have to do a few @other_bit over the next couple of days too.
pmichaud okay
jnthn I propose doing something like Rakudo days split over 2 days.
pmichaud I'll let you know if I get priorityneeds
jnthn so like half on mon, half on tue for the next one.
pmichaud at the moment, it would be roles-from-pir
class decls shortly after that 18:37
jnthn I can surely have those for you today, since it's mostly bringing back in some other code.
OK. What will you need in class decls?
pmichaud that would be awesome
actually, we don't need much
jnthn methods and attributes, I presume.
pmichaud we can cheat "augment class ..." by just saying "module" :-)
jnthn lol
sicko.
:-)
I might *just* manage augment. :-)
pmichaud if not, then we'll just do "module" for a short bit
jnthn Given it's meant to be easy now. ;-) 18:38
otoh I'm sorta in a "put this stuff back cleaner" mood.
18:38 stepnem joined
pmichaud right 18:38
jnthn And a "make custom metaclasses easier to do later" mood too...
pmichaud oh, I also forgot: 18:39
subnames now begin with &
no more funny "list" method conflicting with the "&list" builtin
18:39 __ash__ joined
jnthn Don't care about doing the custom metaclasses right now, but I think putting this stuff in such that I have a clear path to that later will help me get a decent design. 18:39
pmichaud jnthn: +1 18:40
jnthn And if I pretty much end up doing them by accident, well, win.
mberends Lately each Rakudo Day is like a former Rakudo Month :-) Wow! 18:41
18:46 payload left
Su-Shee a hash key doesn't have to be something string-ish anymore, doesn't it? 18:49
jnthn Su-Shee: In spec, or in Rakudo? 18:50
pmichaud yeah, I'm looking at how quickly I'm closing in on my Hague grant items now :)
("about time", I know :-)
Su-Shee jnthn: in Rakudo - but is the spec different?
18:50 Whiteknight left
jnthn Su-Shee: Yes, Rakudo only copes with string ones at the moment, afaik. 18:51
colomon rakudo: my %a; %a{1/2} = 1; say %a.keys.perl 18:53
p6eval rakudo d154eb: OUTPUT«["0.5"]␤»
colomon So Rakudo will take anything given to it as a hash key and stringify it?
jnthn colomon: atm yes 18:54
Su-Shee rakudo: sub add { 1 + 1; }; my %a; %a{ add() } = 1; say %a.keys.perl 18:56
p6eval rakudo d154eb: OUTPUT«["2"]␤»
jnthn rakudo: sub add { 1 + 1; }; my %a; %a{ &add } = 1; say %a.keys.perl # uh-oh 18:57
p6eval rakudo d154eb: OUTPUT«["add"]␤»
18:58 jan joined
Su-Shee rakudo: sub add { 1 + 1; }; my %a; %a{ add } = 1; say %a.keys.perl 18:58
p6eval rakudo d154eb: OUTPUT«["2"]␤»
18:58 jan is now known as Guest91830 19:01 Whiteknight joined 19:03 jferrero joined
justatheory s/monkey patching/fuck typing/ 19:07
jnthn At least if it was called that, nobody in a corporate environment would dare to do it in their code. ;-) 19:08
19:10 wlan joined
justatheory justatheory.com/computers/programmi...yping.html 19:10
wlan hiall
moritz_ hi
wlan i read about perl6 19:11
i can't understand 19:12
why better than perl5?
what*
moritz_ there are lots of things that are better 19:13
wlan gm
moritz_ for example we have new, much more powerful and readable regexes
we have a type system
and optional type constraints
lazy lists
multi dispatch
custom operators 19:14
and so on, the list is rather long
Su-Shee "real" OO...
wlan and CPAN?
__ash__ i like the new regex things, the are nifty
moritz_ and, very importantly, we're fixing old things that can't be fixed in perl 5
because it breaks backwards compatibility 19:15
or because it's conceptually impossible in Perl 5
wlan interisting
moritz_ wlan: we don't have a CPAN for Perl 6 yet, but we do plan to have one
Su-Shee (I get sold every time.. ;)
wlan what language written perl6? 19:16
19:16 lichtkind_ left
pmichaud mostly Perl 6. 19:16
moritz_ Perl 6 is a language specification - compilers can be written in any language people like
wlan gm
moritz_ we don't have one implemention 19:17
wlan i want say compilator
moritz_ *implementation
we have one rather popular, called Rakudo
that's based on parrot, a virtual machine
pmichaud see also perl6.org/compilers/
wlan i now see this portal
19:19 cottoo left 19:21 japhb joined
wlan Pugs is written in Haskell, and has been inactive since mid 2007. 19:23
pugs_svn r28971 | Kodi++ | [t/spec/] "Junction" -> "junction", ".eigenstates" -> "!eigenstates" (as per r25891).
r28971 | [t/TODO] Now we need to ensure that the tests can call junction!eigenstates.
wlan redeyes 19:24
=))
19:24 masak left 19:26 NorwayGeek left 19:27 NorwayGeek joined
moritz_ uhm, the point is that you can't call junction!eigenstates - it's a private method 19:28
Su-Shee wth are eigenstates?! 19:29
colomon moritz_: but it's spec'ed so we need to test it.
rakudo: say any(1,2,3).eigenstates.perl 19:30
p6eval rakudo d154eb: OUTPUT«[1, 2, 3]␤»
19:30 NorwayGeek left
moritz_ colomon: it's spec that we can call !eigenstates? 19:30
19:30 NorwayGeek joined
moritz_ Su-Shee: the components of a junction 19:30
pmichaud keep in mind that rakudo's implementation of eigenstates was based on a conjectural spec
(which has since changed)
19:32 NorwayGeek left, NorwayGeek joined 19:34 NorwayGeek left 19:35 NorwayGeek joined
colomon moritz_: S32 containers 19:35
"Note this is a private method; you must arrange for yourself to be trusted by the junctions class in order to call it, which probably involves evil MONKEY_TYPING."
19:36 icwiener_ left
colomon So we need to test that we can do that. 19:36
(If you couldn't call it, what would be the point of putting it in the spec at all?)
pmichaud there's still an ongoing debate as to whether !eigenstates should exist at all
(iirc) 19:37
at any rate, I wouldn't accept this particular piece of the specification as being "correct"
it's still a best guess
__ash__ eigenstates sounds funny, does the spec have anything for eigenclasses?
19:38 NorwayGeek left
moritz_ __ash__: it's from the quantum mechanics analogy 19:38
19:38 NorwayGeek joined
moritz_ __ash__: where eigenstates are the only things you can measure without an error 19:39
__ash__ ah, didn't know it about that use of the word
Su-Shee waits for the digest version for us common folks.. 19:40
19:40 NorwayGeek left 19:41 silug joined
moritz_ Su-Shee: read the Perl 6 articles in the iX, eigenstates are described there ;-) 19:41
19:43 dalek left, bigpresh_ left, Exodist left, cls_bsd left, carlin_ joined, PerlJam left, elmex left, constant left, PacoLinux left, Whiteknight left, yves left, cognominal left, araujo left, edenc left, cls_bsd joined, cj joined 19:44 clkao left, Guest91830 left, Chillance left, crazed left, fridim_ left, ejs left, bpetering left, nbrown left, synth left, avar left, astrojp left, frew left, Eevee left, gfldex left, ascent_ left, jsut|work left, revdiablo left, kcwu left, baest left, avuserow joined
jnthn ...whoa... 19:44
Su-Shee moritz_: we should have the ixes in the office..
19:44 carlin_ left, cls_bsd left, cj left, avuserow left, PacoLinux joined
pmichaud moritz_: btw, do you know of any way to get dalek to report commits from the rakudo/ng branch? 19:44
19:44 nbrown joined 19:45 jan joined 19:46 presh_ joined, akl joined
moritz_ pmichaud: ask Infinoid++, all we need is an RSS/atom feed 19:47
pmichaud okay
19:47 masak joined
moritz_ pmichaud: since github offers only RSS feeds per branch, they have to be added manually for each branch we want tracked 19:47
19:48 elmex joined
pmichaud phenny tell Infinoid could you add the rakudo/ng branch commits to dalek? url is github.com/feeds/rakudo/commits/rakudo/ng 19:48
19:48 carlin joined
pmichaud phenny: tell Infinoid could you add the rakudo/ng branch commits to dalek? url is github.com/feeds/rakudo/commits/rakudo/ng 19:48
phenny pmichaud: I'll pass that on when Infinoid is around.
pmichaud Infinoid: ^^^
19:48 cls_bsd joined
pmichaud phenny: tell Infinoid I think it only needs reporting to #perl6 19:49
phenny pmichaud: I'll pass that on when Infinoid is around.
19:50 quuxx left, dj_goku joined, quuxx joined, Schwern joined 19:52 Bucciarati joined 19:53 jan is now known as Guest41472, constant joined 19:54 christine left, christine joined
moritz_ pmichaud: is there anything I can do to help with the ng branch? 19:54
pmichaud what sort of task would you be interested in working on ? 19:55
if you're wanting to play with grammars at all, perhaps port in the full <ws> rule?
right now it doesn't recognize pod comments
19:55 astrojp joined
pmichaud I also need to come up with an improved build environment for the ng branch 19:56
moritz_ wrt importing nqp? 19:57
pmichaud yes 19:58
moritz_ shouldn't we wait for a decision from the parrot folks?
pmichaud although there's a discussion currently going on about making nqp-rx available in core parrot
yeah
but I don't want to wait too long if it means people can't be working in the branch easily
moritz_ ok 19:59
pmichaud anyway, the pod_comment rule would be a good candidate
moritz_ I'll take a look
pmichaud it's probably also worth looking at the pod_comment rule that is currently in rakudo's master 20:00
even just getting embedded comments to work might be instructive :)
moritz_ is there a reason not to use :dba where STD.pm does? 20:01
pmichaud nqp-rx doesn't support it yet
for now we just comment it out
moritz_ ok
20:02 nihiliad left 20:03 wlan left, araujo joined 20:05 wlan_ joined
masak oh hai. I ran into a little problem... gist.github.com/223686 20:06
oh wait. I see what it is.
it's referencing very old paths. 20:07
nvm. :)
jnthn lol its masak
:D
masak \o/
20:07 felipe joined
masak I'm doing my first day of puni... of November blogging. :) 20:07
jnthn masak: Will book flights for Riga tonight. :-)
hehe
I look forward to the next 29 days.
masak++ # epic blogging 20:08
carlin A new blog post each day will be good for testing zaslon ;-) 20:09
masak if this weekend is any indication, I look forward to every day until April. :)
mberends aye
masak it seems wonders have become the norm.
__ash__ what is rakudo ng branch for? 20:10
pmichaud ...which might be saying something, given that our previous norm was considered wondrous also :)
__ash__: it's the rebuild-the-rakudo-world branch 20:11
masak __ash__: porting Rakudo to nqp-rx.
moritz_ oh, Makefile FAIL
__ash__ thought so, i saw all of pmichaud's mailing list post about nqp-rx
moritz_ touching grammar.pg and then typing make doesn't rebuild anything
pmichaud moritz_: in ng? 20:12
moritz_ pmichaud: yes
pmichaud moritz_: the new stuff is in src/Perl6
20:12 arnsholt joined
pmichaud i.e., src/Perl6/Grammar.pm 20:12
moritz_ oh
ok
pmichaud (yes, we really are rebuilding the entire rakudo universe :-)
20:12 base_16 joined
pmichaud for people that want to see a really cool grammar: github.com/rakudo/rakudo/blob/ng/sr...Grammar.pm 20:13
it's almost like writing in Perl 6! :)
well, except that jnthn++ has put a huge block of PIR in the second method :-) 20:14
masak :)
masak likes the pir::method calls
20:15 eternaleye left, eternaleye joined
jnthn pmichaud: Yes, but see the comment I put at the top of it to bait people who think it's ugly. ;-) 20:15
pmichaud I saw that
I'm almost baited :)
mberends not many other people could ever be baited that way ;) 20:16
masak oh, I wouldn't say that... :) 20:17
20:17 pmurias joined
pmurias diakopter: ping 20:17
pmichaud jnthn: have you done anything like !fixup_routine_type in the ng branch yet?
(looks like "no") 20:18
jnthn pmichaud: no 20:19
"masak bait"
pmichaud: I'm still pondering...what to do...about that.
pmichaud I'm going to add it, I need it for regexes
we can switch it up a bit later
jnthn ok
masak jnthn: who knows? it might work. that masak is a gullible fellow.
jnthn masak: If gullibility gets people to tidy up my code, I'm all for it! 20:20
masak not today, though. today I'll be making the November test suite look decent again.
jnthn tries to find the masak riga dates in backlo 20:21
g
20:21 BinGOs joined
pmichaud oh, fixup_routine_type gets into the question of "do we want our own custom Code objects"? 20:21
masak jnthn: 19th - 23rd
pmichaud hmmmmmmm
jnthn pmichaud: Yes, that's why I was still pondering. :-) 20:22
pmichaud: You mean "do we subclass sub"?
pmichaud yeah, something like that 20:23
or do we create a Code object that has the parrot sub as a 'do' property
jnthn pmichaud: oh
pmichaud (and then subclass our other types from that)
jnthn pmichaud: You know, I like the second of those...
...if it won't hit performance too horribly.
pmichaud the do property?
jnthn (it shouldn't) 20:24
pmichaud: yes
20:24 awwaiid joined
pmichaud I think it shouldn't 20:24
jnthn pmichaud: Same, especially as invoke goes looking for a proxy now anyway.
pmichaud: In fact, it may get cheaper.
pmichaud exactly
and closer to spec
jnthn pmichaud: oh heh
oh, wait...no
:-)
pmichaud argggh, no fair using my own tricks against me :) 20:25
jnthn masak: Aww! AirBaltic in the future will fly from Blava to Riga direct. But not yet.
masak jnthn: :/
pmichaud jnthn: I had that happen last year... Southwest Airlines started flying to Minneapolis... 3 weeks after Frozen Perl.
pmichaud wonders if he's been overlooking any conference invitations in his inbox 20:26
jnthn masak: It's fine, Vienna airport isn't exactly hard for me to get to. ;-)
What with the airport bus leaving < 10 minutes walk from my door.
masak :)
20:27 allbery_b joined
jnthn I just hadn't seen Bratislava on AirBaltic's list before and got all excited. 20:27
pmichaud jnthn: so, should I go with our old fixup_routine_type approach for now, or should we look at fixing up the Code object?
jnthn Riga is AirBaltic's hub, which actually means I'll probably win a whole bunch of connecting flights...
pmichaud: Let's do the code objects.
pmichaud: After all, the way we're creating routines now makes that easy to shove in, no?
pmichaud let me review what the synopses say about it, but I'll go with whatever you like better 20:28
jnthn
.oO( damm, I just volunteered )
OK.
I'm doing $flight at the moment anyway.
And then roles.
(enough for you to make 'em from PIR)
20:29 desertm4x left
moritz_ I can't even find the token ws definition in src/Perl6/Grammar.pm 20:29
is the default from nqp-rx used?
jnthn masak: So I@m getting
pmichaud moritz_: it's inheriting one from HLL::Grammar
jnthn Th 19/11 14:25 Vienna 17:25 Riga
Mo 23/11 11:55 Riga 12:55 Vienna
pmichaud jnthn: the note about do properties is S06:2456
(it's mentioned other places in S06 as well)
I'll skip regexes for now, then 20:30
masak jnthn: we'll be landing on the same time, exactly!
jnthn pmichaud: Heh, I'd noticed that before and wondered how on earth we'd do that. :-)
masak: oh wow
masak: in that case, I hope on separate runways ;-)
masak jnthn: also, my aircraft is a "Fokker 50"
moritz_ Fokker 50. Wow.
masak doesn't sound too good, actually.
jnthn "lol where's masak...oh...i can see the fokker"
;- 20:31
masak does the pilot go "oh, fokk!" in mid-air?
20:31 nihiliad joined
Su-Shee I forbid you to fly. you all take the train. I want a finished Rakudo. 20:31
moritz_ lol 20:32
masak Su-Shee: it's "bus number", not "fokker number" :)
Su-Shee masak: now it is. ;)
masak dang. :)
Su-Shee masak: and YOU can swim anyway! ;)
20:32 pmurias_ joined, pmurias_ left
masak Su-Shee: you got me. I'm lazy. :P 20:32
jnthn Su-Shee: There's a slight problem with building a train line between Riga and Stockholm ;-)
Su-Shee jnthn: I already opted for masak swimming. he may take some boat, ok. ;) 20:33
jnthn Su-Shee: Annoyingly, while I could go by train...
Su-Shee actually - masak, can't you really go by ferry?
masak Su-Shee: too late. already booked flight tickets.
they were very comparable in price, and I like flying.
Su-Shee a well. will end up in the water anyway.. ;) 20:34
who doesn't.. european train connections are just sad with the short ways..
jnthn Su-Shee: The train would take me 33 hours, just looking it up. 20:35
Su-Shee: And involve 4 changes.
masak bring "War and Peace".
jnthn And also is scheduled brilliantly so I get to spend much of a night on Daugavpils platform...
masak: That woulda been more fitting for the Trans-Sib. 20:36
;-)
masak oh, indeed.
jnthn wonders whether he really needs more than just hand baggage
hmm, borderline. 20:37
masak I thought the same.
in the end I opted for 1 luggage.
you never know.
Su-Shee ROTFL.. ok - berlin - riga is something like 850km and it takes 35 hours by train.. un-be-lie-va-ble. 20:38
jnthn Su-Shee: Yeah. It's ridiculous as soon as you hit Poland and head north from there.
Su-Shee you can go by bike :)
moritz_ and Würzburg - Braunschweig is 350km and takes 2hrs or so
20:39 tak11 left
Su-Shee instead of crappy transrapids they should have connected all european capitals with a tgv/shinkanzen long ago.. 20:39
jnthn Su-Shee: I could also walk. It'd take 10 days.
(according to google, assuming I skip sleep) 20:40
Su-Shee jnthn: how did you google it?
pmurias sleep is for the weak ;)
jnthn oh hey, if I walk through Poland I can visit pmichaud 20:42
erm
pmurias:
:-)
tab completion fail, not geography fail ;-)
Su-Shee: maps.google.com
Su-Shee jnthn: yeah, but what did you assume you walk per day?
*hihi* perl 6 pilgrimage - walk with us from the south to the north.. and we can fetch everybody on the way. ;) 20:43
jnthn Su-Shee: oh, 10 days was non-stop
moritz_ STD.pm has rules like token comment:sym<#> { '#' {} \N* 20:47
}
what's the {} for?
jnthn LTM screw-up protection 20:48
Or something.
20:48 nihiliad left, NorwayGeek joined
jnthn pm can explain it better than that though ;-) 20:48
moritz_ so I'd write that '#' :: \N* in nqp?
jnthn moritz_: pm told me to skip the {} for now 20:49
moritz_ ok
jnthn masak: flight booked!
masak: I get a Boeing WITH WINGLETS
masak \o/
wow, winglets!
jnthn Yeah
You'll be lucky if yours even has wings. ;-)
masak oh fokk... 20:50
Su-Shee do winglets work as well as applets in the web in the 90ties? ;)
jnthn :-)
masak: eh well, I guess now we can go and get lost together on the way to some hotel somewhere, rather than alone... :-)
jnthn akshually not that bad at finding places, if given a decent map 20:51
Su-Shee one with a fokker, one with winglets.. I see you both swimming.. ;)
20:54 Exodist joined, nihiliad joined
masak jnthn: did I tell about how I got lost last weekend already? 20:55
I'm *very* good at doing that.
jnthn Su-Shee: Ah well, at least it's two Perl programmers, not 3 French cats... 20:56
masak: OK, I print off a very good map! :-)
masak excellent.
hm, I might have bought bus tickets from the Airport into town...
jnthn oh, I might not have... 20:57
d'oh
masak :/
jnthn oh well, I'm sure they sell them at the airport ;-)
oh, can buy them on the bus, but only in cash, and only lats at that 20:58
masak: found the form to buy them online.
(separate from flight)
masak the email from Andrew said they could also be bought on the plane.
jnthn doing that, it'll save some hassle.
Hmm...you can pay in LVL or LTL as well as EUR. Too bad I can't pay in LOL... 20:59
masak 哈哈
21:02 colomon joined
jnthn masak: OK, I haz a bus ticket both ways now too. :-) 21:02
masak: I guess that just means I need to submit talks.
Well, 1 or 2...
masak oh, thanks for reminding! I'll do that also.
I have one talk.
since it's only one day. :) 21:03
jnthn yeah
maybe I should have just one, not sure
What you going to speak on, btw? Web.pm?
Cheese?
November?
moritz_ nqp: token foo_bar { 3 }
p6eval nqp: ( no output )
moritz_ nqp: token pod_comment { } 21:04
p6eval nqp: ( no output )
moritz_ nqp: token pod_comment { ^^ \h* }
p6eval nqp: ( no output )
masak jnthn: I'm not telling. you have to wait like everyone else.
:) 21:05
moritz_ nqp: token pod_comment { ^^ \h* '=' <.unsp>? 'being' }
p6eval nqp: ( no output )
jnthn masak: :-P
masak: I'm pondering giving the "Solved in Perl 6" again...
masak \o/
jnthn It tends to go down well.
I may submit a lightning talk on lolsql.
masak that's a great idea.
I should consider a lightning talk as well.
jnthn "The funniest 5 Rakudo bugs I've filed" 21:06
21:06 tak11 joined, nihiliad left
masak heh. :) 21:07
it would be fun to have Druid in such a state that it could be lightning-talk'd.
jnthn Heh, we could play each other online, amidst the segvs. ;-)
masak aye. :)
having the web app respawn automatically each time. 21:08
21:08 quuxx left
carlin You had to say segv didn't you? :-P 21:08
21:09 __ash__ left, quuxx joined
carlin I hope that's magically fixed in zaslon but I doubt it ... 21:09
jnthn quuxx: segv
...nah, we're innocent. :-) 21:10
carlin: Any chance of a bt?
21:10 Su-Shee left
carlin Yes, actually. I did one from a segv last night. 21:11
gist.github.com/223728 21:12
jnthn updates his ACT photo with a more wintery image 21:14
lolsql abstract is win! 21:17
carlin: Heh, line 224 has *so* much that could be wrong! ;-) 21:19
21:19 payload joined
jnthn An opening curly is such a place to segfault. 21:19
21:21 __ash__ joined
pmichaud back from lunch 21:21
jnthn pmichaud: Well, I committed nothing, but I did book a flight and submit some talks... :-) 21:22
carlin jnthn: well, if you deleted it the segv wouldn't happen anymore ...
jnthn carlin: Of course not!
carlin: Only 'cus we fail to compile 'cus of unbalanced curlies though.
;-)
pmichaud: srsly going to work on roles now :-)
21:22 avuserow joined
pmichaud jnthn: +1 21:23
21:23 quuxx left, quuxx joined
pmichaud I vote to remove 06-use.t -- it's not testing anything helpful for Test.pm . 21:24
I vote to remove 07-binding.t -- Test.pm doesn't use the binding operator 21:25
jnthn pmichaud: kill kill kill 21:26
pmichaud: S09-types is also perhaps a candidate.
pmichaud I vote to change Test.pm to used .defined instead of defined ()
and change 07-defined.t accordingly
jnthn What is this, a democracy?
;-)
pmichaud it's a chance for people to register objections
moritz_ note that in Auld Rakudo .defined would sometimes give Null PMC Access
where defined() would work
jnthn Ouch! 21:27
That's...so wrong.
moritz_ it is.
jnthn masak: lol my talk already is approved
masak wow, that's fast!
jnthn masak: the Perl 6 one.
masak: Poor Andrew is still probably scratching his head wondering what on earth language I wrote the lolsql abstract in. 21:28
masak :)
jnthn pmichaud: No objects on my part to any of them.
oh, approved anyway ;-)
21:29 nihiliad joined
moritz_ nqp: regex foo { 'a' { say 'bar' } } 21:29
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1616 (src/Regex/Cursor-builtins.pir:179)␤»
moritz_ how are assertions handled in nqp-rx?
jnthn <?{ ... }> 21:30
moritz_: see typename for an example
moritz_ nqp: regex foo { 'a' <?{ say 'bar' }> } 21:31
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1616 (src/Regex/Cursor-builtins.pir:179)␤»
moritz_ nqp: regex foo { 'a' <?{ say('bar') }> }
p6eval nqp: ( no output )
moritz_ ah, much better
jnthn :-)
masak Test::is has no responsibility to return Bool::True if it succeeds, right?
I have a test here that seemed to assume that.
moritz_ IMHO it should 21:32
as hould all testing functions
masak moritz_: it currently doesn't.
moritz_ masak: patches welcome ;-)
masak sure, some other day. :)
I'm racing towards fixing November today.
moritz_ you better should, since it's already November for more than 20 hours ;-) 21:33
masak you can see why I'm a bit busy right now :P
jnthn pmichaud: How do you feel about having a directory for PIR-y bits that are not actually built-ins per say, but more helpers for doing guts-y things? 21:34
pmichaud jnthn: propose a name?
jnthn guts ;-)
moritz_ guts-y.pir ;-)
jnthn pmichaud: I'm just thinking we can try and keep builtins to stuff that's directly related to types and living in namespaces.
pmichaud: And pull out things like, the helpers for constructing roles, dispatch helper bits, etc. 21:35
Just feel it may be nicer than cluttering up builtins with them.
I actually don't have a better name than "guts" :-/ 21:36
helpers?
pmichaud yeah, I'm trying to come up with one also
helpers
internals
jnthn evil
21:36 payload1 joined, payload left
pmichaud magic 21:36
jnthn ignorethis
dragons
pmichaud readme # make sure nobody ever looks at them
jnthn ok, win.
pmichaud glue 21:37
jnthn ooh, not bad.
21:37 base_16 left
jnthn OK, glue it is for now. 21:37
We can easy enough rename later.
pmichaud shims 21:38
glue is fine 21:39
we can change it later
I was a little partial to "magic" :-)
moritz_ nqp: grammar A { token TOP { ^ a <?{ pir::say('foo') }> } }; A.parse('a');
p6eval nqp: OUTPUT«foo␤Null PMC access in get_bool()␤current instr.: 'parrot;A;TOP' pc 73 (EVAL_1:35)␤»
jnthn pmichaud: Yeah, I like that too.
moritz_ is that known/intended
?
pmichaud not known, not intended, but not necessarily wrong 21:40
pir::say doesn't return a value
thus the Null PMC
moritz_ ok
thought it returned 0/1 or true/false just like the perl 5 and perl 6 one
pmichaud nope
returns void
moritz_ ok
pmichaud nqp: grammar A { token TOP { ^ a <?{ pir::say('foo'); 1; }> } }; A.parse('a') 21:41
p6eval nqp: OUTPUT«foo␤»
moritz_ that's what I used now, yes
pmichaud I not sure what to do with the case w/o the 1 21:42
of course, easier is just a plain closure, no <?
nqp: grammar A { token TOP { ^ a { pir::say('foo'); } } }; A.parse('a')
p6eval nqp: OUTPUT«foo␤»
pmichaud note that there's also a <?DEBUG> rule 21:43
turns on tracing
nqp: grammar A { token TOP { <?DEBUG> <abc> <def> }; token abc { abc <def> }; token def { def }; }; A.parse('abcdefdef'); 21:44
p6eval nqp: OUTPUT«0/1: START abc␤3/1: START def␤3/1: PASS def at pos=6␤0/1: PASS abc at pos=6␤6/1: START def␤6/1: PASS def at pos=9␤0/1: PASS TOP at pos=9␤»
moritz_ how can .*? every match anything in a token?
s/every/ever/
pmichaud because it has an explicit backtracking qualifier
moritz_ ah
pmichaud (the ?)
however: [.*?] in a token will not match anything 21:45
nor will (.*?)
moritz_ ok
pmichaud the <?DEBUG> rule applies only to the current match (and subrule matches) -- once leaving the rule that declares <?DEBUG> tracing is automatically turned off. (I.e., it's contextual) 21:48
21:49 justatheory left
pmichaud okay, I'll keep defined() but I'm removing undefine() -- Test.pm doesn't need it 21:50
21:52 Whiteknight joined, nihiliad1 joined 21:53 nihiliad left 21:56 xenoterracide left 21:58 xenoterracide joined 22:01 pnate joined
spinclad (backlogged four hours, don't know if the world has changed again...) re ::T vs ** '::' , isn't leading :: (as in ::T) a sigil? then <identifier> ** '::' should be right. 22:01
jnthn spinclad: <identifier> ** '::' doesn't match a leading ::
spinclad: But yes, ::T is for that. 22:02
spinclad: <identifier> ** '::' matches identifiers with :: between them.
22:02 xenoterracide left
spinclad right 22:02
jnthn But we need <name> to match ::T. 22:03
spinclad so the sigil should be considered in an outer layer: <innername> = <id> ** '::', <name> = <sigil><twigil><innername> or something 22:04
22:04 xenoterracide joined
jnthn Well, if :: is really a sigil in the same sense as the others anyway... 22:05
STD treats it differently though.
22:07 xenoterracide_ joined
quuxx masak++ blogged "November 1 2009 -- a somewhat shaky start": use.perl.org/~masak/journal/39826?from=rss 22:09
masak shaky, but fun! \o/
(ask me again by the end of the month, though) 22:10
22:13 pnate2 left 22:14 pnate2 joined
jnthn masak++ # nice post :-) 22:15
masak thanks.
moritz_ maybe quuxx should say 'lolmasakblogged' or so ;-)
masak I think that'd be very appropriate. 22:16
22:16 quietfanatic joined
moritz_ I managed to write a rule that successfully matches a Pod comment 22:17
28/7: PASS pod_comment at pos=60
but still rakudo says Confused, quoting the line before the Pod comment 22:18
masak that's confusing. 22:19
time to sleep. see y'all tomorrow. o/ 22:21
lisppaste3 moritz_ pasted "ws rule with POD comments kinda not-working" at paste.lisp.org/display/89655
22:21 masak left
moritz_ good night 22:21
22:24 xenoterracide left
moritz_ rakudo: sub jv(Object $j) { my @e; (-> Any $x { @e.push: $x }).($j); ~@e.sort }; jv(3|5|2) 22:25
p6eval rakudo d154eb: ( no output )
moritz_ rakudo: sub jv(Object $j) { my @e; (-> Any $x { @e.push: $x }).($j); ~@e.sort }; say jv(3|5|2)
p6eval rakudo d154eb: OUTPUT«2 3 5␤»
jnthn pmichaud: I'm getting a tad bogged down figuring out exactly how I want this roles stuff to really look in the end, so decided to just do something that works for now.
22:25 xenoterracide_ left
jnthn e.g. enough for what you need at the moment. 22:26
And encapsulated enough that should be fine for the future.
pmichaud jnthn: wfm
I don't mind if it changes in the future.
jnthn pmichaud: I'm still thinking about how I want a few things to look overall. 22:27
But not quite hit on a magic answer yet.
Or at least, a sufficiently likable one.
22:27 pnate left
jnthn Probably it'll come when I get class and role decls back in place again. 22:27
22:28 xenoterracide joined 22:29 __ash__ left
moritz_ rakudo: say (3|4|5).pick 22:31
p6eval rakudo d154eb: OUTPUT«any(3, 4, 5)␤»
jnthn ...huh?
jnthn thought .pick was defined on junctions. 22:32
sjohnson pakudo
oops
rakudo: say (3|4|5).WHAT
p6eval rakudo d154eb: OUTPUT«Junction()␤»
pmichaud jnthn: I'm going to go ahead and model Code similar to the way we do it in master, but feel free to rip it out when you come up with the new model 22:35
I'm not going to have a bunch in there
just enough to keep moving forward
oh, I have something else to work on first 22:36
jnthn pmichaud: OK 22:37
22:38 __ash__ joined 22:40 icwiener joined
pmichaud oops. Test.pm requires type-based multi subs. 22:41
I'll fix that.
22:42 pnate2 left
jnthn pmichaud: Those should already work. 22:42
pmichaud: Just that you need to add the types. ;-)
pmichaud yeah, but it's depending on Whatever
jnthn oh.
pmichaud I'm not sure I want to add that yet.
jnthn Whatever you want. :-)
moritz_ seems like fudge doesn't like overlapping todo/skip directives ;-) 22:43
jnthn
.oO( toskip )
22:44
sjohnson jnthn: did you know windows has a grep command? 22:45
jnthn pmichaud: oooh, I think I may have something that works enough for you. :-)
sjohnson: not a built-in one, no... 22:46
sjohnson jnthn: findstr
try it :)
it's been in windows since before XP was out
i went many years without knowing about findstr :( 22:47
pugs_svn r28972 | moritz++ | [t/spec] clean up some junction testing mess
r28972 |
r28972 | since eigenstates are now private, it's WRONG to rely on them heavily, even if
r28972 | we may later on obtain a way to ask for them via monkey typing.
r28972 |
r28972 | Also adds some rakudo skips. Needs more cleanups.
jnthn sjohnson: wow 22:48
pmichaud: pushed 22:49
pmichaud: So basically, I added Positional but tweaked the way we make the role a bit. 22:50
pmichaud: And I showed how you get hold of something to compose into List
But stopped short of actually composing it in (will let you do that in your own time/readiness).
pmichaud okay, great 22:51
that should work well for me
jnthn In next couple of days I'll put back class and role decls. 22:52
I'll need to be a tad more awake for that, though. :-) 22:55
pmichaud np. I have plenty to work on, and I need to write some reports as well as code :)
pmichaud adds trait parsing
jnthn yes, I plan to blog a bit now.
pmichaud: just parsing?
pmichaud just parsing
jnthn kk
pmichaud to get us past the "is export(:DEFAULT)" traits in Test.pm 22:56
jnthn ah, fine.
They'll probably have to follow fairly soon after class decls.
pmichaud wfm
jnthn Otherwise we can't do inheritance. :-)
pmichaud I think I'll count lazy lists as my Rakudo Day :)
jnthn ooh, good plan.
Since they really are extra. 22:57
22:57 iblechbot left
jnthn To the grammar re-orgs. :-) 22:57
I wasn't expecting those at all.
pmichaud I wasn't either, but given the discussion yesterday, and the fact that I was already redoing STORE and FETCH for rw semantics, it seemed like a good time :)
we now make it to line 85 of Test.pm
oh. rat parsing 22:58
actually non-integer parsing
jnthn aww
pmichaud can't call it "float", because they aren't "floats" any longer :-)
jnthn May have to fake rats for now...givne the whole impl is setting.
pmichaud 0.0001
lol
I can do 1/10000 22:59
instead of 0.00001
jnthn heh
:)
pmichaud now we get to line 129 23:00
jnthn Well, there's parsing it and there's running it. :-)
pmichaud It doesn't recognize Callable as a typename
hmmmm.
jnthn Oh
We didn't pull that back in yet I guess.
pmichaud well, Callable is really a Role. 23:01
jnthn In master too.
pmichaud is the role stuff far enough along that I could create Callable? ;-)
(even if it's just a placeholder)
oh, but in order to for it to run, our code objects would actually have to be "does Callable" 23:02
jnthn yeah, true
well, just change Callable $foo to &foo
pmichaud (this is one reason why I've not been a fan of type constraints in Test.pm)
I might just eliminate or comment out the constraint 23:03
moritz_ note that &foo has a long history of not working properly as a type constraint in rakudo
pmichaud it's okay... the constraint is actually not useful in Test.pm
23:03 samlh joined
pmichaud or, if the constraint is important, it would be better to use .isa instead of relying on having a sophisticated enough dispatcher to do it 23:04
23:04 __ash__ left
pmichaud eliminating Callable gets us to line 133 23:04
moritz_ I think the importance in lives_ok and dies_ok is to detect when the user is stupid enough to confused it with the eval_lives_ok variant and pass a string ;-) 23:05
pmichaud sure, in which case use .isa and give a useful error :-)
jnthn heh, it's not that we don't have a sophisticated enough dispatcher, just that we don't have a sophisticated enough type hierarchy ;-)
pmichaud jnthn: I'm thinking for implementations that may come after us
or if we port to somewhere else
ugh, the Null PMC checks require regexes to run 23:06
that's the only part of Test.pm that needs regexes....
moritz_ comment it out for now
jnthn pmichaud: Just pulled Callable back in now.
pmichaud okay, excellent
jnthn We'll need Code objects to do it anyway.
pmichaud that will give me a(nother) template for seeing how roles are set up
commenting out the regexes gets to line 190 23:07
... &infix:<Z> ?~?~ 23:08
?!?!?!?
lambdabot Unknown command, try @list
pmichaud geezum
I'll parse it but not run it.
jnthn Callable pushed. 23:11
pmichaud pulled, merged 23:14
23:14 tak11 left
jnthn If you don't beat me to the code thingy, I'll do it tomorrow. 23:14
It shouldn't be hard, but I'm getting to the point where I'm liable to foo stuff up.
(e.g. tiredish)
pmichaud I'm not sure if I'll get to the code thingy tonight. I might, but more useful is to see if I can get Test.pm running.
that will require END blocks and use, at minimum 23:15
that's likely enough for a night
(plus reports)
jnthn Running Test.pm again in 3 days of hacking on this would be great progress either way.
Especially since we know that in many areas we're *not* cheating.
pmichaud yes
but I can also work on Mapping/Hash, Range, etc. 23:16
so there's a lot that can be done even w/o code
and with the role stuff you added, I can clean up Failure
jnthn OK, if you want me to do that bit, that's fine.
pmichaud and I might be able to fix Nil
so I'll leave Code for you until I hurt for it :)
jnthn I'll try and do it before you hurt. :-)
pmichaud we also need to be able to parse single-word typenames (e.g. Int) -- I can undoubtedly do that 23:17
jnthn Oh, I nearly put that back in earlier.
Yes, just call the assertion check.
See old grammar.pg for how it influences the code gen, if you're unsure.
pmichaud oh, it's no problem
I just have to prevent typenames from being treated as listops
that's purely in the grammar
jnthn Right.
pmichaud <!is_type(...)>
jnthn STD has it like that? 23:18
oddness.
pmichaud pretty close
jnthn But does it eventually call $c.is_name($the_name) ?
pmichaud that's what <!is_name($the_name)> means :-)
subrules are $c.subrule()
jnthn oh, cute. 23:19
And yes, makes sense. :-)
pmichaud phrased more directly, <xyz> is basically like { $<xyz> = $c.xyz; }
with a few other things in place for quantified captures, etc.
actually, I guess more like <?{ $<xyz> = $c.xyz; }> 23:20
jnthn nod
pmichaud anyway
subrules are just methods on the cursor
jnthn $c.foo is equivalent to $/.CURSOR.foo?
pmichaud and unlike PGE, which had to take an argument and slurpy hash for each subrule, the new engine doesn't need any params :-)
it's more accurate to say that $/ is $c.MATCH 23:21
the cursor contains the match object, not vice-versa
jnthn ok
pmichaud .CURSOR is just an easy way to get back to the cursor from the match object
(in STD.pm, the Cursor _is_ the Match object, but there are a few problems with that approach that I think are better solved by having them separate. Such as the difficulty in having a rule named "from", "to", "orig", etc.) 23:22
jnthn I think I may have used .CURSOR once 'cus it's quicker to type than working out how to do the cent symbol. <embarrassed look>
pmichaud in the new engine it will eventually be the case that avoiding the $/ match object will be more efficient
jnthn Ah, OK.
pmichaud match objects are generated lazily now, so if you ask for one you incur the cost of creating it 23:23
(if you're just about to return a match it doesn't make much of a difference, but if you're doing lots of backtracking you'll be generating them unnecessarily)
jnthn Good to know.
Maybe I'll try and be less lazy about typing $c 23:24
erm, $...thingy...
:)
pmichaud on my keyboard it's Ctrl-K + | + c
(in vim)
Juerd That's any keyboard :)
pmichaud or just plain right-alt + | + c if not in vim
moritz_ Compose + | + c
pmichaud as in ¢ :-) 23:25
anyway, that's the other advantage to <!is_name(...)> -- you don't have to type the ¢ :-)
moritz_ I'm still not sure if the Windows key should be the compose key or the window manager key
bed & 23:26
jnthn ¢
pmichaud arrrrgh
looks like we need pointy subs
jnthn AltGr + 0162
pmichaud I really despise is_deeply
jnthn pmichaud: Well, we already have signatures and blocks... ;-)
pblocks should be easy enough.
Juerd There. I configured a compose key in my new ubuntu install. ¢
23:26 pmurias left
moritz_ pmichaud: you can try to replace is_deeply by ok ($a eqv $b) 23:27
Juerd I chose caps lock for my compose key. Finally a good purpose for that key.
moritz_ pmichaud: that way you just have to parse infix:<eqv> for now, and worry about making eqv smart enough later
pmichaud moritz_++
yeah, I'll do that.
Juerd Note: compose c / works too on my machine. Saves me a shift.
pmichaud hey, here also! 23:28
Juerd++ # Win!
jnthn
Juerd That makes it only slightly less awkward, but it the long run you might benefit ;)
moritz_ github.com/moritz/json/commit/43a90...5d14c51f9d
pmichaud is_deeply also makes heavy use of return
moritz_ that's a quite awesome commit
pmichaud is_deeply is_evil 23:29
Juerd Is return bad?
pmichaud it requires setting up exception handlers to catch the returns
moritz_ I was amazed how much I could simplify some action methods now that I understand them, and rakudo isn't as infantile as it used to be
pmichaud the new action methods (that don't require the {*}'s) are really nice to work with
moritz_ looking forward to those too 23:30
pmichaud saves a lot of "oops why didn't that work oh I forgot the stupid {*} again" comments
jnthn is grateful for that.
Juerd moritz_: The change to pairlist is a load of fun to read :)
pmichaud while writing nqp-rx I kept forgetting the {*}, after bootstrapping nqp-rx I've been like "hey, this is NICE."
moritz_ japhb: for array too
jnthn moritz_: Wow, that's...quite an improvement. :-)
Juerd Ah, for array too indeed.
(Assuming tab completion fail) 23:31
jnthn moritz_: j<tab> fail ;-)
moritz_ basically I looked into explaining them for the boook
and though "there *must* be a simpler way"
jnthn oh noes book
pmichaud 0
+ make = $<pair>».ast;
huh?
(line 11, new version)
moritz_ what's "huh?" about that?
jnthn oh, I missesd the = when reading that... 23:32
pmichaud what does the '=' do there?
moritz_ oh
23:32 payload1 left
jnthn Just read it as make $<... 23:32
moritz_ OH NOES
all the time I tested, I actually had JSON::TIny installed in ~/.perl6/lib 23:33
so I have actually broken JSON::Tiny
and my tests didn't catcht that
because it used the wrong modules
pmichaud :( 23:34
moritz_ t/01-parse.t ...... Can only transform an Object to p6opaque
oh wow
never seen that error before
23:34 s1n_mini joined 23:35 __ash__ joined 23:36 nickgibbon joined
jnthn Ouch. 23:36
You gotta do something quite special to get that one...
moritz_ anyway, I'll try to track that down tomorrow 23:37
sleeping time, for real
jnthn night
23:37 nihiliad1 left 23:38 cotto joined
Juerd Good night, moritz_ 23:38
pmichaud now up to 218 (of 251) 23:41
23:41 nihiliad joined, scallop left
pmichaud okay, we parse all of Test.pm, fail because it doesn't know $! yet 23:42
pmichaud prepares to add $_, $!, and $/
s1n_mini pmichaud: how's nqprx coming? 23:43
pmichaud it's going great
I've pretty much stopped work on nqprx to work on moving rakudo over to it
s1n_mini you guys have been wicked busy
pmichaud and I think we're all in agreement that things are going far better than we had planned or expected 23:44
s1n_mini that's great
jnthn It's pretty fast paced. :-)
pmichaud and we're fixing some long-outstanding big bugs and features 23:45
jnthn It's not just that we're putting it back together - it's that many things are going back together so much nicer than they did the first time around.
s1n_mini wishes he had more time; haven't been able to utilize my toy
pmichaud I'll be eager to close out a bunch of tickets in the perl6 queue with "no longer a problem in ng!"
s1n_mini such as? 23:46
jnthn That will be nice. :-)
23:46 tak11 joined
pmichaud array vivifications now work properly 23:46
lexicals are initialized properly
lists are lazy
jnthn oh, I didn't look at the new lex init stuff properly...
pmichaud ranges are lazy
IO (will be) lazy
s1n_mini lists are lazy? that's awesome
so BUILD is now properly supported? 23:47
pmichaud I don't know about that part yet. I'm sure it will be soon if it isn't. :)
(where "soon" means "in the next couple of weeks")
a lot of our blockers are disappearing
s1n_mini sounds like this change was a long time coming
pmichaud oh, one can no longer write to constant values :) 23:48
s1n_mini awesome heh
pmichaud should be a lot fewer Null PMC errors
s1n_mini and all you added to nqprx was regexes?
pmichaud rewrote the regex engine, actually
s1n_mini to do what?
pmichaud protoregexes
but also the regex engine itself is now written in NQP :-) 23:49
jnthn s1n_mini: It's also that we're just re-building a lot of things that would have on their own been big and challenging refactors.
pmichaud (at least the parser/compiler parts are)
jnthn But since we cna do them and then build out on top of them, it's a bunch easier.
pmichaud github.com/perl6/nqp-rx/tree/master...x/P6Regex/ # code for compiling Perl 6 Regexes 23:50
s1n_mini so Grammar.pm is the complete regex grammar for p6?? 23:51
jnthn pmichaud: heh heh, I see the magic. :-)
$BLOCK[0].push($decl);
pmichaud yes
initialize lexicals at the beginning of the block
jnthn That'll kill some NPMCAs. :-) 23:52
pmichaud a bunch of them. In fact, I don't think I've really seen many Null PMC accesses while doing this
jnthn Me either.
But we ain't masak. :-) 23:53
pmichaud s1n_mini: it also borrows from HLL::Grammar a bit
s1n_mini: mainly for the quote_EXPR rules and value rules
s1n_mini that's not daunting at all
quite compact actually, i sorta expected a huge mess lol
pmichaud the protoregexes make it so much easier
23:53 samlh left
s1n_mini protoregexes are where? 23:54
23:54 tak11 left
pmichaud anything that is of the form category:sym<...> 23:54
that's an entry in a protoregex
so
the last four lines of Grammar.pm are
jnthn metachar:sym<bs> # lol
pmichaud proto token mod_ident { <...> } 23:55
token mod_ident:sym<ignorecase> { $<sym>=[i] 'gnorecase'? }
token mod_ident:sym<ratchet> { $<sym>=[r] 'atchet'? }
token mod_ident:sym<sigspace> { $<sym>=[s] 'igspace'? }
the first line says that "mod_ident" is a protoregex.
The next three lines say that <mod_ident> will match any of those tokens
it's like writing
token mod_ident {
$<sym>=[i] 'gnorecase'?
| $<sym>=[r] 'atchet' ?
| $<sym>=[s] 'igspace' ? 23:56
}
except the protoregex handles the alternation for you
s1n_mini ahhh okay, that's what a protoregex is
23:56 constant left, constant joined
pmichaud and the actions are then broken out by individual rules 23:56
so instead of having a single mod_ident action that has to handle all three cases, each entry in the protoregex gets its own action method
and the really cool thing is 23:57
the protoregex is smart enough that it can often select the correct candidate to call just by looking at the string to be matched
s1n_mini it's like an overloaded token :)
pmichaud for example, if we get to matching <mod_ident>, and the next character to be matched is an 'i', then it only tries the first candidate
it doesn't even attempt to match the other alternatives, because there's no way that 'r' or 's' could match what is next 23:58
23:58 __ash__ left
s1n_mini neat, you learn something every day 23:58
pmichaud and if the next character doesn't match any of the alternatives, the protoregex fails immediately without having to try any of them
i..e. the mod_ident protoregex knows that the only possible matches at that point are 'i', 'ignorecase', 'r', 'ratchet', 's', and 'sigspace' 23:59