4 ms·
Non-C programs on Linux either implement the C ABI (or the Linux system call interface) or run via interpreters that do. Can your preferred language link to th
by lmm 11y ago
Non-C programs on Linux either implement the C ABI (or the Linux system call interface) or run via interpreters that do.
Can your preferred language link to the OCaml ABI? Do you have an interpreter written in OCaml for it?
- Guvante 11y agoAre we talking about microservices that talk over TCP of some sort? If that is the case it is a moot point as the other end need not even compile against a unikernel at all, it can sit on a traditional OS.
- nickpsecurity 11y agoExactly. They seem to be creating unsolvable, strawman problems instead of assuming we start with the middleware approach to getting things to work together. And there's both very efficient and very robust tooling available for that these days.
- lmm 11y agoNo, we're talking about running things under unikernels. I mean yes, you could have some of your app implemented in OCaml and then it talks over TCP to some Fortran running on Linux to do linear algebra, but that approach has its own problems.
- Guvante 11y agoYou are splitting the problem at the wrong place. Microservices is a well known thing and is what is providing the fire under unikernel research, you cannot simply ignore the aspect of "do the hard thing in a different environment" when talking about microservices.
- lmm 11y agoIMO the popularity of microservices is a lot more about languages that provide very weak isolation guarantees (i.e. Ruby). OCaml is a strongly typed language with an excellent module system, and so microservices offer relatively little value.
- kryptiskt 11y agoIt's much easier than you think. OCaml can expose functions with a C ABI. You can put newlib on top of MirageOS, calling down to OCaml for basics (and newlib needs only a handful of IO and memory functions to be provided, so it isn't particularly hard), and then you have instant POSIX. Now you can run most anything you want from C-land.
- pjmlp 11y agoThat is no different from the days C was only meaningful to UNIX users. The languages have to implement the OS ABI, whatever that is. Lisp Machines had Fortran, Ada and C compilers available.