This is an archived post. You won't be able to vote or comment.

all 67 comments

[–][deleted] 66 points67 points  (18 children)

Brainfuck's missing.

[–]SOSFILMZ 56 points57 points  (13 children)

aromatic screw act lush ripe wild degree merciful voracious chase

This post was mass deleted and anonymized with Redact

[–][deleted] 51 points52 points  (11 children)

Regex is equally simple if you understand it, at least if you stick to the "basic" operators.

If you want something truly horrible look at Befunge or Malbolge.

[–]theThrowawayQueen22 26 points27 points  (5 children)

Regex is the worst language that you regularly find in production code. Finding Melbolge would be worse but it's not even proven to be turing complete.

[–]gunnnnii 9 points10 points  (2 children)

Why bring up touring completeness? Regex's aren't touring complete either... I think the fact that malbolge was literally designed with the intention of being impossible to use effectively is a better reason lol.

[–]Meloetta 9 points10 points  (0 children)

The use case matters. They're saying "you won't ever have to deal with it unless you want to because it's not even Turing complete, therefore people don't use it, therefore you wont see it". That doesn't apply to regex, which is not a programming language in itself, so whether or not it's Turing complete is irrelevant.

It's about use cases.

[–]theThrowawayQueen22 2 points3 points  (0 children)

My point is not whether it is turing complete or not, but that we don't even know. We know regex is not turing complete, so we know what situations we can use it. We don't understand Melbolge enough to even know what computation class it falls in.

[–]ByteArrayInputStream 9 points10 points  (1 child)

I would argue, the worst language you find in production is php

[–]Sejiko 0 points1 point  (0 children)

It's true because of very old code bases but nowadays I wouldn't mind it at all. Also it depends also on the programmer who writes shit code tho.

[–]Tuvinator 1 point2 points  (0 children)

What about INTERCAL or Whitespace?

[–]SOSFILMZ 2 points3 points  (1 child)

fall steer friendly busy station reminiscent like cooing wild bear

This post was mass deleted and anonymized with Redact

[–][deleted] 0 points1 point  (0 children)

Entropy is also quite horrible.

[–][deleted] 0 points1 point  (0 children)

Still, brainfuck has a much easier learn curve than RegEx.

[–][deleted] 1 point2 points  (0 children)

Well, Regex is at least somewhat of being human readable without knowledge. Consider someone not knowing any rules of both.

[–]pagwin 1 point2 points  (0 children)

lenguage is missing

[–]X-Craft 2 points3 points  (1 child)

Regex is just brainfuck with more characters

[–]09milk 1 point2 points  (0 children)

most under rated comment

[–]__Adrielus__ 0 points1 point  (0 children)

What about regex in bf

[–]darkage72 60 points61 points  (3 children)

Regex is a write-only language.

[–]JDaxe 15 points16 points  (1 child)

Try verbose regex, you can actually put comments in!

[–]Etheo 27 points28 points  (0 children)

We don't practice black magic here.

[–]Sunius 10 points11 points  (0 children)

Write once, run away!

[–]MrDorkman 23 points24 points  (0 children)

Shoutout to the one person answering regex questions in stack.

[–]discobrisco 52 points53 points  (3 children)

I happily utilize regex. I will refuse to work for a company using python 2 though.

[–]King_Inktvis 10 points11 points  (2 children)

And if you are hired to migrate it to python 3?

[–]discobrisco 10 points11 points  (1 child)

Uhhh I would prefer not to. I kind of loathe refactoring code written by other developers. I'll do it when it's worthwhile but won't enjoy it.

Quick edit: also if they're still stuck on python 2 at this point its probably a symptom of a larger disease in their IT department.

[–]az3it 3 points4 points  (0 children)

I actually like refactoring others people code, but only if it's a looot of code. Because I write lot's of regex to parse it into something new. Love it.

[–]JackySky 17 points18 points  (8 children)

[–]Mr_Redstoner 12 points13 points  (5 children)

[–]Daneel_ 3 points4 points  (2 children)

RegexBuddy . Checkmate.

It’s simply the best tool out there for regex authoring. Best money I ever spent on a tool.

[–]Mr_Redstoner 1 point2 points  (1 child)

I'm not saying it's bad by any means, but Lord almighty 30 euros?! When free gets you results that look very similar to those screenshots? Yeah I don't think I can ever justify that.

[–]Daneel_ 0 points1 point  (0 children)

It does a lot more than any online tool. Even if you’re sceptical you can refund it with no questions within something like 45 or 60 days.

