cluttex
cluttex copied to clipboard
Plan: Rewrite in Standard ML
I think Lua is a good language for some little scripting, but not very good for a complex application like ClutTeX. I want to switch to a statically-typed language.
However, a Lua script has the advantage that it can easily be distributed with TeX Live (see Contributing packages - TeX Live - TeX Users Group).
Therefore, a transpiler from the statically-typed language to Lua is needed. There are some choices:
- teal-language/tl: The compiler for Teal, a typed dialect of Lua
- Unisay/purescript-lua: Purescript compiler back-end for Lua
...but neither existed around 2020 (at least, I didn't know). So I created LunarML:
After several years of development, LunarML has become somewhat usable. So it is a good time to rewrite ClutTeX in Standard ML.
The plan is:
- Release ClutTeX v0.6 with already-merged and ongoing changes.
- Rewrite ClutTeX in Standard ML; this is being done in
sml
branch. Some parts will remain in Lua. - Release LunarML v0.1 after confirming it is usable enough for ClutTeX's needs.
- Hopefully, in 2023.
- Release ClutTeX v0.7, compiled with LunarML.
Ok, I see the issues which arose due to missing types, I suffered from this myself not knowing what some tables are being used for and what they contain. So switching to some typed-lua-like environment which transpiles to lua (can be run with texlua
) sounds reasonable.
On the other hand, I have to be honest I have no connections to Standard ML and on the first look I don't like it that much. Thus, my path is more the direction of switching to teal
/tl
which looks pretty nice in my eyes (sadly lacking a proper language server still).
I would simply name it cluttex_teal
as I didn't came up with a proper name yet (and it still very much is something like cluttex with type annotations).
I hope this is fine with you so far. (Please react to this somehow :pray:)