TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hello world in every programming language

85 pointsby QuarkSparkabout 13 years ago

24 comments

rllabout 13 years ago
Technically Hello World in PHP is just:<p>Hello World<p>The one they have with &#60;?php print("Hello World"); ?&#62; is also an opcode longer than using &#60;?php echo "Hello World"; ?&#62; because off the FREE on the return value from the print. But a file just containing the string: Hello World and nothing else will generate the same opcodes as the echo version so they are equivalent and you might as well use the shorter form. A file without an opening &#60;?php tag is still a perfectly valid PHP program.
评论 #3905812 未加载
评论 #3905704 未加载
评论 #3905914 未加载
mtrnabout 13 years ago
While <i>Hello World</i> is nice, something a bit more involved could give you more insight. Among many people, Amit Singh (of MacFuse and Mac OS X Internals fame) did this with the <i>Towers of Hanoi</i>: <a href="http://www.kernelthread.com/projects/hanoi/" rel="nofollow">http://www.kernelthread.com/projects/hanoi/</a> (111 Hanoi implementations total).
评论 #3905498 未加载
评论 #3907596 未加载
baddoxabout 13 years ago
The Rosetta Code is a much more interesting and useful site along the same lines.<p><a href="http://rosettacode.org/wiki/Rosetta_Code" rel="nofollow">http://rosettacode.org/wiki/Rosetta_Code</a>
评论 #3905951 未加载
doktrinabout 13 years ago
Why is Morse code included? I'm not being flippant, but rather genuinely curious as to whether there's some basis for it being considered a "programming" language or precursor thereof.<p>This isn't to confuse Morse code with reMorse : <a href="http://esolangs.org/wiki/ReMorse" rel="nofollow">http://esolangs.org/wiki/ReMorse</a>
评论 #3905508 未加载
评论 #3906682 未加载
Groxxabout 13 years ago
Another very large set of hello worlds: <a href="http://rosettacode.org/wiki/Hello_world" rel="nofollow">http://rosettacode.org/wiki/Hello_world</a>
ushiabout 13 years ago
This repo is out of date. There are 9 months old pull requests open. Here is a fork: <a href="https://github.com/c00kiemon5ter/hello-world" rel="nofollow">https://github.com/c00kiemon5ter/hello-world</a>
luzonabout 13 years ago
node.js is not a programming language.
评论 #3906215 未加载
评论 #3906178 未加载
scriptproofabout 13 years ago
One page list, more languages: <a href="http://www.scriptol.com/programming/hello-world.php" rel="nofollow">http://www.scriptol.com/programming/hello-world.php</a> (and older)
reitzensteinmabout 13 years ago
I remember reading that the Malbolge author was 'working' on a Hello World program, and thought that was awesome. Now I see why:<p><a href="https://github.com/leachim6/hello-world/blob/master/m/malbolge.mbg" rel="nofollow">https://github.com/leachim6/hello-world/blob/master/m/malbol...</a><p>I wonder if it was written by hand; that would be impressive. Doesn't look like it would be too hard to hand roll a little compiler for it.
评论 #3905843 未加载
评论 #3905836 未加载
评论 #3906132 未加载
jfoutzabout 13 years ago
No love for intercal? <a href="http://en.wikipedia.org/wiki/INTERCAL" rel="nofollow">http://en.wikipedia.org/wiki/INTERCAL</a> Hmm. piet is missing too. <a href="http://www.retas.de/thomas/computer/programs/useless/piet/index.html" rel="nofollow">http://www.retas.de/thomas/computer/programs/useless/piet/in...</a>
joshbaptisteabout 13 years ago
I prefer the FizzBuzz examples as it also displays the simple looping constructs of the languages <a href="http://rosettacode.org/wiki/FizzBuzz" rel="nofollow">http://rosettacode.org/wiki/FizzBuzz</a><p>Edit: Grr it is missing one of my favorite JVM.next() languages of the week Kotlin, I will have to update it.
quinkabout 13 years ago
MUMPS was left out. Like usual :P<p>w "Hello World",!
评论 #3905639 未加载
druckenabout 13 years ago
Largest collection "Hello world" in programming languages (441 at last count): <a href="http://www.roesler-ac.de/wolfram/hello.htm" rel="nofollow">http://www.roesler-ac.de/wolfram/hello.htm</a><p>It even has BCPL and LabVIEW!
franzeabout 13 years ago
well, certainly not every programming language.<p>i.e.: i'm one of the most senior ACT3 programmers worldwide. (well, there were only about a dozen or so people) it was a programming language used extensively at the national austria press agency. it was - at it's time (around 2001) - for more advanced as PHP 4. the hello world would have looked something like this<p>&#60;!--%'hello world'--&#62;<p>(the &#60;!-- --&#62; was a relict from ACT2 ...)<p>yes it was an abomination, but it worked, and it was fast.<p>ok, anyway, ARC is missing, too. I think the claim "every programming language" is a) wrong and b) not really feasible.
评论 #3906262 未加载
jiganetabout 13 years ago
Hello world in PostScript:<p>/Times-Roman findfont 12 scalefont newpath 200 200 moveto (Hello World) show closepath Showpage<p>Use this in gs on Linux or y gswin32 on windows
simonbarker87about 13 years ago
LabVIEW is missing - can git support it?<p>Update:<p>And I don't see Processing either
tzamanabout 13 years ago
Not very useful
tomeabout 13 years ago
The Python 3 version works in Python 2 as well. They may as well unify them.
BasDirksabout 13 years ago
I am not quite sure why the Haskell program needs a module statement.
asjoabout 13 years ago
COMAL 80 is missing. Too bad I don't remember anything of it :-)
评论 #3905757 未加载
knowtheoryabout 13 years ago
of course, it doesn't explain how to build and/or run any of them :P
erodeabout 13 years ago
Missing F#.<p>printfn "Hello World"
评论 #3905467 未加载
goggles99about 13 years ago
Where is the PL/I?
zackzackzackabout 13 years ago
I note a suspicious lack of DCPU-16.
评论 #3907190 未加载
评论 #3906401 未加载