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!"
Apply these same principles to a virus and you'd have a pretty dangerous bit of code.
Meet the White House Whores
tcd004
The whole purpose behind having so many languages is for different specialized needs. There used to be PASCAL for scientists, FORTRAN for mathematicians, BASIC for hobbyists or new programmers... each server a purpose, and was not made to do anything more.
Nowadays, Perl and PHP are almost identical, Obj C, C, and C++ are very similar, Java bears many similarities to Obj C and C++ as well, and most of the new 'Basic' environments like REALBasic and VisualBasic are near clones as well.
All of today's popular coding environments could be condensed to Java, Objective C, Perl, and some form of BASIC. This point is exemplified nicely by the fact that a bit of code can be done to compile in 4 languages... the syntax is already quite close, having so many minor variants is just messy.
First off, this guy obviously has much better kung-fu than I do...I've never even heard of BrainFuck or Befunge...but I think he kinda cheated on the last two languages. He just hid the code for Brainfuck and Befunge in perl and C comments, so they wouldn't interfere with each other. Now, the perl/C part is really neat, because he used C #defines to translate various Perl characters into C, so the Perl interpreter and C compiler are reading and understanding the exact same code...that's cool. But the B & B code just gets ignored by the Perl interpreter and C compiler because of comments, so this amounts to writing 3 seperate programs (one in BrainFuck, one in Befunge, and one that's bi in C and Perl) and then putting them all in the same file with intstructions as to which compiler/interpreter reads which part, as opposed to writing one piece of code that's meaningful in all 4 languages. I'd call this bilingual, not quadlingual.
We don't have a state-run media we have a media-run state.
Yeah, it's great to have a piece of code that compiles for four languages, but what's the point if you're just using pre-processor and compiler tricks to get the compiler to look at a different section of the same file? In this file, if I change the problem-solving logic slightly, I have to change it in several places. What would be truly cool (and incredibly difficult), in my opinion, would be to completely eliminate redundant logic.
When I get into my "programming language learning" mode, when I learn a new procedure in one language, I try to make the same program in at leats 7 others....sure, it sounds lame, but it really sticks in my head..
If you're not a Liberal in your 20's, then you have no heart.If you're still a Liberal in your 30's you have no brain.
I'm afraid that before someone writes such an essay, someone else will have written a +5 Funny post on why you *should* do it. Sorry.
In Soviet Russia, Jesus asks: "What Would You Do?"
Why is it that Slashdot's editors can't fix the mistakes in the above and many, many other articles before posting? Either they don't notice the errors (in which case they should be sacked and replaced), or it's that important to post the article a minute earlier (highly unlikely), or somehow the original wording is considered "sacred" and Not To Be Changed (stupid if true). Come on here. Does the error rate on the front page have to be so high?
The only reason I'm not blaming the submitter (mtve) as well is because it's possible English is not his first language (or even his second). If it is, shame on him too. We all deserve better.
(Oh yes, for those clueless enough to say "What errors", I threw in the required changes in bold. Also, isn't one Perlgolf link enough?)
czth
Benefits? It's really fun to program in.
Useful benefits? Does it need any?
Win dain a lotica, en vai tu ri silota
oh wait we have some that can't understand their own language and those languages which are universal like money and the hand/finger gesture of giving someone the bird.
... in JSL (Japanese Sign Language) the 'birdie' is used quite often, and does not have any negative connotation to it when used in the context of that language.
:)
Slight nit-pick
However, it can be assumed that a fair number of people in the Japanese speaking (and signing) world have had to communicate with the western world, and they know that perticular hand guesture may not be taken well
- It is simple to make something complex, and complex to make it simple