Would it be possible to change Mudlet's behavior of trampling LuaGlobal.lua to recreating it if it doesn't exist? (Or more fancy, wrapping the dofile in a pcall and trample if it errors, and moving the file to a .bak extension)
There's a lot of stuff in there that I was going to rewrite; functions that can be more elegant (RGB2Hex, indent), and others that are just wrong (the unnecessary PadHex, table.pickle, saveVars). It makes debugging the code difficult since it gets overwritten every startup.
Also, needing to recompile an exe to update a script seems like it's defeating the main advantage of having a scripting engine: easily modifiable source code.
Debugging LuaGlobal.lua
Re: Debugging LuaGlobal.lua
Yes, so simply copy/paste LuaGlobal.lua contents into a Mudlet script. Since scripts are read and run after LuaGlobal is, you can easily work with it this way.
(and if you don't like Mudlets editor, well, dofile a call to your own)
(and if you don't like Mudlets editor, well, dofile a call to your own)
Re: Debugging LuaGlobal.lua
By the way, LuaGlobal is maintained here: http://github.com/babelfish/mudlet-lua/ so if you use git+github, feel free to send the patches in if you'd like.
Re: Debugging LuaGlobal.lua
Why is there a separate repository for a file that's included in the mudlet/mudlet repo on sourceforge??
Re: Debugging LuaGlobal.lua
because babelfish maintains it, and then gives a copy to heiko in update time.
Re: Debugging LuaGlobal.lua
That's what git and branching are for.
Re: Debugging LuaGlobal.lua
The git for the application doesn't even get updated regularly, Heiko hasn't pushed anything since the 1.1.1 release. I don't really understand why, I like to be able to get the latest sources and compile it myself. :/
Re: Debugging LuaGlobal.lua
Yes, I've complained about this myself.Denarii wrote:The git for the application doesn't even get updated regularly, Heiko hasn't pushed anything since the 1.1.1 release. I don't really understand why, I like to be able to get the latest sources and compile it myself. :/