Giter Club home page Giter Club logo

Comments (4)

xclerc avatar xclerc commented on July 23, 2024

As you guessed, the JVM provides only limited support for POSIX operations.
For the time being, implementation of primitives is basically best effort; however,
in the future, JNA (https://github.com/twall/jna) may be used to leverage native
libraries (if present, with a fallback to the current implementation).

As you noticed, support for "unix" and "threads" libraries is only partial ; I have
just set up a web page (currently not linked to the rest of the website) with the
compatibility information: http://www.ocamljava.org/more/compatibility.html

Finally, note that the "threads" library has been only lightly tested and I would
recommend to use it iff your code is also targeting ocamlc/ocamlopt. Indeed,
the "concurrent" (http://www.ocamljava.org/files/api/concurrent/index.html)
library (which is ocamljava-specific) has a lower overhead, is largely more
tested, and can leverage multiple cores...

from ocamljava.

struktured avatar struktured commented on July 23, 2024

That answers my questions-I was only considering using threads so that I could compile some existing ocaml modules into cmj format. Lots of useful libraries depend on lwt, which requires the unix and threads modules.

You can close this if you wish, unless you want to leave it open until it's properly documented on the website.

from ocamljava.

xclerc avatar xclerc commented on July 23, 2024

I will keep the issue open until the information is really available
(page referenced from the website, manual, etc.).

Incidentally, I wonder whether it would make sense to have a
custom lwt backend for OCaml-Java. To be sure not to rely on
a (partially) incompatible primitive, or on existence of a global lock.

from ocamljava.

struktured avatar struktured commented on July 23, 2024

I was thinking along similar lines regarding the lwt backend. The same argument can be made for Jane Street's async package as well.

from ocamljava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.