| Newsgroups |
gmane.comp.lang.ocaml.beginners |
| Message-ID |
<[email protected]> |
On 12.05.2015 01:43, Hendrik Boom [email protected] [ocaml_beginners] wrote:
>
> On Mon, May 11, 2015 at 10:03:34PM +0200, 'Mr. Herr' [email protected]
> [ocaml_beginners] wrote:
>
> > Then it excels in systems programming: the Xen hypervisor is written
> > in OCaml I think, and work in this direction goes on with Mirage
> > (www.openmirage.org/) which will provide OS services for
> > applications that run on Xen (one might say a container on
>
> I took a very casual look at some of ite source code, and that part
> (qemu) appears to be written in a dialect of C or C++.
>
> Evidently the wrong part.
>
Yes, it was a little careless to write things like this late at night.
Counting file types of xen 4.5.0 I found 3109 *.c files, and 41 *.ml files, the
latter all in the tools/ directory.
>
> Would you know just which of xen's components is written in ocaml?
> I'm curious, because the low-level delay-sensitive hardware interaction
> that things like hypervisors need don't seem to be ocaml's strong
> point. Not that I think ocaml is likely to be unsuitable for the
> project, but it will likely have to be supplemented with tight
> real-time components that are insensitive to garbage collection delays.
>
The mirage OS yes is written in OCaml. I agree that the low level OS or processor
specific part,
that are not portable anyway, should/must be written in a hardware near language.
> Most of serious system programming is not concerned, however with
> low-level hardware interaction. The main things you need there are
> tools for avoiding bugs. Static typing helps a lot there, and usually
> enables a compiler to generate fast code as well.
>
> For my money ($0 because it's all free softwarae) I consider ocaml and
> Modula 3 to be wotrhy competitors in the system programmming area.
> I believe Modula 3 has been furnished with true multicore parallel
> processing by now, though garbage collection requires that all its
> processes stop and wait for it.
>
Modula-3? Even more exotic than OCaml. I would rather take Ada, it has all the features
for embedded systems programming, is certified for correctness, and even of
the pascal family.
/Str.