From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id DD5917F2AA for ; Fri, 21 Dec 2012 10:45:43 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bozman.cagdas@gmail.com) identity=pra; client-ip=209.85.215.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bozman.cagdas@gmail.com"; x-sender="bozman.cagdas@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of bozman.cagdas@gmail.com designates 209.85.215.52 as permitted sender) identity=mailfrom; client-ip=209.85.215.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bozman.cagdas@gmail.com"; x-sender="bozman.cagdas@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f52.google.com) identity=helo; client-ip=209.85.215.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bozman.cagdas@gmail.com"; x-sender="postmaster@mail-la0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoABAJsu1FDRVdc0jWdsb2JhbABFg0iIUahLAYkRFg4BAQEBCQkLCRIGI4IeAQEFQAEsCwIDDAEFBRgJFg8JAwIBAgEiAQUBHAYBDAgBAYd9Aw8ECJdJjy6FPCcNiU8BBQyMS4RDA5JYhE+ET4NihRs/gVeCPw X-IronPort-AV: E=Sophos;i="4.84,329,1355094000"; d="scan'208,217";a="187185691" Received: from mail-la0-f52.google.com ([209.85.215.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Dec 2012 10:45:43 +0100 Received: by mail-la0-f52.google.com with SMTP id l5so4629915lah.39 for ; Fri, 21 Dec 2012 01:45:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=N7k/GPJwjZ9E0++MNZoT2S+7wfzzOwKGwh5i7+KMYpM=; b=vlRFBZcSxv+HSyqnuFdt2Vjwm4iLvsQSMyFYC5tvokQlu5QkuQlKYATpASY18hxitl vSbwebWHIS+UnULqcaQ78AtWWod88phkxR/neyQDpdT9oUibIUqExwfNyBFVNb9uQMNE p7o3gws4YFmM05Wa+e/pUFw/JE7tPp5NC/ARVlwGROR/BLQdSzvMEepFpeq0AzAjZlLF yanccKYGn8DZWqBKnvUCBqo/igSvt2/iJSmqSEprw1XtG+nabkcIq2ILv32/iYlAHpKB DdieCl1hoj/24aO5NaEY2tBHweupz0uqpr/EkCAQztQoRvCb8q3piZKYHa2ICSVsip7M aHjA== X-Received: by 10.152.145.8 with SMTP id sq8mr11564044lab.21.1356083141717; Fri, 21 Dec 2012 01:45:41 -0800 (PST) Received: from [193.55.250.242] (chercheurs2-242.saclay.inria.fr. [193.55.250.242]) by mx.google.com with ESMTPS id ns7sm2991666lab.5.2012.12.21.01.45.39 (version=SSLv3 cipher=OTHER); Fri, 21 Dec 2012 01:45:40 -0800 (PST) Sender: =?UTF-8?Q?=C3=87agdas_Bozman?= Message-ID: <50D42FD3.5080401@ocamlpro.com> Date: Fri, 21 Dec 2012 10:45:55 +0100 From: =?ISO-8859-1?Q?=C7agdas_Bozman?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: caml-list@inria.fr, Hongbo Zhang , Pierre-Etienne Meunier References: <65E30EED-7FB4-44C6-B1EC-F304E55CAD77@gmail.com> <50D3DE6E.8060200@gmail.com> In-Reply-To: <50D3DE6E.8060200@gmail.com> Content-Type: multipart/alternative; boundary="------------060503030207000100010905" Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml? This is a multi-part message in MIME format. --------------060503030207000100010905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 >> 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 > > 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 :-) -- Ēagdas --------------060503030207000100010905 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

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 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 ;-)
<html>
<body>
<div id="example">
Blabla
</div>
<p id="aparagraph">
Blibli
<p>
</body>
</html>

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


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 :-)
-- Çagdas
--------------060503030207000100010905--