Quadrilingual Crazy Programming
mtve writes: "Have you ever seen source code that is valid on four languages: Perl, C,
Befunge,
and BrainF*ck?
During last Perlgolf
season famous Perl hacker Jérôme
Quelin submit such inconceivable masterpiece and now he published expanded explanation
of his solution. Caution: that text can hurt your mental health. Play
Perlgolf!"
What sort of lunatic wants code that compiles in 4 languages, anyway?
Isn't it bad enough that microsoft creates gigabytes of code bloat, let alone all the geeks who are now going to try multi-lingual code?
- Kaos games and encryption systems developer
But think about what this means for more serious programming.
Imagine a program that runs in C++, MySQL, and Apache. This could be a new era in cross-platform development!
Programmers: please study this closely, and we will finally allow Linux to compete.
Karma: Good (despite my invention of the Karma: sig)
I don't know if there's an official term for it, but I often write a function in one language that writes code for another language - for example, using PHP or Perl to write javascript. I've even gone so far as to use PHP to write a SQL statement which in turn is used to determine what will go in a Javascript function that writes HTML code. The example below is rather pointless, but I have come across real situations where it is beneficial to use that many languages together.
That's three "real" languages and one markup language. And if you think that was crazy, think about this - I just had to write that in HTML in a slashdot posting textbox!
My next goal is to make the javascript write out HTML for parameters in a Java applet. And, the whole PHP page is going to be written by a C program exectuted by a cron job that was set up via a perl script (webmin!) That's eight different languages - perl -> bash (I think) -> C -> PHP -> SQL and Javascript -> HTML -> Java. Sadly, I don't think that's nearly as crazy as the quadrilingual program. I need to learn Brainf*ck.
I really hate signatures, but go to my website.