caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Jean-Baptiste Jeannin <jeannin@cs.cornell.edu>
Cc: Nicholas Lucaroni <nicholas.r.lucaroni@gmail.com>,
	Edgar Friendly <thelema314@gmail.com>,
	 "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Hash function: complexity and circular structures
Date: Fri, 18 Jan 2013 19:27:14 +0100	[thread overview]
Message-ID: <CAPFanBGqAdTe2uujQGtxYVrj-W5Y_Ez0Xu0_fgrY2OttekYzgw@mail.gmail.com> (raw)
In-Reply-To: <50F98A81.6080902@cs.cornell.edu>

A blunt point of view: comparing implicitly circular structures is a
sure road to hell, and you should use an explicit representation of
circularity (eg. with a element that just means "nothing here, you
should rewind to the other side") that will not blow up at each
occasion it gets -- and is generally much more flexible.

On Fri, Jan 18, 2013 at 6:46 PM, Jean-Baptiste Jeannin
<jeannin@cs.cornell.edu> wrote:
>
> I would be curious to know if this is by design (it is supposed not to
> work), or if it is a problem with the implementation of compare, or of
> Hashtbl.find. In particular, if it is by design, why have updated the hash
> function to support circular lists?
> I am also now stuck on creating an (efficient) hashtable supporting circular
> data structures as keys. Any idea on this?

  reply	other threads:[~2013-01-18 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 15:35 Jean-Baptiste Jeannin
2013-01-17 15:46 ` Nicholas Lucaroni
2013-01-17 16:41   ` Edgar Friendly
2013-01-17 17:05     ` Nicholas Lucaroni
2013-01-18 17:46       ` Jean-Baptiste Jeannin
2013-01-18 18:27         ` Gabriel Scherer [this message]
2013-01-18 20:11           ` Nick Lucaroni

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=CAPFanBGqAdTe2uujQGtxYVrj-W5Y_Ez0Xu0_fgrY2OttekYzgw@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jeannin@cs.cornell.edu \
    --cc=nicholas.r.lucaroni@gmail.com \
    --cc=thelema314@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).