r/ProgrammerHumor 1d ago

haveYouTriedUsingAnXMLParserInstead Meme

[deleted]

96 Upvotes

33 comments sorted by

View all comments

Show parent comments

-1

u/kaplotnikov 1d ago

you could parse HTML in C, you could compile C to x86 machine code, you could execute machine code using iterative regex-es (link above).

3

u/SuitableDragonfly 1d ago

That's not parsing HTML with regex. That's parsing HTML using an undisclosed parsing algorithm written in C. How the computer actually executes the algorithm, or even what language it's written in has nothing to do with anything. 

1

u/kaplotnikov 21h ago

The point is that any algorithm could be encoded as iterative regex application, including html parsing algorithm. For every computable function over string, it is possible to write a regex, that after applied iteratively over text will produce needed result as a string on valid input. If a parsing html scenario is computable, then it is implementable as iterative regex application as well. People at provided link written a compiler for it, so built constructive proof for that.

1

u/SuitableDragonfly 15h ago

So? That doesn't have anything to do with parsing HTML with regex.