Show HN: Pico – a small embeddable scripting VM in C

(github.com)

3 points | by vaergawdd 9 hours ago ago

2 comments

  • vaergawdd 9 hours ago ago

    I posted an earlier version here before as a learning project. Since then I have been moving it toward a more practical direction: v0.2.0 adds a C embedding API and builds the runtime as libpico. A host program can now create a VM, evaluate PiCo code, register native C functions, call PiCo functions from C, capture output/errors, and prevent scripts from terminating the host process.

    It is a small toy language. The current public value API is intentionally limited to null, bool, and number.

    • Rochus 6 hours ago ago

      That's cool. Did you compare performance with the PUC Lua VM versions (which are register based as well)? Personally, I find the Are-we-fast-yet suite very useful and usually migrate the suite to my languages to compare the implementations (see e.g. https://github.com/rochus-keller/are-we-fast-yet/).