2 ms·
A tiny (1000 lines), fastish, embeddable scripting language can be AOT compiled
- tracker1 1y agoNifty... I'm not really big on even lua myself. This seems to come in around 40kb for the runtime where luajit seems to be 140-160kb. I'm somewhat curious what targets the author is concerned with. This isn't to be dismissive or anything, most of the applications I write seem to come in well over 2mb in size for rust and over 80mb for C# which are massive in comparison, so I'm interested in use cases. For that matter, I've been inclined to reach for JS as much as anything, though I've considered Lua before.
- yablak 1y agoMicrocontrollers?
- themadsens 1y agoSweet, very impressed. To be really usable, for embedded and otherwise, a well documented and ergonomic C API for bindings is needed though. The closest I could find was "If you need to add more predefined functions, add them in intrinsics.h." I will take a look though, this seems really promising EDIT: Looks to be pretty easy to tack an external registration mechanism onto intrinsics.h. Good to go then .. .. Only two SO comments at this point .. come on folks :-)
- ghusbands 1y ago> garbage collection, I just link the Boehm GC. Not ideal, but good enough It's worth noting that on 32-bit, the Boehm GC can have consistent issues [1] [2] [3] that make it worth avoiding for anything long-running. The Mono team implemented their own GC due to this. If a runtime is aiming to be useful on such systems, it may be worth implementing or using a less conservative GC. [1] https://en.wikipedia.org/wiki/Mono_%28software%29#Garbage_collector https://en.wikipedia.org/wiki/Mono_%28software%29#Garbage_co... [2] https://news.ycombinator.com/item?id=3576396 https://news.ycombinator.com/item?id=3576396 [3] https://stackoverflow.com/questions/8152374/ https://stackoverflow.com/questions/8152374/