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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 9F5D0BC37 for ; Sat, 20 Jun 2009 10:32:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AngCAJs7PErRVdzemGdsb2JhbACYLj8BAQEBAQgJDAcTpGePegEDAgSEBQWHJQ X-IronPort-AV: E=Sophos;i="4.42,258,1243807200"; d="scan'208";a="31621543" Received: from mail-fx0-f222.google.com ([209.85.220.222]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Jun 2009 10:32:02 +0200 Received: by fxm22 with SMTP id 22so2442140fxm.9 for ; Sat, 20 Jun 2009 01:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=IOr+WcLqWti+rv8dQjbz4IOfMoHOzXFVtdm80j7K2yo=; b=L+XLKSVC9syGDtB8MywCs00960OMDi52B1+UfIM0vw16FyJNNBu2xQy7GjxXn7DVr6 oEgq84UKbl32Gpa7dFCBWHQd2quxBS11DfiXUGySJhOdrU98bX1sCVWoSzZ740xR/tEr 388Wg86KArfopnuFZNVxBVTps1bbQ1xTm1tRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=IT6AfX/iXorhg0orluxz/3tlDEeLaD7qZJFVD/Aldzlkx5JdIRwJi6xVN25Dz8LPMH fMCDmSH09NEw2hyPodsjBEarCeaDPE7FQaAwYvJIs3NLOJIk1ZYjji73Drt1ZEaKyiN+ F18Bhgvu4i0SZIr/1+SW+/3hXp3srufr5cb0U= Received: by 10.86.49.16 with SMTP id w16mr3963085fgw.4.1245486722172; Sat, 20 Jun 2009 01:32:02 -0700 (PDT) Received: from ?192.168.1.34? (191-20.79-83.cust.bluewin.ch [83.79.20.191]) by mx.google.com with ESMTPS id d6sm880365fga.24.2009.06.20.01.32.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Jun 2009 01:32:01 -0700 (PDT) Sender: =?UTF-8?Q?Daniel_B=C3=BCnzli?= Message-Id: <91F6B99D-3075-47A1-9257-0BD208C6D5D8@erratique.ch> From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: OCaml List In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: [Caml-list] Re: Obj.magic and existential types. Date: Sat, 20 Jun 2009 10:30:29 +0200 References: <4A3BCE1A.3010403@citycable.ch> X-Mailer: Apple Mail (2.935.3) X-Spam: no; 0.00; bunzli:01 buenzli:01 existential:01 bounded:01 caml-list:01 int:01 int:01 let:03 let:03 frp:04 daniel:04 daniel:04 types:05 ecrit:06 thread:06 Le 19 juin 09 =E0 20:47, Jake Donham a =E9crit : > You can also find FRP in froc (which is quite similar to React; the > main difference is that it works in browsers): Theoretically React may also work in browsers via o'browsers = (http://ocsigen.org/obrowser=20 ) but I never tried. Correct me if I'm wrong but from my perspective froc is different from =20= react in that it leaks memory (see example below) and is less thread =20 friendly (because it uses global datastructures). Best, Daniel The following froc program consumes an unbounded amount of memory : > open Froc_afp;; > > let n =3D return 1;; > > let () =3D > while true do > let m =3D n >>=3D fun x -> return (x + 1) in > print_int (read m); > Gc.full_major (); > done The following equivalent react program consumes a bounded amount of =20 memory : > open React;; > > let n, _ =3D S.create 1 > > let () =3D > while true do > let m =3D S.map (fun x -> x + 1) n in > print_int (S.value m); > Gc.full_major (); > done >