9 ms·
Emacs Lisp is known for its great documentation, but I bet you're not asking about that. Try Fennel - it's a zero-overhead Lisp->Lua compiler. 'Zero-overhead' m
by iLemming 2y ago
Emacs Lisp is known for its great documentation, but I bet you're not asking about that. Try Fennel - it's a zero-overhead Lisp->Lua compiler. 'Zero-overhead' means that Fennel compiles directly to Lua without adding any extra runtime costs or abstractions beyond those present in standard Lua, ensuring Fennel code runs as efficiently as native Lua code. It has a relatively small set of features and is a very lovely language. I use it for dealing with things that need Lua - Hammerspoon, AwesomeWM, Neovim, etc. I jokingly call Fennel "the best Lua formatter" because Fennel code looks much more compact, cleaner, and easier to reason about than Lua. Lua syntax is weird, and I can never figure out how to format it for the best readability; standard tools and formatters rarely help here, sometimes making things even worse. The problem I almost never had with Fennel.
- speedster217 2y agoCan you share an example of Fennel with AwesomeWM?
- iLemming 2y agoThere are plenty: https://github.com/search?ref=simplesearch&q=language%3A%22Fennel%22+awesomewm https://github.com/search?ref=simplesearch&q=language%3A%22F... Here's mine, https://github.com/agzam/awesomewm.d/blob/main/src/_init.fnl https://github.com/agzam/awesomewm.d/blob/main/src/_init.fnl Beware though, I'm not highly experienced in using and configuring Awesome (especially for beautification), the code is not meant to be shared and it has tons of dirty parts (result of my experimentation), I only built what I needed for my personal use. Bigger (more public) project built on Fennel is https://github.com/agzam/spacehammer https://github.com/agzam/spacehammer It's for Hammerspoon though, and my guess you're using Linux, not Mac. One of the aspects I still haven't figured out is the "proper Fennel REPL", it makes certain things less joyful to write or troubleshoot, but even without it, I see some benefits in using Fennel instead of Lua - it's more compact, more FP-oriented, has macros, and it's a Lisp - I can use structural editing.