From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 3CB2FBBCA for ; Sat, 10 May 2008 10:24:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnACAAj4JEjAXQIniGdsb2JhbACCNTaPHgEBAQ8gkxGFSQ X-IronPort-AV: E=Sophos;i="4.27,464,1204498800"; d="scan'208";a="26023586" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 May 2008 10:24:53 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4A8OruA024035 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 10 May 2008 10:24:53 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowDALr4JEjRVcbqc2dsb2JhbACCNTaPHgEMAwQECQ8Fkw2FSQ X-IronPort-AV: E=Sophos;i="4.27,464,1204498800"; d="scan'208";a="12062328" Received: from rv-out-0506.google.com ([209.85.198.234]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 May 2008 10:24:52 +0200 Received: by rv-out-0506.google.com with SMTP id k40so1594725rvb.57 for ; Sat, 10 May 2008 01:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=uPP/7rbQhjRfinkuv8UscTc8Z6bgjf7eAvwGxTS7eKo=; b=sXAzLhNsGSQ/0hzwgT8kcs+g/x3ldjMJ4Phv2vQ+py+dkCQUhBGzD7gVzjvWJEk8ZHzxKBw5aUoLZmpNifvSsYGaonqxOvcylUpOqtNtwQjscI+5svj4uvWWeF56efeGY3UY/eUNnYOOoHFkOBByjS/9E6v77u9njcmnxrQhVN8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=JOgb5YD2hVH3lI7ePqL9aqcuyQda+USdg427kyR7u47DRjcNdFdTB1DZVjYdBP7bZWLpYM4hCO9UYmtU2inMBAty0cd/Z7lkczxhOEA1sBjAb6+/UYzfMWuuDY2j3iz5Jw3P+NE+jMEDw4pyzlN8D16OTLq9CwBL5crFYdFcwkA= Received: by 10.140.127.13 with SMTP id z13mr2605987rvc.142.1210407890930; Sat, 10 May 2008 01:24:50 -0700 (PDT) Received: by 10.140.193.3 with HTTP; Sat, 10 May 2008 01:24:50 -0700 (PDT) Message-ID: Date: Sat, 10 May 2008 10:24:50 +0200 From: "Berke Durak" To: "Richard Jones" Subject: Re: [Caml-list] Re: Why OCaml rocks Cc: caml-list@inria.fr In-Reply-To: <20080510075205.GA2043@annexia.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6069_11976858.1210407890928" References: <200805090139.54870.jon@ffconsultancy.com> <200805090609.36123.jon@ffconsultancy.com> <1210331526.17578.32.camel@flake.lan.gerd-stolpmann.de> <200805091910.41381.jon@ffconsultancy.com> <1210365645.17578.88.camel@flake.lan.gerd-stolpmann.de> <9d3ec8300805091400q1ed60bf8x95e31814ebf62473@mail.gmail.com> <20080509222603.GA21613@annexia.org> <20080510075205.GA2043@annexia.org> X-Miltered: at concorde with ID 48255BD5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; berke:01 durak:01 berke:01 durak:01 ocaml:01 0200,:01 ad-hoc:01 ad-hoc:01 marshalling:01 hashing:01 hashing:01 marshalling:01 0200,:01 10,:98 10,:98 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_6069_11976858.1210407890928 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, May 10, 2008 at 9:52 AM, Richard Jones wrote: > On Sat, May 10, 2008 at 01:01:03AM +0200, Berke Durak wrote: > > But you are saying in the README that values in the ancient heap have > some > > limitations, namely no ad-hoc polymorphic primitives. > > You misunderstand this limitation, but anyway ... The paragraph from your README then needs some clarification. > (1) Ad-hoc polymorphic primitives (structural equality, marshalling > and hashing) do not work on ancient data structures, meaning that you > will need to provide your own comparison and hashing functions. For > more details see Xavier Leroy's response here: As you cannot mutate anything that is ancient (since it might be concurrently accessed), you cannot mark or modify them in-place for ad-hoc marshalling or deep copying. Is that correct? Comparison does not mark (and thus does not work on cyclic structures). Does it work on values in the ancient heap (I'm not talking of handles here)? So it seems that adding a generic copy-out-of-the-ancient heap function (which marks in a private area) would be worthwhile. Should not be too difficult. -- Berke ------=_Part_6069_11976858.1210407890928 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, May 10, 2008 at 9:52 AM, Richard Jones <rich@annexia.org> wrote:
On Sat, May 10, 2008 at 01:01:03AM +0200, Berke Durak wrote:
> But you are saying in the README that values in the ancient heap have some
> limitations, namely no ad-hoc polymorphic primitives.

You misunderstand this limitation, but anyway ...

The paragraph from your README then needs some clarification.

> (1) Ad-hoc polymorphic primitives (structural equality, marshalling
> and hashing) do not work on ancient data structures, meaning that you
> will need to provide your own comparison and hashing functions.  For
> more details see Xavier Leroy's response here:

As you cannot mutate anything that is ancient (since it might be concurrently
accessed), you cannot mark or modify them in-place for ad-hoc marshalling or
deep copying.  Is that correct?

Comparison does not mark (and thus does not work on cyclic structures).
Does it work on values in the ancient heap (I'm not talking of handles here)?

So it seems that adding a generic copy-out-of-the-ancient heap function
(which marks in a private area) would be worthwhile.  Should not be too difficult.
--
Berke


------=_Part_6069_11976858.1210407890928--