From: Brian Hurt <bhurt@spnz.org>
To: Jean-Christophe Filliatre <filliatr@lri.fr>
Cc: Michael Wohlwend <micha-1@fantasymail.de>,
OCaml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] algorithm question
Date: Mon, 27 Feb 2006 08:48:53 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.63.0602270844580.9569@localhost.localdomain> (raw)
In-Reply-To: <17410.54463.981731.409109@gargle.gargle.HOWL>
On Mon, 27 Feb 2006, Jean-Christophe Filliatre wrote:
>
> > > I want to implement the dancing link algorithm as described here:
> > > http://www-cs-faculty.stanford.edu/~knuth/papers/dancing-color.ps.gz
> > >
> > > has someone an idea if there is an equally fast way to implent
> > > this more functional?
> > [...]
> > With a purely functional (aka applicative aka
> > immutable) data structure, modifications are not destructive. After you
> > add a new element into a map, for example, the old map is still valid and
> > not changed. So you can support undoing operations by just keeping
> > references to the old copy of the data structure around, and dropping the
> > new (modified) data structure and returning to the old one.
>
> For the little story, I heard this ``dancing links'' talk by Knuth at
> Stanford, which was simply delightful, and at the end I asked him
> about the use of persistent data structures in backtracking
> algorithms. I had to give a few explainations about what I meant, and
> when I mentioned ML, Knuth simply replied: ``oh, the stuff by Mc
> Carthy? I've never been convinced about it...''
Which is something I find vaguely humorous. When he wrote the first
version of AoCP, he wrote all the examples in assembler, because he wanted
to use a language that wouldn't go out of date in 50 years. Of course,
what happened was the architecture design changed so radically over the
next couple of decades that he needed to rewrite the books in a new
assembly.
On the other hand, a core, simplified Lisp was relevent thirty years ago,
is relevent today, and is the most likely language to still be relevent
thirty years from now.
Brian
prev parent reply other threads:[~2006-02-27 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-26 20:21 Michael Wohlwend
2006-02-26 20:48 ` [Caml-list] " Diego Olivier Fernandez Pons
2006-02-26 21:28 ` Michael Wohlwend
2006-02-26 20:51 ` Brian Hurt
2006-02-26 21:03 ` Diego Olivier Fernandez Pons
2006-02-27 10:30 ` Jean-Christophe Filliatre
2006-02-27 11:02 ` Diego Olivier Fernandez Pons
2006-02-27 14:48 ` Brian Hurt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.63.0602270844580.9569@localhost.localdomain \
--to=bhurt@spnz.org \
--cc=caml-list@yquem.inria.fr \
--cc=filliatr@lri.fr \
--cc=micha-1@fantasymail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox