Comments (4)
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.
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.
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.
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)
- The notation for Java classes cannot specify inner-classes.
- The "-cp" and "-classpath" should be passed by ocamlbuild when compiling an interface
- ocamljava error during linking on Windows; ocaml, ocamlc, & ocamlrun all work HOT 5
- Error when installing ocamlfind with ocamljava HOT 4
- ocamljava for 32-bit windows HOT 4
- ocamljava has exit code 0 even on an error HOT 1
- Error "Java method is too long" HOT 2
- ocamllex always fails on java.nio.channels.ClosedChannelException HOT 1
- ocamljava fatal error "exception Not_found" HOT 3
- Some *.cmj files from camlp4 are not installed.
- Some *.cmj files from ocamldoc are not installed
- Where are the sources to the runtime? HOT 2
- OCaml 4.02.X support HOT 19
- Installation instruction for windows
- Support for Facebook's Reason source format HOT 3
- ocamlfind won't build with ocamljava HOT 3
- Can't build from source HOT 4
- Failing to link a module/dependency in an OCaml script HOT 3
- Failing to add C stubs with ocamljava HOT 2
- Inheritance of Java classes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocamljava.