Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-06-29

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:32 vendethiel joined #6macros
06:22 vendethiel joined #6macros
06:57 Ven joined #6macros
07:04 vendethiel joined #6macros
07:53 Ven \o masak
07:53 masak o/
07:54 Ven masak: maybe you'll have more free $brane today :)
07:54 masak seems like it.
07:55 masak I'm doing some other stuff now in the morning, but I have your gist open in a tab :)
07:55 masak will get to it
07:56 Ven alright, good
07:56 Ven .oO( I hope you close your tabs faster than I do, because mines have been piling up... )
07:56 masak I have that too
07:56 masak the ones on the far right tend to be quite active
07:56 Ven ...I guess I'm to blame for that as well *g*
07:57 masak partly, though maybe less than you think :P
07:57 Ven good.
07:58 Ven The Comonad.Reader » Fast Circular Substitution, TYPE-DRIVEN DEVELOPMENT OF CONCURRENT COMMUNICATING SYSTEMS, Totality vs Partiality, Pluggable type position, Resource-dependent Algebraic Effects
07:58 Ven i have around 15 like that open
07:58 masak haha
08:07 vendethiel joined #6macros
09:45 Ven joined #6macros
10:00 Ven joined #6macros
10:25 vendethiel joined #6macros
12:07 vendethiel joined #6macros
12:43 vendethiel joined #6macros
13:27 vendethiel joined #6macros
13:56 vendethiel joined #6macros
14:21 Ven joined #6macros
14:22 vendethiel joined #6macros
16:15 Ven joined #6macros
17:05 Ven masak: feeling more like macros now? :P
18:59 masak mood knocked weirdly sideways by $kid vomiting repeatedly for the past 90 minutes.
18:59 masak I'll have a look, though.
19:02 vendethiel uh, whoops
19:02 vendethiel hope it doesn't look worse than slightly bad food :)
19:03 masak it doesn't, thankfully.
19:03 masak but there was a lot of crying involved (on his part), both before and during.
19:03 vendethiel rightfully
19:04 masak extra ')' on https://gist.github.com/vendethiel/5308​0d9aa77a0139b43d#file-gistfile1-6pl-L35 ?
19:04 vendethiel fixed
19:05 masak I can already see that I like what I'm reading
19:05 masak you seem undecided between `QAst` and `QAST`. the actual spelling is just `Q` :)
19:05 masak (hence "Qtree")
19:05 vendethiel fixed
19:06 masak nice
19:06 masak I'm looking at the way you handle unquotes in the quasi block, and I'm thinking "my, it'd be nice if they could actually do all that"
19:06 masak I wonder what it'd take for them to do that.
19:07 masak I wonder if typechecking ought to play a role in it.
19:07 vendethiel I somewhat wanted to ".subst" from blackcoffee for that gist
19:07 masak like, $param would have to be statically typed as Q::Var
19:08 vendethiel mmmmmmmmmhh. seems scary
19:09 vendethiel you can't parse the quasi without the unquote.
19:12 masak that's what I mean. it feels like there has to be some restraint.
19:12 masak like, it's a parse error if what {{{ $param }}} gets is not a Q::Var
19:13 masak we actually don't have to statically know that... we have to know it at splice time.
19:13 masak no, wait. we have to statically know that for the reason you said. we have to parse the quasi.
19:15 vendethiel ...but we can't
19:15 masak I'm thinking I should focus on that question: "how can we make quasis that powerful?"
19:15 masak we can't?
19:15 vendethiel we can't parse the quasi
19:15 masak if we can't, then the parser must throw an error and abort the compile.
19:16 vendethiel my $q = quasi { sub infix:<+>($a, $b) is tighter(&infix:<,>) {} }; return quasi { {{{ $q }}}; say 3 + 4 / 5 }
19:19 * masak ponders
19:19 masak I don't think the infix:<+> is supposed to be visible outside of its quasi without some kind of COMPILING:: shenanigans
19:20 vendethiel ..which solved my issue, opening yours (COMPILING) in the process :)
19:20 masak aye
19:21 * masak asks TimToady
19:22 vendethiel well, it's simple, really
19:22 vendethiel removing the ability to generate subs from macro would hinder its usefulness a lot :(
19:25 masak I think it might work.
19:26 masak or at least, suddenly I don't see the big problem. things seem to happen in the order they should.
19:27 vendethiel do you see my gist theoritically working?
19:27 vendethiel re*
19:33 masak yes, I dub it the most concrete/fleshed-out macro gist ever.
19:33 masak I could see lots of small details needing re-work, but apart from that it seems like a reasonable thing to expect New Macros to be able to do.
19:34 masak (and a good example at that)
19:38 vendethiel tons and tons and tons of detais
19:38 vendethiel details*
19:38 vendethiel it's terrible code
19:57 masak ;)
19:57 masak let's aim to make it real, though.
19:58 masak maybe I can even convince you at some point to help prototype things in 007... :D
20:01 vendethiel oh, i don't think i'm anywhere near good enough to pull that feat off
20:07 masak it surprises me that you say that
20:07 masak you just implemented delimited continuations in hypothetical future Perl 6 macros
20:08 vendethiel that's easy
20:09 masak no, it bloody isn't
20:09 vendethiel of course it is. you just have to swap the inside of shift() with the inside of reset()
20:12 masak parsers and runtimes are easy. you just have to turn the source text into an intermediate form, then execute the intermediate form.
20:13 masak seriously, I think more people would be compiler writers if they realized (a) exactly what compilers are, and (b) that there's not that much to it
20:13 masak I know _why realized this at some point, with Potion
20:13 vendethiel oh, parsers and runtimes are "easy"
20:14 vendethiel i'm writing one in haskell currently, and I have another project with the parser in 6 and the VM in rust
20:14 masak and 007 is a rather easy example of parsers and runtimes
20:16 vendethiel i never implemented macros!
20:32 masak as a point of reference, I found ops-as-routines tougher to get right in 007 than macros...
20:33 vendethiel ops-as-routines?
20:35 masak define an infix:<!>, and suddenly there is one in the parser's table of operators
20:35 vendethiel ooh
20:36 vendethiel doesn't seem too hard, though?
20:36 vendethiel I already have an array with a list of OPs
20:37 vendethiel if I lex "operator infix §§", I just { 'operator' $<pos>=\w+ $<op>=.+$ { @operators.push($<op>.Str) } }
20:37 vendethiel no?
20:38 vendethiel i only parse infixes tho...
20:47 masak except the definition is a `sub infix:<!>(l, r) { ... }`, so the installation has to happen as part of sub parsing
20:48 masak and then when a `!` is encountered in infix position, there has to be a lexical lookup for `infix:<!>`, in order to bind to the right definition.
20:48 masak each detail isn't all that tricky, but it's a lot of details.
21:00 vendethiel I see
21:01 vendethiel oh yeah it means you need lexical scope at the parsing level.
21:04 masak it does.
21:04 masak but so does BEGIN
21:18 vendethiel true
21:19 vendethiel alright
21:19 vendethiel i'll think about this more still
21:19 vendethiel but for now, 'night!
21:19 masak 'night
23:38 vendethiel joined #6macros

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary