Monday, August 5, 2013

[Sam] Project Euler Language Challenge

I don't have any good ideas for games/etc. floating around in my head right now (though the Dominion AI idea proposed over lunch today sounds interesting...that may or may not happen at some later date). So, I am deciding to pick up a proposal that came up over an earlier lunch during the year that sounded like it would be fun - try to solve as many Project Euler problems as possible (in 48 hours), but each solution must be written in a different language. My goal for now is to do at least 20, though I can hope for more.


  • Have fun revisiting Project Euler problems / potentially solving new ones for me
  • Learn the basics of some "real" programming languages that I have never gotten a chance to use (like Haskell, Perl, Ruby...)
  • Muck around with silly / ridiculous programming languages while having an actual goal in mind for their use instead of playing with them just to play with them.

In order to make specific what I will be doing, I have established a set of rules to formalize my task:


  • Each "solution" must both follow the Project Euler rule of taking about a minute or less to run to completion, and in addition must actually be capable of outputting the solution in some manner - a program that gives information that can then be used to deduce the solution through additional work or guess and check over a small range is not sufficient.
  • Two languages, in order to be considered "different," must not be related by age or have a subset relation in code. For example, Java 1.5, Java 1.6, and Java 1.7 will all be considered "Java," even though each is a slightly different language. Also, C/C++ will be considered the same language as any Project Euler C++ code will probably use very few, if any features that are not in the C subset. In addition, for the purpose of this challenge, "assembly" and "machine code" will be considered one language - I am not going to just go around and write assembly for a bunch of different architectures.
  • A "language" is defined loosely as basically anything you can write in in order to instruct a computer to perform a sequence of instructions - languages need not be Turing complete or live up to any other such qualifications. Meta-languages such as the C Preprocessor and the C++ template meta-language will be considered unique languages, though preference will generally be given to "real" languages before working with them.
  • I will say that non-programming solutions are invalid - among these would be pencil and paper, calculator usage, graph plotting, excel spreadsheets, etc - due to the increased difficulty in establishing an adequate metric for difference among such methods, and due to not being in the spirit of this challenge. However, this rule may change at a later date, as trying to solve problems in this way could be pretty fun.
  • Programs must be either hand-written or programatically written by programs I wrote - a solution is not in "Java Bytecode" because I used the Java compiler, but a solution could be in Whitespace if I wrote a Python script that allowed me to convert semi-human-readable text into Whitespace.
  • A new Project Euler account will be made for this project in order to record my progress
  • Outside Project-Euler specific help is not allowed, including but not limited to looking at the forums for a problem and looking at my own older solutions (most of which are written in Scheme/Racket, Python, or Java)
  • I will post my solutions to the Project Euler forums for each problem as I complete them

No comments:

Post a Comment