I started to do some work on custom tags and it appears that the custom tags are using a single instance(not verified) i.e. nestled custom tags of the same type will modify each other.
I didn't verify this because after going through the custom tag code I got to thinking about a couple of scenarios.
2. What if a user wants the Learn tag to function like Pandorabots Learn tag.
3. What if a user has 2 dll's that specify the same tags and wants to use some from one and some from another.
What I did was make a small class called TaghandlerList (50ish lines) and gave the bot a property Taghandlers which is a TaghandlerList the changes were very minimal and all in bot.cs (other than the new class)
This list holds all the taghandlers for the bot including the builtin ones and any handler can be loaded or unloaded and the above 3 scenarios are satisfied, it also calls the default constructor on the custom tags.
If you have any interest in this let me know, although it's vb.net code.
Does mono have generics? because I was thinking that the hashtables and arraylists should be their generic cousins for performance.
Firstly, to re-iterate what I wrote in a previous response - I really do appreciate the effort you are taking reporting bugs, re-factoring the custom-tags and so on.
Now on to your points...
Yes, custom tags are currently single instances stored in a hash. Like all new "features" I wanted to try something basic to see if the idea would work - and I think it does. I hope you agree.
Ditto with regard to the scenarios you list - I've been thinking hard about an open-source version three and one of the first "architectural" decisions I've made is that I want to make the bot more "loose" than it already is by always implementing things like normalisation, substitutions and tag handlers as "snap-ins" in a similar way to custom tags.
There are all sorts of good reasons for doing this:
1. The code is better organised into discrete areas rather than being one large (56k?!) dll.
2. The bot starts to become easier to maintain and third party developers are able to see conventions upon which to base their own customisations.
3. The AIML "standard" can be overridden (as you illustrated in your post)
4. Developers and users only need to load what they require.
5. Internationalisation will be easier - normalisation and substitution will have to be different for Chinese speaking bots for example (I have already been contacted by a developer in China who wants to help with this)
6. Administration of the bot becomes a lot more flexible and finely grained (what snap-ins to use, in what order normalisation processes occur, what substitutions to use and other stuff) and can be controlled with a simple XML configuration file.
Now, I've not started working on these features yet because I'm up to my eyes in work and other stuff - but work will start soon.
With regard to Mono - yes, it does support generics and that is also something else I was going to change. I was holding back though because 1.1 is still widely used and I didn't want to deviate too far away from it for the sake of developers who still wanted to use my code. However, with the release of Vista this changes everything - I hope to have generics in very soon.
A time-line for all this? I hope to have an open-source version three ready for final release by the summer.
I must also be completely honest and open and make it clear that I am planning to use the bot as the basis for commercial software I want to release (I'm currently writing an AIML editor and planning a "server" wrapper around the dll).
Nevertheless, AIMLBot will always be developed under an open-source license because there is a growing community of users and developers who provide great feedback that is to the mutual benefit of all. For this I am very grateful.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.