9 ms·
Hello world in every programming language
- brudgers 10y agoDiscussion of repository four years ago: https://news.ycombinator.com/item?id=3905398 https://news.ycombinator.com/item?id=3905398
- pmarreck 10y agoI kinda wish Hello World was unit tested by default
- lomnakkus 10y agoRelated, but broader: https://www.rosettacode.org https://www.rosettacode.org Their Hello World implementations: https://www.rosettacode.org/wiki/Hello_world/Text#BML https://www.rosettacode.org/wiki/Hello_world/Text#BML
- daturkel 10y agoCame to post the same. Rosetta Code is actually a great resource for understanding the varying capabilities of different languages—the way some tasks are trivial in some languages due to powerful built-ins, while in others they have to be built up from scratch.
- CorvusCrypto 10y agohaha ditto for posting the same. Anyone also catch the ending line of the README re: FizzBuzz? :)
- therealmarv 10y agomy favorite https://github.com/leachim6/hello-world/blob/master/x/xslt.xslt https://github.com/leachim6/hello-world/blob/master/x/xslt.x...
- benjaminjosephw 10y ago,{,{89+(59+~1&(7~+1&2&2&((3~+1&(4~(32_((6~+((8+(38_(},} Beautiful. https://github.com/leachim6/hello-world/blob/master/e/EOOOL.eoool https://github.com/leachim6/hello-world/blob/master/e/EOOOL.... https://esolangs.org/wiki/EOOOL https://esolangs.org/wiki/EOOOL
- jiiam 10y agoClearly the winner is Shakespeare (https://github.com/leachim6/hello-world/blob/master/s/shakespeare.spl https://github.com/leachim6/hello-world/blob/master/s/shakes...): "The Infamous Hello World Program. Romeo, a young man with a remarkable patience. Juliet, a likewise young woman of remarkable grace. Ophelia, a remarkable woman much in dispute with Hamlet. Hamlet, the flatterer of Andersen Insulting A/S."
- fauria 10y agoClosely followed by Chef: https://github.com/leachim6/hello-world/blob/master/c/chef.ch https://github.com/leachim6/hello-world/blob/master/c/chef.c... "This prints hello world, while being tastier than Hello World Souffle."
- tjalex 10y agohttps://github.com/leachim6/hello-world/blob/master/b/blub.blub https://github.com/leachim6/hello-world/blob/master/b/blub.b... Some of these are so nonsensical, it's fantastic
- Cthulhu_ 10y agolooks like a dialect of https://github.com/leachim6/hello-world/blob/master/o/ook.ok https://github.com/leachim6/hello-world/blob/master/o/ook.ok
- jjuel 10y agohttps://github.com/leachim6/hello-world/blob/master/c/chicken.chicken https://github.com/leachim6/hello-world/blob/master/c/chicke... Yes exactly!
- staticelf 10y agoIT'S SHOWTIME TALK TO THE HAND "hello world" YOU HAVE BEEN TERMINATED
- prof_hobart 10y ago"Every" is a big claim. No Pick/Basic[1] for a start, or Sculptor[2], as just two of the languages I've used in the past that haven't made it onto the list. [1] https://en.wikipedia.org/wiki/Pick_operating_system https://en.wikipedia.org/wiki/Pick_operating_system [2] http://www.sculptor.co.uk/ http://www.sculptor.co.uk/
- blowski 10y agoThe author encourages pull requests, so feel free to fix it.
- ShinyCyril 10y agoThis one certainly lives up to its name: https://github.com/leachim6/hello-world/blob/master/v/verbose.verbose https://github.com/leachim6/hello-world/blob/master/v/verbos...
- sleepychu 10y agoThey didn't bother to put the second 'l' onto the stack :-(
- hathym 10y agohttps://github.com/leachim6/hello-world/blob/master/b/brainf*ck-2d https://github.com/leachim6/hello-world/blob/master/b/brainf...
- teamhappy 10y agoAlso https://github.com/leachim6/hello-world/blob/master/b/BIT.bit https://github.com/leachim6/hello-world/blob/master/b/BIT.bi...
- guard-of-terra 10y agoThey could probably employ that executable tracing program to indeed make any compiler produce "hello world" eventually.
- theknarf 10y agoI'we been a big fan of http://www.99-bottles-of-beer.net/ http://www.99-bottles-of-beer.net/
- AstroJetson 10y agoIt's much better since you get to see some flow control. They also have much more coverage.
- stepanhruda 10y agoThis would be awesome for undercover operations: https://github.com/leachim6/hello-world/blob/master/b/beatnik.beatnik https://github.com/leachim6/hello-world/blob/master/b/beatni...
- drinchev 10y agoI always have fun when I read LOLCODE [1] There's even a whole web server written in LOLCODE [2] 1 : https://github.com/leachim6/hello-world/blob/master/l/lolcode.lol https://github.com/leachim6/hello-world/blob/master/l/lolcod... 2 : https://github.com/justinmeza/httpd.lol https://github.com/justinmeza/httpd.lol
- flashm 10y agoThat's brilliant. The code in the web server is surprisingly readable. I like the 'O RLY?' to start an if/else
- RealityVoid 10y agoAahaha, I'm dying here. It's the funniest thing I've seen all week.
- PDoyle 10y ago<groan> Hello World tells you nearly nothing about a programming language. (Unless, of course, it's written in Java, in which case it's a painstaking tour of the entire programming language, requiring you to learn the concepts behind "class", "public", "static", "void", "main", and arrays, despite never actually using any of those things.)
- scrollaway 10y agoThis post doesn't claim to teach you about programming language. It actually contains exactly what it says on the tin: Hello World in every programming language. When you pick up a dictionary, do you groan about it teaching you nearly nothing about human languages?
- trymas 10y agoThis IMHO is better https://learnxinyminutes.com/[0] https://learnxinyminutes.com/[0] if you want to see how the language looks like, because indeed "hello world" usually tells absolutely nothing. [0] https://github.com/adambard/learnxinyminutes-docs https://github.com/adambard/learnxinyminutes-docs
- akio 10y agoI like http://rosettacode.org http://rosettacode.org
- Robadob 10y agoJava 9 will have 'interactive shell' functionality, 1:40 of the video (on the linked page) they show hello world. https://blogs.oracle.com/java/entry/jshell_and_relp_in_java https://blogs.oracle.com/java/entry/jshell_and_relp_in_java
- skoczymroczny 10y agoNot really, when learning the language, most people will see it just as "stuff you do to make a main function". It's just as you don't have to look inside stdio.h to be able to #include it for a hello world program.
- brador 10y agoWould it be possible to make something better than Hello World that would showcase even more of the universal standard features of programming languages? Any ideas? Maybe calculate the first 10 primes and output the result? Something like that...
- dragonwriter 10y agoThat's kind of the point of Rosetta Code. http://rosettacode.org/wiki/Rosetta_Code http://rosettacode.org/wiki/Rosetta_Code
- _asummers 10y agoIt should be several examples, each showing one of the following: Iterating over infinite lists (generators, lazy seq, whatever), polymorphism (if applicable), pattern matching (if applicable), how one would pass functions around, how one would manipulate a date, how one would read and write to a file, how one would make an http request (with some error handling!), traits/mixins (or similar, if applicable) concurrency, parallelism, and use of built in List, Map data structures. While not exhaustive, to me those feel like common building blocks to my day that would showcase how easy it is to do things in a language.
- fiatjaf 10y agoSee also: http://rosetta.alhur.es/ http://rosetta.alhur.es/
- Kristine1975 10y agoLacks Inform: https://en.wikipedia.org/wiki/Inform https://en.wikipedia.org/wiki/Inform [ Main; print "Hello World^"; ];
- anthk 10y agoI would add a location .
- termos 10y ago326 ./p/pit.pit 194 ./a/assembler_atari2600.asm 125 ./d/DNA-Sharp.dna 124 ./d/DNA#.dna 94 ./b/brainf*ck-2d 89 ./s/shakespeare.spl 89 ./b/beatnik.beatnik 81 ./b/BIT.bit 68 ./t/Tao-Presentations.ddd 65 ./c/chef.ch Top 10 Hello World programs in number of lines.
- deleted 10y ago[deleted]
- throwaway7767 10y agoMy favorite so far is Malbolge[0]: https://github.com/leachim6/hello-world/blob/master/m/malbolge.mbg https://github.com/leachim6/hello-world/blob/master/m/malbol... "Malbolge was specifically designed to be almost impossible to use, via a counter-intuitive 'crazy operation', base-three arithmetic and self-altering code.[1] It builds on the difficulty of earlier, challenging esolangs (such as Brainfuck and Befunge), but takes this aspect to the extreme, playing on the entangled histories of computer science and encryption. Weaknesses in the design have been found that make it possible (though still very difficult) to write useful Malbolge programs." [0]https://en.wikipedia.org/wiki/Malbolge https://en.wikipedia.org/wiki/Malbolge
- akerro 10y agoHmmm... there is react.js, but there is no Spring.
- DonaldFisk 10y agoThere are thousands of programming languages, so it should be "many" rather than "every". Some important ones are missing, e.g. SNOBOL4, SASL, IPL, POP-11, SISAL, LabVIEW, Prograph. In Full Metal Jacket (not released yet), "Hello computer" is shown at http://web.onetel.com/~hibou/fmj/tutorials/FirstSteps.html http://web.onetel.com/~hibou/fmj/tutorials/FirstSteps.html In Prograph, it's similar. In LabVIEW, it's also similar, except that data flows from left to right.
- amelius 10y agoWhat I want is a transpiler from every language to every other language. It doesn't need to result in performant code, just working code.
- gtycomb 10y agoIs PLM missing? I used to program in PLM before C became popular for firmware coding.
- epmatsw 10y agoWow, it actually had MUMPS. I'm impressed.
- careersuicide 10y agoI love this kind of stuff. The similarities and differences of programming languages is something of an obsession of mine. In my free time over the last several years I've been working on a chrestomathy that collections solutions to Project Euler problems in various different languages [0]. I'm currently up to 39. It's certainly far from "every" language and in most languages I've only written solutions to the first handful of problems. I've learned it's hard to not learn a lot about a language if you do the first 7 or so problems in it. [0] https://github.com/seaneshbaugh/rosetta-euler https://github.com/seaneshbaugh/rosetta-euler
- kriro 10y agoI think the C-Version should be "int main(void)" and use puts instead of printf or printf with %s. You can also remove the return 0 in modern C but I don't mind the explicitness. Edit: Link to C11, draft only as the released version costs money: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf Edit2: No ARM assembler or is it not under A (either for assembler or ARM)?
- trymas 10y agoWait, what? C11 standard released version costs money? How it's not free?
- sjclemmy 10y agoAngular.js is not a language. https://github.com/leachim6/hello-world/blob/master/a/angular.js https://github.com/leachim6/hello-world/blob/master/a/angula...
- city41 10y agoNeither is JSON. The repo owner should be more picky with PRs.
- miguelrochefort 10y agoIt's lacking Elm.
- ised 10y agoI do not see an entry for sed. Is it an editor or a language?
- lagadu 10y agoI'm a bit sad that there's no version written in BS [0] [0] https://skillsmatter.com/skillscasts/6088-the-worst-programming-language-ever https://skillsmatter.com/skillscasts/6088-the-worst-programm...
- Raphmedia 10y agoSomebody should add Taxi, https://bigzaphod.github.io/Taxi/ https://bigzaphod.github.io/Taxi/
- xhrpost 10y agoAmazing how many programming languages have been developed over the years. Looks like some non-english based ones have been added[1], quite a few more that could be added as well[2]. [1] https://github.com/leachim6/hello-world/blob/master/a/aheui.aheui https://github.com/leachim6/hello-world/blob/master/a/aheui.... [2] https://en.wikipedia.org/wiki/Non-English-based_programming_languages https://en.wikipedia.org/wiki/Non-English-based_programming_...
- psuter 10y agoNow, for each language, we need a Docker image built to compile and run the program.
- philliproso 10y agoFollowing this comment.https://news.ycombinator.com/item?id=11720057 https://news.ycombinator.com/item?id=11720057 Does contain hello world in the macro evaluation system of xkas
- crux 10y agoWhat's Novice? It's extremely difficult to google.
- burkaman 10y agohttps://esolangs.org/wiki/Novice https://esolangs.org/wiki/Novice http://yiap.nfshost.com/esoteric/novice/novice.html http://yiap.nfshost.com/esoteric/novice/novice.html
- Null-Set 10y agoNeeds a ><> https://esolangs.org/wiki/Fish https://esolangs.org/wiki/Fish !v"hello, world"r! >l?!;o I love 2d languages.
- anthk 10y agoThe ZX Spectrum ASM is ubereasy if you know a very little of Z80 ASM :)
- 0x54MUR41 10y agoSo, the high level programming language will produce less lines than low level programming language (Assembly takes 35% portions of the repository).
- nycatelos 10y agoI mean the java implementation is almost as long as the assembly one :)
- karmacondon 10y agoI see the value of this as a resource to compare different languages. But for me "Hello world" is about all of the admin/setup work that has be done in order to get the most basic program to run. It's more like install python, deal with dependencies and conflicts, make sure my PATH is set and the right port is open on the server. Etc and so forth. And all of that is why "Hello" and "world" are two of my favorite words. It can take so much effort just to see them.
- gagzilla 10y agoThe TrumpScript is awesome :) Lots of us are pointing out what's missing, but I think there is at least two that doesn't necessarily belong in a category of programming language- plain text and json. The latter one just says {"hello":"world"} if you are curious. There may be more but I haven't looked through all of them.