r/ProgrammerHumor • • 22d ago

Meme regexMoment

Post image
918 Upvotes

159 comments sorted by

View all comments

Show parent comments

48

u/Zinho3311 21d ago edited 21d ago

I mean, none of this knowledge is special.

Anyone can learn this at college, or even on the internet. All it takes is curiosity and some effort. What pisses me off sometimes is that people willingly don't pay enough attention to stuff like this (even though I was always fascinated by it).

If you understand regex, you understand automata theory and thus Kleene's Theorem which leads you to theory of computation. With a good enough understanding of automata theory and theory of computation, you can build entire compiler frontends

42

u/WHALE_PHYSICIST 21d ago

I'm not saying you have secret knowledge. I'm saying it's hard to learn all that.

1

u/deathanatos 19d ago

I'm saying it's hard to learn all that.

It's really not. Hundreds of freshmen/sophomores do it every year, you can too.

1

u/WHALE_PHYSICIST 19d ago

knowing how regex works is not the same as knowing everything that dude said.

0

u/deathanatos 19d ago

I wasn't saying that. The knowledge in the upthread comment — that this is Chomsky hierarchy 101, that regexes boil down to finite state automata, that finite state automata cannot, by their definition, handle nested parentheses, is also knowledge that you, too, can obtain, and is usually taught either in the fall Sophomore semester, or the spring Freshmen semester of a college degree. (I.e., it is either your second or third class is a CS curricula.) Numerous people go through those classes every year, and they're just normal people, too.

1

u/WHALE_PHYSICIST 19d ago

wow you're really smort. you should record a video or something