caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] Ocsigen Js_of_ocaml 2.0
@ 2014-04-11 13:12 Jérôme Vouillon
  2014-04-11 13:36 ` Jacques-Pascal Deplaix
  0 siblings, 1 reply; 3+ messages in thread
From: Jérôme Vouillon @ 2014-04-11 13:12 UTC (permalink / raw)
  To: caml-list, ocsigen

Hi,

We are happy to announce release 2.0 of Js_of_ocaml, the compiler from
OCaml bytecode to JavaScript.

A lot of efforts has been put in reducing the size of the generated
JavaScript code. Much shorter variable names are used; unnecessary
whitespaces and semicolons are omitted; multiple occurrences of a same
constant are shared... The runtime is minified as well. You can expect
a space reduction of 15% to 20%.

Recursive modules are now supported. Tail calls between mutually
recursive functions are optimized (using trampolines). In particular,
lexers produced by ocamllex are now properly optimized.

The runtime now simulates a small filesystem (in memory), which makes
it possible to use the OCaml I/O functions. The standard outputs are
by default redirected to the JavaScript console, which is convenient
for debugging.

A larger part of the OCaml libraries are supported: bigarrays, the
time-related functions of the Unix library.

A number of incompatible changes have been made. In particular:
- JavaScript numbers are simply given type 'float' rather than type
  'float Js.t';
- the compiler generates "strict mode" JavaScript; therefore,
  'Js.Unsafe.variable "this"' does not refer to the JavaScript
  global object ("window" in browsers) anymore; you can use
  'Js.Unsafe.global' instead;
- runtime primitives are now wrapped together with the generated code
  in a huge function so as not to pollute the global scope.

LINKS

Project home page  http://ocsigen.org/js_of_ocaml/
Download           http://ocsigen.org/download/js_of_ocaml-2.00.tar.gz
Get source code    git clone https://github.com/ocsigen/js_of_ocaml.git
Documentation      http://ocsigen.org/js_of_ocaml/manual/


Regards,

-- Jérôme Vouillon and Hugo Heuzard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-11 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11 13:12 [Caml-list] [ANN] Ocsigen Js_of_ocaml 2.0 Jérôme Vouillon
2014-04-11 13:36 ` Jacques-Pascal Deplaix
2014-04-11 13:42   ` Jacques-Pascal Deplaix

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).