Re: [dev] JIT & VM discussion
If you don't want to use Lua, what about doing something more like CGI? Then you can just call the configuration program with what you want a dynamic answer for. You could then have a simple awk script parse your config file and answer queries to the host program.
I suggest this because I have observed that the suckless community doesn't like dynamic loading and doesn't like parsing. Just use awk's built-in parsing, and don't dynamic load. Just call a standard parser directly.
Or just use Lua or LuaJIT. I would just use Lua. But I have to say this about the crazy CGI thing: "Though I drew this conclusion, now it draws me."
> On Jun 18, 2016, at 2:33 AM, Connor Lane Smith <cls_AT_lubutu.com> wrote:
>
> Hi all,
>
> I was wondering if others had an opinion on JIT. Suppose we don't need
> anything fancy like adaptive optimisation, but just wanted to compile
> a program at runtime. One possibility might be to generate C code and
> store that in a file and then call the C compiler and then execute the
> resulting binary... But that seems a bit unpleasant, prone to
> compilation failure, and not particularly lightweight either.
>
> One solution could be simply to produce assembly code, but then that
> is tied to a specific architecture, which is unfortunate. There's also
> LLVM, but that is a very big and complicated dependency, which
> shouldn't really be necessary if we're just jitting something quickly
> and don't mind it being a little unoptimised for the sake of
> simplicity and speed of compilation. We just want to portably generate
> machine code and then run it.
>
> An ideal might be something like an abstract instruction set together
> with a JIT for the abstract machine. To be honest a JIT might not even
> be necessary so long as it is has very little interpretation overhead,
> the instruction set is general purpose and fixed, and it plays well
> with the C memory model.
>
> Does anyone have any ideas?
>
> Thanks,
> cls
>
Received on Sun Jun 19 2016 - 05:49:24 CEST
This archive was generated by hypermail 2.3.0
: Sun Jun 19 2016 - 06:00:15 CEST