7 ms·
Ask HN: Beyond Hello World in multiple languages?
I work in a lot of different languages on a regular basis, and it can be hard to keep track of some of the syntax between Python, MATLAB, Swift, JS, R, C++, ...
Does anyone have a good resource for "Hello World" type examples in multiple languages that go a little beyond `print("hello world");`?
I would be happy to start with code that at least includes a function definition and a for loop, but my eventual goal would be to fill about 1 page of code in each language with the most common actions.
Does something like this exist? I don't want to recreate it if someone can point me to a good existing project.
Thanks!
- elyseum 6y agoMaybe not a starting point because it’s too advanced, but Make A Lisp has example implementations for +80 languages now: https://github.com/kanaka/mal https://github.com/kanaka/mal
- chrisBob 6y agoThat is an interesting advanced project, but it is hard to find a consistent 1-page section in all of the languages.
- cratermoon 6y agoWhat you want is http://www.rosettacode.org/wiki/Rosetta_Code http://www.rosettacode.org/wiki/Rosetta_Code
- chrisBob 6y agoThis looks like the best starting point for me so far. The fact that they are real, useful programs means that I would need to cut a bunch for any of the examples I looked at so far, but I like it as a starting point.
- compressedgas 6y agoYou might be interested in https://hyperpolyglot.org/ https://hyperpolyglot.org/
- chrisBob 6y agoThat is interesting and certainly has all of the pieces I am looking for. This project isn't anywhere near what I want for a final result, but would make the pieces easy to find as I am putting it together.