4 ms·
It's interesting to think about how complex the wikipedia text is compared to something like github flavored markdown or even standard html tables (although I g
by firasd 8mo ago
It's interesting to think about how complex the wikipedia text is compared to something like github flavored markdown or even standard html tables (although I guess it eventually renders into standard html so it's not more complex than the latter when all other html elements are considered in addition to <table>)
For example the swatch internet time infobox is dynamically updated
{{short description|Alternate time system by watch maker Swatch}}
{{Infobox
| image = [[File:Swatch beat Logo.svg|200px|alt=Logo of Swatch Internet Time]]
| caption = Logo of Swatch Internet Time
| title = Time{{efn|at page generation }} {{purge|(update to view correct time)}}
| label1 = 24-hour time (UTC)
| data1 = {{nowrap|{{#time:H:i:s}}}}
| label2 = 24-hour time (CET)
| data2 = {{Time|CET|dst=no|df-cust=H:i:s|hide-refresh=yes}}
| label3 = .beat time (BMT)
| data3 = {{nowrap|@{{#expr: floor( {{#expr:{{#expr:{{#expr:{{#time:H|now + 1 hour}}3600}}+{{#expr:{{#time:i}}60}}+{{#time:s}}}}/86.4}} )}}}}
}}
- stogot 8mo agoI’ve spent countless hours at employers fixing Xwiki syntax errors mixed with HTML. The parsing engine must be complex
- decimalenough 8mo agoThat's putting it lightly, since Mediawiki templates are Turing-complete. I'm not up to speed on my parsers anymore, but I believe Parsoid remains the most complete implementation, while mwlib is a reasonable compromise. https://www.mediawiki.org/wiki/Alternative_parsers#Known_implementations https://www.mediawiki.org/wiki/Alternative_parsers#Known_imp...
- bawolff 8mo agoI always found it ironic that the table syntax is designed to resemble ascii-art type tables, and then literally nobody writes it in a way that looks like an ascii art table.
- notpushkin 8mo agoYeah, because it’s a PITA to align everything by hand. But the spaces around | make it easier to read, than, say, CSV.
- fao_ 8mo agoHonestly it continually surprises me how people forget about TSV It's the perfect format, more or less! CSV, but no difficulty around commas, and the only major risk being an editor that converts tabs to spaces
- hmry 8mo agoI agree it's great, but that risk is so major that I stopped using it. "There's a 50% chance that your editor will invisibly corrupt the data you enter, and another 30% chance to corrupt the entire file" is just not usable... Especially in Zed where the only way to switch hard tabs is buried in the settings menu, and impossible to change per buffer.
- yellowapple 8mo agoYou'd think more editors would be smart enough to recognize that it's a TSV file and therefore should preserve the tabs, in much the same way that you'd think editors would be smart enough to recognize that something's a Makefile and therefore should preserve the tabs.
- notpushkin 8mo agoIt gets tricky when you have a TSV inside Markdown. I don’t think I’ve ever seen tabs used for indentation in Markdown in the wild, though it probably does work. We could, however, make the Tab key insert spaces if the cursor is in the beginning of a line, and a literal \t if it’s in the middle. This way, you can write a TSV table pretty much anywhere you want.
- rf15 8mo ago
- popalchemist 8mo agoIt's basically wordpress era PHP templating.
- sph 8mo agoDay 1: we’ll adopt a simple markup language because our users are not programmers Day 2: our users have complicated needs so we’ll basically reinvent Lisp expressions, but worse. Day N: whatever this markup language is —— I’ve seen this happen so many times it’s not even funny anymore. Well, at least it’s not YAML.
- Inityx 8mo ago> so we’ll basically reinvent Lisp expressions, but worse https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
- bawolff 8mo agoIronically it wasn't even intentional. Wikipedia users discovered a way to create an if statement by themselves, originally there was no conditionals. Anyways, now a days you can use lua, so most of the wikisyntax is just glue code calling a lua program