Orthodox platform agnosticism
June 24, 2006 10:05 AM Subscribe
Just a clarification; several of the languages cited are not compiled languages; Perl, Python and PHP (for example) are interpreted languages. That is, they don't have to be compiled to be run.
Thanks. My inner geek feels better now ;->
posted by sporb at 11:03 AM on June 24, 2006
Thanks. My inner geek feels better now ;->
posted by sporb at 11:03 AM on June 24, 2006
That is, they don't have to be compiled to be run.
To clarify, they could be compiled if desired (PHP, Python, Perl, etc.).
posted by Blazecock Pileon at 11:09 AM on June 24, 2006
To clarify, they could be compiled if desired (PHP, Python, Perl, etc.).
posted by Blazecock Pileon at 11:09 AM on June 24, 2006
Old news. In fact I've seen files that could run with something like 40 compilers, or execute directly as X86 machine code in DOS.
posted by delmoi at 11:16 AM on June 24, 2006
posted by delmoi at 11:16 AM on June 24, 2006
My favorite trick for getting a program to compile in Pascal and C--start it out like this:
(*x);
5 points to anyone who can guess what that does in C :)
posted by jewzilla at 11:42 AM on June 24, 2006
(*x);
5 points to anyone who can guess what that does in C :)
posted by jewzilla at 11:42 AM on June 24, 2006
Actually, perl is a compiled language, it gets compiled first and then run, it's just that this happens every time you start the program unless you jump through lots of hoops.
</my inner geek is bigger than your inner geek>
posted by fvw at 12:06 PM on June 24, 2006
</my inner geek is bigger than your inner geek>
posted by fvw at 12:06 PM on June 24, 2006
I actually tried poking around trying to figure out what you might do to make it work in javascript, but, ha. No.
Obviously what we need to do is make sure every major scripting language uses a different character for its comments!
And jewzilla, I have no idea, but you have to tell us now.
posted by blacklite at 12:11 PM on June 24, 2006
Obviously what we need to do is make sure every major scripting language uses a different character for its comments!
And jewzilla, I have no idea, but you have to tell us now.
posted by blacklite at 12:11 PM on June 24, 2006
I tried to compile it with my old Visual Studio 2005 C++ compiler and it puked all over itself. :( (yes, I am in fact bored today)
posted by BillsR100 at 12:40 PM on June 24, 2006
posted by BillsR100 at 12:40 PM on June 24, 2006
jewzilla: Declares an int * variable x, but is only legal in K&R C, not ANSI or ISO C, yes?
posted by reventlov at 1:07 PM on June 24, 2006
posted by reventlov at 1:07 PM on June 24, 2006
reventlov: Right-o, though gcc lets it slide with a warning (unless you say -pedantic), so I say it still counts. No other way to do it, AFAIK.
posted by jewzilla at 2:12 PM on June 24, 2006
posted by jewzilla at 2:12 PM on June 24, 2006
that's nothing. Chuck Norris could compile that code in pascal, c, c++, java, vb, .net, perl and python without a computer.
posted by Milliken at 2:36 PM on June 24, 2006
posted by Milliken at 2:36 PM on June 24, 2006
Someone want to explain how this works, and what it compiles to? My rudimentary knowledge is useless here...
posted by Orange Goblin at 2:45 PM on June 24, 2006
posted by Orange Goblin at 2:45 PM on June 24, 2006
Someone want to explain how this works, and what it compiles to? My rudimentary knowledge is useless here...
You can see what it does in the blog post. When interpreted as C it outputs "I am a C program". When interpreted as perl it outputs "I am a perl program" (and so on). It uses lots of different method to hide the C code (and the PHP code and the TCL code etc) from the perl compiler, and vice versa.
posted by cillit bang at 3:29 PM on June 24, 2006
You can see what it does in the blog post. When interpreted as C it outputs "I am a C program". When interpreted as perl it outputs "I am a perl program" (and so on). It uses lots of different method to hide the C code (and the PHP code and the TCL code etc) from the perl compiler, and vice versa.
posted by cillit bang at 3:29 PM on June 24, 2006
Yes, it's a Polyglot. AFAIK, the first one was written by these folk.
posted by quiet at 10:14 AM on June 26, 2006
posted by quiet at 10:14 AM on June 26, 2006
« Older Belly up to Barbarism | The pirate Captain Morgan never saw this coming Newer »
This thread has been archived and is closed to new comments
posted by sbutler at 10:21 AM on June 24, 2006