Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(English, Perl, Python, Ruby) comparison on a code fragment-by-fragment basis? [closed]

Looking for a code samples that present a code fragment in plain English, Perl, Python, and Ruby. Here's an example of a whole mini-solution present in that format, but I'd rather just have the code present in a fragment-by-fragment basis.

like image 923
blunders Avatar asked Oct 13 '22 20:10

blunders


2 Answers

A good place to look would be Project Euler where (after solving the puzzles yourself) you get access to solutions by other people in all kinds of programming languages. Of course, sometimes there will be atrocious solutions, so you'd have to look at the answers carefully.

like image 92
Tim Pietzcker Avatar answered Oct 30 '22 22:10

Tim Pietzcker


Rosetta Code currently has 449 tasks, of which some 349 languages are covered, though the site does not (and cannot) promise to have solutions to every task in every language.

NOTE: aaronasterling posted Rosetta Code as a comment to the question, but never as an answer. After 24-hours, posted it as an answer myself, since I'm not planning on leaving my question open forever, and it's an answer to the question. Feel free to up vote the comment, and not this answer; if aaronasterling post it as an answer, I'll delete this answer.

like image 23
blunders Avatar answered Oct 30 '22 23:10

blunders