Skip to content

lgastako/polyeuler

Repository files navigation

This is my attempt to solve all of the problems from Project Euler in as
many languages as possible.  My goal is to, wherever possible, create a single
source file which produces a single interpreted script or compiled executable
which when invoked from the command line with no arguments will print the
answers to each of the euler problems in order, or, if invoked with arguments
treats the arguments as problem numbers and prints the answer to the
appropriate problems.

I also plan at some point (probably once I have gotten the CLI done for
each of the languages I'm using) to also implement printing of timing
information in the output of each result and then optimize each solution
to be quick (a few seconds or less whenever possible and under a minute
for all cases).  During this optimization phase I am also planning on
trying to implement more idiomatic (relative to the implementation language)
solutions where I have not already done so.

NOTE: I am doing this for autodidactic purposes, and therefore am not
interested in pulling changes from other people, however, people are welcome
to fork this project and do whatever they like with it.  Dustin J. Mitchell
has created one fork that specifically encourages people to pitch in, here:

http://github.com/djmitche/polyeuler/tree/master


CURRENT SOLUTIONS
=================
(Languages with at least one solution implemented (number of solutions
in parens)):

C (6) +cli
Clojure (18+) -cli
CoffeeScript (5) +cli
Erlang (7) -cli
F# (1) +cli
Fortran (3) -cli
Fan (3) +cli
Go (2) +partial cli
Java (5) +cli
Javascript (7) +cli
Common LISP (7) +partial cli
Lua (7) +cli
Nice (2) -cli
OCaml (2) -cli
Pascal (4) -cli
Perl (6) +cli
PHP (2) +cli
Python (8) +cli
R (2)
Reia (1) -cli
Ruby (7+) +cli
Scala (2) +cli
Scheme (7) -cli
Haskell (21+) +cli


That's 24 languages with 134+ (overlapping) solutions.


Language list for each solution:
#1: C, Common Lisp, Clojure, CoffeeScript, Erlang, Fan, F#, Fortran, Go,
    Haskell, Java, JavaScript, Lua, Nice, OCaml, Pascal, Perl, PHP, Python,
    R, Reia, Ruby, Scala, Scheme
#2: C, Common Lisp, Clojure, CoffeeScript, Erlang, Fan, Fortran, Go, Haskell,
    Java, JavaScript, Lua, Nice, OCaml, Pascal, Perl, PHP, Python, R, Ruby,
    Scala, Scheme
#3: C, Common Lisp, Clojure, Erlang, Fortran, Haskell, Java*, JavaScript, Lua,
    OCaml, Pascal, Perl, Python, Ruby, Scala, Scheme
#4: C, Common Lisp, Clojure, CoffeeScript, Erlang, Haskell, Fan, Fortran,
    Java, JavaScript, Lua, Pascal, Perl, Python, Ruby, Scheme
#5: C, Common Lisp, Clojure, Erlang*, Haskell*, Java, JavaScript*, Lua, Perl,
    Python, Ruby, Scheme
#6: C, Common Lisp, Clojure, Erlang, Haskell, JavaScript, Perl, Python, Lua,
    Ruby, Scheme
#7: Common Lisp, Clojure, Erlang, Haskell*, JavaScript, Lua, Perl, Python,
    Ruby, Scheme*
#8: Clojure, CoffeeScript, Haskell
#9: Clojure, Haskell
#10: Clojure
#11: Clojure, Haskell
#12: Haskell*
#13: Haskell
#14: Clojure, Haskell*
#15: Clojure, Haskell
#16: Clojure, Haskell
#17: Clojure, Haskell
#18: Python
#19: Clojure
#20: Clojure, Haskell
#21: Haskell*
#25: Haskell
#26: Haskell
#29: Clojure, Haskell
#30: Haskell
#31: CoffeeScript
#34: Clojure, Haskell
#35: Haskell*
#36: Haskell
#40: Clojure
#42: Clojure
#52: Haskell
#59: Clojure

* Idicates a slow solution.

That's 33 unique problems solved.


Missing languages that I would like to (and probably will) add:
===============================================================
Objective-C
Prolog


Maybe some day, (roughly) in order of preference:
=================================================
Ioke
Oz
Mathematica
Smalltalk
io
Forth
C#
J
Clean
Rebol
Maude
Logo
Basic
Rexx
TCL
SQL?
unix shells (bash / ksh / csh / tcsh / zsh)
other misc unixy things (awk, sed, etc)
Postscript
Brainfuck
Whitespace
Eiffel
Groovy



-
John Evans
john@jpevans.com

About

My attempt to finish Project Euler in as many programming languages as possible.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published