about photos bookshelf portfolio blog home
Begin main content

The Road to Enlightenment Is Littered with Irritating, Superfluous Parentheses

Arto Bendiken has posted a wonderful Q&A on how he got started with Lisp, with the same title as this post.

His path is not dissimilar to mine except that I had the good fortune to get hooked on dynamic languages early on, which is possibly why I have been slower to get from B to C with Lisp (less need when you can implement many list based and functional idioms in Perl).

I almost want to like Smalltalk more than Lisp, but I suspect that is because of the OO ingrained in me and also my worship of Xerox Parc, Douglas Engelbart, etc. My gut instinct, however, tells me that Lisp is just that one level higher.

I'm very interested in any languages/dialects that implement the power of Lisp with less noise. I'm sure it's possible, but it just hasn't been "discovered" yet. On the other hand, perhaps it's not. Perhaps the endless, nested, streams of braces and symbols are the purest representation of code. Like logic DNA.

Update: In Arto's post he mentions the Lisp machines. I would suggest that in a not dissimilar way that Squeak is a software embodiment of the Alto Smalltalk Machine, Emacs is a rough embodiment of a Lisp machine. Some people even use Emacs as their entire windowing system.

03:16 AM, 16 Jan 2007 by Mark Aufflick Permalink | Comments (0)

Einstein's Puzzle

I can't believe I've never come across this before. It took me a bit under 30 minutes using pen and paper (but I was distracted by work a few times...). Probably would have been quicker to write a Prolog program (but it's much more satisfying by hand :) See how you go:


The Brit lives in the red house.
The Swede keeps dogs as pets.
The Dane drinks tea.
The green house is to the left of the white house.
The owner of the green house drinks coffee.
The man who smokes Pall Mall keeps birds.
The owner of the yellow house smokes Dunhill.
The man living in the house right in the center drinks milk.
The Norwegian lives in the first house.
The man who smokes Blends lives next to the man who keeps cats.
The man who keeps horses lives next to the man who smokes Dunhill.
The man who smokes Blue Master drinks beer.
The German smokes Prince.
The Norwegian lives next to the blue house.
The man who smokes Blends has a neighbor who drinks water.

Who keeps the fish?




Email or meebo me for the answer (comments with the answer will be deleted!).

Wikepedia has some information on the history of this puzzle. Excerpt:

The Zebra Puzzle is a well-known logic puzzle.

It is often called "Einstein's Puzzle" or "Einstein's Riddle" because it is said to have been invented by Albert Einstein as a boy, with the common claim that Einstein said "only 2 percent of the world's population can solve this". It is also sometimes attributed to Lewis Carroll. However, there is no known evidence for Einstein's or Carroll's authorship.

There are several versions of this puzzle. The version below is quoted from the first known publication in Life International magazine on December 17, 1962. The March 25, 1963, issue contained the solution given below and the names of several hundred solvers from around the world.

The version of the puzzle given in Wikipedia is tougher because two pieces of information are missing. Naturally someone has already written Prolog and Lisp solutions for it :)

02:38 AM, 16 Jan 2007 by Mark Aufflick Permalink | Comments (0)

XML

Blog Categories

software (4)
  ..heads up 'tunes (4)

Notifications

Icon of Envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: all good ideas
  2. Unregistered Visitor: Excellent!
  3. Mark Aufflick: Hey thanks
  4. Unregistered Visitor: Fantastic entry
  5. Mark Aufflick: Bah - dashboard widgets
  6. Unregistered Visitor: Nice
  7. Mark Aufflick: elegant maths (as opposed to elegant rabbit)
  8. Unregistered Visitor: Does that really matter?
  9. Mark Aufflick: Inspiration
  10. Unregistered Visitor: Perhaps...