Scaffolding a love2d project to use Fennel
love2d: http://love2d.org/wiki/love
This was a learning exercise for me, and the end result is largely the result of me poking into other people's code. Almost nothing here is originally my own.
love .
from the root directoryPros:
Get to write lisp for awesome lua frameworks like love2d and TIC-80
Hot swapping / live reloading
REPL driven development
Full Lua interop: call any and all lua functions, built in or from a library
Cons:
This is what we're doing here. Put a few files in /lib
:
lua lib/fennel --repl
to run the repl. or anything else you can do with fennelThen require fennel in your lua project.
Meaning, install fennel, and use it to build lua files
Install luarocks: brew isntall luarocks
Install fennel: luarocks install fennel
You can for example run fennel --compile main.fnl > main.lua
to turn Fennel into Lua.
Put this step in your Makefile or something to compile .fnl
files into .lua
files
technomancy: wrote a couple of great games for Lisp Jam in Fennel and Love2d/TIC-80, all of which and more you can find in a series of blog posts starting here: https://technomancy.us/186
selfsame: wrote Hats in the Deep, a game written for TIC-80 for a jam: https://selfsame.itch.io/hats
Visit #fennel on freenode.net