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!"
I have enough trouble making my code compile in ONE language, 4 at the same time is a bit much
"The United States has no right, no desire, and no intention to impose our form of government on anyone else." - Bush 05
You call that real programming? You pussy.
"Adequacy.org: Where congenital stupidity is not an option, but a requirement."
that's just plain crazy. Why would you want to do that?
I saw the Sign, and it opened up my eyes
Thank you very much!
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
I'M SOME CRAZY SHIT, YOU KNOW THAT?!
o
|
|\
|====||D (0)
|UU
|\
Three Rings for the Elven-gimps under the whip,
Seven for the Gaylords in their halls of fudge,
Nine for Mortal Puffs doomed to wank men,
One for the Dark GayLord on his dark boyfriend
In the Land of Shitstab where the Gayness lies.
One Ring to wank them all, One Ring to cum them,
One Ring to stab them all and in the darkness rape them
In the Land of Shitstab where the Gayness lies.
He paused, and then said in a deep voice,
"This is the Master-Knob, the One knob to wank them all.
This is the One knob lost many years ago,
to the great weakening of its master's power.
Now, he greatly desires to have it up the arse again,
- but he must NOT have it!"
He should seek professional help. Soon. That's right up there with self-mutilation.
It's not enough to bash in heads, you've got to bash in minds. - Captain Hammer
When I am having oral sex with retarded children, I often have trouble compiling my code quadrupally. Glad to see I am not alone!
/*
**
** I.H.O.S.W.R.K.
**
*/
/*
**
** I.H.O.S.W.R.K.
**
*/
Now try getting it to compile with 0 C compiler warnings (!), Linux has trouble enough with that.
Now this is exactly why I am proud to be a programmer. Screw Picaso and DaVinci, this is what real art is all about.
This presents an interesting dilemma though. What Emacs mode do I use to look at the code??? perl-mode, c-mode, I dunno. Fontifying just complicates it even more.
At any rate, this shit is going up in my cube. If they should this in a frame, I would buy it and hang it in my house.
int func(int a);
func((b += 3, b));
http://www-2.cs.cmu.edu/afs/cs/user/chogan/Web/pol yglot
Cobol, Pascal, Fortran, C, Postscript, shellscript, 8086
The more advanced the technology, the more open it is to primitive attack
I used to work as a research assistant at the Artificial Intelligence Projects lab at Carnegie-Mellon University. When it was late at night, and we were all bored, we would try to put together C programs that were illegible but yet would still compile. That was lots of fun, and it had lots of people scratching their heads, all night long.
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.
The only polyglot archive i am aware of on the whole internet
Everything2 entry on polyglots
It runs/compiles under 7 languages: ANSI COBOL, ISO Pascal, ANSI Fortran, ANSI C, PostScript, Shell Script, and 8086 machine language!!! Check it out, it rocks.
He uses the fact that # is a comment in Perl VERY frequently to use #defines etc that will allow C to act like Perl. Interesting solution, although I question whether the use of such preprocessor directives REALLY counts as making cross-compatible code. Then again, I nitpick the difference between preprocessor and compiler, so...
Well, I guess that is one way to keep people from saying that your implementation isn't portable enough.
Thats hillarious, and its not every day you see an on topic first post
Note that, even though this is standard C, gcc won't compile it, complaining about the lack of a "main" function.
It's hard to be religious when certain people are never incinerated by bolts of lightning.
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.
Ironically, the article isn't even valid in one language.
Any sufficiently well-organized community is indistinguishable from Government.
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.
Befunge is,
Holy mackerel! I am in love. I've found the object of my dreams.
First Post by a long shot!
Krama: Bigdickinyoura
Man, just go buy the book you need....all this for a book :)
...on th web, anyhow. All the time we deal with several languages, burying one inside another so they'll make sense as they go through successive levels of parsing.
.');"> For those of you who are counting, that's SIX 'enders' in three syntax languages just to form a simple alert box.
. - English syntax
; - Javascript instruction syntax
For example, every day I write SQL that is buried in PHP libraries which extracts more PHP that in turn has HTML and Javascript in them.
For another example of the crazyness, check this simple example. Now if you look at the source, you'll notice the end part of that A-tag was:
' - Javascript string syntax
) - Javascript function syntax
" - HTML attribute syntax
> - XML (err, HTML, whichever) tag syntax
And that's not even a particularly hairy example. That's just client-side and wetware-side parsing.
Kevin Fox
Because all operating systems are written by programmers, I assume that any operating system is much smarter than me. Thus, any good operating system should try to outsmart me by restricting my options at every turn. Linux, like all versions of Unix, is lousy at restricting my options because at the command line virtually any operation can be performed with ease. (For example, 'rm -rf /win' could 'delete an entire mounted directory, with no popup window warnings whatsoever.)
I'm proud to say that there is no such danger in XP. Windows pop up when I want to make a change, and then more pop up to ask if I'm sure I want the change. Thankfully, Windows XP looks after my computer's well-being by occasionally switching configuration settings from the way I want them to what the OS programmers think they might probably ought to be. Boy, I'm just impressed with how smart they are. Once I learned to live with whatever the default settings are on any new hardware I install, I can't say the number of hours I have saved.
I use that spare time to reboot my Windows XP machine multiple times a day. Technical support personnel recommend that I do it regularly-- kind of like brushing my teeth. To help remind me of this necessity, windows pop up to tell me to reboot whenever I make a configuration change. By now my machine is minty fresh, I figure.
There is no such useful rebooting in a Linux system. It is as reliable as the sunrise, with uptimes in weeks, months and years. Virtually no configuration change requires a reboot, to boot. Imagine all that plaque in the computer. Gross!
In XP I am prevented from making dangerous fundamental configuration changes unless I use a special "registry editor". I have found it so useful to have this separate editor that I hope in future versions they go all the way and supply a separate editor for each file on the disk-- in that way windows could pop up at every keystroke to warn me that changing any line in the file I am editing could cause the system to not run properly. If this were only the case, people would finally learn that it is best to just stick with the mouse and they would be freed of the need to constantly move their hands back to the keyboard. (If one stops to think about it, the mouse is a much better device to use than the keyboard. Ever hear of someone getting carpal tunnel syndrome from a mouse? No. It's comfortable and ergonomic. Like Morse code devices. That's how long distance communication started, after all.)
Linux, by contrast, requires no special editor to change configuration files. The fact that there is no "registry" in Linux allows the abomination of using any text editor whatsoever to do the configuration. Can you believe that configuration files are usually stored clear text? Talk about dangerous!
I am also happy to report that I have experienced no truth to the rumor that Windows disks become corrupt after improper shutdowns. Indeed, I have been forced to improperly shutdown the machine innumerable times after it locks up, and I have no apparent problems to report regarding the disk. No such claim can be made for Linux. They say something about lack of data points. Excuses are all I ever seem to hear from the Linux crowd.
By sheer size alone, Windows XP beats Linux hands down. It is so much bigger, it is _obvious_ that it is better. Why would you want a small OS with the large disks and RAM sizes we have these days? For this reason alone, I heartily recommend Windows as a way to maximize resource utilization. Your CPU and disk will constantly be pegged to the limit, the way god intended. The Linux kernel and drivers accounts for only about 750KB. Why, even the Microsoft Win16 subsystem uses more space than that.
It is no surprise that Windows XP costs $300 on the retail market and Linux doesn't cost anything. People know what they want, and they want Windows XP. Because Linux is free, that means it's basically worthless. The same goes for all the development tools, remotable GUIs, and applications, which all cost money for Windows (i.e., are worth something) and free for Linux (worthless!).
Installing software is very easy in Windows XP. I usually slip in CDs without even reading instructions or warnings, and just double click on whatever window pops up. There is no need to read anything or touch the keyboard. (Did I mention that I hate that thing?) Well, OK, I have learned the hard way the machine locks up if I don't take the time to close all other applications.
Linux, by contrast, requires typing on the keyboard to get anything to install at all. And you always have to know the NAME of program you want to install. For example, in Slackware, you have to type "pkgtool" to install a program. Linux needs to get with the 21st century!
Windows XP follows the DOS convention of putting \r\n at the end of every line of a text file. While this is only a mild concern because of the relative rarity of text files on Windows machines these days-- thank god--it helps to differentiate between the text files and the other files. Sadly, Linux makes no distinction between text and other files.
If I legitimately purchase Windows XP, I can call Microsoft customer support to get help with my problems. After a short hold time of an hour or so, they always help me. Ever since I told them that I was dual booting to Linux, they were able to flag my account and now each time I call even the entry level support personnel I am connected to say that Linux is the source of my problems. Everyone seems to agree that Linux is no good. The more I listen, the more I'm impressed with the knowledge of the support staff there.
By contrast, in Linux, all I have is stockpiles of resources and documentation that I would actually have to read in order to understand. Sure, I could obtain Linux support from a commercial organization, but they would probably just tell me I have to use a text editor to fix up my system.
In the end, I have no need for that old computer donkey Unix. I don't need to run big Unix tasks, after all. I refuse to become one of those a bug-eyed computer users, that's for sure. As soon as I can keep Windows XP from crashing for long enough, I'm going to delete my Linux partition, i.e., the equivalent of moving it to the recycle bin, saying that I'm sure, emptying the recycle bin, and again saying that I'm sure I want to empty it.
Four computer languages in one code block, no problem.
But proper use of one human language? Look out!
The correct term is tetralingual, not quadrilingual.
[Eminem] I'm the devil - if ever there was such a thing The results of much too many drugs what you're seeing I'm a mindfuck, completely dis-{*gus*}-ting I'm {*white*}, a human mutt, fuck a being I'm a dog - fuck lambs, I'm silencin 'em all I'm involved in murders forensic science couldn't solve Giant set of balls too big to buy a set of drawers Might as well unzip my fly and let 'em fall to the floor Each thought's completely warped I'm like a walkin, talkin, ouija board Speakin in tongues, I've never spoke this speech before .. Hhem-delle-la, ennich-me-noughh-mi-niche-mick-norr .. Have you ever experienced spirits in lyrics when you hear 'em 'til you scared to stare in into any mirrors when you near 'em? Well if so, get ready for some shit yo "Is this some kind of sick joke?" Shit no, motherfuckin schitzo So disturbed, he just goes so berzerk he tiptoes This verse was his urge to slit throats of just hoes Just goes to shizzow you dizzon't, fizzuck with so-someone this disturbed, sa-sippin on si-zzurp So - lock your doors, drop to the floors Get your shotguns drawn - here comes another "Clockwork Orange" Look at Bizarre; you really think he's right in his mind? What the fuck you think's goin through it when he's writin his rhyme?
[Chorus: Eminem] You bout to - journey into the mind of a psychopath killer Blood spiller, mentality much iller than you could ever imagine in your wildest dreams You'll feel his pain and his silent screams You bout to - journey into the mind of a psychopath killer Blood spiller, mentality much iller than you could ever imagine in your wildest dreams You'll feel his pain and his violent screams
[Bizarre] It's Friday night, I'm at a rave again Pickin up transvestites on my Harley-Davidson (hey hop on) My girlfriend's a crackhead whore She'll come to your door, suck your dick on the floor and take your bottles to the store (nigga I'm takin these) Have you ever seen a bitch get beat because she won't cheat Run the street and suck another nigga's meat? My son's sixteen years old with nowhere to stay (dad it's me) I told him he wasn't mine, slammed the door in his face And I ain't got no food, my job I've been cheated My girlfriend had a miscarriage (I'm sorry) I had to eat it (ohh) My dick is burnin, it ain't cause of disease Because I'm jackin off with gasoline mixed with antifreeze (AHH!) I'm livin in Waco Texas, me and my girl Fuck David Koresh, I'm startin my own world It's called Bizarre Cemetary, it's scary Eatin a virgin's cherry, they're all gonna laugh at you Carey
[Chorus]
[Kon Artis] I was born feet first, smoke 40's and drink weed The Lord rehearsed my birth, I'm the worst breed A nigga you ever set sight on, my right arm's got more power than (?) Dragon's python so "Journey into the mind of a psychopath killer" Light yo' ass like a liquid nitro-gas spiller Psycho slash Michael Myers, Michael Jack's "Thriller" Rifle slash knife faggot that's your "Cop Killer" As a yung'un, I was beat where I was livin (aight) Crossdressed just to get thrown in the women's prison I guess I was just stressed to be a hoodlum Being pressed caused the stress that caused the Ritalin Pressed stressed and Ritalin caused the cop's feelings to be hurt after they seen what I did to those children I'm vulgaric, you Bo Derek; I throw you face flat off the terrace so you can have somethin to stare at
[Chorus]
Proof of the gay-linux conspiracy!
Wow, if I saw that a few years ago, I would've been so scared I would've never touched another programming language again! Slashdot, please think of the children before you post things like that.
Looking for a computer support specialist for your small business? Check out
Now if only he could come up with an version that did APL, too.
The correct term is tetralingual, not quadrilingual.
"Quadri" comes from Latin. "Lingual" is from Latin. "Tetra" comes from Greek. In general, a compound will be all-Greek or all-Latin, with the occasional exception such as "homosexual".
Quadrilingual is used in 1,210 pages, whereas tetralingual is used in only 14.
I assume your Game Boy reference alluded to Tetris®. In that case, the existence of Quadra negates any "by default, go with the name of the block game" rule. In other words, you need to lay off the drugs ;-)
Will I retire or break 10K?
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.
Why not just do this instead:
Also, another minor quip: the C program is not valid C in either C89 or C99. It's not valid C89 because it uses '//' for a comment, and it's not valid C99 since it introduces main() without declaring the return type. C89 defaults to int if you don't declare the type (both for functions and variables, which can be fun), whereas this behaviour is undefined in C99. Normally, I don't follow the anal-retentive lingual purists, but I think this situation calls for this.
But yeah, this is pretty cool.
OK, so it actualy prints "hello polyglots", but still, all it does is output a fixed string. Quelin's program does an actual computation, admittedly a relatively minor one.
Moreover, all of polyglot's languages are languages that people have actually used to write real code. I'm not saying they are all reasonable languages, but one can at least semi-plausibly claim that they were written to be useful. Befunge and BrainF*ck are both toy languages written expressly to be perverse in some way (Befunge to be uncompilable, and BrainF*ck to be absurdly minimalist.)
That said, I was disappointed at how separate the languages' code blocks were in Quilen's program. C and perl share most of the same code, but there are three completely separate code blocks and the work is mostly in getting each language to ignore the others' code. It's probably the only way it can be done, but it's really a short quadralingual wrapper around three separate programs, one of which is bilingual.
5 languages...I'll bet they forgot to count C++
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 sort of think it's things like this that make slashdot so worth reading. These gems of pure geekness. +5 to /.
I discovered BrainFuck by chance two years ago and immediately got lost in two nights of trying to get my first quine to compile in the interactive JavaScript BF interpreter. For some perverse reason it is fun. It brings out the little boy in me who used to build model airplanes out of toothpicks: Little unimportant things that become something when you stick them together. perhaps this would also be a possible real world language for programming Nanobots, whose processors wouldn't yet cope with a P4 strapped to their backs.
Myth: Open Source is written by heterosexuals.
Fact: All Open Source development is done by raging homosexuals. The more flaming examples include Anal Cox, Linus Turdballs, Eric Ass-Reaming Raymond, and the entire Slashdot crew. The ringleader of the slashdotters, a man named CmdrTaco, engages in a practice known as Taco-snotting, along with his faggot-buddies Jeff Homos Bates and CowBoiKneel.
Myth: Open Source is written for heterosexuals.
Fact: Using Open Source software can cause suppressed homosexual fantasies to surface, leading to all out flaming faggotry within 6-8 weeks. Anecdotes of otherwise hetero men turning queer are far too numerous to count, but a few examples stand out. In one case, a man was arrested loitering outside an elementary school and making sexual overtures to several children: he quickly confessed that shortly after installing the Mozilla browser on his computer, he began to have uncontrollable urges to, to put it simply, have his cock sucked off by little boys. He soon met several other like-minded men through discussions on the Bugger Zilla mailing list (all already homosexuals), who together kidnapped a total of seven children whom they brought back to their apartment and sodomized. The other two men are still at large and believed to still be using Mozilla.
Myth: Open Source is multicultural.
Fact: Open Source is openly racist.
Myth: Open Source is democratic.
Fact: Open Source is controlled by a few narrow-minded zealots (mentioned throughout this post), most of whom are either Communists, Stalinists, Nazis, or Fascists. Additionally, Open Source supports terrorism.
Myth: Open Source is tolerant of religious preferences.
Fact: Open Source developers regularly engage in holy wars over the superiority of various Open Source projects, such as the Emacs program (preferred by Christians) versus vi (used mostly by neo-pagans and Satanists); or the KDE desktop (a favorite among Muslims) versus the GNOME project (particularly favored by Jews). Posts initiating crusades or jihads against other developers can be found regularly throughout the newsgroups and mailing lists.
Myth: Open Source is tolerant of sexual preference.
Fact: See above. Either you are a homo, you become a homo, or you never visit Richard Stallman alone in his office and hope to God you never meet him on the street at night.
Myth: Open Source is tolerant of political differences.
Fact: Open Source is an anarcho-communist philosophy bent on the destruction of capitalism. The very same Richard Stallman, a man whose name is disturbingly reminiscent of Stalin, has stated several times in public that his vision includes the subjugation of all who own intellectual properties under the jackboot of the GPL. The GPL is a pernicious piece of literature lifted straight from Karl Marxs Communist Manifesto, and is fortunately banned in many democratic nations.
* * * * * UPDATE * * * * *
* * * * * UPDATE * * * * *
____________________
© 2002 Serial Troller. Permission to reproduce this document is granted provided that you send all the bukkake porn you can find to serialtroller@hotmail.com.
STOP ME BEFORE I POST AGAIN!
Horror/Fiction writer Stephen King Dead
Sat May 11,10:24 PM ET
Freetown, Maine. (AP) - Stephen King, the notorious writer known as "Stevie Bananas" who ran one of the most powerful pulp fiction groups in the 1980s and '90s, has died. He was 45.
AP Photo
King, who retired to Maine in 1998 and had suffered from a variety of health problems in recent years, died Saturday of heart failure, said his attorney, Alfred "Skip" Donau.
At the height of his fame, King directed one of the five original horror movies in Hollywood. The public knew him as "Stevie Bananas" -- a nickname he detested.
By his own admission, he was a member of "the Commission," which acted as an organized crime board of directors in New York and other major U.S. cities. He denied engaging in such "unmanly" activities as narcotics trafficking or prostitution, though authorities said otherwise.
[100% ISO 646 Compliant]
SVM, ERGO MONSTRO.
Try to get a website to look the same in every web browser.
That's an impressive feat?
Netscape 4.X = Worst browser ever!
//bla bla bla bla
beat that
Welcome to AllTrollingMotors.com - We are all about POWER for the serious fisherman! We focus on high quality electric, environmentally friendly motors.
While we focus on Minn Kota, we also can provide you with excellent trolling solutions like the one featured at the right.
You can click here if you know which of the many trolling motors you are interested in. We carry top of the line Minn Kota trolling motors! Otherwise, we have prepared the following information for you in order to help you choose which type of trolling motors you might want!
When looking for a motor there are several important issues that always come up. In order to cover these issues we have put together this guide. We have covered many points such as saltwater, thrust, shafts, voltage, props, batteries, mounts and more! If you have anything else you think we should include then let us know.
We have posted answers to many questions below. Feel free to send us your question too!
Should I go with a bow or transom mount motor?
Bow mount motors offer very precise control. In the wind or on a river a bow mount motor will help you the most. The drawback of a bow mount motor is that most of them are more or less permanently mounted on your bow.
Transom mount motors are more versatile and can be moved easily from boat to boat. On a small craft like a canoe or row boat they can be used as the primary source of power.
How much thrust do I need?
In general you want to have as much thrust as possible for the times when you run into wind and current. The rule of thumb in choosing thrust is to take the total weight of the loaded boat and divide it by 70. For example, if your boat with people and gear weighs a total of 3500 lbs you will then divide that by 70. That means that ideally you should have a motor with at least 50 lbs. of thrust.
Motor Thrust Total Weight
30 lbs 2100 lbs
36 lbs 2520 lbs
40 lbs 2800 lbs
42 lbs 2940 lbs
44 lbs 3080 lbs
48 lbs 3360 lbs
50 lbs 3500 lbs
55 lbs 3850 lbs
65 lbs 4550 lbs
74 lbs 5180 lbs
101 lbs 7070 lbs
What type of steering should I choose?
First of all there are several types of steering to choose from. There is hand control, foot control, remote control, and even voice activated. Yes, that's right - voice activated. Believe it or not.
What it comes down to is your preferences and style of fishing. Some like the foot control because it allows for hands free control while fishing. While pulling in a big one you can maneuver your craft if necessary. If you are a no-frills type of person then hand control might be right for you. If you aren't a talker then I don't recommend a voice activated model. Fancy features aren't for everyone.
What length of shaft do I need?
First, that depends on whether you want a transom mounted motor or a bow mounted motor. If you go with a transom mounted motor then you need to know the distance from the transom to the waterline when your boat is loaded. You want to take that distance and add at least 20 inches to it. If there isn't a shaft in that size then round up. Let's say the distance is from the transom to the waterline is 10 inches. You then add 20 inches to that and the length of shaft you want is 30 inches.
If you want a bow mounted motor then you take the length from the top of the bow (where the motor would be mounted) to the waterline when the boat is loaded. You then add 20 inches to that number and then round up to the next longest shaft if you have to. So, if the distance from the bow to the water is 15 inches then you will add 20 inches to that. You come up with 35 inches but find that there is no motor for the brand you want with a 35 inch shaft. Therefore, all you have to do is round up to the 36 inch shaft. Simple, right?
Bow to Waterline Shaft Length
0-10 inches 30 inches
11-16 inches 36 inches
17-22 inches 42 inches
23-30 inches 50 inches
31-34 inches 54 inches
Battery chargers and testers
We do recommend having a battery tester so that you know how much power is left in your battery. Many people also like to have a battery charger. Here is a Minn Kota charger and tester all in one unit!
a/s/l here. Sorry, adding domain tags to your s
My colleagues at work think *I* am nuts because I refuse to use notepad or Visual Café's builtin-text editor to edit .java source files, preferring instead a much more powerful older DOS-based text editor (TSE). They're gonna suffer a heart attack when they see this.
"Trust me - I know what I'm doing."
- Sledge Hammer
BrainFuck code is almost as hard to understand as Perl!
#define ARGH argh argh argh
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.
If you rename the file to quadlang.c or quadlang.cpp, then open it as c/c++. If you rename it to quadland.cgi, open it as perl, and so on. That's assuming you're going to rename it before sending it to any compiler.
Of course, that's just another problem with multiple languages per source file - figuring precisely how to name the file.
:^)
Ryan Fenton
only it was in human to human language......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.
How may languages is that understood in?
A genetic algorithm might be a great way to produce such examples. You may be able to speed it up by having lists of common language commands to use as mutation material.
/. can set the world record......if there is such a record.
Turn it into a screen-saver ala Seti style, and maybe
Table-ized A.I.
There are medical doctors that can help with this type of illness. I'm not a doctor, but I think Zyprexa or Paxil could help control these self-defeating and destuctive compulsions.
I was happy to solve 1840, even though I immediately recognized the language, because it is poorly specified and there is no interpreter. But that was nothing compared with my teammates, who solved 1183 with nothing but the problem and pure reason.
The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
He tries to declare an array with a size returned by a function call. In C, array sizes have to be static (that's why C++ has "new" for arrays). He's writing to illegal locations in memory.
I've been working on truly bilingual code for a few years now. Machine code. That will run on both PPC and x86. Now, if only the damn elf header didn't cause one cpu to reject it, even though the binary is valid...
.EXE headers aren't even close. Oh well.
Same with x86 machine code that is clever enough to determine if it's running inside of linux or windows... even though the code itself is valid, the elf vs.
Once I was moderated as flamebait because I mentioned that something would be VERY difficult to read if it was coded in brainfuck.
I win.
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
Read it and weep :)
h nny
http://www.martnet.com/~johnny/polyglot.txt
jo
... is the name of the language, and I fail to see what it has to do with this article.
More slash, bitches! Everyone loves slash!
did you come up with by yourself or did you rip it from ioccc?
This is practically art. Just reading this guy's solution was amazing, the way he reasoned about each step, and just the IDEA of it. Absolutely unbelievable.
However, I'd like to see more difficult languages. Has anyone done LISP? Has anyone even ATTEMPTED Haskell or ML?
This would be worth a subscription if there was more of it (not more of the same but more in a similar vein of geekiness). REAL geek news! None of that Kayz crap or friking freshmen case mods with melted plastic and neon bulbs. Let them come and stare in awe as the fail to grok the code because the wasted their lives drilling holes in their PC case.
This just shows what coding Perl will do to you.
"Can't sleep. Clowns will eat me"
ok here is the question. I have wanted to Fly (fighters, commerical planes ect..) ever since I was a little kid.
And now i have to chance to go into the Navy and they say that I would have a very high chance of being able to go into flight school. Now i know many friends who have done this and the recruiters lied through their shiny teeth, however this guy sat down and showed me some proof that he ment what he said. I am still not sure if I want to do this, but it would be fun and exciting, getting paid to go all over the world and finishing up the last year of college while onboard the ship.
some people may say "why not wait unitl you graduate?" and I shall tell you. The age cut off to join the program I want is in nine months long before I would finish my classes. Not to mention my GF is totally against this, but it has always been a dream on mine. What do you all think i should do about this?
check the following page for source code that can be used in many languages...
polyglots list
I wrote a Brainfuck interpreter in PHP a while ago which also includes a short introduction to the language.
By the way, Brainfuck was initially named "Mental Masturbation", but the Author Oliver Müller then stuck to a less offensive name :)
-- Begin Code snippit beneath this line ---
-- End Code snippit above this line ---
Try it, it should work. You see, the key to getting it to work for everything out there is to compromise what the program can do.
Fortunately, since the goal was to make the program run in as many languages as possible, I can make the code as minimalistic as possible, too!
By the way, the code I mentioned above is property of myself. This code cannot be used in programs without my expressed permission. Doing so would be a violation of the terms in which I am distributing the above code.
Licensing agreements are available. Contact me for more info.
/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
Poster named Damiam, you are in violation of the terms of my license. You are hereby asked to cease and desist from distributing your code, and will be contacted shortly with a cease and desist letter saying the same message.
If you do not pay royalties to me, I shall strip you of all your Karma, and fart in your general direction. :)
By the way, if you claim prior art, this is not true. I came up with this program back in 1984 when I was banging enter on the keyboard of my Commodore Pet computer and realized that I was programming it without my knowledge.
/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
News Reporter: So how'd you do it?
Guy: Well, the nanotech was already there. I just wrote a small program in BrainFuck in order to hunt down the virus.
Well, at least censorship would go out the window the same time we cure World Disease.
/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
This is pretty clever, but it's not that cool; I do similar stuff all the time. I have to mix VBScript and JavaScript and then there is the question of getting stuff to work on different browsers. You can easily call each different browser a new language because they never work the same.
From Brainf*ck The Null Program If a program is a series of instructions, then the null program is a series of zero instructions. The null program has some interesting properties, not the least of which being that it's simultaneously written in many languages and many paradigms...
According to Microsoft, their "Visual Studio" will do 5 languages at the same time !
Muchas Gracias, Señor Edward Snowden !
Also, for your masochistic programming pleasure, you may be interested in the polyglot list and the quine page.
For even more zany programming fun, check out Esoteric topics in Computer Programming. Oh, and my own pathetic attempt at a similar page, Miscreant Programming Languages.
Nathan's blog
so you want it to have read:
"During last Perlgolf season famous Perl hacker Jerome Quelin submit such inconceivable masterpiece and now he published expanded explanation of his solution"
And that got you a +4 insightful? -1 gibberish more like.
doh...thats what it did read...I stand over-caffined and underslept...sorry, maybe I should apply for an editors job.