Page 1 of 1

My code keeps throwing CthulhuRlyehWgahnaglFhtagnExceptions

Posted: Sun Sep 14, 2014 4:04 am
by Gilberreke

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Mon Sep 15, 2014 6:38 pm
by Azdoine
And normal techspeak seemed eldritch enough...

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Wed Sep 17, 2014 8:37 pm
by garrak_x86
I guess he should have used

Code: Select all

<([a-z]+)[^>]+?(?<!/)>
People tend to abuse the regex engine a lot ;) understand the requirement first, after that the pattern isn't such a big deal (if it is - yeah, don't use it...)

filed under: nerdy and offtopic
//edit: actually messed up, negation is annoying.

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Wed Sep 17, 2014 10:58 pm
by Gilberreke
I don't think you get the joke :(

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 12:27 pm
by garrak_x86
I do, and i laughed the first time i read it.
Especially since i have been asked exactly this kind of questions plenty times.

But it wouldn't have happend with linux anyway.
</cthulhu>

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 3:53 pm
by warmist
Must have been a miscalculation of "Dho-Nha" curve...

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 4:05 pm
by Gilberreke
garrak_x86 wrote:I do, and i laughed the first time i read it.
Especially since i have been asked exactly this kind of questions plenty times.

But it wouldn't have happend with linux anyway.
</cthulhu>
Not sure what Linux has to do with a cthulu joke, but okay...

For reference, this comment is the main source of humor:
Don't listen to these guys. You actually can parse context-free grammars with regex if you break the task into smaller pieces. Your pattern needs to do each of these in order:

Solve the Halting Problem.
Square a circle (use the "ruler and compass" method for this).
Work out the Traveling Salesman Problem in O(log n). It needs to be fast or your regex engine will hang.
The results will be pretty big, so make sure you have another algorithm that losslessly compresses random data.
Almost there - just divide the whole thing by zero. Easy-peasy.
I haven't figured out the last part yet, but it shouldn't be hard. My code keeps throwing CthulhuRlyehWgahnaglFhtagnExceptions lately, so I'm setting up an empty catch block to just consume those and keep parsing. I'll update with the code once I investigate this strange door that just opened in the wall. Hmm.

Pierre de Fermat also figured out how to do it, but the margin he was writing in wasn't big enough for the code.

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 4:36 pm
by FlowerChild
Do I get a cookie for at least knowing that I don't know enough about the subject matter to get the humor? ;)

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 5:10 pm
by Gilberreke
FlowerChild wrote:Do I get a cookie for at least knowing that I don't know enough about the subject matter to get the humor? ;)
Sure, but it's only a cookie in non-Euclidean dimensions

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 7:23 pm
by garrak_x86
Well, there are multiple jokes for me in that topic, depends on the view you take. And sure, given the topic the one you referenced is the one that pops to mind :)

Linux has nothing to do with the joke you quoted, it's just another common rant which by now has been brought to the point of ridicule, a reference to the background why the quoted answer even exists - that's why the cthulhu tag is closed now ;). I don't think i can pull a clear response at this hour :D

My first answer was somewhat intended as a pun to the "serious" part of the thread, by now i realised that's not something i can use at random. I just assumed you wanted to start some sort of discussion about something and i guessed the topic - which is madness anyway... Right now it seems more of a "lol, have a laugh at this stuff" thing which suits off-topic anyways. How do i forum again? I forgot.

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Thu Sep 18, 2014 8:45 pm
by Azdoine
Solve the Halting Problem.
Square a circle (use the "ruler and compass" method for this).
Work out the Traveling Salesman Problem in O(log n). It needs to be fast or your regex engine will hang.
The results will be pretty big, so make sure you have another algorithm that losslessly compresses random data.
Almost there - just divide the whole thing by zero. Easy-peasy.
I haven't figured out the last part yet, but it shouldn't be hard. My code keeps throwing CthulhuRlyehWgahnaglFhtagnExceptions lately, so I'm setting up an empty catch block to just consume those and keep parsing. I'll update with the code once I investigate this strange door that just opened in the wall. Hmm.
I'm pretty sure those are all unsolvable problems... but that's the joke, right?

Re: My code keeps throwing CthulhuRlyehWgahnaglFhtagnExcepti

Posted: Fri Sep 19, 2014 12:47 am
by jorgebonafe
I just found this article that explains this whole thing pretty well...