Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Benjamin Canou <benjamin.canou@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Obj.magic and existential types.
Date: Mon, 22 Jun 2009 11:19:21 +0200	[thread overview]
Message-ID: <4A3F4C99.2030808@gmail.com> (raw)
In-Reply-To: <E83DCC27-418A-4DF4-8292-7C73ABEEB615@erratique.ch>

Daniel Bünzli a écrit :
>
> Le 21 juin 09 à 20:08, Jake Donham a écrit :
>
>> I have not tried either, but from a cursory glance at the code I have 
>> the impression that React's space safety relies on support for weak 
>> references, which standard Javascript does not have.
>
> Yes.
>
> The weak module is available in obrowser, but I don't know if it 
> implements its semantics. If the author of obrowser is on this list 
> would he be kind enough to enlight us ?
Abstract: The weak.js file remaining in the distro is a mistake. I see 
possibilities to implement them but have no short term plans for a 
perfect solution.

Well... there is no such a file as this garbage weak.js in the 
distribution, it must have spawn by itself in your computer ;-)
Indeed there is no such mechanism in JS. I have ideas to implement them 
on top of JS, in particular a trivial solution involving reference 
counters and updating weak arrays incrementally every N VM instructions 
could suffice in some cases (but induce memory leaks in presence of 
cycles through the weak value, of course). There are more satisfying 
possibilities but I have yet to figure out one with good complexity, 
incremental, and not too hard to implement (in particular not too 
intrusive in other parts of the VM).
 
  Cheers.

PS: btw, there is now a darcs repo for obrowser at ocsigen.org for those 
who didn't know


  reply	other threads:[~2009-06-22  9:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 17:42 Guillaume Yziquel
2009-06-19 18:21 ` Daniel Bünzli
2009-06-19 18:30   ` Guillaume Yziquel
2009-06-19 18:37     ` Daniel Bünzli
2009-06-19 18:47   ` [Caml-list] " Jake Donham
2009-06-20  8:30     ` Daniel Bünzli
2009-06-21 18:08       ` Jake Donham
2009-06-21 18:39         ` Yaron Minsky
2009-06-22  0:03         ` Daniel Bünzli
2009-06-22  9:19           ` Benjamin Canou [this message]
2009-06-22 17:02           ` Jake Donham
2009-06-23  0:24             ` Daniel Bünzli
2009-06-23  0:34               ` Jake Donham
2009-06-23  2:22               ` Jake Donham

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=4A3F4C99.2030808@gmail.com \
    --to=benjamin.canou@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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