Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Hongbo Zhang (BLOOMBERG/ 731 LEX)" <hzhang295@bloomberg.net>
To: caml-list@inria.fr
Subject: [Caml-list] [ANN] BuckleScript 1.4.3 - Link time dead code elimination
Date: Mon, 13 Feb 2017 15:57:25 -0000	[thread overview]
Message-ID: <58A1D76502500620003900B0_0_44340@msllnjpmsgsv06> (raw)

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

Dear OCaml developers:
   BuckleScript is an optimizing compiler for OCaml to generate readable JavaScript, it is 
open sourced by Bloomberg [1].
   We are glad to announce 1.4.3, this release brings JS native module support to BuckleScript. In combination of existing JS bundler like rollup, it generates very small JS code output, below is an example:
   test.ml
   ```
    Js.log (List.length [1;2;3])
   ```
    test.js -- comments removed
    ```
    import * as List from "../lib/es6/list"
    console.log(List.length ([1,[2,[3,0]]]))
    ```
     test.bundle.js --comments removed
     ```
     (function (){
       var invalid_argument = [ "Invalid_argument", -3];
       function length(l) {
            var _len = 0;
            var _param = l;
            while(true) {
               var param = _param;
               var len = _len;
               if (param) {
                    _param = param[1];
                    _len = len + 1 | 0;
                    continue ;      
                }
               else {
                    return len;
                }
           }
        }
        console.log(length([1,2,3]));
      })()
     ```
   Documentation is available here: http://bloomberg.github.io/bucklescript/Manual.html
   To install:
        npm install -g bs-platform
   Happy hacking in OCaml! -- Hongbo
[1]: https://github.com/bloomberg/bucklescript/   



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

                 reply	other threads:[~2017-02-13 15:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=58A1D76502500620003900B0_0_44340@msllnjpmsgsv06 \
    --to=hzhang295@bloomberg.net \
    --cc=caml-list@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