Nick Gammon said: Now when you start talking about adding the V8 Javascript engine I think you are straying from not modifying its behaviour
Well, I'm not adding V8. I'm refactoring the code so it will be possible to add V8 (among other things).
Nick Gammon said: Apart from mentioning Javascript you haven't suggested a major change that you want to make, that the un-refactored code makes impossible or
difficult.
Here's two bullets from your own list of things-that-could-be-improved:
Nick Gammon said: *Functions that affect internal notepads should really be based on a Notepad object (not the world object).
*There should be a Miniwindows object, so you can easily manipulate them. Ditto for hotspots.
Script-wise, these things are possible if we define a new interface. One that still uses Lua, yes, but one with a "thicker" layer of glue. And since it's implemented separately, plugins that use the older interface aren't affected.
Nick Gammon said: But if you are going to improve it, all this should really be fixed up, big time. But then it absolutely won't be backwards compatible, as you can imagine. Scripts would need to be rewritten, all of them.
I've acknowledged above that the scripting interface is a mess, in many ways. But to fix it would render existing scripts (and all - or most of - the examples on this web site) unusable. Maybe you can see a benefit in that. I can't really. Not now.
That won't be necessary. The script engine interface is the lynchpin between scripts and MUSHclient. By allowing new interfaces to be defined separately from the old ones, old scripts need not be updated. It's another form of versioning.
Nick Gammon said:Truly, my advice is, if you think the code is a mess, and the scripting interface is a mess, and miniwindows could be improved to suit the graphical API you are talking about then start again. Honestly. And I don't mean that in a rejecting way. I proposed starting again myself ...
http://www.gammon.com.au/forum/?id=8132
It could be done so much better if you start from scratch. Ask the Mudlet guys, they wrote a client recently.
I tried Mudlet, and I didn't really like it. Personal preference, I suppose.
I want to work on Aspect, but I fear that I don't have enough experience in the client field in general. MUSHclient is an already working codebase. I've mentioned this before, but since I'm learning from it, I wanted to give back to it too.
Nick Gammon said:Actually, speaking of them, I got an email from one of their developers who I hope won't mind being quoted here ...
Heiko Koehn said: I think it's time to say thank you for your valued pieces of advice that you gave us.
The most important one for me clearly was your advice to stick to Lua as the only scripting language for the time being and focus on providing the best possible integration into the client instead of wasting time and resources on support for multiple other scripting languages.
At the time I wanted to integrate at least 2 or three more scripting languages from the ground up, but I thought that your 15 or so years of MUD client programming experience should be reason enough to follow your suggestion and I'm very glad I did this today, because I wouldn't have been able to finish the project otherwise.
I want you to sit and read that four or five times and digest what he said. Read the bit about "not being able to finish the project" if he tried to integrate lots of scripting languages - something you propose. Read the bit about "wasting time and resources on support for multiple other scripting languages".
No, see, I agree. One language makes much more sense. I'm just working with what we have here, and trying to make it better. Expanding the interface support will allow us to craft a newer Lua interface without breaking older scripts, as I described earlier. (Among other things. I don't expect you to include a V8 interface, but I'd write it into my version of the source just because that's awesome.)
Nick Gammon said: I suggested a couple of years ago writing another client which used Lua only and was shouted down. Well, Mudlet did that and are thankful they did.
Hence why I'm working with what we've got, rather than angering your valued user base. :)
Nick Gammon said: So what I am saying is, and what he said is, that changes to the scripting engine to support multiple languages would be wasting time and resources. I can't make it much clearer than that. I'm not saying it can't be done. Maybe someone would use it one day. Whether it is a good use of time is what is debatable.
Fact is, it already supports multiple languages. It's also very rigid, and there are a lot of things that a newer Lua interface can offer that plugin authors would love.
Yes, I'm settling on an updated Lua interface as my "end goal", following these refactorings. I think it's a worthy goal, don't you?
As always, thanks for your honest feedback, Nick. |