caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Bob Zhang <bobzhang1988@gmail.com>
To: Caml List <caml-list@inria.fr>
Cc: Damien Doligez <damien.doligez@inria.fr>,
	Alain Frisch <alain.frisch@lexifi.com>
Subject: [Caml-list] OCaml to Readable Javascript Playground(http://zhanghongbo.me/js-demo/)
Date: Fri, 11 Sep 2015 12:26:48 -0400	[thread overview]
Message-ID: <CANcqPu6SSw5PX3Pq05ySyQV+tNXQXJTeh_g+og-_n9CnQWF6jw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]

Dear OCaml devs,
    (Disclaimer: This is my personal project at home, does not represent my
current employer's  opinions)
     I made a OCaml to Readable Javascript Playground(
http://zhanghongbo.me/js-demo/) you may find interesting, you can do live
coding inside the browser and see the output of Javascript immediately.
     It's still in very early stage, but it already supports the full
language (with tons of bugs). Javascript is a truly amazing platform(not
just in browsers, Bloomberg has millions lines of in-house Javascript code
embedded!)  and interests me a lot recently.
     The motivations is listed as below:
     1. Readable (at least most skeletons are preserved), so that we can
make use of existing Javascript tools, for example, I can use webstorm as
GUI debugger to debug my OCaml code.
     2. Easy FFI, all OCaml functions are plain Javascript functions, I
borrowed some ideas from Alain (gen_js_api), so if you want to call
Javascript from OCaml, just annotate types, even better, minimal code is
generated, the user can call the function on the fly.
     3. (working on) Dev mode/Release mode. Another work on the road map is
do optimizations on lambda layer, cross module inlining, data flow
anaylsis, global dead code elimination.
     4. (to-do) Compile OCaml objects into Javascript Objects, better FFI
for existing Javascript code base.
     There are some changes needed from OCaml compiler, but those changes
are non-intrusive and mostly just pass down more information from
front-end, I would clean up and submit some patches when it's ready. If we
do some refactoring for the OCaml compiler (mostly use inline records
instead of tuples for typedtree, that will the maintainance  much easier in
the future)
     Any feedback is welcome!
     Thank you -- Hongbo


-- 
Regards
-- Hongbo Zhang

[-- Attachment #2: Type: text/html, Size: 2060 bytes --]

             reply	other threads:[~2015-09-11 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 16:26 Bob Zhang [this message]
2015-09-12  9:02 ` Raphaël Proust
2015-09-12 12:27   ` Bob Zhang

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=CANcqPu6SSw5PX3Pq05ySyQV+tNXQXJTeh_g+og-_n9CnQWF6jw@mail.gmail.com \
    --to=bobzhang1988@gmail.com \
    --cc=alain.frisch@lexifi.com \
    --cc=caml-list@inria.fr \
    --cc=damien.doligez@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).