HNHacker News
TopNewBestAskShowJobs

rblank

75 karma · joined November 26, 2021

submissionscomments
rblank··on Is Mozilla trying hard to kill itself?
https://xkcd.com/463/
rblank··on Sqlite3 WebAssembly
https://github.com/sqlite/sqlite-wasm

sqlite-wasm loads much faster than Pyodide, so if you don't need Python, then the former is a better choice.

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

This made my day.

rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
FTR, Fennel support was indeed fairly easy to add.

https://github.com/MicroLua/MicroLua/commit/b9dfa2407afe932b...

rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
MicroLua currently compiles Lua files to binary at built time. It seems that Fennel is capable of transpiling to Lua source code, so it should be easy to add that step to the build process.
rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
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.
rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
Thanks for the kind words :)

I've been working on this in my spare time since March, so roughly 8 months.

rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
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.
rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
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.

rblank··on Show HN: MicroLua – Lua for the RP2040 Microcontroller
It looks like noceMCU uses Lua 5.1.4 or Lua 5.3.5, while MicroLua uses 5.4.6.

Other than that, nodeMCU is much more advanced :)