News for hackers. Stuff that matters.
Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller by bmitc on Saturday November 04, 2023 @01:43AM (#38138512)
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?

Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller by rblank on Saturday November 04, 2023 @01:15PM (#38143034)
I 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.