Hacker News new | past | comments | ask | show | jobs | submit login
Picrin – a lightweight R7RS scheme implementation in pure C89 (github.com/picrin-scheme)
93 points by networked on Jan 30, 2016 | hide | past | favorite | 2 comments



I've been hacking on femtolisp, which is actually what the Julia parser is written in:

https://github.com/JeffBezanson/femtolisp

femtolisp is more compact than Picrin, for better or worse. It's also pretty highly optimized and relies on some (reasonable) hardware assumptions (not just ANSI C, which is fairly restrictive for interpreters).

The byte code compiler is written in the language itself. It's not a reentrant VM. More details on the Github page.


Where lightweight is:

• About 13k source lines.

• builds in 1.25 seconds on my Core i7 3770 from a few years back.

• 400k executable when stripped

• Dynamic links to the usual suspects plus libedit, libtinfo, and libbsd.

Not bad.

The memory footprint isn't tiny, I'm showing TRS=385k and RSS=12.2m after launching and adding 3 and 4. For reference, lua 5.3 is TRS=187k and RSS=2.2m after the same add.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: