What in the Daft Punk is going on with the Rust XML parsers?
@olafurw I will wait for better-xml to come out.

@olafurw Somebody heard a Daft Punk song and tried to make it into XML parsers?

Harder, better, faster, stronger. Just missing better-xml here.

@olafurw a couple were probably made with regular expressions and then they found out

@olafurw the thing is that those language wide repositories need some kind of moderation. Otherwise their namespaces get clogged real fast.

Unless the language is not that popular.

@Bogado @olafurw Interestingly that didn't happen with python's pypi. At least not to the same extend of crates.io and npm.

But then again python has a very comprehensive standard library, so you don't need third party libraries for a lot of things.

@freundTech @olafurw didn't pypy have closed its web search feature due to too many bots?

I feel that python already had a good set of basic additional libraries when the explosion of usage happened. That means that this might be happening within the less known packages.

@olafurw “our work is never over” when you have to keep up with changing Rust crates
@olafurw parse it better (faster, stronger) 🎶
@olafurw It's starting to look like a maven repository.

@olafurw they probably be thinking "work is never over".

Poor folks.

@olafurw let's create one-xml to rule them all, one-xml to find them, one-xml to bring them all, and in the compiler bind them.
@olafurw supercalifragilisticexpialidocious-xml is not yet taken! Brb.
@olafurw my library will be called copy-of-copy-of-xml-final-final(2)
@olafurw not shown: instant-xml 😅
@olafurw they be at the olympics
@olafurw there is still room for better-xml!

@olafurw This is a late reply, but I think I can give a bit more context to this… since I started writing "yolo-xml" a while back 

The gist is that writing a spec-compliant XML parser that you can use safely on untrusted data is ANNOYING. Note that I didn't write 'hard', but you basically need a recursive coroutine with safety limits to do this. Ideally it should also opt-in-support includes, and accurate streaming, because indefinite streamed XML documents are a thing.

@olafurw

What this leads to is that (when I last checked) *not one* of those XML implementations is remotely general or even to spec.

Most will accept invalid XML documents without observable notice (which is somewhat okay, the spec does say you can skip validation iirc and you would need heap allocations to do it when parsing a `Read`), none support XML streaming iirc, support for includes and XML entities is spotty, and many don't actually implement XML but a specific serialisation scheme.

@olafurw

Overall this creates a major headache if you want to implement something like XMPP in Rust (outside of Websocket mode) since that:

- is untrusted data,
- streaming XML,
- does use namespaces (kinda¹),
- *negotiates encryption by aborting an open streaming document and reusing the underlying byte stream*².

¹ I'm pretty sure most implementations take a shortcut there.
² which means the streaming parser mustn't over-consume (valid XML) while yielding XML events

@Tamschi neat, thanks :D

@olafurw I wouldn't say it's a bad format for all applications, e.g. *in theory* it would allow creating data processing adapters and workflows through a graphical interface, and makes formal validation of partial systems easier.
A binary (and less annoying) form of streaming XML is now in use in car chargers, which is very sensible.

However, I feel like it is a format that lends itself mainly to formally specified work expected to be partially in flux for decades as e.g. an industry evolves.

Shafik Yaghmour (@[email protected])

@[email protected] Life is not fair sometimes 🧐 Is there also a trie-harder and trie-harder-with-a-vengence 🤔

Hachyderm.io
@olafurw XML is so complicated they made Quantum XML, these are just the dispositions of the core components. Hard is up, strong is down, fast is charm, easy is strange.
@olafurw "sexy-xml" coming soon