Nick Gammon said:
This is what troubles me ...
My experience bar plugin is 151 lines, and the ATCP plugin I wrote is 204 lines. The ATCP plugin can be shared between the experience bar, the health bar and the mapper.
You want me to replace the ATCP plugin with a downloaded zip file which contains 8 files and 4 folders. The files are:
[...]
Total for getting ATCP functionality: 1,201 lines.
Line count is an absolutely awful way to go about it. I value structure above and beyond mere brevity. You also list parser.lua, which I removed in this last release.
(EDIT: Also note that the majority of my plugin is dedicated to the PPI-based interface, which is mere fluff on the core functionality. The PPI-based interface makes it a lot easier (and perhaps even more fun) to work with ATCP.)
Nick Gammon said: Then I have to work out how it all works. And I gather with the PPI stuff I then have to "register" the desire to receive messages (my method just uses BroadcastPlugin).
I admit I haven't gotten my documentation up to scratch yet, but I always point to roomname.plugin as an example of how to use the interface. You do have to register for specific messages, but it's no different from, say, registering event handlers with Javascript. (That might be a bad example, I don't know, but it's not an uncommon technique)
Nick Gammon said: Your system may be great for a more complex environment, but I want to be able to just get up a health bar or experience bar without all this fiddling around. And have the files available right here (or on GitHub which I control).
What fiddling around? I think setting up your own ATCP interface is more work than adding another plugin and using an API that's already been shown to work in general. I think the biggest issue is understanding the "structured plugin" format. You're right: it's a zip file. It's structured internally to allow for easily breaking up your own plugin into manageable components, and bundling resources and third-party libraries to make it a single unit. (Just like compiling sqlite3, zlib, png, etc. into .libs and linking them statically into the MUSHclient executable.) It takes a little getting used to on the development side, but it maintains the one-download aspect of normal XML plugins while making it way easier on the developer to include and manage other files required for the plugin to work.
Nick Gammon said: Actually after discussing with their programmer, you can send more than one, and it respects the *last* one - I think you gave the impression before that only the first one counted.
I admit the details are fuzzy - the server's treatment of 'hello' isn't explained in the spec - but in the end it's the same: you have to unify the 'hello' messages in the end, or all the previous ones won't count.
Nick Gammon said: I explained about the multiple plugin problem and they are happy to remove that restriction, and allow the "hello" messages to be cumulative.
Whether the unification occurs client-side or server-side doesn't matter, so I'm very happy about this. Assuming I can send multiple 'hello's, and each one can enable new modules ones while maintaining the status of the previous ones, that's fantastic. A way to -disable- messages would be great too, but...
Nick Gammon said:The whole thing about "if you install my plugin, then your plugin won't work" goes against the grain of the design of plugins ( http://www.gammon.com.au/plugins/) where they are supposed to be "self-contained" things that don't require a lot of cross-plugin functionality to work.
This plugin has existed in various forms for a long time. It was a very iterative development, and before the changes to telnet subnegotiations in MUSHclient, some of them leaked through (as I mentioned with Char.Vitals). It was essential to strip the ATCP data out to guarantee that the data wouldn't show up on-screen. Nowadays you've fixed that particular issue.
On a note of personal ideology, I think you're being a little narrow-minded about plugins. What you envisioned plugins to be doesn't matter, it's how plugins are actually used that matters. (Look at the many uses of WD-40 for a good analogy.) Obviously, plugins that are standalone tend to be better, because it's a single download to get it working. But that's no reason to say that they can't or shouldn't work closely with other plugins, because you can do some really cool things that way.
Nick Gammon said: I admit I have moved the ATCP functionality to a second plugin myself, but it is designed in such a way that it should not interfere with other plugins - apart from the IRE problem with only one "hello" message which I only heard about this week, and am on the way to solving.
Again, my ATCP plugin was developed iteratively over a long, long period, and I'm only the most recent of its maintainers. I'm very glad that I can now remove (and have removed) the blocking behavior of the ATCP data. Once the 'hello' message has been solved, the ATCP plugin very well may not be needed anymore... though I'd still be glad to maintain an auxiliary library for ATCP to make it easier, that you can stick in a structured plugin. ;) |