Show HN: Tiny – An interpeted dynamic langauge with inline Go native functions
github.com
github.com
i started with a simple bytecode vm and built features on top of that one by one. keeping the scope practical helped a lot too, like using go for the runtime and focusing on things i actually wanted to use: packaging, http, plugins, lsp support, etc... there was also a lot of rewriting and fixing weird bugs along the way.
You can do similar things in other languages but not AFAIK as a built in feature. You can have in line C innTCL
for memory, i did a quick test using tiny's built-in runtime.memoryStats(). these are go runtime heap stats rather than process rss.
at startup: about 8.1 mb alloc / 19.7 mb sys.
after keeping 100k object records alive, each with strings and nested arrays: about 109.3 mb alloc / 126.5 mb sys.
i should make these numbers easier to find in the readme/release notes instead of making people dig for them.
luajit is a useful reference point, but i don't think a direct comparison would be very meaningful right now. it is a much more mature runtime optimized in c, while tiny is still young, runs on top of go's runtime, and uses wasm as its jit backend, so the tradeoffs are pretty different.
I think it'd be interesting to build a adhoc config mgmt system w/ this and use it as a high level scripting language.
it also has escape hatches for go/wasm and native plugins, so if part of a program needs lower-level code or an existing native library, you can call into a .dll or .so through a simple json-based plugin interface.