Computer Science Canada The Other Official "Hello World" Thread. |
Author: | Martin [ Thu Aug 19, 2004 5:46 pm ] | ||||
Post subject: | The Other Official "Hello World" Thread. | ||||
Let's make the hello world program in as many languages as possible. Turing
C++
Continue! |
Author: | Mazer [ Thu Aug 19, 2004 6:48 pm ] | ||
Post subject: | |||
I'd like to start off by pointing out you've forgotten to return 0. Darkness. Tsk tsk. EDIT: seems I've forgotten some code here. Python
|
Author: | wtd [ Thu Aug 19, 2004 7:08 pm ] | ||||||||||||||||||||||||||||||||||||||||
Post subject: | |||||||||||||||||||||||||||||||||||||||||
Ruby:
O'Caml:
C:
Perl:
Eiffel:
Java:
Groovy:
PHP:
Javascript:
Pike:
Haskell:
Icon:
C#:
AppleScript:
|
Author: | wtd [ Thu Aug 19, 2004 7:35 pm ] | ||||||||||||||||||||||||||||||
Post subject: | |||||||||||||||||||||||||||||||
Object-oriented versions here. I create a Greeter class in each language that takes a name (in this case simply "world") and greets it with "Hello". Ruby: In file "greeter.rb":
In file "main.rb":
O'Caml:
Objective-C: In file "Greeter.h":
In file "Greeter.m":
In file "main.m":
Perl: In file "Greeter.pm":
In file "main.pl":
Eiffel: In file "greeter.e":
In file "hello_world.e":
Java
Python: In file "greeter.py":
In file "main.py":
C#:
C++:
|
Author: | Paul [ Thu Aug 19, 2004 9:32 pm ] |
Post subject: | |
Um... I think wtd's got them covered ![]() |
Author: | wtd [ Thu Aug 19, 2004 9:50 pm ] | ||||||||||||||||
Post subject: | |||||||||||||||||
Paul Bian wrote: Um... I think wtd's got them covered
![]() The scary thing is, I haven't even scratched the surface. Be afraid. Be very afraid. Oh, and inheritance to provide a fancy greeting class where one can specify the greeting... Ruby: In file "flexible-greeter.rb":
In file "main.rb":
O'Caml:
Python: In file "greeter.py":
In file "main.py":
Eiffel: In file "greeter.e":
In file "flexible_greeter.e":
In file "hw.e":
|
Author: | templest [ Thu Aug 19, 2004 10:51 pm ] |
Post subject: | |
or you can just go here; http://www2.latech.edu/~acm/HelloWorld.shtml It's hello world in EVERY concievable language. ![]() |
Author: | wtd [ Thu Aug 19, 2004 11:43 pm ] |
Post subject: | |
templest wrote: or you can just go here; http://www2.latech.edu/~acm/HelloWorld.shtml It's hello world in EVERY concievable language.
![]() I know a few languages that aren't on that list. Where're Ruby, Rexx, Rebol? Besides, a lot of the examples there are very poor code. This, though, is beautiful. |
Author: | templest [ Fri Aug 20, 2004 12:27 pm ] | ||
Post subject: | |||
btw, Shakespeare is a real programming language. http://shakespearelang.sourceforge.net/report/shakespeare/ and that IS a Hello World program. |
Author: | the_short1 [ Fri Aug 20, 2004 1:11 pm ] |
Post subject: | |
hahah.. u all forgot one the old school basic on tandy 5 cls 3 $$$ collors the screen blue i beleive.. 10 print "hello world" % outputs hello world %% those numbers are line numbers then u can tye 'list' to see em all and if u made a mistake u had to do hte whole lien again.. and thats hard if the lines really long.. it overwrites old line if u use same ien number twice.. and if u dont have spaces (i put every 5) if u needed to add a line in the middle there... if u dont have spaces... ur screwed .. heheheh that was the first programmign language i ever knew.. i made some sick stuff with it.. forgot most of it now.. (i got it on paper somewhere tho)... i was able to do get ur name then put happy bday that person.. or whatever... plus osme nice graphic stuff.... tahts crzy WTD.,. or did u get a lot of those from that website u mentioned? dam.. why cant they be semi easy like basic and turing? lot of them are so more complext.. sad... |
Author: | wtd [ Fri Aug 20, 2004 3:00 pm ] |
Post subject: | |
the_short1 wrote: tahts crzy WTD.,. or did u get a lot of those from that website u mentioned?
With the exception of the Shaespeare program, I wrote all of that code myself. |
Author: | wtd [ Sat Aug 28, 2004 2:29 pm ] | ||||||
Post subject: | |||||||
A blast from the past! Algol68:
Fortan77:
ABC:
|
Author: | Tony [ Sat Aug 28, 2004 2:43 pm ] |
Post subject: | |
the_short1 wrote: lot of them are so more complex
you think? Quote: Hello World in BrainF***, posted by Dmitri Katchalov <dmitrik@my-deja.com> on comp.lang.misc on Feb. 14, 2000. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++.+++++++++++++++++++++++++++++.+++++++..+++.-------------- -----------------------------------------------------.----------- -.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++.--------.+++.------.--------.----------- --------------------------------------------------------. ![]() |
Author: | wtd [ Sat Aug 28, 2004 2:48 pm ] |
Post subject: | |
tony wrote: the_short1 wrote: lot of them are so more complex
you think? Quote: Hello World in BrainF***, posted by Dmitri Katchalov <dmitrik@my-deja.com> on comp.lang.misc on Feb. 14, 2000. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++.+++++++++++++++++++++++++++++.+++++++..+++.-------------- -----------------------------------------------------.----------- -.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++.--------.+++.------.--------.----------- --------------------------------------------------------. ![]() Real geeks code in Whitespace. ![]() |