How many different "Hello, Worlds" can we come up with? Add Answer

Okay, fellow nerds. Typically when we tackle the learning curve of a new computer language, our first experiment will be to get it to squawk some output back to us. Just any old meaningless string will do, such as "Hello, World." Tutorials often begin with this coding challenge. On the web, I have occasionally run across collections of "Hello World" code in various computer languages. I saw one clever example which embedded six different languages within the comment tags of each other, and claimed to be executable in any of those languages. I thought it might be neat to assemble a collection of "Hello, World" examples here on Modwest, just to see all the different computer languages that we know.

Top-ranked Newest A to Z Time Travel
1.
 
5 votes

PHP

Leader! Most 1st Place Votes
print "hello world!";

Comments 2 Comments

2.
 
3 votes

JavaScript

document.write("Hello World!");

Or, to say it in a dialog box alert:

alert("Hello World!");

Comments Discuss

3.
 
3 votes

Bash

echo "Hello world"
or
printf "Hello world\n"

Comments Discuss

4.
 
2 votes

LOLCODE

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

Comments Discuss

5.
 
2 votes

Lisp

(DEFUN HELLO ()
"HELLO WORLD"
)

Comments Discuss

6.
 
2 votes

Brainfuck (pardon my French)

I confess, I stole this from wikipedia:

++++++++++[>+++++++>++++++++++>+++>+.

http://en.wikipedia.org/wiki/Brainfuck

Comments 1 Comment

7.
 
2 votes

Perl

print "Hello, World";

Comments Discuss

8.
 
1 votes

Hi y'all

Oh, I forgot the apostrophe just screws up the programming.

Comments Discuss

9.
 
1 votes

Forth

: HELLO ." Hello, world." ;
ok
HELLO
Hello world. ok

Forth is an early stack-machine language used in many embedded applications in the early days of microprocessors. It was a complete computing system: interpreter, compiler, and operating system.

Comments Discuss

10.
 
1 votes

Ruby

puts "Hello, World!"

Comments Discuss

11.
 
1 votes

421

http://helloworldsite.he.funpic.de/ The Hello World Collection.

Comments 2 Comments

12.
 
1 votes

C

int main() { printf("Hello world\n"); }

Comments 1 Comment

13.
 
1 votes

CPP

I.e., C++, but C++ is detected as a duplicate answer because of C.
#include
int main() { std::cout << "Hello world\n"; }

Comments Discuss

   

 

Analytics

17 members have voted on one or more of the 13 answers. This topic was started by Anonymous25356 Anonymous25356: 348 points on February 11th, 2009. Tags: coding, computer languages, language, perl, syntax, versatility

Topic rating:
  +1.1    

Detailed analysis...

Like this topic?

Get email notifications and feed updates on your home page by turning on the options below. You can also subscribe to topics automatically.

Please login or register to see notification options.

Comments     Leave a comment Leave a comment

Avatar Image
      Thumbs down Thumbs up   
squiggle squiggle: 719 points   5 months ago

It's remarkable how some people still contribute, even after they've all been listed and the topic rendered mute http://community.modwest.com/answer/398/421

Reply to this comment  Reply     Link to this comment Link