Lua scripting #694

Open
opened 2026-10-05 04:39:10 +02:00 by adam · 5 comments
Owner

Would it be possible to interface with ZNC via Lua scripting, e.g. create a modlua? It would be a great light scripting language as an alternative to Python and others.

Lua 5.2 is achievable with SWIG, and likely LuaJIT (JIT'd Lua 5.1) as well.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Would it be possible to interface with ZNC via Lua scripting, e.g. create a `modlua`? It would be a great light scripting language as an alternative to Python and others. Lua 5.2 is achievable with SWIG, and likely LuaJIT (JIT'd Lua 5.1) as well. ## <bountysource-plugin> Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/32526675-lua-scripting?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:145423205 -->
Author
Owner

If someone wants to implement it, and, more importantly, maintain it, sure...

If someone wants to implement it, and, more importantly, _maintain_ it, sure... <!-- github-comment-id:204811998 -->
Author
Owner

For sure, I wouldn't mind taking a stab... that said, I did look at the current scripting modules, and you're definitely right about maintaining... I think modpython is the only one that is really up to date!

This is from my (very) limited experience with SWIG, but do you think we could standardize modpython/modperl/modtcl (and in the future, modlua) to use a central interface file, and then have specific customizations for each one as necessary?

For sure, I wouldn't mind taking a stab... that said, I did look at the current scripting modules, and you're definitely right about _maintaining_... I think modpython is the only one that is really up to date! This is from my (very) limited experience with SWIG, but do you think we could standardize modpython/modperl/modtcl (and in the future, modlua) to use a central interface file, and then have specific customizations for each one as necessary? <!-- github-comment-id:205780255 -->
Author
Owner

I think modpython is the only one that is really up to date!

Yes, more or less.
Modperl is missing several features, mostly because SWIG doesn't support Perl as well as Python, and I didn't bother implementing it (or adding workarounds) especially for ZNC.
Modtcl doesn't even use SWIG, and therefore it exposes very small subset of API, which is enough only for several basic eggdrop scripts.

do you think we could standardize modpython/modperl/modtcl (and in the future, modlua)

Another idea for this: #173

to use a central interface file, and then have specific customizations for each one

If that helps, why not. Mostly they contain language-specific typemaps, but there are a few common pieces. Some of such pieces can be useful to C++ modules too.

> I think modpython is the only one that is really up to date! Yes, more or less. Modperl is missing several features, mostly because SWIG doesn't support Perl as well as Python, and I didn't bother implementing it (or adding workarounds) especially for ZNC. Modtcl doesn't even use SWIG, and therefore it exposes very small subset of API, which is enough only for several basic eggdrop scripts. > do you think we could standardize modpython/modperl/modtcl (and in the future, modlua) Another idea for this: #173 > to use a central interface file, and then have specific customizations for each one If that helps, why not. Mostly they contain language-specific typemaps, but there are a few common pieces. Some of such pieces can be useful to C++ modules too. <!-- github-comment-id:205982331 -->
Author
Owner

Have there been any updates on this? Has anyone tried to implement this? I'd like to give it a try.

Have there been any updates on this? Has anyone tried to implement this? I'd like to give it a try. <!-- github-comment-id:612465209 -->
Author
Owner

@leonardus Feel free to do so. I would expect any updates to be posting here, so I guess: Nope, no updates.

@leonardus Feel free to do so. I would expect any updates to be posting here, so I guess: Nope, no updates. <!-- github-comment-id:612466135 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#694