Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:17 vendethiel joined #6macros
02:50 vendethiel joined #6macros
06:05 vendethiel joined #6macros
08:25 Ven joined #6macros
08:51 Ven joined #6macros
09:28 vendethiel joined #6macros
10:02 vendethiel joined #6macros
10:29 vendethiel joined #6macros
10:55 vendethiel joined #6macros
11:21 vendethiel joined #6macros
13:02 vendethiel joined #6macros
13:11 Ven joined #6macros
13:11 Ven macros to TCO.
13:11 Ven hi, #6macros!
13:14 Ven seeing as perl6 can't get macros, I think a macro could rewrite functions to be tailrecursive.
13:14 Ven question: how would applying it look?
13:14 Ven how the macro itself should process shouldn't be that hard for self-recursive functions
13:30 Ven https://github.com/puffnfresh/brushtail
13:30 Ven that's a JS one
13:33 Ven maybe this could be simpler with trampolining
13:53 vendethiel joined #6macros
14:33 masak would these two things be enough: (a) being able to arbitrarily change the AST/Qtree, (b) having some Qtree construct that corresponds to "call this other thing, replacing the current stack frame" ?
14:41 vendethiel joined #6macros
14:46 Ven masak: no, less than that is needed
14:46 Ven masak: please check the linked repo
14:47 * masak does so
14:48 masak oh, a CPS transform. got it.
14:49 masak I keep encountering these CPS transforms! I think a Qtree transformation library should have built-in support for them.
14:49 masak thanks for making me realize that.
14:53 * Ven is glad about it
14:53 Ven since I'm scared perl6 itself can't propose tco...
14:53 Ven having it as a macro seems good
14:53 Ven I have no idea how it'd look, tho?
14:54 masak me either.
14:54 Ven decorator macro, a-la python? (scala has it with annotations, iirc)
14:54 Ven block?
14:54 Ven tco { xxx }
14:54 Ven `use`?
14:54 masak oh, I'm more thinking along the lines of an API. no special syntax.
14:54 Ven use tco; :P
14:54 Ven well
14:54 Ven you need to say where you want that to happen
14:54 Ven because you're breaking a lot of introspection features of perl6
14:54 masak yes, of course.
14:54 masak it'll happen inside a macro.
14:54 masak so the macro might be called `tco`
14:55 masak `tco sub foo() { ... }`, mebbe
14:56 * masak suddenly wonders if `macro trait_mod:<is>` should work
14:56 masak then we could even `sub foo() is tco { ... }`
14:57 Ven seems like the best solution
14:57 Ven ("decorator")
14:57 masak aye.
14:58 masak though people have been known to use the first form for that, too. making the decorator a sub that takes a routine at runtime.
14:58 masak it's a cute pattern.
15:01 Ven myeah.
15:01 Ven no.
15:02 Ven i don't like it, for some reason.
15:02 Ven I need to figure out why, but I still have my essay to write, and there's only an hour left
15:02 masak nodnod
15:02 masak don't let me distract you :)
15:39 Ven that'll be enough
15:50 vendethiel joined #6macros
16:21 vendethiel joined #6macros
16:40 vendethiel o/
18:03 vendethiel okay so, issues with "modifiers"
18:03 vendethiel it's like they don't compose well
18:57 Ven joined #6macros
19:22 masak could you be more specific/concrete?
19:24 Ven It reminds me of perl5's `try`/`catch` abusing prototypes, in some way, with `catch` just being `id`. I don't know why
19:24 Ven but.
19:24 Ven "tco cleaned optimized sub foo" reads really poorly
19:30 vendethiel okay, I'm off to do something now
19:48 masak I think I see what you mean.
20:43 vendethiel joined #6macros
22:09 vendethiel joined #6macros
23:42 vendethiel joined #6macros

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