Fennel is a Lisp that translates straight to Lua. I’d like to learn more about it because @technomancy writes a *spaceflight progamming game* called Bussard using it.
So I’m doing Advent of Code using *Fennel*. I’m three days in and I like it so far.
Some weird things I’ve noticed:
1. There are no breaks from loops! Thus, while you can write a loop with an explicit exit condition like `(while (not done?) ...)` you have no way to exit a loop like `(each [key value (pairs table)] ...)`.
2. I miss so many Lisp things, like ... lists! There seem to be no lists in this language. How the hell is this a Lisp? Oh well. Apparently you can use Lua tables as lists, but I keep using them as maps/hashes/dictionaries.
3. If you use `let` to create a local binding, you can’t `set` it! That’s weird for somebody like me who’s used to Emacs Lisp.
If you want to look at my code, take a look at the 2018 folder in my advent repository.
#Advent of Code #Programming #Fennel
(Please contact me if you want to remove your comment.)
⁂
@technomancy ran his antifennel compiler on Lite, a tiny editor written in C and Lua to turn the Lua into Fennel code. The result is Fite:
fite is a lightweight text editor written mostly in Fennel ¹
– Alex 2021-10-04 07:49 UTC