Hacker Newsnew | past | comments | ask | show | jobs | submit | rblank's commentslogin


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.


Amazing!

    npm install @sqlite.org/sqlite-wasm


I built my own little demo page here: https://tools.simonwillison.net/sqlite-wasm

With the help of Claude, though it incorrectly hallucinated some of the details despite me pasting in documentation: https://gist.github.com/simonw/677c3794051c4dfeac94e514a8e5b...


This would run on client side I presume? Where the data would go?

Okay that's listed here: https://sqlite.org/wasm/doc/trunk/persistence.md

EDIT: Self answered.


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

This made my day.


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.


FTR, Fennel support was indeed fairly easy to add.

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


Whoa — that's amazing!


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.


Thanks for the kind words :)

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


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.


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 :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: