cluttex icon indicating copy to clipboard operation
cluttex copied to clipboard

Plan: Rewrite in Standard ML

Open minoki opened this issue 1 year ago • 3 comments

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:

...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:

  1. Release ClutTeX v0.6 with already-merged and ongoing changes.
  2. Rewrite ClutTeX in Standard ML; this is being done in sml branch. Some parts will remain in Lua.
  3. Release LunarML v0.1 after confirming it is usable enough for ClutTeX's needs.
    • Hopefully, in 2023.
  4. Release ClutTeX v0.7, compiled with LunarML.

minoki avatar Oct 29 '23 09:10 minoki

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:)

atticus-sullivan avatar Mar 11 '24 23:03 atticus-sullivan