Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Lua ➜ Stand-alone Lua modules from MUSHclient

Stand-alone Lua modules from MUSHclient

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Thu 05 Jun 2008 12:56 AM (UTC)

Amended on Thu 05 Jun 2008 08:21 AM (UTC) by Nick Gammon

Message
I have had a query about whether the Lua modules utils, bc, and bit can be made available outside MUSHclient.


  • The bc (big number) library is available here (51 Kb):

    http://www.gammon.com.au/files/mushclient/lua5.1_extras/bc.zip

    That was the original library developed by Luiz Henrique de Figueiredo from the Lua developers. I simply turned it into a DLL, and then later incorporated it into MUSHclient.

  • The bit library was based on bitlib by Reuben Thomas, see:

    http://luaforge.net/frs/?group_id=224

    Specifically Release 20:

    http://luaforge.net/frs/download.php/2075/bitlib.zip (2 Kb)

    Later versions seem to have taken a big jump in file size, however the small one is the one used in MUSHclient.

  • The utils library is a concoction of various useful things I developed, or adapted from other sources. Since the source for MUSHclient is publicly available, you could download that and find the relevant parts.

    The source is available at: http://www.binarygoblins.com/mushclient/bzr/

    A slightly earlier version is here: http://www.gammon.com.au/files/mushclient/src/mushclient_4.13_src.zip

    I don't think the Lua functions have changed much since then.

    Specifically, the file lua_compress.c implements: compress, decompress, hash, sha256, md5, tohex, fromhex, base64encode, base64decode, readdir, and split.

    The file lua_utils.cpp implements: msgbox, umsgbox, inputbox, editbox, choose, listbox, multilistbox, xmlread, functionlist, filepicker, metaphone, info, spellcheckdialog, edit_distance, utf8encode, utf8decode, utf8valid, utf8sub, appendtonotepad, and activatenotepad.

    Some of those utilities require some of the other files in the MUSHclient source, you would need to try them to see what is required.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Terry   USA  (87 posts)  Bio
Date Reply #1 on Fri 20 Jun 2008 12:12 AM (UTC)
Message
This might be exactly what you're talking about, and if it is, I apologize! Anyway, is there a way of getting the MUSHclient Lua interpreter to run outside of MUSHclient? I realize it'd have to open up a telnet screen or something to work right, and it couldn't do things like Send() etc, but it's just the MC Lua seems so much more powerful than the normal Lua codebase. Maybe it's just what I'm used to, but either way, would it be possible?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Fri 20 Jun 2008 05:21 AM (UTC)
Message
Well you can run stand-alone Lua all right, but that is the same as the one you get from www.lua.org.

Yes, it runs in a command window. There is a version available from this site, it is much the same as the precompiled one at:

http://luabinaries.luaforge.net/download.html

As for the "extra features" quite a few of those are available from LuaForge:

http://luaforge.net/

For example, the bit library, hashing and other such things are released as Lua modules. Also LuaSocket, LuaSQL and so on.

Is there a specific feature you particularly wanted? Effectively MUSHclient's Lua is standard Lua with extra libraries built in, basically to support some of the things people wanted to do (like read directories, pop up dialog boxes, etc.).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,992 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.