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?


13 Jul 23

It’s also at a level of complexity that most game development tutorials don’t cover. Most of the problems beginners have when starting out with game development have to do with scope. The usual advice is to start small and work your way up, and while that might be a good idea, if the types of projects you’re interested in cannot be made any smaller then there are very few resources out there that attempt to guide you through the problems that come up.

by resoluxe Jul 2023 saved 2 times

It’s also at a level of complexity that most game development tutorials don’t cover. Most of the problems beginners have when starting out with game development have to do with scope. The usual advice is to start small and work your way up, and while that might be a good idea, if the types of projects you’re interested in cannot be made any smaller then there are very few resources out there that attempt to guide you through the problems that come up.

by eli Jul 2023 saved 2 times

12 Jun 23

It’s a common misconception that dynamic languages inherently have tobe slow. This seems to be a deeply ingrained reflex nowadays. Probablytrained by years of suffering from simplistic implementations, oftenhelped by bad language design decisions.

by 2097 Jun 2023 saved 2 times

It’s a common misconception that dynamic languages inherently have tobe slow. This seems to be a deeply ingrained reflex nowadays. Probablytrained by years of suffering from simplistic implementations, oftenhelped by bad language design decisions.

by eli Jun 2023 saved 2 times

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.


23 Apr 23

Here is a simple way to make a fully navigable archive of an interesting static website, for instance for offline consumption, or because you are afraid that the Internet will cease to exist soon. We will be using redbean to make this archive easily viewable: this will make the archive an executable, that runs a simple static webserver when launched. For this example, we will be archiving redbean’s website itself.

by eli Apr 2023 saved 5 times

26 Nov 22

some inspiration for reloading Neovim config written in Lua automatically. I’m not confident that this is the only way. it may work. it’s something to test soon.


15 Aug 22

Tiny-ecs is an Entity Component System for Lua that’s simple, flexible, and useful. Because of Lua’s tabular nature, Entity Component Systems are a natural choice for simulating large and complex systems. For more explanation on Entity Component Systems, here is some basic info.

Tags:

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!