Overview
Discovered fennel pretty recently and thought it’d be pretty neat if I could use it for scripting Norns.
- Fennel Maiden: https://github.com/pcvonz/maiden
- Fennel Matron: https://github.com/pcvonz/norns/tree/matron-fennel
Note: For debugging right now, the Lua script it generates is being logged.
Setup
If you want to try it out here are the steps.
Summary
Matron setup
- ssh into your Norns and
cd
into the norns directory - Add my fork as a remote
git remote add fennel_fork https://github.com/pcvonz/norns
- run
git fetch fennel_fork
- Checkout the branch
matron-fennel
from my fork
git checkout matron-fennel
- run
./waf clean && ./waf build
in the~/norns
directory. - Grab a copy of the fennel compiler:
sudo curl https://fennel-lang.org/downloads/fennel-0.6.0 > /usr/local/share/lua/5.1/fennel.lua
- [optional] If you want to use Fennel in the REPL, add the flag
--fennel
tomatron.sh
:
./build/ws-wrapper/ws-wrapper ws://*:5555 ./build/matron/matron --fennel &
- Creating a new script with the extension
.fnl
in Maiden should convert it to Lua and run it like a regular norns script.
Maiden setup
- Navigate to the maiden directory
cd ~/maiden/app
- Run
curl -L https://github.com/pcvonz/maiden/releases/download/v1.0.2-fennel/build.tar.gz | tar xz
- Refresh maiden
Uninstalling
Uninstalling Matron Fennel
- cd into norns and run
- Run
git checkout main
- Run
git reset --hard origin/main
(This will remove any uncommitted changes, best to do a git status to make sure there aren’t any uncommitted files you care about!) - ./waf clean && ./waf build
- Reboot norns
Uninstalling Maiden Fennel
- Head over to the releases page of Maiden:
https://github.com/monome/maiden/releases
- Download the
tar.gz
and extract it - Replace the
~/maiden/app/build
folder with the one from the tar file.
TODO:
- [x] Run fennel scripts via Maiden
- [x] Add syntax highlighting to maiden (in progress)
- [x] Add REPL support via matron (???)
- [ ] Figure out clean way to have both the regular lua repl and fennel repl available via maiden.