I’m one of the lead devs for Fennel; been working on it for about a year now and having a ton of fun.
We’ve got a free 1-day conference in Portland next month: https://conf.fennel-lang.org/2019
Ask me anything!
I was curious why it was built on top of Lua specifically. Is that so Fennel can leverage its JIT’d VM and embedding? Or did you all also value Lua libraries wanting them? The latter I wonder about given Id guess there be lot more libraries for Pythkn, Ruby, etc.
Good question. For me personally it started because I was using the Love2D framework for games, and I became very impressed by the speed and conceptual simplicity of Lua.
But there were still a few remaining annoyances despite its simplicity; the statement/expression distinction, the ease with which you can accidentally create a global, and the lack of arity checks in particular were the only complaints I had with it.
It wasn’t enough for me to do anything about, but when I found Fennel, I realized that creating a compiler that targets Lua doesn’t need to be a big deal. The source for the compiler is under 2kloc. Fennel introduces virtually zero runtime overhead, and the compiler output (with a few exceptions like pattern matching) looks very close to the input.
Thanks for response. 2kloc? That’s impressive! That’s in bootstrapper territory.
Love2D looks neat. The first thing that jumped out is it runs on every major platform. Examples look easier than some GUI toolkits from long ago. So, my first thought is: “Could someone use this as a cross-platform, GUI toolkit with simple language to make great-looking interfaces?”
Yeah, actually 2k isn’t just the compiler; it includes the stock macros and the repl.
Love2D is much easier than any other GUI work I’ve done on any platform, yeah. If you don’t need native widgets or the ability to display more than one window it could certainly be used for non-games. In fact, I created a text editor in about 1.2kloc which is a mix of Fennel and Lua: https://git.sr.ht/~technomancy/polywell
It’s loosely based on Emacs and has syntax highlighting, a buffer switcher, support for repl buffers, completion, tetris, etc.
I’ve also had some success using imgui using the love2d bindings. It’s got a lot of handy UI widgets - I used it for game debug UI, but I could see it being used for non-game apps as well.
Are you the same technomancy who created the Atreus keyboard?
Yep, that’s me!
Lua has a rich metaprogramming ecosystem.