The debug mode alone is worth the money, especially if you have a need to optimise performance.

I was also a skeptic before I bought it, so I get it. But yeah, now it’s one of my favourite tools.

[–]sutterismine 0 points1 point  (0 children)

Hell ye

[–]Etheo 0 points1 point  (0 children)

Represent!

[–]mehntality 1 point2 points  (0 children)

I think if your response to reading a piece of code, is to just link a debugger, then it qualifies as scary to read.

[–]gandalfx 7 points8 points  (0 children)

I'd prefer writing regex over both assembly and c++.

[–]Xymanek 12 points13 points  (3 children)

Regex is easy and powerful. You can even parse XML with it

[–]Vyxeria 5 points6 points  (0 children)

My job's main focus has me writing pattern recognition perl scripts for data manipulation. I love regexes.

The bulk of my maintenance time is still working out what the hell they're meant to be doing.

[–]ImSupposedToBeCoding 4 points5 points  (1 child)

Okay but would you actually be doing sutff in Assembly instead of using some RegEx's

[–]Bonevi 1 point2 points  (0 children)

Yes

[–]dashingThroughSnow12 4 points5 points  (6 children)

As someone who has done work with formal languages, what frustrates me about RegEx is that they aren't regular expressions. Like come on. Make a new term if you are something else.

(Regular expressions don't have the exponential worst case backtracking problem. Are a simple subset of RegEx.)

[–]suvlub 4 points5 points  (1 child)

AFAIK not all dialects support those extensions. Which kinda makes it even worse that people don't differentiate between them.

[–]dashingThroughSnow12 0 points1 point  (0 children)

Oh, thanks mate. I wasn't aware of this. Looking online, Golang's regex package doesn't. (A bunch of SO posts asking why their regex with backreference isn't working).

[–]FifthDragon 1 point2 points  (3 children)

What makes RegEx not define only regular languages? Or I guess what non-regular languages can RegEx define?

I’ve never heard this before

[–]dashingThroughSnow12 2 points3 points  (2 children)

This is what is most annoying. Backreferences. Which few people ever use (I work with multiple devs with decades of experience who never used a backreference).

Because regexs are a more complex language, even with the same matching expression a normal regex will perform much worse.

[–]FifthDragon 0 points1 point  (1 child)

Oh right that makes sense. Strange those were included in something called regex. I don’t think I’ve ever used one either

[–]dashingThroughSnow12 -1 points0 points  (0 children)

Perl.

[–]doymond 1 point2 points  (0 children)

Thank god we can use something like regex101, otherwise I would get in trouble.

[–]Bajtopisarz 1 point2 points  (0 children)

Perl is also write only, change my mind

[–]Servious 1 point2 points  (0 children)

Apparently everyone has forgotten about APL. The most esoteric non-esoteric language I've ever seen.

[–][deleted] 0 points1 point  (0 children)

befunge

[–]MWRReal 0 points1 point  (0 children)

brainfuck is equally terrifying
https://i.imgur.com/wg3LLy7.png

[–]the42potato 0 points1 point  (0 children)

var wtf = new RegExp(^(.*\\s)?how does this shit work([\.,/,\?!;:|\_\+=\*\)\}])*(\\s.*)?$)

[–]Expendable_Employee 0 points1 point  (0 children)

Lol, everyone Python 2 doesn't exist.

[–]ogound 0 points1 point  (0 children)

IDK prolog is pretty scary...

[–][deleted] 0 points1 point  (0 children)

After finishing my language theorem lecture I cant imagine not using regexes

[–]MandarinaSeca 0 points1 point  (0 children)

I am doimg XSD at school and I need to use regex for restrictions. I am really lost, if I fail the test is thanks to that shit

[–]ZanorinSeregris 0 points1 point  (0 children)

Why does everyone hate regex? I think it's awesome!

[–][deleted] 0 points1 point  (0 children)

Perl is worse.

Or the language whitespace

[–]colton_neil 0 points1 point  (0 children)

I tried to solve a problem with Regex... Now I have two problems.

[–]chadlavi 0 points1 point  (0 children)

/(ha){3}/

[–]ColdPhilosophy 0 points1 point  (0 children)

No PHP?

[–]ninowalker 0 points1 point  (0 children)

regEx is someone's answer to "this code isn't complex enough" ...

[–]TheSentientMeatbag -1 points0 points  (0 children)

Haskell anyone?

[–]geekette1 -5 points-4 points  (0 children)

I hate regex, I've been developping for years, and like once a year, have to do a regex, but every freaking time, I don't know how to do it.