From: "Çagdas Bozman" <cagdas.bozman@ocamlpro.com>
To: caml-list@inria.fr, Hongbo Zhang <bobzhang1988@gmail.com>,
Pierre-Etienne Meunier <pierreetienne.meunier@gmail.com>
Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml?
Date: Fri, 21 Dec 2012 10:45:55 +0100 [thread overview]
Message-ID: <50D42FD3.5080401@ocamlpro.com> (raw)
In-Reply-To: <50D3DE6E.8060200@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 3502 bytes --]
next prev parent reply other threads:[~2012-12-21 9:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-20 16:41 bob zhang
2012-12-20 20:31 ` Pierre-Etienne Meunier
2012-12-21 3:58 ` Hongbo Zhang
2012-12-21 9:45 ` Çagdas Bozman [this message]
2012-12-21 16:56 ` Ashish Agarwal
2012-12-21 17:05 ` Gabriel Scherer
2012-12-21 20:55 ` bob zhang
[not found] <fa.FJUwiHb9MCpx1s04UJaSR5DeNOI@ifi.uio.no>
2012-12-20 17:56 ` Barbara Lepage (db0)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D42FD3.5080401@ocamlpro.com \
--to=cagdas.bozman@ocamlpro.com \
--cc=bobzhang1988@gmail.com \
--cc=caml-list@inria.fr \
--cc=pierreetienne.meunier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox