HN user

rblank

75 karma
Posts2
Comments10
View on HN

"That said, if your heuristic is 'words used in strange ways' then you will get false positives from all teenagers."

This made my day.

I have to admit that this was one reason why it took me so long to start a project with Lua. Now that I've had some exposure to the language, I can say that it's not as bad as it seems, but it's also not "nothing". I frequently have to think about indices to avoid making mistakes in Lua, while in zero-based language indexing is pretty much muscle memory.

I haven't run any benchmarks yet, and TBH performance isn't a high priority, but event dispatch latency is currently fairly bad, between 100 and 150 us (when overclocking the Pico at 250 MHz). It feels like it should be possible to bring it down to <30 us. I suspect the bad latency is due to my very naive implementation of thread scheduling and timers.

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.