9 ms·
I'm first author of the linked paper and am working on Pallene for my PhD. Feel free to ask any questions here!
by hugomg 8y ago
I'm first author of the linked paper and am working on Pallene for my PhD. Feel free to ask any questions here!
- marktangotango 8y agoSand boxing is what really sets lua apart imo. Will custom allocators and dynamic code loading be supported? Will generated code implement the debug hook counters?
- hugomg 8y agoPallene has been designed to seamlessly interoperate with Lua, not to replace it. So you can still use Lua when you need dynamic code loading or magic debug hooks. Roughly speaking, from the point of view of Lua, Pallene is a system language like C. It is good for performance and calling C system libraries, but isn't particularly suited for dynamic code loading and sandboxing via interpreter hooks.
- nikki93 8y ago(Maybe trivially answerable by looking through the resources, sorry!) -- will Pallene still support `eval`-like behavior (like with Lua's `load` function(s))?
- hugomg 8y agoDon't worry, that is still a fine question. Pallene programs are still able to use Lua's "load" to eval dynamically-typed Lua code. But it is less likely that we would implement a function to load Pallene source code at run-time, for the same reasons why it isn't common to dynamically load C source code: Pallene takes longer to compile than Lua, and dynamically-loaded code usually isn't as performance-sentitive anyway.
- nikki93 8y agoCool makes sense. Could actually still be awesome to have a Lua lib or some other runtime lib that can translate Pallene or some other type-annotated Lua format to plain Lua, just for typechecking and ability to use autocomplete etc.
- corysama 8y agoWould it be a mischaracterization to say that the generated C is basically the source of the Lua interpreter + the statically compilable functions from the Pallene program?
- hugomg 8y agoFrom the point of view of Lua, Pallene works the same as C If you want to produce a standalone executable, at the end of the day this executable will contain a copy of the Lua VM. If you want to produce a library that can be "require"-ed from Lua, then you will produce a ".so" shared object file with just the Pallene functions in it.