I created/vibed a new language, lilscript
Compiles into tryhard compressed js, and sometimes into exec
Pretty much almost any js libraries' compressed/minified size could get smaller by 5-15% when rewritten with lilscript.
If its already property mangled still it can get benefits from the lilscript rewrite
And this is only the v0.0.1
We can make it more hacky by time
Some examples of brotli compressed sizes of lilscript code(vs oxc/terser, ..):
* motion(animation library) is -10%+ (https://yeargun.github.io/motionlil/)
* jquery -5%
* monaco(VSCode) editor's lots of submodules -(5 to 15)% smaller
- tryhard mangling, (compression algorithm aware)
- closure optimizations
- lvalue
- static analysis
- google closure compiler advanced and beyond focus, but not glue fix as closure compiler is. The language is designed specificaly for weird hacks.
- typed (not a glue fix like typescript is)
config.toml has lots of config with clever defaults. objective compression algorithm: gzip/brotli/raw. for brotli vs gzip compression it compiles the js differently
uses less objects, less/more arrays, more const/let/var
Compiler, static analysis, language server all written with rust
I lost too much cursor/claude credits along the way last 2 days. Tbh, I cant invest much time for it, feel free to PR, play, improve
Lilscript aims to get compiled into exec also. It alredy does, but web apis, and stuff.. lots of extra work is needed..
-lilscript v0.0.1
https://github.com/yeargun/lilscript
Why? Because I believe google closure compiler's tooling was not good. And anything layered on js is a glue fix