It would be nice to add configuration/scripting to Jet via Lua.
Why Lua instead of a 'static' config format like toml, yaml, json, etc?
- Being able to receive/send jupyter messages via Lua would make it possible to extend the Jet CLI to support kernel-specific features (i.e. comms), or to just execute code in response to other stuff, e.g. the terminal width changing
- Would be fairly straightforward to allow users to implement custom commands, e.g.
:restart, %install ..., etc
- More things I haven't thought of yet
Implementation
The fact that we already expose a Lua library complicates things, since mlua doesn't let you expose a library and vender a Lua runtime. So we'd basically need to build in 2 modes:
-
If we're building the Lua library, we'd need to piggyback off the host Lua session and reuse that Lua runtime to support Jet's scripting
-
If we're building the CLI we'd bundle our own Lua runtime, i.e. Luajit.
Stuff which should be configurable
Stuff which should be scriptable
It would be nice to add configuration/scripting to Jet via Lua.
Why Lua instead of a 'static' config format like toml, yaml, json, etc?
:restart,%install ..., etcImplementation
The fact that we already expose a Lua library complicates things, since mlua doesn't let you expose a library and vender a Lua runtime. So we'd basically need to build in 2 modes:
If we're building the Lua library, we'd need to piggyback off the host Lua session and reuse that Lua runtime to support Jet's scripting
If we're building the CLI we'd bundle our own Lua runtime, i.e. Luajit.
Stuff which should be configurable
Stuff which should be scriptable