Hacker News new | past | comments | ask | show | jobs | submit login

Very nice project - thanks for sharing! How would you say this compares to maru, which does a similar thing? Maru uses gcc rather than Node.js or lua, and compiles it's own (x86) binaries. It focusses on as minimal syntax as possible, to expose new methods of composition: http://piumarta.com/software/maru/

If I've got this correct, lumen still relies on having the lua/Node/luaJIT runtime underneath?




I didn’t want to give an answer till I spent some time picking apart Maru and looking for similarities.

First, thanks for pointing out Maru. I’ve often wondered how to translate Lumen into C, and this is an excellent guide.

Also, I’m not sure how to shoehorn this into the conversation, but: https://m.youtube.com/watch?v=2XID_W4neJo

Regarding Maru the Lisp, the goals are similar-ish to Lumen’s. Lumen started life as an experiment: “what would a table-based Lisp look like?” Maru on the other hand is a (very fine!) traditional Lisp. It has cons cells, for example, and a GC. Lumen elides these features by virtue of running on a host that already implements them.

You’ve got me excited to try writing a Lumen to C compiler now...

Actually, that highlights one interesting difference. It’s possible to implement a C backend for Lumen relatively easily. It would just spit out C, which is fed straight to gcc. The problem is self-hosting. It’s easy to emit some C functions. It’s hard to emit code which is capable of compiling itself, i.e. implementing Lumen’s runtime and compiler systems.

I would say that Lumen’s power is largely thanks to its brevity. In fact it’s so small that I almost overlooked it, that first day many years ago. It didn’t seem like something so small could be production-quality.

I’ll keep studying Maru and perhaps report back with more thoughts.


The vid made me smile :) Yes, maru was conceived as part of the STEPS program, to provide a minimal runtime base for an OS. As such it's focus was on being able to produce DSLs for a higher level of abstraction, and hence needed to provide the ability to extend composition (http://piumarta.com/freeco11/freeco11-piumarta-oecm.pdf).

Personally I've been interested in replacing the GC part of maru with a structural method of managing memory (http://concurrency.ch/Content/publications/Blaeser_ETH_Diss_...), this would require extending the language with the Composita primitives, but not really sure how this'll go yet.

The Lumen-C compiler sounds good! Yes the tricky part is the self compilation, I'm wondering if you'll just end up with a maru-like system if you follow this down?

Alternatively the other way of doing this is via an explicitly generated runtime as-per Ferret (https://github.com/nakkaya/ferret)?

decisions decisions :)




Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: