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 A40E17F2AA for ; Fri, 21 Dec 2012 04:58:52 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.220.171; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.220.171 as permitted sender) identity=mailfrom; client-ip=209.85.220.171; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@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-vc0-f171.google.com) identity=helo; client-ip=209.85.220.171; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-vc0-f171.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuMDAEbe01DRVdyrlGdsb2JhbABFg0i6KhYOAQEBAQkJCwkSKYIeAQEFMgEFCAEbEQsBAQMMBgULDQkWDwkDAgECARERAQUBHAYNAQcBAYd8AQMPDJhWjDOCe4UVChknDVmIdgEFDIxLhEMDiGKJdoMzgRyIMYUbP4Qz X-IronPort-AV: E=Sophos;i="4.84,327,1355094000"; d="scan'208,217";a="166481156" Received: from mail-vc0-f171.google.com ([209.85.220.171]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Dec 2012 04:58:42 +0100 Received: by mail-vc0-f171.google.com with SMTP id n11so4588010vch.16 for ; Thu, 20 Dec 2012 19:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=pFIgxUWitMUVufA7YOm3yGul7rKsYnvJXj9LhYeh3h8=; b=iCIUXxe/PECpPjHTq/orjqgFL2hZdcnIQ+vLkYek+VIPg+2zC753ykxbWESSIEx6fd fO5B9vmslOdWXgq9r5hMO6FlNcghDI2p/+ir3nEHE8hHyqywbPVdly/2CboNPUmQx1Dt AbL/orvO6s4bwoJpDJYcJ8FVcqnK4RAx0zWL/lndzZDRPEaduEXpiEQzAK91g2iFXOKL B4Bki3Oq0uG2F/i1gW+iGFd9xGo8XV7FiRcKYHEqK6g2NijR49aS9XEnPjuVopo7I7IC qnarTplQT32VHKJ5eBk3HJNx9nrqM3GgvMkZtkRYYEhmBEA1Q4VD31cvt1uWnCRUQSxb 1xvA== X-Received: by 10.52.21.179 with SMTP id w19mr15775326vde.55.1356062321400; Thu, 20 Dec 2012 19:58:41 -0800 (PST) Received: from Hongbos-MacBook-Air.local ([66.250.143.158]) by mx.google.com with ESMTPS id x17sm8728256vdi.1.2012.12.20.19.58.39 (version=SSLv3 cipher=OTHER); Thu, 20 Dec 2012 19:58:40 -0800 (PST) Message-ID: <50D3DE6E.8060200@gmail.com> Date: Thu, 20 Dec 2012 22:58:38 -0500 From: Hongbo Zhang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Pierre-Etienne Meunier CC: O Caml References: <65E30EED-7FB4-44C6-B1EC-F304E55CAD77@gmail.com> In-Reply-To: <65E30EED-7FB4-44C6-B1EC-F304E55CAD77@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml? On 12/20/12 3:31 PM, Pierre-Etienne Meunier wrote: > Hi, > > Personally, I learnt js_of_ocaml by first learning javascript using firebug 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, ās 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 the output JsClient.js does not work as I expected >> Thanks in advance! >> >> -- >> Regards >> -- Bob