MXP enhancements, was PR #4200

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: MXP enhancements, was PR #4200

Post by freshman »

I know have split up and resubmitted all parts of the original PR. Most of them, all really important ones, have already been merged to the development tree, two I just uploaded for review. From my point of view, even the currently merged PRs are already a great improvement, as this now makes Mudlet a great client to use for MXP. Thank you for that.

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: MXP enhancements, was PR #4200

Post by freshman »

Hmm, I thought a bit about it, and regarding MXP default entities, I now have a version which makes this Mudlet screen (a current PTB)
broken.png
become this one
perfect.png
.

Unfortunately, I also had to extend the internal Entity handling prototypes a bit, since I need the full UTF code for default entities in TBuffer, but custom entities need to go through the Charset interpretation, I need to restrain recursive entity interpolation to avoid endless loops and stuff..

I'm sure there'll be a bunch of questions about this, I already extended the MXP tests. I'll probably do a bit more testing, maybe polishing one or the other thing, but maybe s.o. wants to see what I did and comment? You can see it at https://github.com/eowmob/Mudlet/tree/W ... XPEntities.

After I did a bit more testing, what do you suggest? Make a PR already or you'll make a prereview on what I need to change or where are I have to completely change the approach.

Just gimme a hint how to proceed.

Tamarindo
Posts: 10
Joined: Sat Jul 28, 2018 10:53 pm

Re: MXP enhancements, was PR #4200

Post by Tamarindo »

Looks improved to me! Nice work. Suggest a PR to get it in the hopper as quick as you can.

User avatar
SlySven
Posts: 1025
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: MXP enhancements, was PR #4200

Post by SlySven »

One thing to watch out for is that the editor in the Qt IDE QtCreator eats some special characters (like non-breaking spaces, which it shows differently but then converts them to normal spaces on saving) in files that it opens and that can mess them up if you have them as raw strings in C++ source code files and anyone subsequently opens the file (in say: `test/TEntityHandler.cpp`)... I've reported this in the past QTCREATORBUG-22052 but it is not clear that it has been fixed... :cry:

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: MXP enhancements, was PR #4200

Post by freshman »

Well, that's a good point. Now, for now, I just added the chars missing compared to other clients and mimicked what I found in the source. For people of my age anything non US-Ascii in a source file is very suspicious. I was surprised it 'somehow' worked out. I'd have no problem putting the actual codepoints in hex into the source, while a bit more work, I'd sleep better.

Now, in the meantime, I did some additional stresstest of my code, using wrong or at least ambiguous entity definitions and it worked quite well, I also made comparisons with other generally good MXP clients (mushclient, cmud), which performed worse in all corner cases. Cmud BTW can reliable be crashed with recursive definitions like <!EN "entity" "&entity;"> (maybe I'll report it to them). Only a Javascript MXP client I once wrote for mudportal handled 'cascaded' entity definitions a tiny bit better, but miserable failed others of my checks.

I guess I'll make a PR soon, so you can decide about it. Mangling this into TBuffer was indeed not so simple and straightforward.

Post Reply