fiatjaf's avatar
fiatjaf
_@fiatjaf.com
npub180cv...h6w6
boa idéia, já que eu também tinha pensado
fiatjaf's avatar
fiatjaf 2 years ago
https://utcc.utoronto.ca/~cks/space/blog/programming/ParsingWikitext "I have a confession: I don't know how to parse WikiText." "unlike a traditional language, wikitext doesn't have any errors. In a traditional parser, a parse production either succeeds or results in an error. In wikitext, there are no errors and something like an incomplete external link is simply raw text; '[[some text' is not an error, it is '[[some text'." "the proper meaning of a lot of wikitext is highly context dependent"
fiatjaf's avatar
fiatjaf 2 years ago
How great is wikitext, by the authors of wtf_wikipedia: Ok first, 🛀 Wikitext is no small thing. Consider: - the partial-implementation of inline-css, - nested elements do not honour the scope of other elements - the language has no errors - deep recursion of similar-syntax templates - the egyptian hieroglyphics syntax - 'Birth_date_and_age' vs 'Birth-date_and_age' - the unexplained hashing scheme for image paths - the custom encoding of whitespace and punctuation - right-to-left values in left-to-right templates - PEG-based parsers struggle with wikitext's backtracking/lookarounds - there are 634,755 templates in en-wikipedia (as of Nov-2018) - there are a large number of pages that don't render properly on wikipedia, or its apps.. this library supports many recursive shenanigans, depreciated and obscure template variants, and illicit wiki-shorthands. image
fiatjaf's avatar
fiatjaf 2 years ago
Names of the best wikitext parser libraries in the wild: - wtf_wikipedia - mwparserfromhell
fiatjaf's avatar
fiatjaf 2 years ago
The official Wikipedia parser for wikitext was written in JavaScript/Node.js and then ported to PHP 7 years later. So weird. image
fiatjaf's avatar
fiatjaf 2 years ago
ICQ is shutting down. Another one that lost to Nostr.
fiatjaf's avatar
fiatjaf 2 years ago
What if instead of follower counts client displayed a "followed by <names of known people>" section? image
↑