Head First Project Euler

3 10 2009

After working through problems 1 to 7 in Clojure, I’m starting to realize the advantages of using a high level programming language. It’s easier to think about complex algorithms without worrying about memory, types and data structure implementations.

I’m running the problems on a virtualized Ubuntu with 512 MB RAM allocated and a single core. I’m planning to implement the problem in Clojure first followed by C using the same algorithm.

You’re probably wondering why C and not another HLL like Python or another functional language like Haskell. The reason is I want to contrast the actual implementation details of a good algorithm using an extremely high level language like Clojure with a real bare knuckle language like C.

With Clojure, we get meta-programming with macros, while with C we can roll our own custom data structures specific to the task at hand. With excellent java interop, Clojure lets me use LISP syntax for metaprogramming and algorithm design but I could always drop down to java for a custom data structure.

Sound interesting?




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: