Re: [Caml-list] Jane Street is hiring (as if you didn't already know)

2009-08-18 Thread Florian Hars
Erik de Castro Lopo schrieb:
> The Linux kernel which is the one I am interested in is C only.

The kernel I linked to is in C, too (well, 7500 lines of C accompanied 
by 20 lines of proof that the C actually implements the formal
specification automatically generated from the Haskell prototype).
And it can more or less run Linux as a personality.

- Florian.

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] Transition to OCaml 3.11.1 in Ubuntu Karmic Koala completed!

2009-08-18 Thread David MENTRE
Hello,

I am very pleased to announce that transition to OCaml 3.11.1 in
Ubuntu Karmic is now completed!
  
http://bentobako.org/ubuntu-ocaml-status/transition_monitor/ocaml_transition_monitor.html

Many thanks to (in order of appearance):

 * Ubuntu side:
   James Wetsby
   Andrea Gasparini
   Michael Bienia
   Steve Kowalik
   Jonathan Riddell
   Stefan Lesicnik

 * Debian side:
Stefano Zacchiroli
Stéphane Glondu
Mehdi Dogguy
Sylvain Le Gall

And of course all the Debian and Ubuntu developers that work so hard
on OCaml support and have helped me doing this transition!

Currently, most of OCaml packages is Debian unstable are available in Karmic:
  http://bentobako.org/ubuntu-ocaml-status/raw/compare-unstable-karmic.html

[ I have requested a synchronization for "react" and "pgocaml". ]

Sincerely yours,
d.

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] fancy tex for ocaml code

2009-08-18 Thread Michaël Grünewald

Pierre-Evariste Dagand wrote:

Hi,


I was wondering if someone is aware of a tool for ocaml like this at
http://people.cs.uu.nl/andres/lhs2tex/


Ocamlweb is what you are looking for:
[http://www.lri.fr/~filliatr/ocamlweb/]. It's an excellent tool.


I really second your voice saying that ocamlweb gives very enjoyable 
results.


> Also, for any language, noweb [http://www.cs.tufts.edu/~nr/noweb/] 
always works.


NOWEB will not produce a `fancy output' for a given language without 
special support for this language. BTW it is an excellent tool for 
literate programming.

--
Cheers,
Michaël

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: OCaml and kernels (was: Re: [Caml-list] Jane Street is hiring)

2009-08-18 Thread Philippe Strauss
On Tue, Aug 18, 2009 at 04:21:16PM +0100, Richard Jones wrote:
> 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.

two interesting projects in that direction:

c-- (cminusminus)

bit-c by jonathan shapiro

-- 
Philippe Strauss
http://philou.ch

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: OCaml and kernels (was: Re: [Caml-list] Jane Street is hiring)

2009-08-18 Thread David MENTRE
Hello,

2009/8/18 Richard Jones :
> 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.

I've done part of this in the past (KOS is not bare metal but a kernel
nonetheless):
 
http://caml.inria.fr/pub/ml-archives/caml-list/2005/01/cf207671ce0efc6bf58f710b230e06e2.en.html

>  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.

I share the same feeling.

There were experiments of implementing kernel functionalities like TCP
stack in ML-like languages, e.g. "A Structured TCP in Standard ML
(1994)" (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.35.8383)
or "A Network Protocol Stack in Standard ML"
(http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.8546)

Yours,
d.

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


OCaml and kernels (was: Re: [Caml-list] Jane Street is hiring)

2009-08-18 Thread Richard Jones
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

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Jane Street is hiring (as if you didn't already know)

2009-08-18 Thread Erik de Castro Lopo
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.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Jane Street is hiring (as if you didn't already know)

2009-08-18 Thread Florian Hars
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

- Florian.

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] ocaml for the Semantic Web

2009-08-18 Thread tumenjargal tsagaan
Hi,

(1) is there any specialized APIs for processing RDF as well as OWL file?
(2) is there any similar API in Ocaml like XML-parsers from Java world?

Thank you.

Tumee.




  ___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Jane Street is hiring (as if you didn't already know)

2009-08-18 Thread Richard Jones
On Tue, Aug 18, 2009 at 08:44:52AM +1000, Erik de Castro Lopo wrote:
> Matthew Macy wrote:
> 
> > I don't anticipate ever doing functional programming professionally
> 
> Why ever not?
> 
> I'm at a small VC funded startup and I use Ocaml and Haskell
> for production code on a regular basis. We have a small but
> growing collection of code written in langauges that are a
> joy to work with and way more robust and debuggable than the
> larger body of C and C++ code we have.

We use OCaml to generate our C code :-)

Rich.

-- 
Richard Jones
Red Hat

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Conditional compilation

2009-08-18 Thread Richard Jones
On Mon, Aug 17, 2009 at 10:00:28PM -0400, Edgar Friendly wrote:
> Is there a better way to do this?  The path I'm following is looking
> very byzantine compared to C's [-DFOO] + [#ifdef FOO].

You can just use autoconf's ordinary features:

eg:

  AC_ARG_ENABLE([foo],
  [AS_HELP_STRING([--enable-foo],
[enable foo @<:@default=no@:>@])],
  [],
  [enable_foo=no])
  
  # Define an automake conditional:
  AM_CONDITIONAL([FOO],[test "x$enable_foo" = "xyes"])
  
  # Define an autoconf substitution:
  if test "x$enable_foo" = "xyes"; then
FOO=1
  else
FOO=0
  fi
  AC_SUBST(FOO)

And then in Makefile.am you can use:

  ifdef FOO
  FLAGS = -DFOO=1
  else
  FLAGS =
  endif

and in any autoconf-substituted files you can use:

  @FOO@

We use autoconf/automake with OCaml code all the time, and it works
fine.  There are also OCaml macros available:

  http://forge.ocamlcore.org/projects/ocaml-autoconf/
  
http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=ocaml-autoconf/ocaml-autoconf.git;a=summary

Rich.

-- 
Richard Jones
Red Hat

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Conditional compilation

2009-08-18 Thread Olivier Andrieu
On Tue, Aug 18, 2009 at 04:37, Edgar Friendly wrote:
> I'm starting to think that optcomp is just a mismatch for what I'm
> trying to do, and I'm trying to use the wrong tool for the job.  That
> said, I don't think it's the best solution (especially with already long
> compile times for the project) to use both optcomp and
> Camlp4MacroParser, so I guess I should figure out how to do
>        #if ocaml_version < (3, 11)
> in Camlp4MacroParser.  I guess autoconf might be of some help here,
> although I don't see an easy way to to pass text from an
> autoconf-created Makefile through ocamlbuild into only some files' [-pp]
> commands.  I think myocamlbuild.ml might be the key, maybe autoconf can
> produce it as well as Makefile.

sure, autoconf can produce any kind of file: it simply replace
occurrences of @varia...@.
It's traditionally used to create makefiles or shell scripts but it'll
work on a .ml file just as well.

-- 
  Olivier

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs