#Pandoc contains an interactive #Lua REPL (since 3.1.2). Start it with
pandoc lua -i
Enable a persistent command history by setting the PANDOC_REPL_HISTORY environment variable to a filename. Use arrow keys to step through the history, or search it with ctrl-r.
One of the great #lua modules provided by LuaX is F.
F is inspired by some #haskell modules (List and Map) and implements functional programming functions to deal with Lua tables.
Below is a custom #Lua writer that behaves like a built-in writer. It can serve as the basis for a modified writer, e.g., one with a programmatically modified template. https://pandoc.org/custom-writers
local format = 'commonmark'
Extensions = pandoc.format.extensions(format)
Template = pandoc.template.default(format)
Writer = function (doc, opts)
return pandoc.write(doc, {format=format, extensions=opts.extensions}, opts)
end
Small example of how the #Lua subsystem can be used to query #pandoc's capabilities:
The default binary allows to --list-extensions of a given format, but there is no analogous option to list all formats which work with a given extension, so here is a pandoc Lua program that provides this functionality: https://gist.github.com/tarleb/ef63974ab18d92acf0eb40180d832c48
Mildly hot programming take.
People who bashed Balatro's "massive scroll of ifs" are ignoring the facts that:
Game dev is fundamentally different from modern GUI/web dev.
Developing a single-player game solo is very different even from developing a big game with a team and a lifecycle, not to mention a continually-delivered web project.
The way Lua only allows you to use a local function AFTER its definition in the file, is absolutely horrible. It forces you to order functions by their local function dependency, making larger files dreadful to navigate through. :blobdislike:
Does anyone have any tips how to organize large Lua files?
I wanted to do #ludumdare this weekend, but didn't have time. 😞 I did, however, get menus fully working and auto-backups working for Froggy, my live-coding app in #picotron! 🐸
#prosody trunk nightly build 1887 now supports systemd notifications via a pure #Lua implementation (it does not use libsystemd). Future builds, starting with 1888 will have this enabled when running under systemd. Could help with race conditions on startup of external components and other services, delaying them until Prosody is ready to accept connections.
So Neorg has moved exclusively to LuaRocks for installation. I wonder if this is the general direction of Neovim packages, or if this is just an outlier? I’m very hesitant to switch, as I’ve only just gotten used to Lazy.
I’m impressed to see that my #Neovim extension to send HTTP requests directly from the editor (it basically emulates the logic of IDEs like VSCode and IntelliJ with .http files) has already reached 65 stars! ⭐️
There already a couple of feature requests that I’d like to tackle (I don’t open Github that often, so I missed the past 2-3 months of notifications), but I’m really struggling with time.
#Platypush takes most of my time, as I’m trying to wrap everything for the first stable release (it only took about 8 years!). The Platypush web extension, the Platypush Android app, the madblog blogging platform and the RSS viewer browser extension take my remaining (unpaid) development time. And there’s still sporadic work I’m doing on Mopidy, Jellyfin, OpenLineage and other projects.
I released nvim-http as a toy one-shot personal project, covering what I perceived as a gap in the Neovim plugins and hoping that I wouldn’t have to come back to it again. But, 65 stars and 10 open issues later, it seems like others liked the idea too - and it’s probably fair to implement the improvements that they’re asking.
Is there anybody out there who’s familiar enough with #Python (or if you want to rewrite in #Lua, feel free to do it too, as I’ve been toying with the idea a bit already) and uses Neovim who would like to give me a hand with this project? I’m happy to add new maintainers/contributors if they can prove enough proficiency with Python and/or writing Vim/Neovim plugins. Otherwise I may eventually respond to all the open feature requests, but squeezing in another project to maintain regularly may prove tricky for me.
That "edit your podcast using Vim" program (recently mentioned on the #postmarketOS podcast) now supports #microhttps://github.com/scateu/tsv_edl.vim because I realized I have a project that this is a good fit for, and I write micro plugins #lua. It's nice to have a lightweight audio/video editor that works in my favorite text editor.
ipairs() in #lua only works on tables with numeric indices. It just ignores non-numeric indices. Doesn't fail or anything, just pretends they aren't there. Oh. OK. That's nice. Nice and elegant. Nice nice nice. #gamedev?
We're working on a website re-design. Made some decisions today. Will be simplifying the design concept to cards representing each of the website sections and then a search that eliminates cards that do not match the search.
This allowed us to remove the bulky menus that the previous version of the website had and simplify the primary use of the website, which is to quickly find information.
Jitsi-Meet avec authentification par JWT : le chaînon manquant
J’essaye actuellement de faire fonctionner Jitsi-Meet avec une authentification par Json Web Token sur une Debian 12 et je suis tombé sur un truc que je n’ai vu documenté nul part.
Après l’installation du paquet jitsi-meet et le paquet jitsi-meet-tokens, ça ne fonctionnait pas. Jitsi ne m’envoyait pas péter mais les conférences ne fonctionnaient pas pour autant.
Les logs de prosody m’ont fourni la réponse :
Error initializing module 'auth_token' on 'jitsi.fiat-tux.fr': /usr/lib/prosody/util/startup.lua:203: module 'inspect' not found:
J’avais pourtant le paquet lua-inspect installé et je trouvais bien des fichiers inspect.lua en faisant find / -name inspect.lua. Mais aucun en lua 5.4, qui semblait être la version utilisée par prosody (no file '/usr/local/share/lua/5.4/inspect.lua' dans les logs).
While learning #golang or #rust or whatnot would be cool, using a scripting language for #AdventOfCode is preferred, mainly so I don't have to compile to get my answer.