07 May 24

It’s that time of year again! If anyone is interested in trying out love2d with Fennel check out the “minimal” love2d fennel repo.This repo is slowly expanding from a truly minimal setup to one that comes with a few batteries included. If you want a bare bones setup to get you started check out: absolutely-minimal-love2d-fennel by @benthor.

by eli 1 year ago

15 Aug 23

a repository of many things, including some fennel things

by eli 2 years ago

07 Aug 23

Before you understand how reloading works in Fennel, you need a little background regarding Lua’s module system, since Fennel is just a compiler that emits Lua code. Older versions of Lua had a module function which would declare the whole rest of the file as being part of a specific module and register that with the module system, and all functions that would normally be declared as global within that file would be exported as part of the module instead. But in version 5.1, that system was recognized as redundant: nowadays a module is just a file that returns a table1 with closures and other values in it. This is reflects the relentless simplicity behind the design of Lua; why have modules as their own concept when tables and closures can do just as good a job?

by eli 2 years ago

05 Jun 23

This server was created specifically to use as a base for a text adventure game. As such it lacks features you might expect. It has not been widely tested.

by eli 2 years ago

05 Aug 22

Fennel is a language a lot like Lua, but it simplifies the syntax and removes some of the most error-prone and troublesome features of Lua while adding modern conveniences like pattern matching and a capable REPL for interactive use. That description omits to mention it’s a language in the lisp family, which I think has an undeserved negative association in the mind of the average programmer. Maybe it’s better to focus on the concrete benefits like the simplified syntax and lack of operator precedence rules to memorize!

by eli 3 years ago

04 Sep 21

Macros are how lisps accomplish metaprogramming. You’ll see a lot of people treat lisp macros with a kind of mystical reverence. “Macros allow you to do things that aren’t possible in other languages” is a common refrain, but that’s nonsense. (Turing tarpits exist; other languages have macros.) The difference is that lisps allow you to write programs using the same notation you use for data structures. It’s not that these things are impossible in other languages; it’s just that the lisp way flows seamlessly instead of feeling arcane.

by eli 4 years ago