Here is the latest OCaml Weekly News, for the week of April 21 to 28, 2015.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2015-04/msg00105.htmlContinuing the thread from last week, Richard Jones said:
> What is the current suggested way to determine what, roughly, autoconf > would do for you? I have some platform specific functionality to be > included (or excluded) depending on the OS. Is there a reason not to use autoconf? I use it all the time with OCaml projects, eg: https://github.com/libguestfs/libguestfs https://github.com/libguestfs/supermin and a random more recent example: http://git.annexia.org/?p=mclu.git;a=tree There are ocaml.m4 macros on ocamlforge.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2015-04/msg00112.htmlJürgen Hötzel announced:
I implemented some basics systemd bindings (just journal functions at the moment): https://github.com/juergenhoetzel/ocaml-systemd Any feedback is appreciated.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2015-04/msg00125.htmlLeo Wzukw announced:
I developed since about a year a tools named OcLaunch. It allow to spread launch of program across session, each time a terminal (or anything else) is called. For example, you may want to launch a client chat and several TODO list, and then verify update. If add all to your .bashrc, the output will be displayed every time it is sourced, i. e. each time you open a terminal. What a mess! With OcLaunch, these commands are launched one at time. So * You open your first terminal: the client chat is launched * You open the second one: a TODO list is displayed * ... and so on An other advantage is that your reminder are spread across your session, which remind you important task several times and may limit procrastination! Official website is http://oclaunch.tuxfamily.org/home.html. You can find a demo video if the purpose of OcLaunch is not clear and several resources. Email me if you need some help or to give feedback. Leo PS: People reading French may be interested by this page : http://linuxfr.org/news/oclaunch-launch-automagically
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2015-04/msg00131.htmlAlain Frisch announced:
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2015-04/msg00132.htmlHelmut Brandl asked:
If you are getting unknown primitive errors at link time then you can simply try to implement them yourself using node's filesystem APIs see: http://ocsigen.org/js_of_ocaml/2.5/manual/linker If you are not concerned about using Unix directly (because node.js is your only target) and simply need these functions you can bind the corresponding node API functions directly: http://ocsigen.org/js_of_ocaml/2.5/manual/bindingsAlain Frisch also suggested:
You need to define bindings to node.js' "fs" API: https://nodejs.org/api/fs.html It should be possible to implement a subset of the Unix module through this API, or just to expose the few functions you would need. For instance, with the gen_js_api I announced earlier today, binding the synchronous mkdir function would look like: val mkdir: string -> int -> unit [@@js.global "fs.mkdirAsync"]Daniel Bünzli then said and Alain Frisch replied:
> That should be "fs.mkdirSync". Indeed! > Just curious, how would the binding to the async fs.mkdir look like ? Something like: val mkdir_async: string -> int -> (js_exn option -> unit) -> unit [@@js.global "fs.mkdir"] assuming some predefined bindings for js_exn. (One could also decide to bind JS exception to OCaml's exn type, but the gain is not clear.) There are other possible variations, such as making the mode optional: val mkdir_async: string -> ?mode:(int[@js.default 0o777]) -> (js_exn option -> unit) -> unit [@@js.global "fs.mkdir"] Here js.default forces the default value for the optional mode argument. Without it, a missing value will send an `undefined` as the second argument (I don't know if fs.mkdir would be happy with it). This is currently not supported, but one could also extend the tool to allow: val mkdir_async: string -> ?mode:(int[@js.drop_if_missing]) -> (js_exn option -> unit) -> unit [@@js.global "fs.mkdir"] so that the second argument is dropped in the JS call if not provided (but I don't see how to support that for OCaml callbacks in full generality, since the function needs to check the type of arguments to decide how to interpret them).Alain Frisch later added:
If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.
If you also wish to receive it every week by mail, you may subscribe online.