Open euclidianAce opened 4 years ago
Further separate the compiler (tl.tl) from the cli (tl), as in make them separate modules
Agree! I've been thinking about this. The names are something to figure out later, but yes, I'd like to have exactly what you described: a no-dependencies pure Lua compiler that can be embedded into any kind of (compatible) environment, and a convenient top-level CLI package with all the bells and whistles.
I thought of some of these ideas while working on the build options (#177) and would like to know your opinions. These are definitely more abstract and long-term oriented goals, but I think they're worth discussing :)
tl.tl
) from the cli (tl
)luarocks install Teal
: pure lua, no dependencies, just the minimal compiler apiluarocks install tealc
: pulls in Teal, argparse, lfs, and any future bells and whistles we may addluarocks search teal
, maybe changeTeal
totealstandalone
or something and just haveteal
pull in everything)Some of these came up when thinking about use cases for Teal and one that came to mind were the Minecraft mods ComputerCraft and OpenComputers, which embed LuaJ and Lua respectively. (I think OpenComputers falls back to LuaJ if it can't use a regular interpreter). On these restricted platforms, people write suprisingly sizable projects2 but wouldn't have access to modules like lfs due to the filesystem being handled differently internally.
I don't know how much other people would want this or if there are any glaring flaws in my logic that I'm missing, but I'd definitely have a usecase for it and would definitely be willing to write the prs.
2: I'd say OpenOS, the default OS for OpenComputers is quite impressive, and when the stars align it can run on actual hardware with a modified Linux kernel. 1: ~20 lines for a decently functional bare-bones compiler