3 ms·
Ah, finally, the ideas from Lumen are percolating slowly into the mainstream: https://github.com/sctb/lumen https://github.com/sctb/lumen (It's a lisp for both
by sillysaurusx 6y ago
Ah, finally, the ideas from Lumen are percolating slowly into the mainstream: https://github.com/sctb/lumen https://github.com/sctb/lumen
(It's a lisp for both JS and Lua.)
Eslisp is 2015, which is around the same time that Lumen was started: https://news.ycombinator.com/item?id=10264970 https://news.ycombinator.com/item?id=10264970
Though from the commit history, Lumen was actually started in 2012. Regardless, both projects seem to be roughly the same idea, which I find very interesting.
"block" is better named "do", and "lambda" is better as "fn", but those are minor details. Most of the power of the idea seems present.
- robinei 6y agoThe most important reason for "do" is avoiding excessive indentation, when starting with the first expression on the same line. And "fn" is good for something that you will want to avoid taking too much space, since you want to sprinkle them everywhere.
- an_ko 6y agoI named it "block" because the structure it generates is literally called a Block in the ECMAScript spec https://www.ecma-international.org/ecma-262/5.1/#sec-12.1 https://www.ecma-international.org/ecma-262/5.1/#sec-12.1. I wanted to make the correspondence as familiar as possible to JS programmers. You're probably right I should have called function expressions fn. You can alias it with (macro fn lambda) though if you prefer that. First I hear of Lumen! What a coincidence that they started at the same time. It seems their language is an "overlay" entirely separate from both Lua and JS which only runs at compile-time, kind of like Lua is to Terra http://terralang.org/ http://terralang.org/. I think that means Lumen can't load macros from JavaScript modules at compile-time like eslisp can, but I'm not sure. I'll do some reading. Thanks for the link.
- sillysaurusx 6y agoIt can. Loading macros is as simple as (when-compiling (load “foo.l”) nil)