News for hackers. Stuff that matters.

rblank

Re:Is Mozilla trying hard to kill itself? on Wednesday December 17, 2025 @06:27AM (#46300783)
Re:Building my childhood dream PC on Sunday May 18, 2025 @03:20PM (#44023703)
"To my horror I found a lot more rust inside."

Not a popular opinion around here.

Re:Sqlite3 WebAssembly on Tuesday October 15, 2024 @02:23PM (#41851515)
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.

Re:Banning E2EE Is Stupid on Wednesday November 08, 2023 @07:06AM (#38189303)
"That said, if your heuristic is 'words used in strange ways' then you will get false positives from all teenagers."

This made my day.

Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller on Monday November 06, 2023 @03:55PM (#38168874)
FTR, Fennel support was indeed fairly easy to add.

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

Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller on Saturday November 04, 2023 @02:40PM (#38143908)
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.
Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller on Saturday November 04, 2023 @01:34PM (#38143257)
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.
Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller on Saturday November 04, 2023 @01:27PM (#38143181)
Thanks for the kind words :)

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

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

Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller on Saturday November 04, 2023 @01:07PM (#38142947)
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 :)

Show HN: MicroLua – Lua for the RP2040 Microcontroller

https://github.com/MicroLua/MicroLua

MicroLua allows programming the RP2040 microcontroller in Lua. It packages the latest Lua interpreter with bindings for the Pico SDK and a cooperative threading library.MicroLua is licensed under the MIT license.I wanted to learn about Lua and about the RP2040 microcontroller. This is the result :)

( Read More... | 29 comments | 3 points | on HN )