Earlier quoted context omitted.
> Ada is a WHATWG-compliant and fast URL parser written in modern C++ Why would you do that, Daniel?
Ada developer here, Ada is the name of my daughter, and this project is my gift to her, to remember me.
Parsing URLs in Python
81–90 of 99 posts
Re: Parsing URLs in Python
#82Okay so some googling found me that the "xn--" means the rest of the hostname will be unicode, but why does é become -fsa in www.xn--googl-fsa.com. Google failed on the second part.
In case anyone else is confused as to why the domain in the example provided needs to be unicode (compared to the filename which is obvious): it's because the hyphen is the shorter '‑' char, which is extended ASCII 226 not the standard '-' (which would be ASCII 45).
Re: Parsing URLs in Python
#83This is intriguing to me for the performance and correctness reasons, but also if it makes the result more dev friendly than the urllib.parse tiple-ish-object result thing.
Re: Parsing URLs in Python
#84Earlier quoted context omitted.
httpx is great, and "needs to be in base"
No it doesn’t, absolutely not. It’s ironic that you say this after the post you’re commenting on spells out quite explicitly why things “in base” are hard to change and adapt.
Re: Parsing URLs in Python
#85Okay so some googling found me that the "xn--" means the rest of the hostname will be unicode, but why does é become -fsa in www.xn--googl-fsa.com. Google failed on the second part.
In this case, Gemini correctly points to Punycode
Re: Parsing URLs in Python
#86Nice. I'll also throw in that I've recently wrote bindings to Mozilla's servo URL library. Those live at https://github.com/crate-py/url They're not complete yet (meaning only the parsing bits are exposed, not URL modification) but I too was frustrated with the state of URL parsing.
https://github.com/servo/rust-url/issues/864#issuecomment-16...
Re: Parsing URLs in Python
#87Re: Parsing URLs in Python
#88Pretty urls are the most unnecessary thing that was invented, they don't provide anything that non pretty urls can't provide and millions of parsers have to process them on every request. What a waste.
Re: Parsing URLs in Python
#89Earlier quoted context omitted.
It is mindboggling to me how often developers create project names without even trying to search for precedent names in their own domain/industry . Calling this Ada is just ridiculous.
Ada developer here. Ada URL parser is named after my daughter Ada. We chose this name in particular as a reference to Ada Lovelace.
Just like the ~20 other projects named Ada.
Re: Parsing URLs in Python
#90- resolving "../" may have security implications - unicode hostname seems more readable. To get punycode, one can call .encode("idna") if necessary.
How often parsing urls is a performance bottleneck?