3 ms·
This is very cool. Thanks for sharing this. I have wanted to do something similar for either an existing language or a subset of such or for a minimal language
by bmitc 3y ago
This is very cool. Thanks for sharing this.
I have wanted to do something similar for either an existing language or a subset of such or for a minimal language I create. Do you have any suggestions on how to get started on that in terms of high-level steps?
- rblank 3y agoI can't really give advice for creating a new language, or even for creating a new implementation of an existing one. MicroLua uses the existing Lua implementation from lua.org, and just packages it to make it useful on a specific platform. For that, it helps if the existing implementation is already cross-platform and has few dependencies. Lua is great in this respect, as it only depends on a libc. The first step is to get it to compile for the target platform and have it execute a hard-coded "hello world" script. After that, it's only a matter of adding more libraries, one at a time.