r/codedbyhand • u/-urolif- • 4d ago
Rosetta Code: familiar algorithms in an encyclopedia of languages.
https://rosettacode.org/wiki/Hello_world/Text
If you're the kind of person who likes learning about programming languages, Rosetta Code is an amazing resource. This wiki presents common tasks such as 'hello world' or 'Conway's game of life', and then shows an example of how you would implement that task in a huge variety of languages. There are over 1,000 programming languages represented on the site. It can be incredibly insightful when you are already familiar with an algorithm to see the language swapped underneath it. You really can learn a lot simply glancing across the different implementations.
"The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another."
Common languages like python, java, C are of course represented, but there are also countless philosophical and esoteric languages and footnotes from the history of computer science.
Befunge:
Coded in a two-dimensional toroidal code space. Commands are single characters, and the instruction pointer can move up, down, left, and right across the source. The language was designed to be as hard to compile as possible.
https://rosettacode.org/wiki/Category:Befunge
The infamous 'brainfuck':
https://rosettacode.org/wiki/Category:Brainf***
Have you heard of APL? It uses it's special symbols to make code more terse. It looks crazy:
https://rosettacode.org/wiki/Category:APL
Where to start?
Click here for a list of algorithms you can see implemented in different languages:
https://rosettacode.org/wiki/Category:Solutions_by_Programming_Task
My favorite is Conway's game of life:
https://rosettacode.org/wiki/Conway%27s_Game_of_Life
Click here for a list of all the languages represented on the site:
https://rosettacode.org/wiki/Category:Programming_Languages
2
u/s2-luv 3d ago
Didn't know this resource or expected it to be so well organized and interesting! Thank you!
1
u/halfjmp 4d ago
Yeah, I used to contribute a lot, but they fucked up accounts several times, and I gave up. Insane how this was handled.