Perl 6 - the future is here, just unevenly distributed

IRC log for #rakudosketch, 2010-04-07

| Channels | #rakudosketch index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:48 colomon joined #rakudosketch
01:49 colomon_ joined #rakudosketch
02:48 colomon_ joined #rakudosketch
03:30 colomon joined #rakudosketch
04:22 colomon joined #rakudosketch
11:01 colomon joined #rakudosketch
15:41 colomon joined #rakudosketch
18:54 bkeeler joined #rakudosketch
18:54 CokeBot9000 joined #rakudosketch
19:01 jnthn OK, I think it must be about time :-)
19:01 jnthn Who's about?
19:02 TimToady I don't know anything about time.
19:03 TimToady moritz_ said he wouldn't be here
19:03 bkeeler I'm here
19:03 diakopter joined #rakudosketch
19:03 jnthn OK, and colomon gave a maybe.
19:04 jnthn Quick report on what I've been up to in the last week...
19:04 jnthn Had weekend hackathon with masak++
19:04 jnthn Fixed some bugs with various escape sequences
19:04 jnthn Implemented interpolation of method calls and postcircumfixes in strings
19:04 jnthn Did the initial bits of work to get programs running with the setting as an outer lexical scope
19:05 jnthn Tossed some "our" decls
19:05 jnthn Some fallout that I need to deal with
19:05 jnthn There's more to come and it's Really Quite Tricky.
19:06 jnthn In Russia next week for two Perl 6 talks, got one in Malmö at the end of the month and will make the Nordic Perl Workshop and give a couple there, so lots of talk prep to distract me at the moment too. :-)
19:06 jnthn That's about all...
19:06 jnthn bkeeler: Is your regex interpolation work essentially just blocking on patch review?
19:07 bkeeler jnthn: Yep, pretty much
19:07 bkeeler Just waiting patiently for some pm time
19:07 jnthn Well, thing is, moritz++ also has a patch in the same state.
19:08 bkeeler Which patch is that?
19:08 jnthn For allowing languages to have their own type of match object created.
19:08 bkeeler Ah yes, that'll be very useful
19:09 bkeeler That was going to be my next thing, but he beat me to it
19:10 jnthn Thing is, there's no real way of knowing when we'll be fortunate enough to have some pm time.
19:10 jnthn I think at this point, I'll give both patches a look over to the best of my ability, and commit them.
19:10 TimToady well, if you put 'em in, and they pass, worst that can happen is that they get backed out later
19:10 jnthn TimToady: Right.
19:11 bkeeler Indeed.  I'd say go for it, but for PM's dire warnings about the world sploding if it's applied as is
19:11 bkeeler I'd like to hear at least a quick summary of his objections
19:11 TimToady well, and if that's the case, it might end up making more work for PM than waiting would
19:11 jnthn bkeeler: Is there such a warning on either of the patches, that you know of?
19:12 jnthn e.g. pm has said it's wrong in some way?
19:12 bkeeler Yeah, lemme see one sec
19:13 bkeeler PM: "The patch is a very good start, but please don't apply it yet. I've only had a chance to do a preliminary review, but there are a few areas that need changing before the patch gets applied (otherwise we start painting ourselves into corners that may be difficult to get out of)."
19:15 TimToady that sounds dire enough
19:15 bkeeler yeah
19:15 jnthn Ugh.
19:15 jnthn OK.
19:16 bkeeler That was on 3/29
19:17 jnthn OK, I guess we should try and hold off a bit longer then.
19:17 jnthn With moritz's patch, I'll try and catch him about that one when he's online.
19:17 bkeeler I could review it also I guess
19:17 jnthn That would be helpful.
19:18 jnthn That one is kinda in the way of us being able to look at matches in Rakudo at the moment.
19:19 bkeeler His patch modifies nqp, right?
19:19 bkeeler (trying to find it in RT...)
19:19 jnthn Yes, I believe so.
19:20 bkeeler It could also be achieved by subclassing NQP's cursor and overriding the !MATCH method I think
19:21 jnthn I guess TMTOWTDI
19:21 jnthn I didn't look over the patch yet.
19:22 jnthn I'm fairly sure that moritz_ and Pm had some discussion about the approach to this at some point, though.
19:23 bkeeler Also, I think the objects are supposed to be named Cursor, Regex and Match rather than Regex::[...]
19:24 jnthn Yes
19:25 jnthn TimToady: How are things coming along on the sink context front?
19:29 TimToady decided it had to be a least partly calculated in a pass subsequent to the parse, and started modifying std to do that, but didn't get very far, other than moving the autoloading AST routines to a separate file from viv
19:30 TimToady the reason you can't do it at parse time is that you don't know if you're current statement is the last one in its context (or the context around that (or the...
19:30 TimToady *your
19:31 jnthn Does it boil down to needing to have the whole program to look at, or is there some smaller boundary?
19:32 jnthn (I follow that blocks themselves certainly can't be that smaller boundary; I wonder more about routines.)
19:33 TimToady yes, routines are analyzable that way, to the extent that you can know at all what the caller wants
19:34 TimToady i.e. not
19:34 TimToady and potentially you have to be able to do it on a smaller scale as well in order to fold constants
19:35 TimToady but that could be with or after the routines analysis, I suppose
19:35 jnthn OK, so we're probably looking at a complete second pass over the AST?
19:36 jnthn (Don't really need for-sure answers now, but trying to get a picture of the kinds of things that we'll need :-))
19:36 TimToady yes, for some definition of "complete" that could be piecemeal
19:37 TimToady (P5 always applies context to a subtree as soon as possible and then marks that subtree as done)
19:38 jnthn OK
19:38 TimToady well, at least last time I looked at it.  :)
19:38 jnthn I'm not looking to iminently implement this, but I suspect we want it in before Rakudo *.
19:39 jnthn Otherwise we struggle with turning for into map I guess.
19:40 TimToady well, you struggle with applying eager to it
19:40 TimToady for and map should just compile down to the same thing
19:40 TimToady give or take
19:42 jnthn Well, yes, I meant for the "knowing when to eager it" part
19:43 jnthn I guess we could switch to map and .eager it all the time until we know not to.
19:43 TimToady it might be more useful to compile assuming sink context, and then retroactively mark the final statements as wanted, as long as sink doesn't do anything non-reversible
19:44 jnthn What does something being in sink context actually mean?
19:44 TimToady but you'd have to distinguish an implicit sink from an explicit one when stripping it back off
19:44 TimToady eager, but again, an explicit eager won't go away, but an implicit one does
19:44 jnthn That is, do we call .eager / .sink / whatever?
19:45 jnthn And then we have a default one that is just identity?
19:45 TimToady we can have .implicitsink that implies eager, and is recognizable enough to strip on the final statement if wanted
19:46 jnthn Well, I can tag the AST too, which is perhaps safer.
19:46 jnthn Otherwise masak++ will read the source and define an implicitsink method then submit masakbug. ;-)
19:46 TimToady yeah, you don't want to precommit to sink if it's going to make for bogus "useless use of" messages
19:47 jnthn Aye.
19:47 TimToady so maybe Sink/Float/TreadWater  :)
19:47 jnthn But my question was more simply: we've (somehow) determinited that something certainly is in sink context. What should the code we generate actually do?
19:47 jnthn e.g. for 1..100 { .say }
19:47 jnthn Would compile to
19:47 TimToady the actual code just does .eager
19:48 jnthn oh, OK.
19:48 jnthn And is there a default .eager for things that already are?
19:48 jnthn And lazy things have a .eager that makes them so?
19:48 jnthn That is, does Mu have a method eager() { self }
19:49 TimToady maybe
19:49 TimToady eager seems like one of those "make it a list (or a denerate list of 1 item) if it isn't a list" kinda things
19:50 jnthn Aye, like the other contextualizers I guess.
19:50 TimToady so probably Any, if not Mu
19:50 jnthn I think we've got the others in Mu
19:50 jnthn So it's always safe to @(...) anything.
19:50 TimToady mkay
19:51 TimToady the "useless use of" analysis is orthogonal to what you run at run time
19:51 TimToady it only cares whether the top operation has side effects or not
19:52 TimToady + has no side effects, therefore you can get "Useless use of +"
19:52 TimToady an assignment in sink context is fine though
19:53 TimToady pure ops also are part of the calculation of static subtrees for constant folding
19:53 TimToady but you also have to have static values to feed the pure ops
19:53 TimToady so pure ops is necessary but not sufficient for folding
19:53 jnthn I guess anybody silly enough to define a + with side-effects get what they deserve. :-)
19:53 * moritz_ back
19:54 jnthn \o/
19:54 TimToady presumably the proto for operators will imply purity/impurity defaulted to the precedence level
19:54 TimToady STD already has :pure :!pure markers in the prec table
19:54 jnthn Ah, cool.
19:55 TimToady (but presumably any new op could override in its proto)
19:56 jnthn nod
19:56 TimToady things like logical ops have to delegate sinkness to their arguments though, so they are neither pure nor impure
19:57 TimToady anyway, purity marking can mostly happen as we reduce, but downward sink/float context propagation has to be later
19:57 jnthn *nod*
19:59 jnthn My plans for the next week or two are to try and get the lexical classes and roles sorted out, and deal with more lexical setting issues. There's some rather nasty stuff to do with BEGIN/INIT time and lexical scopes. :-(
20:00 TimToady time for cabal phone
20:00 jnthn :-)
20:00 moritz_ speaking of time...
20:01 moritz_ I now have a regular event on Wednesday evenings
20:01 moritz_ so it would be good for me to move #rs to Tuesday or Thursday
20:01 moritz_ afk &
20:01 jnthn moritz_: That could well be do-able. I'm day agnostic.
20:01 bkeeler Me too
20:03 TimToady me three
20:07 diakopter left #rakudosketch
20:07 bkeeler left #rakudosketch
20:20 colomon o/
20:32 PerlJam well crap.  I tend to miss #rakudo-sketch even when I'm aware of the day and time
20:38 CokeBot9000 ( I should at this to the parrot calendar.)
21:40 colomon joined #rakudosketch

| Channels | #rakudosketch index | Today | | Search | Google Search | Plain-Text | summary