News for hackers. Stuff that matters.
Re:Wikipedia's in Trouble (2019) by kayodelycaon on Friday December 04, 2020 @09:07AM (#25302328)
I think this article shoots itself in the foot by suggesting markdown.

Wikipedia predates markdown by several years. The only truly “universal” markup language I know of at the time was bbcode.

Even if markdown has been designed, it’s lacking support for templates and tables that wikis make heavy use of.

Every wiki software I’ve used has had a custom language for one reason or another. Usually good reasons.

Re:Wikipedia's in Trouble (2019) by burnte on Friday December 04, 2020 @09:47AM (#25302760)
And also that it says that WikiPedia articles are in an impenetrable, UNPARSABLE format that you can't run scripts against. This is absurd. If it's unparsable, how does Mediawiki manage? because it IS parsable! oh my, in order to work with the content you need to either use the MW parser or write your own. Well, literally everything is like that. just because there aren't 5 different MW parser engines out there doesn't mean it's unparsable.

I stopped reading the article early on.

Re:Wikipedia's in Trouble (2019) by detaro on Friday December 04, 2020 @09:51AM (#25302810)
Mediawiki manages by having defined "whatever our code does is how it is", and when they needed a second parser for their new WYSIWG editor (because the one in the main Mediawiki code base isn't really usable for other purposes) it added a lot of extra effort and pain. So no, it's not literally "impossible", but a large hurdle to working with it. When I had to deal with mediawiki markup I built all kinds of really ugly tricks that fed markup snippets into a mediawiki instance, parsed the HTML, adjusted the snippets based on that, repeat...
Re:Wikipedia's in Trouble (2019) by dredmorbius on Friday December 04, 2020 @01:25PM (#25305837)
Re:Wikipedia's in Trouble (2019) by jwilk on Friday December 04, 2020 @03:30PM (#25307421)
What's POMLIWIR?
Re:Wikipedia's in Trouble (2019) by dredmorbius on Friday December 04, 2020 @03:36PM (#25307532)
The purpose of a markup language is what it renders.
Re:Wikipedia's in Trouble (2019) by ChrisLomont on Friday December 04, 2020 @01:14PM (#25305711)
You can have unparseable structures that are built upon using special, one time hacks for various cases and things you want out.

"Parsing ... is the process of analyzing a string of symbols ... conforming to a formal grammar." [1]

Wikipedia content is most definitely not a formal grammar in any usable meaning of the terms. This is why it's a nightmare to work with, and why it's not parseable using the correct meaning of parseable.

[1] https://en.wikipedia.org/wiki/Parsing

Re:Wikipedia's in Trouble (2019) by karmakaze on Friday December 04, 2020 @10:29AM (#25303320)
If there's no grammar for the content that it accepts, I would consider this to be a failing, not fatal but certainly a good point being made.
Re:Wikipedia's in Trouble (2019) by msla on Friday December 04, 2020 @11:17AM (#25304000)
The problem isn't a lack of grammar, the problem is not having a grammar factored out of one specific codebase which implements the grammar, such that you can't be sure the existing code is doing the right thing except from the trivial standpoint of "this code is defined to be correct" which doesn't provide much of a basis for discussion.
Re:Wikipedia's in Trouble (2019) by anoncake on Friday December 04, 2020 @10:07AM (#25303011)
It's imparsable in a similar way to TeX and Perl: There is a program that can process it, good luck creating another.
Re:Wikipedia's in Trouble (2019) by bawolff on Friday December 04, 2020 @03:25PM (#25307342)
There are two official parsers (original mw, and parsoid, with parsoid being much more of a "real" parser), so people did create another.
Re:Wikipedia's in Trouble (2019) by sllabres on Friday December 04, 2020 @03:45PM (#25307666)
not a bad example nevertheless, but as we are talking about grammar

https://github.com/Perl/perl5/blob/blead/perly.y

Re:Wikipedia's in Trouble (2019) by tinus_hn on Friday December 04, 2020 @10:05AM (#25302990)
If you conform to the limitations imposed by markdown Mediawiki syntax is trivially parseable.

The hard part is in things that are impossible in markdown.

Re:Wikipedia's in Trouble (2019) by SmokeyHamster on Friday December 04, 2020 @11:54AM (#25304603)
Markdown has supported tables for a very long time...

https://riptutorial.com/markdown/example/1741/creating-a-tab...

Re:Wikipedia's in Trouble (2019) by kayodelycaon on Friday December 04, 2020 @12:04PM (#25304782)
Tables were not part of the original spec and are not standardized across all implementations that support them.

Once you start extending markdown to support all of the features Wikimedia supports, you end up with the same problem.

If mediawiki syntax was as feature-limited as markdown, it would be equally trivial to parse.

Re:Wikipedia's in Trouble (2019) by blindm on Friday December 04, 2020 @10:30AM (#25303326)
> Even if markdown has been designed, it’s lacking support for templates and tables that wikis make heavy use of

Yeah it would be cool if you could 'inject' arbitrary HTML into markdown to make up for its lack of support for tables

Re:Wikipedia's in Trouble (2019) by biryani_chicken on Friday December 04, 2020 @11:24AM (#25304121)
Skip the middleman and just use html directly.
Re:Wikipedia's in Trouble (2019) by blindm on Friday December 04, 2020 @11:33AM (#25304262)
I always liked the Ghost[0] editor, where you write your blogpost with markdown, and then for more trickier stuff, you could add HTML and it would still render beautifully. More of this please!

[0] https://en.wikipedia.org/wiki/Ghost_(blogging_platform)

Re:Wikipedia's in Trouble (2019) by petre on Saturday December 05, 2020 @03:11AM (#25312778)
Ghost ditched Markdown long ago. Now it uses some JSON based markup which is awful.
Re:Wikipedia's in Trouble (2019) by kayodelycaon on Friday December 04, 2020 @10:48AM (#25303609)
If arbitrary html was so great an idea, it would be used a lot more.