PDA

View Full Version : The Hello World Collection


Kayaker
July 13th, 2007, 07:45
Taking your first steps in QuakeC, G-Code or Fjölnir?

Trying to remember the syntax for Fortran, Cobol or Amiga-E?

Want to say Hi to your buddy in Galicia or Madagascar?

Here's the solution, 330 Hello World programs in many more-or-less well known programming languages, plus 57 human languages.

http://www.roesler-ac.de/wolfram/hello.htm

Maximus
July 13th, 2007, 09:49
Code:

* Hello World in Cobol

*****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY "Hello World!"
STOP RUN.
****************************



I want my youth back

( )

Aldebaran
July 13th, 2007, 10:11
ahahahahahahhahaha coooooooool

LITURGY:
PRAY "Hello World!"
AMEN.

IS GOD A PROGRAMMER? POPE IS SURELY THE ANALYST...

CluelessNoob
July 13th, 2007, 14:27
Quote:
[Originally Posted by Aldebaran;67130]
IS GOD A PROGRAMMER?


Considering the state of the world I'd almost guarantee it.

Too bad he doesn't seem to be working on any bug fixes.

blurcode
July 13th, 2007, 23:59
Quote:
[Originally Posted by CluelessNoob;67141]..

Too bad he doesn't seem to be working on any bug fixes.


He is in vacation doing his best hobby. Fear the time He'll come back, He's gonna reprogram everything not like the Matrix one


LLXX
July 14th, 2007, 07:44
Quote:
[Originally Posted by Aldebaran;67130]IS GOD A PROGRAMMER?
http://imgs.xkcd.com/comics/lisp.jpg

The Assembler-Intel version could've been a bit shorter:
Code:
xchg ax, bp
mov dx, offset hello
int 21h
ret
hello: db "Hello World!",13,10,"$"

omega_red
July 14th, 2007, 10:18
Quote:
Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. The program was not even written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp.

Now that's something!

Maximus
July 14th, 2007, 11:51
Quote:
[Originally Posted by Aldebaran;67130]
IS GOD A PROGRAMMER? POPE IS SURELY THE ANALYST...


mmh... I remember an old joke.... not sure how it sounds in english...

NO! God is an Engineer, see the perfect machine of our Universe ...said the engineer!

NO! Answered the (free)architect! See its perfect, ordered structure! He made Order out of the Chaos! He's the Architect for sure!

...really? and who made the Chaos? asked the Programmer...

blurcode
July 14th, 2007, 13:35
#define Chaos


Silver
July 15th, 2007, 08:04
Here's another old joke, relevant to those who know the Amiga or C64...

A man walks into a bar, and sits down in front of the bar tender. The barman turns around and asks, "So, what can I get you?".

At that moment a 6 foot Jamaican guy with dreadlocks walks in and sits down. Just as the first guy is about to order, the Jamaican says "hey mon, how you doin!".

The guy stops and gives an angry stare at the Jamaican. He then turns back to the bar man and says, "I'd like a..."

But before he can finish, the Jamaican shouts "I listen to de reggae musik mon!".

The guy turns to the Jamaican and shouts, "For god's sake, will you just SHUT UP". Realising that the barman is pretty surprised at his behaviour, he says....

"Sorry about that, I've been having problems with my rasta interrupts all day."



(If you need help, or you're too young to remember the Amiga, google "raster interrupt"

CluelessNoob
July 15th, 2007, 22:35
Quote:
[Originally Posted by blurcode;67168]#define Chaos



Simple

Chaos EQU Humans

Or for the more detail oriented

enum Chaos (wife, children, job);

Kayaker
July 30th, 2007, 12:20
Heheh, in a related news item, from

Shoot yourself in the foot in any language
http://www.infosecpodcast.com/security/2007/07/shoot-yourself-in-the-foot-in-any-language/


C
You shoot yourself in the foot.

C++
You accidentally create a dozen clones of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can’t tell which are bitwise copies and which are just pointing at others and saying, “That’s me, over there.”

JAVA
After importing java.awt.right.foot.* and java.awt.gun.right.hand.*, and writing the classes and methods of those classes needed, you’ve forgotten what the hell you’re doing.

Ruby
Your foot is ready to be shot in roughly five minutes, but you just can’t find anywhere to shoot it.

PHP
You shoot yourself in the foot with a gun made with pieces from 300 other guns.

ASP.NET
Find a gun, it falls apart. Put it back together, it falls apart again. You try using the .GUN Framework, it falls apart. You stab
yourself in the foot instead.

SQL
SELECT @ammo:=bullet FROM gun WHERE trigger = ‘PULLED’; INSERT INTO leg (foot) VALUES (@ammo);

Perl
You start shooting yourself in the foot, but you lose the gun.

Javascript
You’ve perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.

CSS
You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.

FORTRAN
You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of
bullets, you continue anyway because you have no exception-handling ability.

Modula2
After realizing that you can’t actually accomplish anything in this language, you shoot yourself in the head.

COBOL
Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.

LISP
You shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds ..

BASIC
Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.

FORTH
Foot in yourself shoot.

APL
You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters.

Pascal
The compiler won’t let you shoot yourself in the foot.

SNOBOL
If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the right foot.

Concurrent Euclid
You shoot yourself in somebody else’s foot.

HyperTalk
Put the first bullet of the gun into the foot of the left leg of you. Answer the result.

Motif
You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.

Unix
% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls
%

Paradox
Not only can you shoot yourself in the foot, your users can too.

Revelation
You’ll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.

Visual Basic
You’ll shoot yourself in the foot, but you’ll have so much fun doing it that you won’t care.

Prolog
You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn’t allow it to explain.

Ada
After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.

Assembly
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After that’s done, you pull the trigger, the gun beeps several times, then crashes.

370 JCL
You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.

blurcode
July 31st, 2007, 13:53
Heh i got in Delphi (Pascal) yesterday a compiler catastrophic failure error :P

Kayaker
July 31st, 2007, 20:07
I can't resist...

Delphi
Your foot will bloat up so much it will explode. Shooting not necessary.

CluelessNoob
July 31st, 2007, 22:30
Quote:
[Originally Posted by Kayaker;67489]
370 JCL
You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.


In your dreams it would be that quick...



or tasty.