Archive for April, 2008

A Rapid Language Tour

I’ve been in Japan for 4 weeks now and my time here is not going to waste… between Japanese classes, I’ve been flirting with ocaml, scala, c (I read the K&R book) and now Smalltalk (with Squeak). My casual language survey is coming to an end, with no more obvious omissions, I would think. (covered before: Haskell, Erlang, Scheme and Common Lisp … and this goes without mentioning the others I touched: Python, Perl, Ruby, C++, Java)

No language is perfect. Performance seems indirectly proportional to expressiveness. This is the intuitive answer … and sadly, the one I found experimentally.

I mentioned before my list of programming exercises I try once I get past the introductions and tutorials. Always working on the same problems really helps understand the idioms of a new language.

I tried to code Tower of Hanoi and “benchmark” the time it takes to execute them for a few languages.

Tower of Hanoi, 20 rings:
* Ruby: ~20 seconds
* C: ~1.2 seconds
* OCaml: ~5 seconds
* Scala: ~16 seconds
* Haskell: >2 minutes … stopped it at that point

As for Smalltalk … this is a whole other story. The main motivation is Seaside, of course. Smalltalk is interesting in itself for many reasons:

  • You can see where Ruby got its inspiration
  • You can experience what object orientation really means
  • You can try “crazy” stuff like switching the garbage collector on the fly …
  • You can experience the-language-is-the-environment-is-the-IDE, which seems like both a blessing and a curse

I’m trying to get to the point where I can write a few webapps in Seaside and see if my whole world is transformed. If you want to understand “why Seaside”, you can watch The Heretic Web Framework – Seaside. The idea of continuations and the idea of assigning code blocks to hyperlinks (instead of named goto: URLs) are definitely something worth investigating.

It doesn’t mean that Smalltalk is a destination… it’s just one of the stops along the way.

Read Full Post »

Fortune 5,000,000

Between DDH Talk – Startup School 2008 and The 4-Hour Workweek, a few common ideas are emerging: start small, do just enough to live, enjoy life. :)

The weird thing about success is that you can tell people exactly how to achieve it and they still won’t. It’s the reason why people like Tim Ferris can sell you his book without worrying about everybody doing the same. It’s also the reason great chefs can publish their recipes without being afraid of going out of business.

Are you going through the motions?

Read Full Post »