caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: OCaml and kernels (was: Re: [Caml-list] Jane Street is hiring)
Date: Tue, 18 Aug 2009 16:21:16 +0100	[thread overview]
Message-ID: <20090818152116.GA18840@annexia.org> (raw)
In-Reply-To: <20090818210723.c45efcaf.mle+ocaml@mega-nerd.com>

On Tue, Aug 18, 2009 at 09:07:23PM +1000, Erik de Castro Lopo wrote:
> Florian Hars wrote:
> 
> > Erik de Castro Lopo schrieb:
> > > That makes sense. I do quite low level stuff as well, even Linux device
> > > drivers and that is not ever going to be done in Ocaml or Haskell :-).
> > 
> > People do use Haskell in developing OS kernels, and you can't get more
> > low-level than that:
> > 
> > http://ertos.nicta.com.au/research/l4.verified/approach.pml
> 
> The Linux kernel which is the one I am interested in is C only. For
> the Linux kernel I very much doubt it is ever going to be possible to
> write drivers in Ocaml or Haskell even if that is possible for other
> kernels now.

Kernel hackers would hate people using any language other than C for
Linux kernel modules.  But that doesn't mean a modified OCaml is a bad
choice for writing a kernel.

It's relatively low-level when you need it to be, and it wouldn't be
too much work to separate out the runtime and reimplement it on top of
baremetal.  It would also be interesting to see if the supposed
massive overheads of garbage collection are in reality better than
bloating every structure with an additional reference count field.

There are some missing features to really make it possible though:

 - inline assembly

 - support for ELF (eg. putting code/data directly into named sections)

 - bit fields / bit twiddling (can probably be done with macros)

 - better optimization of int32 and int64 types

Of the above, inline assembly is the one I'd really like to see added
to OCaml.  And having int32 be optimized to an int on 64 bit
platforms.

Rich.

-- 
Richard Jones
Red Hat


  reply	other threads:[~2009-08-18 15:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 21:50 Jane Street is hiring (as if you didn't already know) Yaron Minsky
2009-08-11 21:58 ` Yaron Minsky
2009-08-16 16:57 ` [Caml-list] " Romain Beauxis
2009-08-16 18:56   ` Yaron Minsky
2009-08-16 23:29     ` Andrej Bauer
2009-08-17 19:59     ` Romain Beauxis
2009-08-17 20:02       ` Alexy Khrabrov
2009-08-17 20:26         ` Romain Beauxis
2009-08-17 20:49           ` Kip Macy
2009-08-17 21:30           ` Matthew Macy
2009-08-17 22:44             ` Erik de Castro Lopo
2009-08-17 23:22               ` Matthew Macy
2009-08-17 23:33                 ` Erik de Castro Lopo
2009-08-18 10:59                   ` Florian Hars
2009-08-18 11:07                     ` Erik de Castro Lopo
2009-08-18 15:21                       ` Richard Jones [this message]
2009-08-18 15:45                         ` OCaml and kernels (was: Re: [Caml-list] Jane Street is hiring) David MENTRE
2009-08-18 15:56                         ` Philippe Strauss
2009-08-19 12:43                         ` OCaml and kernels Alexander Danilov
2009-08-19 16:31                           ` [Caml-list] " Richard Jones
2009-08-19 19:31                             ` Alain Frisch
2009-08-19  6:46                       ` [Caml-list] Jane Street is hiring (as if you didn't already know) Florian Hars
2009-08-18 10:21               ` Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090818152116.GA18840@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).