I continue my Lua series with part 3 — testing, mocks, and continuous integration.
@vanja I did this with #python once, didn't even manage to create a package to put my code in. I went with #lua in the end, and installing packages with #luarocks was surprisingly pleasant.
I'm trying #hare right now, which would've been a lot more mearable if I had used it back then.
Wrote a little #fennel script to parse and create #bitsy game files using #lua:
https://git.sr.ht/~jummit/bitsy-format
It can convert between .bitsy and .json files:
parse-bitsy game.bitsy # prints the json
parse-bitsy game.json # prints the bitsy format
It's also on #luarocks: https://luarocks.org/modules/Jummit/bitsy-format
New article! Part 2 of my 8-part Lua series. This time about creating, building, and publishing packages for Lua: https://martin-fieber.de/blog/create-build-publish-modules-for-lua/
Series overview: https://martin-fieber.de/series/lua/
Publish your #Neovim to #Luarocks
https://mrcjkb.github.io/posts/2023-01-10-luarocks-tag-release.html
I’m writing a series of articles about Lua, covering different aspects of the language and the surrounding ecosystem. I just published part 1, focusing on the project setup with LuaRocks: https://martin-fieber.de/blog/lua-project-setup-with-luarocks/
Series overview: https://martin-fieber.de/series/lua/
#luacheck #luaformatter #projectsetup #luarocks #lua
Just found https://github.com/Omikhleia/markdown.sile - an enhanced Markdown module for the sile typesetter (alternative to LaTeX) - also found https://djot.net via there as well. Sample PDF rendering looks absolutely gorgeous - sadly I can’t seem to install it due to a #luarocks bug (https://gist.github.com/talios/dcb25f45f7057b66e67d3461656fb820) that I’ll have to investigate another night.
Em vez de fazer o que eu devia estar fazendo, obviamente eu estou procrastinando procurando uma alternativa ao gravador de tela em GIF #Peek que eu usava para preparar material de apoio às aulas. Achei um #Gifine, que parece que é escrito em #Lualang, o que me obrigou a instalar #luarocks, e como eu sou tosco no pamac ele está atualizanfo neste momento 2GB de coisas no meu Manjaro.
#peek #gifine #lualang #luarocks
I love that #LuaRocks' builtin
build method copies ./lua
to the right place as-is. This allows me to use the build method for my little #Fennel project without any weird tricks.
Yes, the stuff I install won't be usable from Lua without Fennel. That's fine, it isn't meant to be. Nor is the package on LuaRocks - I just supply a rockspec file to build it locally.
RT @soapdog@twitter.com
@hisham_hm@twitter.com I think I got #LuaRocks working on Windows on ARM:
🌑 https://github.com/luarocks/luarocks/pull/1125
It worked well enough to install LuaFileSystem and some other rocks.
#luarocks #lualang #lua #windowsonarm
Installing #LuaRocks in #Termux on Android, hurdle 3:
$ luarocks install luasec OPENSSL_DIR=$PREFIX
When building with external dependencies, you have to specify the $PREFIX directory (provided by Termux). There's probably a way to configure this globally but I haven't found that option yet. Also, you need to specify the variable at end of command line (as an arg) instead of as environment variable at the beginning because #reasons.
Installing #LuaRocks in #Termux on Android, hurdle 2:
$ ls -l -d .
drwx------ 18 u0_a95 u0_a95 4096 Nov 29 20:12 .
$ echo 'export USER=u0_a95' >> ~/.bashrc
$ . ~/.bashrc
LuaRocks uses the $USER variable extensively, but Termux does not set it by default. LuaRocks also checks permissions, so you cannot just make it up. Use the user owning your home directory.
Announcing LuaRocks 3.0.0beta1!