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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id B809D7F2AA for ; Fri, 21 Dec 2012 18:06:06 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.54 as permitted sender) identity=mailfrom; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f54.google.com) identity=helo; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnkBADiW1FDRVdY2jWdsb2JhbABFvXQIFg4BAQEBCQkLCRIGI4IeAQEFQAEbEQwBAwwGBQsNLiIBEQEFARwGE4gAAQMPDJdIjDOCe4UQChknDVmIdgEFDIxLhEMDkliDM4EciDGFGxYphBY X-IronPort-AV: E=Sophos;i="4.84,330,1355094000"; d="scan'208,217";a="166565707" Received: from mail-bk0-f54.google.com ([209.85.214.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Dec 2012 18:06:03 +0100 Received: by mail-bk0-f54.google.com with SMTP id je9so2530569bkc.41 for ; Fri, 21 Dec 2012 09:06:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=E9oWBas2fHjuwVt7Edz65NJDn7ivAZ6uBjwnPTa40hM=; b=Omw1AqSOAoV8M86XnYWz4MgkyV/2jiO68hLx4b7vlt8aOJSd1mKiKjaBOmgpx4xduV LadB+HTT7z1cw1NZM5kojKu1dlfSWSspYu8fF53C82QlZJKD+OC0kZkpTf/1/J0sojJP FjYw1GyW34mk9OlxfgOfolBxcX6V+HmQRdx2rlXF5R1ETAfHdZav2CTUWXAwRurvv9Qz vjqlTLjDNptFAuCM4H2menpL+/yYa83Z/WFmmLW88L9S9O/ufzWyjGiX5S1c9wayMNL4 tFC+MWlWYk7pWgtF/6b7ntH8ViIpqZ8EV0ixCYQZS4G7UhBS1HSK2ZKsrRgiO0cuBeAi NJEw== Received: by 10.204.150.137 with SMTP id y9mr6683095bkv.103.1356109563118; Fri, 21 Dec 2012 09:06:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.236.134 with HTTP; Fri, 21 Dec 2012 09:05:22 -0800 (PST) In-Reply-To: <50D42FD3.5080401@ocamlpro.com> References: <65E30EED-7FB4-44C6-B1EC-F304E55CAD77@gmail.com> <50D3DE6E.8060200@gmail.com> <50D42FD3.5080401@ocamlpro.com> From: Gabriel Scherer Date: Fri, 21 Dec 2012 18:05:22 +0100 Message-ID: To: =?ISO-8859-1?Q?=C7agdas_Bozman?= Cc: caml-list@inria.fr, Hongbo Zhang , Pierre-Etienne Meunier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml? When I click "Reset" in the toplevel, the changes that were made to the webpage are not reverted (I still see the moving square). This is not what I would expect; I understand reverting this perfectly is probably not easy or even possible, but some form of rollbacks that allows to revert to a clean state if we didn't do anything really crazy would be appreciated. On Fri, Dec 21, 2012 at 10:45 AM, =C7agdas Bozman wrote: > Hi ! > > On 12/21/2012 04:58 AM, Hongbo Zhang wrote: > > On 12/20/12 3:31 PM, Pierre-Etienne Meunier wrote: > > Hi, > > Personally, I learnt js_of_ocaml by first learning javascript using fireb= ug > in firefox. They have something called the console, similar to a toplevel, > where you can directly manipulate the DOM to see what you are supposed to= do > with javascript, and immediately see the results on the webpage. Make a > simple webpage, the most important point is that your elements all have a > property called "id", and try to play with this toplevel before > understanding it. A typical example is : > > Thanks for your message, it's really helpful ;-) > > > >
> Blabla >
>

> Blibli >

> > > > Then, in order : > > - try to make a table programmatically (using the Mozilla Developper > Library). > - use httprequests. > - animate svg pictures > - use canvas. > > Then if you learn about what javascript calls "prototypes", you're done > learning javascript, and you can do all this in ocaml. > > Good luck > Pierre > > > Em 20/12/2012, =E0s 17:41, bob zhang escreveu: > > Dear List, > I tried several times using js_of_ocaml, but did not get a working > example yet, it always gives me some error message like missing some > primitives. > I am absolutely a newbie in javascript, is there some simple working > examples online? > > I followed this thread, http://toss.sourceforge.net/ocaml.html, but t= he > output JsClient.js does not work as I expected > Thanks in advance! > > -- > Regards > -- Bob > > > > Are you aware of this page : http://try.ocamlpro.com/js_of_ocaml/ > We put some examples and you can try them online. > > You can also look at the source of TryOCaml, it can be a start :-) > > -- =C7agdas