3 ms·
Yes, the performance is by far one of the best parts of Lumen. Think of it this way. It generates exactly the code you write. It's nearly a one-to-one translat
by shawn 8y ago
Yes, the performance is by far one of the best parts of Lumen.
Think of it this way. It generates exactly the code you write. It's nearly a one-to-one translation between the input forms and output code. But that's why it's fast.
If you want to see just how fast, try `time LUMEN_HOST=luajit make -B`
On my box, LuaJIT is able to recompile the entirety of Lumen and run all the tests in 1.3 seconds flat.
As for Urn, I'd be happy to answer specific comparison questions. I've been putting together a little intro guide to Lumen, but for now the best way to jump in is to study test.l and learn by example: https://github.com/sctb/lumen/blob/master/test.l https://github.com/sctb/lumen/blob/master/test.l
EDIT: By the way, Lumen runs on Torch too. If you want to do some hardcore machine learning, it's as easy as installing torch and running `LUMEN_HOST=th bin/lumen`.
http://torch.ch/ http://torch.ch/
Try evaluating `(require 'torch)` and `(require 'nn)`, then dive into the Torch guides. You can bring Lumen's full macro system to bear on any ML problem, which greatly simplifies the boilerplate generation involved with standardizing datasets and such.
- veli_joza 8y agoIt's been few days since this post, don't know if you're still checking the thread. I'm really a beginner at lisp, so perhaps my questions won't make much sense? I'd like to have Lua host application (in Love2d) with lisp-like runtime. The lisp-like code is expected to be changed often during the runtime by modifications of structure and constants in AST, so compile-time macros are not useful to me. On the other hand, the lisp-like code would not be written from scratch in text form. It would be built by executing code-transformation functions that would always construct a syntactically valid AST. For example, let's say there is a function for drawing an arc of single color. Now user wants to draw a rainbow. I would offer a function that could be executed to wrap existing operation in a loop. In rainbow example the loop iteration would also modify a vertical displacement and color hue shift. My two questions - is lisp (and Lumen specifically) a good choice for self-modifying live coding runtime? And is generated Lua source in Lumen project suitable for embedding Lumen into Lua host application?