|
6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today Set by moderator on 28 July 2015. |
|||
|
01:39
vendethiel joined
05:58
vendethiel- joined
13:54
vendethiel joined
|
|||
| vendethiel | o/ | 17:11 | |
| I'm currently implementing a lisp in perl to get a small taste of what it looks like | 17:12 | ||
| (it's in Perl 5, here: github.com/vendethiel/simplist ) | |||
| masak | nice | 20:16 | |
| no tests :/ | 20:17 | ||
| vendethiel | nope | 20:21 | |
| later :) | 20:22 | ||
| masak | bah :) | ||
| vendethiel | i do have a small integration test file | 20:24 | |
| ah, it's not there | |||
| well, i'll do unit tests when i'm decided on an internal format | |||
| i don't feel that big of a need to test the actual parsed formats in isolation because faux_combinator has its test suite | 20:27 | ||
| masak | ok | 20:33 | |
| vendethiel | i also coded myself into a corner with that | 20:36 | |
| my "eval" functions (OO-style dispatch) strip off the structure, and just return a value (i.e. 3) | 20:40 | ||
| which means implementing macros is gonna be complicated, zz | |||
| (because I'd need to convert the array I'm getting from the macro back to an AST to eval it) | 20:41 | ||
| (i have a few too many projects like that at the same time.. This interpreted lisp, a stack VM in Rust, and an alt-compiler in haskell...) | 20:42 | ||
| I've never implemented macros though, so that's gonna be a fun exercise :) | |||
| masak | :) | 20:43 | |
| best of luck | |||
| vendethiel | (or exercice? I can never get it right...) | ||
| well, i'm sure it looks like a small feat through you -- and I'm not pretending it's gonna be complex either. It's just gonna be good for deeper understanding | 20:46 | ||
| s/through/for/ (or from where you stand) | 20:48 | ||
| masak | "exercise" :) | 20:50 | |
| no, implementing macros is no small feat. ...it just happens to be easier than implementing custom operators ;) | 20:51 | ||
| though I do find that implementing macros is always... hm, opinionated | |||
| in the sense that either you make a lot of contingent decisions about how it all should work at that point, or the language has somehow already done it for you | 20:52 | ||
| vendethiel nods | 20:56 | ||
| the language i'm implementing certainly made its stand a few decades ago..:) | |||
| masak | and so did Perl 6, more recently | 21:04 | |