From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 5401980091; Fri, 2 Dec 2016 14:41:57 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=alain.frisch@lexifi.com; spf=None smtp.mailfrom=alain.frisch@lexifi.com; spf=None smtp.helo=postmaster@vrout30.yaziba.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=pra; client-ip=185.56.204.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=mailfrom; client-ip=185.56.204.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@vrout30.yaziba.net) identity=helo; client-ip=185.56.204.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="postmaster@vrout30.yaziba.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3ATbE0wRRHBE9UZVl1RJxlHNl9edpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa64Yx2N2/xhgRfzUJnB7Loc0qyN4vumBTdLu8rJ8ChbNscTB1ld0Y?= =?us-ascii?q?RetjdjKfDGIHWzFOTtYS0+EZYKf35e1Fb/D3JoHt3jbUbZuHy44G1aMBz+MQ1o?= =?us-ascii?q?Ora9QdaK3Iyfntq/8JzLYghOmCH1IfYrdE33/k3tsZwogI1pJ6AtgjHApnJUM7?= =?us-ascii?q?BIxGVjKFSP2Rz14s6s1Jlo6CVftvRn8NRPB+GyeK8jTLNVChwnNXo07Yvlr12L?= =?us-ascii?q?aiCG439Ud2wXlhtODEDh7QrmFsP6uy7+8+58wzWyPMvsTLlyVy70vIlxTxq9oS?= =?us-ascii?q?MONjhx3nvWkcdwxPZSpBugoVpx2Y/Pa4G9MPduf63cO9gdQDwSDY5qSyVdD9bk?= =?us-ascii?q?PMM0BO0bMLMd9tGlqg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BGAADoeEFYmCPMOLldHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBgw0BAQEBAXmBBqRRDpZ0K4V3AoJaEQEBAQEBAQEBAQEBEgEBAQE?= =?us-ascii?q?BCAsLBx0wgjMEARUBBIIXAQUjFTQKEwsSBgICIwMCAkYDDgYBDAYCAQEQiF8BC?= =?us-ascii?q?axvgimLPAEBCAEBAQEBASGBC4UzgX2CXoRJgwSCXQWaY4F4hFOKSYFyiBuGLId?= =?us-ascii?q?fgj+DYoQLAjWBGYQOgWlxAYcugU8BAQE?= X-IPAS-Result: =?us-ascii?q?A0BGAADoeEFYmCPMOLldHAEBBAEBCgEBFwEBBAEBCgEBgw0?= =?us-ascii?q?BAQEBAXmBBqRRDpZ0K4V3AoJaEQEBAQEBAQEBAQEBEgEBAQEBCAsLBx0wgjMEA?= =?us-ascii?q?RUBBIIXAQUjFTQKEwsSBgICIwMCAkYDDgYBDAYCAQEQiF8BCaxvgimLPAEBCAE?= =?us-ascii?q?BAQEBASGBC4UzgX2CXoRJgwSCXQWaY4F4hFOKSYFyiBuGLIdfgj+DYoQLAjWBG?= =?us-ascii?q?YQOgWlxAYcugU8BAQE?= X-IronPort-AV: E=Sophos;i="5.33,729,1477954800"; d="scan'208";a="247820268" Received: from vrout30-bl.yaziba.net (HELO vrout30.yaziba.net) ([185.56.204.35]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Dec 2016 14:41:56 +0100 Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id A4F0A51EF6; Fri, 2 Dec 2016 14:41:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id A4B0216027F; Fri, 2 Dec 2016 14:41:55 +0100 (CET) X-Virus-Scanned: amavisd-new at mtaout20.int.yaziba.net Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id x3vErPGSfgpI; Fri, 2 Dec 2016 14:41:55 +0100 (CET) Received: from [10.0.210.40] (unknown [185.23.92.144]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id 85825160152; Fri, 2 Dec 2016 14:41:55 +0100 (CET) To: Vincent Balat , ocsigen@inria.fr, OCaml Mailing List References: <96757896-e79c-f940-fc3a-090fc1419df2@lexifi.com> From: Alain Frisch Message-ID: <4b5b6340-0cdd-abc1-b6dc-b97e3d6b9cdf@lexifi.com> Date: Fri, 2 Dec 2016 14:41:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeelfedrgeefgddviecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthhqredttdefjeenucfhrhhomheptehlrghinhcuhfhrihhstghhuceorghlrghinhdrfhhrihhstghhsehlvgigihhfihdrtghomheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpvghlmhdqlhgrnhhgrdhorhhgnecukfhppedukeehrddvfedrledvrddugeegnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Announce: ocaml-vdom (pre-release) Hi Vincent, First, let me insist that I have zero experience with functional=20 reactive interface, Tyxml or React. So I'm not in a very good position=20 to comment on them! My *intuition* is that the tradeoff would be a bit similar to the one=20 with Jane Street's Incremental. Both FRP and SAC require to introduce=20 extra concepts (signals, events, variables, observers; specific maps and=20 binds) which add some weight compared to a simple one-directional "view"=20 mapping from state to vdom. What you gain with those approaches is a=20 more fine-grained notion of update, which can be necessary in some cases. Interestingly, Elm moved away from FRP :=20 http://elm-lang.org/blog/farewell-to-frp . This is not just a shift of=20 terminology, and it corresponds to the removal of the "Address" argument=20 on the view function in favor of a parametrized vdom type: =20 https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md#n= o-more-signaladdress (In a sense, the "Address" argument is rather similar to the "inject"=20 function which we discussed with Yaron.) About Tyxml itself: I think that it addresses a rather different set of=20 issues (ensuring that the DOM is "statically correct" w.r.t. definition=20 of HTML5/SVG). We haven't identified those issues as being relevant for=20 us, i.e. we have never hit a bug related to breaking such validity=20 constraints, and the lack of static typing does not seem to make=20 refactoring UI code more difficult or fragile; so it's not clear to us=20 that adding more static typing here would help. If we tried to combine=20 it with our vdom approach, it would probably add some noise, since the=20 vdom type would receive extra type parameters, which would be visible in=20 the interface of all components exposing "view" functions. Alain On 02/12/2016 13:51, Vincent Balat wrote: > Hi Alain, > > How would you compare the virtual DOM with a functional reactive > interface, as you can do with Tyxml and React? > > -- Vincent > > Le mer. 30 nov. 2016 =C3=A0 17:53, Alain Frisch > a =C3=A9crit : > > Dear all, > > You might be interested in the ocaml-vdom project which has been used= by > LexiFi for some time and open-sourced recently. It contains two > components which we use to create our browser-side UIs with js_of_oca= ml > and which might be useful to the community: > > - Bindings to the DOM and other browser APIs, implemented with > gen_js_api. (Partial bindings, expanded on demand.) > > - An implementation of a "virtual DOM" and the "Elm architecture", > i.e. a programming model where the UI is specified by a state type, a > view function (producing a functional version of the DOM), and an upd= ate > function that modifies the state based on messages (generated by UI > events or external interactions). > > > Project page: > > https://github.com/LexiFi/ocaml-vdom > > > -- Alain >