3 ms·
I'm currently looking for lisp-like language for Lua. I've looked into Urn, Lumen and Fennel, still haven't decided on one. Maybe someone can answer - why does
by veli_joza 8y ago
I'm currently looking for lisp-like language for Lua. I've looked into Urn, Lumen and Fennel, still haven't decided on one.
Maybe someone can answer - why does fennel description insist on macros as compile time feature? I'm interested in live coding and self-modifying code; is there a speed penalty or some other reason why Fennel would be a bad option?
- dman 8y agoWhat problem domain are you working in?
- veli_joza 8y agoI'm building the 2D interactive graphics engine for mobile platforms. The focus is on authoring all of content on phone/tablet. Instead of using bitmaps/meshes, the user starts with single primitive (y < 0 half-plane) and applies series of transformations (wrap, intersect, linear transform...) to sculpture it into desired shape. This scene description looks and behaves both like JSON tree and S-expressions. For interactivity, I would like to have a lisp-like language that's visualized as tree. The user would execute 'macros' to modify existing code, for example to wrap a function into a loop or to make a mirror reflection of existing graphics. The host should make sure that code is always syntactically correct and should provide default primitives when constructing new code, that will be replaced or modified by user. Here's some WiP screenshots: [0] https://raw.githubusercontent.com/jmiskovic/arbo/master/media/2018-08-29%20rotating%20rays.gif https://raw.githubusercontent.com/jmiskovic/arbo/master/medi... [1] https://raw.githubusercontent.com/jmiskovic/arbo/master/media/2018-08-27%20clock.gif https://raw.githubusercontent.com/jmiskovic/arbo/master/medi... [2] https://i.imgur.com/qzb6cC0.gif https://i.imgur.com/qzb6cC0.gif
- technomancy 8y ago> why does fennel description insist on macros as compile time feature? This just means that it's possible to ship the compiled code on its own and have no dependencies on Fennel at runtime. It doesn't mean you can't ship the compiler if you want to; the choice is up to you. In fact, I strongly recommend in most cases shipping the compiler so you can write and refine your code interactively as the program runs. It's helpful to think of "compile time" as a subset of runtime; it's just that portion of runtime when the function that's running happens to be the compiler! Fennel is very well-suited for live-coding; I used this heavily when writing my entry to the Lisp Game Jam this spring. I blogged a bit about how live-reloads interact with the Lua module system here: https://technomancy.us/189 https://technomancy.us/189