Live data from Hacker News

Show HN: Solid, a scripting language with a tiny VM

github.com

1–10 of 16 posts

Re: Show HN: Solid, a scripting language with a tiny VM

#3
post #2

Great job! I was looking for a small and simple embeddable language (smaller than Lua) for a long time. Solid looks very promising to me.

Thanks! Quite honestly, my primary reason for making it was that I didn't like the Lua object model and Python/Ruby/Guile are a bit inconvenient to embed.

Re: Show HN: Solid, a scripting language with a tiny VM

#5
post #4

Awesome work. How big is the executable? Also, what did you not like about the Lua object model?

Without debug symbols (the default Makefile includes them), the executable is 83KB (93KB with -g), less than half the size of Lua. The shared library is a bit larger, at 102KB.

Lua's whole table-metatable system always felt awkward to me, what with the magic names for operators. It's really not so bad, I just didn't see any reason to spend time learning something that felt awkward and archaic to me when I could make something that seemed a bit cleaner.

Re: Show HN: Solid, a scripting language with a tiny VM

#6
post #5
post #4

Awesome work. How big is the executable? Also, what did you not like about the Lua object model?

Without debug symbols (the default Makefile includes them), the executable is 83KB (93KB with -g), less than half the size of Lua. The shared library is a bit larger, at 102KB. Lua's whole table-metatable system always felt awkward to me, what with the magic names for operators. It's really not so bad, I just didn't see any reason to spend time learning something that felt awkward and archaic to me when I could make…

Can VM be built separately from the compiler, so it could be used on small MCUs?

Re: Show HN: Solid, a scripting language with a tiny VM

#7
post #6
post #5

Earlier quoted context omitted.

Without debug symbols (the default Makefile includes them), the executable is 83KB (93KB with -g), less than half the size of Lua. The shared library is a bit larger, at 102KB. Lua's whole table-metatable system always felt awkward to me, what with the magic names for operators. It's really not so bad, I just didn't see any reason to spend time learning something that felt awkward and archaic to me when I could make…

Can VM be built separately from the compiler, so it could be used on small MCUs?

The VM, the AST parser, and the Bison/Flex frontend are built in a layered manner: you could (with the appropriate Makefile) build only the VM, the VM+the AST parser, or all three. I don't currently have Makefile options for this, but it would be pretty trivial to add.

Re: Show HN: Solid, a scripting language with a tiny VM

#10
post #7
post #6

Earlier quoted context omitted.

Can VM be built separately from the compiler, so it could be used on small MCUs?

The VM, the AST parser, and the Bison/Flex frontend are built in a layered manner: you could (with the appropriate Makefile) build only the VM, the VM+the AST parser, or all three. I don't currently have Makefile options for this, but it would be pretty trivial to add.

How long did it take to write this once you had all the ideas? I looked at the github history but they only went back 5 months and it looks like there was already a significant amount written so I couldn't tell how far back from there it went.
Post reply on HN