TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hello world in every programming language

85 点作者 QuarkSpark大约 13 年前

24 条评论

rll大约 13 年前
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 未加载
mtrn大约 13 年前
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 未加载
baddox大约 13 年前
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 未加载
doktrin大约 13 年前
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 未加载
Groxx大约 13 年前
Another very large set of hello worlds: <a href="http://rosettacode.org/wiki/Hello_world" rel="nofollow">http://rosettacode.org/wiki/Hello_world</a>
ushi大约 13 年前
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>
luzon大约 13 年前
node.js is not a programming language.
评论 #3906215 未加载
评论 #3906178 未加载
scriptproof大约 13 年前
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)
reitzensteinm大约 13 年前
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 未加载
jfoutz大约 13 年前
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>
joshbaptiste大约 13 年前
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.
quink大约 13 年前
MUMPS was left out. Like usual :P<p>w "Hello World",!
评论 #3905639 未加载
drucken大约 13 年前
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!
franze大约 13 年前
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 未加载
jiganet大约 13 年前
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
simonbarker87大约 13 年前
LabVIEW is missing - can git support it?<p>Update:<p>And I don't see Processing either
tzaman大约 13 年前
Not very useful
tome大约 13 年前
The Python 3 version works in Python 2 as well. They may as well unify them.
BasDirks大约 13 年前
I am not quite sure why the Haskell program needs a module statement.
asjo大约 13 年前
COMAL 80 is missing. Too bad I don't remember anything of it :-)
评论 #3905757 未加载
knowtheory大约 13 年前
of course, it doesn't explain how to build and/or run any of them :P
erode大约 13 年前
Missing F#.<p>printfn "Hello World"
评论 #3905467 未加载
goggles99大约 13 年前
Where is the PL/I?
zackzackzack大约 13 年前
I note a suspicious lack of DCPU-16.
评论 #3907190 未加载
评论 #3906401 未加载