My new favourite book

I was attending the UDS in Mountain View last week and it proved to be one of those fascinating albeit somewhat exhausting events (please see either of these resources for UDS reports and commentary).

Anyway, while being there I managed to get my hands on a paper copy of Real World Haskell. Being busy with the UDS I only started reading it on the plane back to Frankfurt. Despite being very, very tired I enjoyed it thoroughly and have to say it’s one of the best technical books I have ever perused.

All successful (technical) projects have a vibrant community and great documentation. This book makes Haskell so accessible, it may well be the last bit that’s needed for a great break-through for Haskell and functional programming in general!

Whether you are interested in functional programming or merely seeking to broaden your horizon, don’t delay, go out and grab a copy of this book. You won’t be disappointed.

This *is* much better indeed :)

My moaning about Python(2) was apparently “snow of yesterday”. Python3 just came out featuring extended iterable unpacking.

  1 Python 3.0rc1+ (py3k, Oct 28 2008, 09:22:29)
  2 [GCC 4.3.2] on linux2
  3 Type "help", "copyright", "credits" or "license" for more information.
  4  >>> def f(a, b, c):
  5  ...   print('%s, %s, %s' % (a, b, c))
  6 ...
  7  >>> f(1,2,3)
  8 1, 2, 3
  9  >>> f(1,*(2,3))
 10 1, 2, 3
 11  >>> f(*(1,2),3)
 12   File "<stdin>", line 1
 13 SyntaxError: only named arguments may follow *expression
 14  >>> f(*(1,2),c=3)
 15 1, 2, 3

Hmm, not ideal but it does the job :-)

Why is consistency so difficult to achieve?

  1 Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17)
  2 [GCC 4.3.2] on linux2
  3 Type "help", "copyright", "credits" or "license" for more information.
  4 
  5  >>> def f(*args):
  6  ...   print ' '.join([str(a) for a in args])
  7 ...
  8  >>> f(1,2,3)
  9 1 2 3
 10  >>> f(1,*(2,3))
 11 1 2 3
 12  >>> f(*(1,2),3)
 13   File "<stdin>", line 1
 14     f(*(1,2),3)
 15              ^
 16 SyntaxError: invalid syntax

Sigh.