I ported a lot of different Lua elements to MoonScript, a language that compiles to Lua.
You can find that work here:
https://github.com/tsolace/tpt-moonscript-demos
Take a look at the *.moon files, particularly FaveElementsMoon.moon, my port of my FaveElements.lua, which compiles a lot of different elements that I like from a lot of different mods. The repository also includes MoonScript ports of my other lua mods. This demonstrates how powerful MoonScript can be for TPT Lua modding, as it produces efficient and comprehensive Lua code. (note: I haven't tested this on anything other than jacob1's mod, but they should work on normal TPT)
If you've got a good understanding of Lua, skip straight to the reference sheet (this is the spec, if you're looking for that), which is really the only thing you need to read to learn about it and how it improves Lua. And of course, there is an online compiler to try it out.
WARNING: you'll either love it or hate it
This is actually pretty cool, but in what ways would this make things easier or better for TPT scripting?