News for hackers. Stuff that matters.
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