[plt-scheme] Project Euler was Hash Table implementation

From: Grant Rettke (grettke at acm.org)
Date: Sat Aug 4 18:04:12 EDT 2007

On 8/3/07, Mark Engelberg <mark.engelberg at gmail.com> wrote:
> Anyone else want to comment on the relative strengths of languages for
> Project Euler?

Hi Mark,

It is a lot of fun to read everyone's solution to the problems on
project Euler.

Like you had said, the J and Mathematica solutions are always the most
succinct, but you don't learn much from them.

Haskell seems to be the language for Euler, it is as though it were
tailored for the problems. That makes sense though, as what I've read
about Haskell is that it was made for math.

Ruby and Python do compose a large chunk of solutions. Ruby has nice
solutions once in a while, though you quickly realize that doing
comprehensions the Ruby way is very very ugly. Python doesn't interest
me much, despite the fact that there seems to be a critical force
growing behind Python and its FP features.

The asm, C, and C++ solutions are, interesting. Sometimes it is fun to
take a C or C++ solution and cut it over to Scheme. You can guess what
you need to do in Scheme to get the same thing (a bit array in C is a
vector of Booleans in Scheme perhaps).

I used Project Euler as a motivation to start writing Scheme code.
Having started learning Scheme, I needed a driver for writing code,
and for that Euler is a real asset. It has led me down all sorts of
different paths of learning not only about Scheme (comprehensions,
streams, various SRFIs), but about programming in general.


Posted on the users mailing list.