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, HTML_MESSAGE,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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id DB624BBAF for ; Sun, 30 Nov 2008 13:09:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUBAO4QMknRVdkLkWdsb2JhbACCQDCQGj4BAQEBCQsKBxEDrysuhHqEZAEDAQOCeoIc X-IronPort-AV: E=Sophos;i="4.33,689,1220220000"; d="scan'208";a="31991843" Received: from mail-gx0-f11.google.com ([209.85.217.11]) by mail4-smtp-sop.national.inria.fr with ESMTP; 30 Nov 2008 13:09:11 +0100 Received: by gxk4 with SMTP id 4so1740539gxk.3 for ; Sun, 30 Nov 2008 04:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=5PRadDNg5o6Jo58glbnSrvsRoF33zJGMIqSmvEWqHec=; b=haH8eLGuAeP7lp0aJ4i+3GQNL3XXl3LUcFBzMJYJvOMYxZIaPE+KTvQntpEemKdFx/ /qcZyOkKlJjwL23QbjELXuALbI96f9VJAwxI1CFCe/01UWbwzCnPexqFco8J810BQzYc ZNBFCbw9iwIUFtBWXnzzl2oV5RoA2DTtVEEZU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=KYQQZGwWFDOCYpamhJtevd2YliIzHnXWX+LPlQqP7pogR7ovA4banaMtxPABz0n6ar 6B8sVde3xUVAQg1Go3zHXcVxouZ3oSIq/AFv59wn9D1XoLEy7QL420udIdVKcAT/jPxn BbwlphHxHMA+L2+eKNQqVE7lER/EW1A3183tA= Received: by 10.65.188.14 with SMTP id q14mr10532624qbp.56.1228046947198; Sun, 30 Nov 2008 04:09:07 -0800 (PST) Received: by 10.65.180.20 with HTTP; Sun, 30 Nov 2008 04:09:07 -0800 (PST) Message-ID: <5e5d16b10811300409o85edd3cv3042e720555db331@mail.gmail.com> Date: Sun, 30 Nov 2008 13:09:07 +0100 From: "William Le Ferrand" Sender: warnegia@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] [announce] O'Browser : OCaml on browsers In-Reply-To: <1227281254.6375.23.camel@localhost> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_41230_21011566.1228046947238" References: <932408.46428.qm@web30501.mail.mud.yahoo.com> <1227281254.6375.23.camel@localhost> X-Google-Sender-Auth: 23eac854b50a8ef1 X-Spam: no; 0.00; ocaml:01 rewriting:01 node:01 node:01 ocaml:01 compiler:01 bytecode:01 bytecode:01 compiler:01 beginner's:01 bug:01 rewriting:01 beginner's:01 bug:01 plug-in:98 ------=_Part_41230_21011566.1228046947238 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi ! Thank you for this amazing work ! I'm rewriting large parts of my website using this tool, and I may have found two little bugs : * get_attribute (in rtjs.js) when get_attribute "toto" returns a boolean, value_from_string returns the empty string (this is nasty ..) (temporary) solution : in rtjs.js, just cast on line 33 with something like return value_from_string (v == null ? "" : (v+"")); * input (in js.ml) it seems that the editable function editable = ( function true -> (try Node.remove_attribute node "disabled" with _ -> ()) | false -> Node.set_attribute node "disabled" "disabled" ); works better. (at least it works with buttons, check boxes and so on) Thank you again ! All best, William Le Ferrand www.beouifi.org 2008/11/21 Benjamin Canou > Hi, > > >From Kuba Ober: > > Pardon the question, but is this meant to be "useful" in the future, > > or is it just a fun experiment (in which case the next target should > > be brainfuck). > Coming soon: the OCaml VM on a turing machine ! > > >From Burgisser Francois : > > Good idea but maybe a browser plugin to manipulate DOM would be much > > more efficient. > >From Gabriel Kerneis: > > But, sadly, much less portable. > >From Jon Harrop: > > Could you write a compiler and call eval to get better performance? > >From David Thomas: > > I'd like to see a plugin that makes available to JS a function to > > execute ocaml bytecode. > > Our plan is to achieve efficiency with a (not yet available) browser > plug-in (the original bytecode interpreter or the native compiler) while > remaining portable by using the JavaScript VM where the plug-in is not > available. So we don't currently focus on optimizing (and complexifying) > too much the JavaScript version. > > >From David Teller: > > To me, the fact that you can write portable lightweight applets sounds > > like a good enough reason. That and the fact that I can see this being > > used by stuff like Ocsigen to make for (even) richer client-server > > applications. > > Indeed, as Vincent wrote, even if O'Browser is at this point only a > client-side scripting core, it takes place into the Ocsigen project and > will be used to interact with (OCaml) server code (in its current form > or not). > > Benjamin Canou. > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- William Le Ferrand E-mail : william@beouifi.org Mobile : +33 6 84 01 52 92 ------=_Part_41230_21011566.1228046947238 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi !

Thank you for this amazing work !

I'm rewriting large parts of my website using this tool, and I may have found two little bugs :

* get_attribute (in rtjs.js)

when get_attribute "toto" returns a boolean, value_from_string returns the empty string (this is nasty ..)

(temporary) solution : in rtjs.js, just cast on line 33 with something like

  return value_from_string (v == null ? "" : (v+""));

* input (in js.ml)

it seems that the editable function

    editable = (
      function
          true -> (try  Node.remove_attribute node "disabled" with _  -> ())
        | false -> Node.set_attribute node "disabled" "disabled"
);

works better. (at least it works with buttons, check boxes and so on)

Thank you again !

All best,

William Le Ferrand

www.beouifi.org

2008/11/21 Benjamin Canou <benjamin.canou@gmail.com>
 Hi,

>From Kuba Ober:
> Pardon the question, but is this meant to be "useful" in the future,
> or is it just a fun experiment (in which case the next target should
> be brainfuck).
Coming soon: the OCaml VM on a turing machine !

>From Burgisser Francois :
> Good idea but maybe a browser plugin to manipulate DOM would be much
> more efficient.
>From Gabriel Kerneis:
> But, sadly, much less portable.
>From Jon Harrop:
> Could you write a compiler and call eval to get better performance?
>From David Thomas:
> I'd like to see a plugin that makes available to JS a function to
> execute ocaml bytecode.

Our plan is to achieve efficiency with a (not yet available) browser
plug-in (the original bytecode interpreter or the native compiler) while
remaining portable by using the JavaScript VM where the plug-in is not
available. So we don't currently focus on optimizing (and complexifying)
too much the JavaScript version.

>From David Teller:
> To me, the fact that you can write portable lightweight applets sounds
> like a good enough reason. That and the fact that I can see this being
> used by stuff like Ocsigen to make for (even) richer client-server
> applications.

Indeed, as Vincent wrote, even if O'Browser is at this point only a
client-side scripting core, it takes place into the Ocsigen project and
will be used to interact with (OCaml) server code (in its current form
or not).

 Benjamin Canou.

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



--
William Le Ferrand

E-mail : william@beouifi.org
Mobile : +33 6 84 01 52 92
------=_Part_41230_21011566.1228046947238--