[Caml-list] Re: Lwt and OCamlMakefile

2010-12-21 Thread Sylvain Le Gall
On 21-12-2010, Jérémie Dimino jere...@dimino.org wrote:
 On Mon, Dec 20, 2010 at 09:36:39PM -0500, orb...@ezabel.com wrote:
 Thanks, I forgot to mention that I am setting that:
 
 (*pp camlp4o pa_lwt.cmo *)

 This one should work:

   (*pp camlp4o `ocamlfind query -i-format lwt` `ocamlfind query -predicates 
 syntax,preprocessor -a-format -r lwt.syntax` *)


It will work on Linux. On Windows, you will get a problem because
ocamlfind EOL (win32) doesn't match `...` EOL wrapping (cygwin).

There was a similar problem with sexplib...

Regards,
Sylvain Le Gall

___
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] Re: Pre-compiled ocaml binary for windows

2010-12-07 Thread Sylvain Le Gall
Hello,

On 07-12-2010, Alain Frisch al...@frisch.fr wrote:
 On 12/07/2010 01:24 AM, Sylvain Le Gall wrote:
 Here is the list so far:
 1. no build system setup : Martin who first did the packaging, didn't
 have included how to build ocaml/findlib neither the binaries itself.
 So basically you need to build by hand to generate the .msi. This is
 not a big issue but for a collective effort it is better to have a
 common way to build the binaries
 2. some environment variables are not set and make ocaml crash (AFAIR, we
 doesn't set OCAMLIB)
 3. we don't ship the graphical toplevel
 4. I am still not sure how to deal with ActiveTCL + OCaml (because of the
 ActiveTCL license)
 5. Total lack of documentation

 Do you plan to support ocamlopt?  If yes, the users will have to install 
 a toolchain (at least, an assembler+linker). Mingw has the advantage of 
 producing binaries that depend only on msvcrt.dll (available on any 
 fresh Windows installation), not on a specific version of 
 msvcr80.dll/msvcr90.dll. But Windows users might prefer to install a 
 version of VS Express or a Windows SDK.

We will provide ocamlopt (32/64 bits). But indeed, the toolchain can be
an issue (esp. masm). I plan to use VS2008.

Maybe the native Lexifi's amd64/x86 backend is a better option. If we
are able to use this backend, we still have to use a linker ?


 Not building labltk seems ok. As for the graphical toplevel, I think 
 there are some pending bugs (random crashes) with the current version 
 under recent versions of Windows, so it's probably better not to include 
 it. Some support for installing the emacs mode automatically and/or a 
 version of ledit would be useful replacements.


I didn't known this fact. This is another reason for not building
labltk. Since I almost never use it, I don't think it will be a big
loose.

I will probably look for ledit (or lwt toplevel) which seems a better
alternative to emacs (too heavy too install).

Regards,
Sylvain Le Gall

___
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] Re: help with regular expression

2010-12-06 Thread Sylvain Le Gall
On 06-12-2010, David Allsopp dra-n...@metastack.com wrote:
 zaid Khalid wrote:


 Hint I am using (Str.regexp)

 There are other libraries (e.g. pcre-ocaml) which provide different (I
 would say more powerful, rather than strictly better!)
 implementations.



There is also syntax extension like mikmatch, that helps to write regexp
in a very meaningful syntax:

match str with 
| RE bol a* | ab* eol -
  true
| _ -
  false

http://martin.jambon.free.fr/mikmatch-manual.html
http://martin.jambon.free.fr/mikmatch.html

You can use pcre and str with mikmatch.

Regards,
Sylvain Le Gall

___
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] Re: Pre-compiled ocaml binary for windows

2010-12-06 Thread Sylvain Le Gall
Hello,

On 06-12-2010, Damien Doligez damien.doli...@inria.fr wrote:
 Hello,

 On 2010-12-03, at 21:06, José Romildo Malaquias wrote:

 Hello.
 
 I am looking for a binary release of the latest ocaml compiler for
 Windows. From the OCaml home page I can find only an older version
 (3.11.0).
 
 Where can I find the latest version?


 It depends on which port you want.  For Cygwin, there is an up-to-date
 cygwin package.  For the other ports, we are looking for volunteers to
 compile and publish the binaries.


There is a start a .msi packaging of OCaml + flexdll + findlib:
https://forge.ocamlcore.org/projects/ocaml-installer/
http://hg.ocamlcore.org/cgi-bin/hgwebdir.cgi/ocaml-installer/ocaml-installer/

There are still problem and we are lacking a bit of time to finish it.
But hopefully, it will be finished one day. If anyone have time/knowledge,
we will be happy if he joins the OCaml Windows Installer project.

Regards,
Sylvain Le Gall

___
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] Re: oasis

2010-11-29 Thread Sylvain Le Gall
Hello,

On Mon, Nov 29, 2010 at 10:46:22PM +0300, Anastasia Gornostaeva wrote:
 On Sun, Nov 28, 2010 at 05:17:35PM +, Sylvain Le Gall wrote:
 
  My current state about this solution is:
  - defines BuildDepends: freetype2 (pkg-config), to make clear that there
is a C build-depends
  - allow to override the defined variable freetype2_cflags and
freetype2_libs. If they are both defined by user, don't even call
pkg-config for this package
 
 There should be three variants: pkg-config, OS-based userspace policy 
 (/usr/include vs. /usr/local/include) and user-defined one.
 

I think the pkg-config is the starting point, it also defines the prefix
of the setup.data variable that we will use.

For you OS-based detection, I can propose a header(XXX), lib(XXX). This
will be cumulative (i.e. you can define several header and lib).

Example:
BuildDepends: 
  freetype2(pkg-config, header(freetype/freetype.h), lib(freetype), = 2.0.4),
  oUnit

The headers and libs fields are extra methods. If you define
them, we will try to find a set of -Idirs that help to find the
matching headers or a -Ldirs to find the matching libs. 

We will only do a detection using Sys.file_exists (i.e. don't try to
link or anything similar). 

The detection method start with pkg-config and if it fails goes to
headers/libs.

  Here is a new proposal about this:
  - use a PostConfigureCommand to invoke a shell script freetype2.sh
  - in freetype2.sh invoke freetype-config and output flags in setup.data
using echo 'freetype2_cflags = $output'  setup.data' and
echo 'freetype2_libs = $output'  setup.data' 
  - add in _tags a src/toto.cma: pkg_config_freetype2 
  - add in myocamlbuild.ml a tag [pkg_config_freetyp2; compile; ocaml] 
[... (* load the content of freetyp2_cflags *) ... ]
  
  This is not simple but this is probably what I will do for the support
  of C libraries in 0.3.0.
 
 But it is the best solution now and partially works for me.
 And please make the functions that loads setup.data and var_get data from it 
 to be public. Right now I attempt to play with your code in myocamlbuild.ml 
 and re-use it in my piece at bottom of the file.
 I'm always ready to test/use oasis from darcs when you put there something 
 new.
 

I not that down, I'll ping you ASAP.

Cheers
Sylvain Le Gall

___
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] Re: oasis

2010-11-28 Thread Sylvain Le Gall
On 27-11-2010, Anastasia Gornostaeva erm...@ermine.pp.ru wrote:
 On Sat, Nov 27, 2010 at 10:20:38AM +, Sylvain Le Gall wrote:
 Hi,
 
 On 26-11-2010, Anastasia Gornostaeva erm...@ermine.pp.ru wrote:
  Hello.
 
  How can I substitute in setup.ml (not in _oasis file) values for
  CCOpt and CCLib fields? I think it is better to substitute them from 
  setup.data, if I could to put proper values to setup.data.
  For example:
CCOpt: $freetype_ccopt
  and put to setup.data output of `freetype-config --clib` for field 
  freetype_ccopt.
 
 As I answer you in private: there will be pkg-config support in 0.3.0.
 This will solve this issue, at least.
 (e.g. you will be able to define:
 BuildDepends: freetype2 (pkg-config), oUnit, ...)

 Sorry, but i didnt receive your mail..

I resent it, but it doesn't contains the ultimate solution, just what I
said here.

 And pkg-config probably is not best solution on bsd and macosx systems because
 it does not guarante nothing.
 The best (and common) solution is CFLAGS and LIBS env variables. :-)
 Or this pkg-config will allow custom paths for those C librares that do not
 depend on pkg-config at concrete systems?

 [...]

My current state about this solution is:
- defines BuildDepends: freetype2 (pkg-config), to make clear that there
  is a C build-depends
- allow to override the defined variable freetype2_cflags and
  freetype2_libs. If they are both defined by user, don't even call
  pkg-config for this package


  I need a way to substitute paths.
 
 
 A last solution, you can apply right now, is to override this call:
 let () = setup ();;
 (last line of setup.ml)
 
 by 
 
 let f pkg = 
   (* Call freetype-config and add flags where 
  needed in pkg
*)
   ...
 
 let () = BaseSetup.setup (f setup_t);;

 Interesting way. Thanks, I'll ckeck it right how.


As you state privately, this indeed has also problem because you also
need to do it in myocamlbuild.ml.

Here is a new proposal about this:
- use a PostConfigureCommand to invoke a shell script freetype2.sh
- in freetype2.sh invoke freetype-config and output flags in setup.data
  using echo 'freetype2_cflags = $output'  setup.data' and
  echo 'freetype2_libs = $output'  setup.data' 
- add in _tags a src/toto.cma: pkg_config_freetype2 
- add in myocamlbuild.ml a tag [pkg_config_freetyp2; compile; ocaml] 
  [... (* load the content of freetyp2_cflags *) ... ]

This is not simple but this is probably what I will do for the support
of C libraries in 0.3.0.

Regards,
Sylvain Le Gall

___
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] Re: oasis

2010-11-27 Thread Sylvain Le Gall
Hi,

On 26-11-2010, Anastasia Gornostaeva erm...@ermine.pp.ru wrote:
 Hello.

 How can I substitute in setup.ml (not in _oasis file) values for
 CCOpt and CCLib fields? I think it is better to substitute them from 
 setup.data, if I could to put proper values to setup.data.
 For example:
   CCOpt: $freetype_ccopt
 and put to setup.data output of `freetype-config --clib` for field 
 freetype_ccopt.

As I answer you in private: there will be pkg-config support in 0.3.0.
This will solve this issue, at least.

(e.g. you will be able to define:
BuildDepends: freetype2 (pkg-config), oUnit, ...)


 The expected alternative way:
   $ocaml setup.ml -build --override 'library(library-name).CCOpt' 
 `freetype-config --clib`
 does not work, too.

The override stuff only works for defined runtime variables (ocamlc,
ocamlopt...). 


 I need a way to substitute paths.


A last solution, you can apply right now, is to override this call:
let () = setup ();;
(last line of setup.ml)

by 

let f pkg = 
  (* Call freetype-config and add flags where 
 needed in pkg
   *)
  ...

let () = BaseSetup.setup (f setup_t);;

Regards,
Sylvain Le Gall

___
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] Re: Is OCaml fast?

2010-11-22 Thread Sylvain Le Gall
Hello,

On 22-11-2010, Thanassis Tsiodras ttsiod...@gmail.com wrote:
 I apologize beforehand if this is not the forum to ask.

 I am on the fence about whether to learn OCaml or not, and while
 reading an article called Why OCaml
 (http://www.cs.ubc.ca/~murphyk/Software/Ocaml/why_ocaml.html), I saw
 that OCaml was praised for the speed of the executables it generates -
 and was referred to, speed-wise, as second to none, except C and
 C++.

 However, when I actually went to the Language Shootout page suggested
 in the article, I found out that OCaml is not 2nd, it is 13th, behind
 languages like Haskell and C#...
 (http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php)

Shootout benchmarks doesn't always allow to set some variables that
could greatly improve the speed of OCaml.


 Is it just hype, then? Or am I missing something?


You could write very fast application with OCaml -- even beating C code
in some case. But what OCaml is really helpful for, is that you can do
algorithmic optimizations that improve the speed. It means that OCaml
is terse enough to allow you to write complex algorithm without making
too much bugs. 

All in all: development time + execution time is fast.

But if you spend 10x development time on the same C code, you will
obviously get something faster in C. 

Regards,
Sylvain Le Gall

___
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] [was: Re: Is OCaml fast?] OCaml Shootout task force

2010-11-22 Thread Sylvain Le Gall
On 22-11-2010, Gerd Stolpmann i...@gerd-stolpmann.de wrote:
 Am Montag, den 22.11.2010, 15:21 +0200 schrieb Thanassis Tsiodras:
 I apologize beforehand if this is not the forum to ask.
 
 I am on the fence about whether to learn OCaml or not, and while
 reading an article called Why OCaml
 (http://www.cs.ubc.ca/~murphyk/Software/Ocaml/why_ocaml.html), I saw
 that OCaml was praised for the speed of the executables it generates -
 and was referred to, speed-wise, as second to none, except C and
 C++.
 
 However, when I actually went to the Language Shootout page suggested
 in the article, I found out that OCaml is not 2nd, it is 13th, behind
 languages like Haskell and C#...
 (http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php)
 
 Is it just hype, then? Or am I missing something?

 I think the shootout is not a good data source. There are definitely
 some very poor Ocaml results there, so I'd guess the shootout got
 recently more attention by enthusiasts of other languages, and the
 current Ocaml programs there are not very good. (I remember Ocaml was #1
 at the shootout a few years ago, faster than C.) So maybe a good
 opportunity to post better Ocaml solutions there?


Maybe it is time to join forces and update the shootout for OCaml?

If some people are interested here, I can setup a repository on the forge
to update all this tests. 

If I get 2 people interested, I will setup a VCS repository + project on
the forge, this afternoon. Drop me an email + preferred VCS (among svn,
git, darcs) and your account login on http://forge.ocamlcore.org. I will
take care, when ready, to made this code available in the shootout once
finished.

Regards,
Sylvain Le Gall

___
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] Re: Optimizing garbage collection

2010-11-22 Thread Sylvain Le Gall
On 22-11-2010, Damien Doligez damien.doli...@inria.fr wrote:

 On 2010-11-21, at 20:26, Eray Ozkural wrote:

 I've been thinking whether some kind of doubling strategy would work for the 
 minor heap size. What do you think?

 Sounds like an interesting idea, but what heuristic would you use?
 When everything is smooth, the running time decreases something like
 exponentially with the minor heap size, so you'd always want to
 increase the size.  How do you tell when to stop?  And then, if the
 program is not behaving uniformly, when do you decide to reduce
 the size?


How do you tell when to stop? 
-

Maybe you can stop when you reach (the size of the L2/L3 cache of the
processor) / number of core.

Both information are quite straight to read from /proc/cpuinfo. 

Regards,
Sylvain Le Gall

___
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] Re: [Was: OCamlJit 2.0]

2010-11-20 Thread Sylvain Le Gall
On 20-11-2010, Yoann Padioleau pada...@wanadoo.fr wrote:

 On Nov 20, 2010, at 9:08 AM, Jon Harrop wrote:

 Do we have example of big companies porting their whole codebase to
 another language ?
 
 Yes, of course. Companies modernise all the time. We have a client who just
 started porting 1MLOC of C++ to F#.

 How they do that ? Are they using compiler frontends to assist them
 in automatically translating part of the code to F# ?


I worked for Metaware (http://www.metaware.fr). This company does source
to source migration of COBOL code. We also tried once to do COBOL to
Java translation using internal tools... It works, but probably not the
way you expect... Or maybe the same way obrowser works in fact: you
create a VM that interpret something in between COBOL and Java. You
loose comments and meanings in between. The result is 100%
unmaintainable/unreadable and at least 2x bigger. 

We stopped this kind of migration, because the result was not exactly
great (but it works). 

 It happens all the time but it is even
 more likely to happen as a consequence of multicore.

I doubt an old code, not written with multicore in mind is easily
portable to multicore. So basically, the migration you are talking about
is starting a new project that will replace one software/library by
another. 

Regards,
Sylvain Le Gall

___
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] Re: Looking for stubs for sendmsg/recvmsg

2010-11-20 Thread Sylvain Le Gall
On 20-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:
 On 19-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:
 On 19-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:
 On 18-11-2010, Goswin von Brederlow goswin-...@web.de wrote:

 The best example about this: you cannot delete a file that has an FD
 still open on it. This makes harder to remove temporary file (and this
 piece of code was precisely made to track FD on temporary files, that
 let 1000s of unremoved temp file). 

 Regards,
 Sylvain Le Gall

 Which again speaks for my solution. The leaked FD will be closed much
 faster (before the program terminates) and one can remove the tempfiles
 while the program is still running.


I think, this totally off-topic. But anyway, when a program create a
temporary files it needs to remove ASAP, itself. I wouldn't 
deliver a program with a notice like sometimes FD leaked, not a
problem, just remove $TMP/myprogram-*. 

For the little story, the leaked FD (hence the temporary files) was
400MB each and it quickly get noticed after a few run (and a full HD).

Regards,
Sylvain Le Gall

___
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] Re: Looking for stubs for sendmsg/recvmsg

2010-11-19 Thread Sylvain Le Gall
On 18-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Hi,

 I'm looking for stubs for

ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);

 Specifically I need those to send (among normal messages) an
 Unix.file_descr over a Unix Domain Socket.

 Does anyone know of a module that has them?


If you don't find one and plan to write it yourself, this would be a
good addition to extunix:
http://extunix.forge.ocamlcore.org

Regards,
Sylvain Le Gall

___
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] Re: ocamlbuild and packs

2010-11-19 Thread Sylvain Le Gall
On 18-11-2010, Thomas Gazagnaire thomas.gazagna...@inria.fr wrote:
 Hi all,

 I've got a source tree with the following patterns :

 A/a.ml (defines 'let x = 1')

 B/a.ml (use A.x and defines 'let y = 2')
 B/b.ml
 B/b.mlpack (contains 'A B')

 C/a.ml (use A.x)
 C/b.ml (use B.A.y)
 C/c.mlpack (contains 'A B')

 Is there any way with ocamlbuild to build that tree (if possible using
 only _tags files, but if not I would be happy to have at least a
 solution :-) ?


You can try to start building A/a.mlpack and use the generated library
in other libraries.

Regards,
Sylvain Le Gall

___
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] Re: Looking for stubs for sendmsg/recvmsg

2010-11-19 Thread Sylvain Le Gall
Hello,

On 19-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:

 On 18-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Hi,

 I'm looking for stubs for

ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);

 Specifically I need those to send (among normal messages) an
 Unix.file_descr over a Unix Domain Socket.

 Does anyone know of a module that has them?


 If you don't find one and plan to write it yourself, this would be a
 good addition to extunix:
 http://extunix.forge.ocamlcore.org

 Regards,
 Sylvain Le Gall

 I'm thinking of changing Unix.file_descr from int to a custom block
 (containing the FD) with finalizer. Unix.close would set the FD to -1
 and the finalizer gives an error if FD != -1 and closes it.

 Actually I want that tunable with 3 possible behaviours:

 type fd_leak_mode = Silent | Complain | Fail
 val set_leak_mode : fd_leak_mode - unit = fun

 Silent just closes the FD if it is still open, Complain (default)
 outputs to stderr and closes it and Fail aborts.

 That would change most of the Unix module and mean a complete fork of it.

Not that much, if you proceed in another way. I think what you are
looking for is a fd leak detector?

Here is a small modules that I have written for this purpose:

File UnixExt.ml:
(** Count open/close call *)
IFNDEF NDBUG THEN
let fd_opened =
  Hashtbl.create 13
;;

let fd_once_opened =
  Hashtbl.create 13
;;

let fd_open fd fn out =
  dbug_print
(fun () - 
   Printf.sprintf %s '%s' 
 (if out then open-out else open-in)
 fn);
  Hashtbl.add fd_opened fd (fn, out)
;;

let fd_close fd =
  try 
let (fn, out) as data = 
  Hashtbl.find fd_opened fd 
in
  dbug_print
(fun () -
   Printf.sprintf %s '%s' 
 (if out then close-out else close-in)
 fn);
  Hashtbl.add fd_once_opened fd data;
  Hashtbl.remove fd_opened fd;
  with Not_found -
begin 
  dbug_print
(fun () - 
   let fn =
 try 
   fst (Hashtbl.find fd_once_opened fd)
 with Not_found -
   unknown
   in
 Printf.sprintf Trying to close %s again fn)
end
;;

let () = 
  at_exit
(fun () -
   let exit_error =
 ref false
   in
 Hashtbl.iter 
   (fun fd (fn, out) -
  if fd  Unix.stdin  fd  Unix.stdout  fd  Unix.stderr then
begin
  Printf.eprintf Not closed '%s' (out: %b)\n fn out;
  exit_error := true
end)
   fd_opened;
 Hashtbl.clear fd_opened;
 if !exit_error then 
   exit 3
)
;;

let opened_files () = 
  let lst = 
ref []
  in
Hashtbl.iter 
  (fun _ e - lst := e :: !lst)
  fd_opened;
List.sort compare !lst;

ELSE
let fd_open _ _ _ = 
  ()
;;

let fd_close _ = 
  ()
;;

let opened_files () = 
  []
;;
ENDIF

(** See UnixExt.mli *)
let to_file_descr_in fd = 
  fd_open fd converted false;
  fd
;;

(** See UnixExt.mli *)
let to_file_descr_out fd = 
  fd_open fd converted true;
  fd
;;

(** See UnixExt.mli *)
let close_in fd =
  Unix.close fd;
  fd_close fd
;;

(** See UnixExt.mli *)
let stdout =
  fd_open Unix.stdout stdout true;
  Unix.stdout
;;

[...override other functions that open/close fd...]

Then in the modules using this features, you just have to open UnixExt
after Unix...

You can even probably design a library that will transparently hide Unix
with a custom Unix module providing this feature.


 Would that be something for extunix too?


I don't think so. At least, this is not currently the purpose of
extunix... 

Regards,
Sylvain Le Gall

___
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] Re: Looking for stubs for sendmsg/recvmsg

2010-11-19 Thread Sylvain Le Gall
On 19-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:
 On 19-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:
 On 18-11-2010, Goswin von Brederlow goswin-...@web.de wrote:

 Not that much, if you proceed in another way. I think what you are
 looking for is a fd leak detector?

 Here is a small modules that I have written for this purpose:

 File UnixExt.ml:
 (** Count open/close call *)

[...]

 [...override other functions that open/close fd...]

 Then in the modules using this features, you just have to open UnixExt
 after Unix...

 You can even probably design a library that will transparently hide Unix
 with a custom Unix module providing this feature.

 Much less usefull.

 Using a custom block with finalizer means that the FD will be closed
 relative close to where/when it was leaked. Makes it easier to find
 where it was leaked and adding GC.compact calls at strategic locations
 can narrow it down even more. Leaking FDs also becomes much less
 serious. The GC will clean them up and close them. So you can use an app
 that leaks FDs just fine.


It all depends on what you want: fix your program that leaks or live
with it. The former piece of code helps to fail if there are leaked FD.
On Unix FD leaks is not that problematic, but on Windows it turns to be
another problem.

The best example about this: you cannot delete a file that has an FD
still open on it. This makes harder to remove temporary file (and this
piece of code was precisely made to track FD on temporary files, that
let 1000s of unremoved temp file). 

Regards,
Sylvain Le Gall

___
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] Re: SMP multithreading

2010-11-17 Thread Sylvain Le Gall
On 17-11-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Sylvain Le Gall sylv...@le-gall.net writes:

 Hi,

 On 15-11-2010, Wolfgang Draxinger wdraxinger.maill...@draxit.de wrote:
 Hi,

 I've just read
 http://caml.inria.fr/pub/ml-archives/caml-list/2002/11/64c14acb90cb14bedb2cacb73338fb15.en.html
 in particular this paragraph:
| What about hyperthreading?  Well, I believe it's the last convulsive
| movement of SMP's corpse :-)  We'll see how it goes market-wise.  At
| any rate, the speedups announced for hyperthreading in the Pentium 4
| are below a factor of 1.5; probably not enough to offset the overhead
| of making the OCaml runtime system thread-safe.

 This reads just like the 640k ought be enough for everyone. Multicore
 systems are the standard today. Even the cheapest consumer machines
 come with at least two cores. Once can easily get 6 core machines today.

 Still thinking SMP was a niche and was dying?


 Hyperthreading was never remarkable about performance or whatever and is
 probably not pure SMP (emulated SMP maybe?).

 Hyperthreading is a hack to better utilize idle cpu sub units. The CPU
 has multiple complete sets of registers, one per hyper thread. Execution
 of the threads is interleaved. Now when one thread is doing some
 floating point operation the cpu switches over to another thread and
 lets it do some integer aritmetic. But that assumes the threads are
 using different sub units. If they are using the same unit then they
 just block each other and no speedup occurs.

 The speedup of hyperthreading is purely from avoiding dead cycles when
 one thread waits for something. On te other hand the cache is shared
 between threads so per thread it is smaller and more easily
 trashed. Hyperthreading can be much slower too.


Indeed, the HT extension was designed to reduce pipeline bubbles, which
most of the time occurs when you need to load data from a slow memory
(slow = RAM as opposed to L1/L2 cache). 

In the old time of my P4, ocaml was performing quite well on the
processor. One story about it: while compiling cameleon on it, I often
get into thermal warning (the CPU was overheating). I think it could
have been related to the fact the CPU idle level was very low (e.g. no
pipeline bubble). I always thought that this was related to the fact the
minor heap can be stored inside the cache and that reduces the hit/miss
factor (i.e. avoid fetching data in RAM). I have never really tested
this hypothesis. Maybe you can tell me your opinion about this?

Regards,
Sylvain Le Gall

___
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] Re: Native toplevel? (was: OCamlJit 2.0)

2010-11-17 Thread Sylvain Le Gall
On 17-11-2010, Alain Frisch al...@frisch.fr wrote:
 On 11/16/2010 03:52 PM, Benedikt Meurer wrote:
 OCamlJit 2.0 was specifically designed for desktop processors and is
 not really portable to anything else in its current shape, because
 the target audience are people using the interactive top-level and
 the byte-code interpreter for rapid prototyping/development

 This looks like a very interesting project!

 Does performance really matter that much for rapid 
 prototyping/development?  I can imagine other uses of the toplevel where 
 performance matters more, like theorem provers embedded in the OCaml 
 toplevel.


OASIS generates a setup.ml that is interpreted using the toplevel.
Maybe, a native toplevel can enhance the speed of this process (it takes
less than 1 second to run).
http://oasis.forge.ocamlcore.org

Regards,
Sylvain Le Gall

___
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] Re: SMP multithreading

2010-11-16 Thread Sylvain Le Gall
Hi,

On 15-11-2010, Wolfgang Draxinger wdraxinger.maill...@draxit.de wrote:
 Hi,

 I've just read
 http://caml.inria.fr/pub/ml-archives/caml-list/2002/11/64c14acb90cb14bedb2cacb73338fb15.en.html
 in particular this paragraph:
| What about hyperthreading?  Well, I believe it's the last convulsive
| movement of SMP's corpse :-)  We'll see how it goes market-wise.  At
| any rate, the speedups announced for hyperthreading in the Pentium 4
| are below a factor of 1.5; probably not enough to offset the overhead
| of making the OCaml runtime system thread-safe.

 This reads just like the 640k ought be enough for everyone. Multicore
 systems are the standard today. Even the cheapest consumer machines
 come with at least two cores. Once can easily get 6 core machines today.

 Still thinking SMP was a niche and was dying?


Hyperthreading was never remarkable about performance or whatever and is
probably not pure SMP (emulated SMP maybe?).

 So, what're the developments regarding SMP multithreading OCaml?


There are various development regarding this subject (most recent
first):
- Plasma (MapReduce in OCaml)
  http://plasma.camlcity.org/plasma/index.html
- OC4MC (OCaml for MultiCore)
  http://www.algo-prog.info/ocmc/web/
- ocamlp3l
  http://camlp3l.inria.fr/eng.htm
- jocaml 
  http://jocaml.inria.fr/
- ocamlmpi
  http://forge.ocamlcore.org/projects/ocamlmpi/

All these projects try to tackle the challenge of SMP from different
point of view. Maybe you'll find what your answer in one of them.

Regards,
Sylvain Le Gall

___
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] Re: Type Safety comes to the iPad

2010-11-09 Thread Sylvain Le Gall
Hello,

On 09-11-2010, Jonathan Kimmitt jonat...@kimmitt.co.uk wrote:
 I thought you might be interested to know that my new OCAML App for the iPad 
 was published
 on the iTunes Store yesterday. I believe this is a significant achievement 
 given the notorious
 reluctance of Apple to embrace languages other than C/obj-C/C++ and I would 
 hope it would
 promote wider dissemination of type safety.

 The real win would be if the new paradigm was accepted for teaching the new 
 generation of
 students etc, which would require greater acceptance by potential employers 
 which is a bit
 of a chicken/egg scenario.

 Anyway I am inordinately proud of my new publication and if you know anybody 
 who has an iPad,
 please let them know about it.

 http://itunes.apple.com/app/ocamlexample/id396515573?mt=8#


Congratulation, this is a really nice work.

Regards,
Sylvain Le Gall

___
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] Re: Help with Elliom syntax

2010-11-04 Thread Sylvain Le Gall
Hello,

On 04-11-2010, Till Crueger till.crue...@gmx.net wrote:
 Hi,

 I am still trying to find my way with Elliom and Ocsigen. Right now I can  
 use OCaml to generate the pages I want, but I still have problems to  
 figure out how to encode the XHTML. The main question I have is how to  
 assign attributes to elements,
 like div blocks or others. I found the a_id functions that should return  
 an id object, but I have not figured out how to use it to actually assign  
 the id.


Most of the time you have an ~a parameter.

Example:
div ~a:[a_class [statistics]] [ h2 [pcdata Statistics]; ... ]

Regards,
Sylvain Le Gall

___
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] Re: Help with Elliom syntax

2010-11-04 Thread Sylvain Le Gall
Hello,

On 04-11-2010, Till Crueger till.crue...@gmx.net wrote:
 On Thu, 04 Nov 2010 13:31:35 +0100, Sylvain Le Gall sylv...@le-gall.net  
 wrote:

 Most of the time you have an ~a parameter.

 Example:
 div ~a:[a_class [statistics]] [ h2 [pcdata Statistics]; ... ]

 Thanks for the help again.
 Is there a place where such things are documented? Because I was not able  
 to figure out how to do this using the Elliom developer manual.


Well, you have to figure how nullary/.../star works.
http://ocsigen.org/docu/1.3.0/XHTML.T.html#TYPEnullary
All is in the type ;-)

E.g. for nullary 
type ('a, 'b) nullary = ?a:'a attrib list - unit - 'b elt 
and 
val br : ([ core ], [ `Br ]) nullary
and 
type core = [ `Class | `Id | `Title ] 

So you know that br accept only a_class, a_id and a_title...

I would recommend you to learn by examples, because ocsigen is a big
application and can be pretty hard to learn. There are already good
websites around:
https://github.com/mfp/ocsiblog
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis-db;a=tree
http://ocsigen.org/ocsimore/sources/

Regards,
Sylvain Le Gall

___
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] Re: type inference problem with Printf.sprintf ?

2010-11-03 Thread Sylvain Le Gall
Hello,

On 03-11-2010, Gregory Bellier gregory.bell...@gmail.com wrote:

 What's the point to rely on another lib while the standard lib Unix is
 enough for this simple task? I don't know calendarLib, that's why I ask. But
 it relies on Unix and Sys anyway so maybe it's better to just use Unix.


Calendar (http://calendar.forge.ocamlcore.org/) or CalendarLib helps you
to deal with a lot of details concerning date. Unix is enough, if you
just want the number of seconds between start and stop of a function. If
you want to count weeks or days, you should use Calendar.


 2010/10/27 Richard Jones r...@annexia.org

 On Wed, Oct 27, 2010 at 08:44:10AM +1100, Arlen Cuss wrote:
  # open CalendarLib;;
  # Calendar.now ();;
  - : CalendarLib.Calendar.t = abstr
  # Printer.Calendar.print %d/%m/%Y %H:%M:%S\n (Calendar.now ());;
  26/10/2010 21:43:43
  - : unit = ()

 Even better, use the internationally standardized format for dates:

 # Printer.Calendar.print %F %T\n (Calendar.now ()) ;;
 2010-10-27 11:28:59
 - : unit = ()



Regards,
Sylvain Le Gall

___
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] Re: Generalized Algebraic Datatypes

2010-10-31 Thread Sylvain Le Gall
On 31-10-2010, Wojciech Daniel Meyer wojciech.me...@googlemail.com wrote:
 bluestorm bluestorm.d...@gmail.com writes:

 It was actually the case in Caml Light : each datatype constructor
 implicitly declared a constructor function with the same name. I
 don't exactly know why this feature was dropped in Objective Caml,
 but I think I remember (from a previous discussion) that people
 weren't sure it was worth the additional complexity.

 Would that be not possible now with Camlp4 extension?


I am pretty sure, it is possible to implement them with camlp4. Just a
matter of time -- and motivation.

The only limitation I can see, is that the generated constructors won't
be capitalized. E.g.:

type t = MyConstr | YourConstr of int 

=

type t = MyConstr | YourConstr of int

let myConstr = MyConstr
let yourConstr i = YouConstr i

Regards,
Sylvain Le Gall

___
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] Re: Generalized Algebraic Datatypes

2010-10-31 Thread Sylvain Le Gall
On 31-10-2010, Lukasz Stafiniak lukst...@gmail.com wrote:
 On Sun, Oct 31, 2010 at 3:35 PM, Sylvain Le Gall sylv...@le-gall.net wrote:
 On 31-10-2010, Wojciech Daniel Meyer wojciech.me...@googlemail.com wrote:
 bluestorm bluestorm.d...@gmail.com writes:

 It was actually the case in Caml Light : each datatype constructor
 implicitly declared a constructor function with the same name. I
 don't exactly know why this feature was dropped in Objective Caml,
 but I think I remember (from a previous discussion) that people
 weren't sure it was worth the additional complexity.

 Would that be not possible now with Camlp4 extension?


 I am pretty sure, it is possible to implement them with camlp4. Just a
 matter of time -- and motivation.

 The only limitation I can see, is that the generated constructors won't
 be capitalized. E.g.:

 type t = MyConstr | YourConstr of int

 =

 type t = MyConstr | YourConstr of int

 let myConstr = MyConstr
 let yourConstr i = YouConstr i


 Why do you say so? HOL Light uses capitalized identifiers for values,
 for example. It's probably possible to do whatever one reasonably
 wants.


Function names and values are low id in OCaml (first letter must be
uncapitalized). If you try to define let MyConstr = 0 in an OCaml
toplevel, you will get a syntax error... 

The code generated by camlp4 must be syntactically correct.

But maybe you are talking about a deeper integration?

E.g. whenever you encounter the constructor YourConstr in expr, you
transform it into fun i - YourConstr i. This should work but since
camlp4 is limited to a single module, you won't be able to use this
outside the module, because you won't have access to the definition of
YouConstr and won't be able to determine his arity...

But if you have an idea about how to solve this, just tell us.

Regards,
Sylvain Le Gall

___
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] Re: Generalized Algebraic Datatypes

2010-10-29 Thread Sylvain Le Gall
On 29-10-2010, Jacques Le Normand rathere...@gmail.com wrote:

 I didn't know about this alternate syntax; can you please describe it?
 cheers
 --Jacques

It is on page 14:
http://gallium.inria.fr/~xleroy/talks/cug2008.pdf

And around 14:22 in the video:
http://video.google.com/videoplay?docid=1704671501085578312hl=en#

Regards
Sylvain Le Gall

___
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] [ANN] oasis v0.2.0: Architecture for building OCaml libraries and applications

2010-10-22 Thread Sylvain Le Gall
OASIS generates a full configure, build and install system for your
application. It starts with a simple `_oasis` file at the toplevel of your
project and creates everything required.

It uses external tools like OCamlbuild and it can be considered as the glue
between various subsystems that do the job.

It also features a do-it-yourself command line invocation and an internal
configure/install scheme. Libraries are managed through findlib. It has been
tested on GNU Linux and Windows.

It also allows to have standard entry points and description. It helps to
integrates your libraries and software with third parties tools like GODI.

Changelog and full blog post here:
http://www.ocamlcore.com/wp/2010/10/oasis-v02-release/

Homepage:
http://oasis.forge.ocamlcore.org/

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/oasis

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis;a=summary

[Generated by 'OASIS announce']


___
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] [ANN] ocaml-data-notation v0.0.3: Store data using OCaml notation

2010-10-22 Thread Sylvain Le Gall
This library uses `type-conv` to dump OCaml data structures using OCaml data
notation.

This kind of data dumping helps to write OCaml code generator, like OASIS.

Changes:
 * Partial support for polymorphic variant, as used in OASIS v0.2.0

Homepage:
http://forge.ocamlcore.org/projects/odn

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/ocaml-data-notation

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ocaml-data-notation;a=summary

[Generated by 'OASIS announce']


___
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] Re: [ANN] oasis v0.2.0: Architecture for building OCaml libraries and applications

2010-10-22 Thread Sylvain Le Gall
On 22-10-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
 Hi,

 OASIS generates a full configure, build and install system for your
 application. It starts with a simple `_oasis` file at the toplevel of your
 project and creates everything required.

 Do you have plans to make GODI packages for Oasis and its dependencies?
 (I don't mean using Oasis to automate the generation of GODI packages;
 I mean GODI packages for Oasis itself).  It's a little step that makes
 trying out new software all the more convenient...


I don't have plans for GODI, but I plan to build Debian packages. I don't
know (yet) GODI enough to do it. But I would help anyone who has plan
about that.

If you wan to try OASIS, there is an installer that should work out of
the box on Linux/Windows (just providing the application, not the
library). It is on the download page:
https://forge.ocamlcore.org/frs/?group_id=54

Regards,
Sylvain Le Gall

___
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] Re: [ANN] oasis v0.2.0: Architecture for building OCaml libraries and applications

2010-10-22 Thread Sylvain Le Gall
On 22-10-2010, bluestorm bluestorm.d...@gmail.com wrote:

 Changelog and full blog post here:
 http://www.ocamlcore.com/wp/2010/10/oasis-v02-release/


 I've used oasis for small experiments, and I hope this project will gain
 traction.
 I found it perhaps still a bit rough on the dev. side : it's heavier than
 just writing a simple META file, but the benefits are important (in
 particular, you can avoid autoconf but still be more flexible than a simple
 Makefile-only build system), and it's particularly sweet on the user side.


Have you tried the revamped quickstart subcommand. I am trying to make
the creation of _oasis as easy as possible...

If you have any suggestions to help make lighter, I'll be happy. BTW,
when you say heavier, is it in term of complexity, of size of the
generated setup.ml or something else?

 I'm not convinced with the linux-installer.bin you distribute, and prefer to
 build from source. oasis built flawlessly, but I first had to find the
 various dependencies; in particular, the oUnit version required is newer
 than the package available in either Godi or  Debian, and your small
 dependencies (odn, ocamlify...) cannot be found elsewhere. They're very easy
 to build (thanks to... oasis), but the whole search-on-ocamlforge process is
 perhaps unnecessary.
 Could you provide an archive included the source of all those dependencies
 that are not in both Debian (testing) and GODI ?
 I'm currently using debian testing, and have needed the following files :
 - ocaml-data-notation-0.0.3.tar.gz
 - ocaml-expect-0.0.2.tar.gz
 - ocamlify-0.0.1.tar.gz
 - ounit-1.1.0.tar.gz

 (Of course, Oasis-DB will make all that a breeze ;-)

And before OASIS-DB, there should be oasis bundle, that should do
exactly what you ask me.

I can try to create an experimental oasis-bundle-0.2.0.tar.gz. Will you
test it?



 It's a triviality to say but I'm quite happy with the change in command-line
 invocation style (OASIS -setup = oasis setup). Four small comments
 regarding this :

 - when just typing oasis, it would be nicer to directly give the help
 page; darcs and git, for example, have this behavior that I find handy

 - the small message we currently have says [..] call 'oasis -help' for
 help. Wouldn't it be more consistent to call 'oasis help' ? I can see
 that you kept the -help/--help interface for compatibility with other
 command-line tools, but the subcommand-style is more consistent with the
 rest of the interface

 - git and darcs automatically call a pager when producing long text output;
 it would also be a nice thing to have in oasis, especially for the oasis
 manual

 - the current behavior of subcommand help (oasis help query) output first
 the general help, then the subcommand-specific help; I think just the
 subcommand-specific help would be a better output


All this seems quite reasonable. May I ask you to submit feature
requests about this on the BTS?

Regards
Sylvain Le Gall

___
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] Re: [ANN] oasis v0.2.0: Architecture for building OCaml libraries and applications

2010-10-22 Thread Sylvain Le Gall
On 22-10-2010, bluestorm bluestorm.d...@gmail.com wrote:
 On Fri, Oct 22, 2010 at 7:51 PM, Sylvain Le Gall sylv...@le-gall.netwrote:

 Have you tried the revamped quickstart subcommand. I am trying to make
 the creation of _oasis as easy as possible...



 If you have any suggestions to help make lighter, I'll be happy. BTW,
 when you say heavier, is it in term of complexity, of size of the
 generated setup.ml or something else?


 I think it's mostly a question of getting used to the new features of oasis.
 Oasis much more things than with a META (configuration, compilation, etc.),
 so the downside is that there are more things to specify in a _oasis file
 than in a META file.


Indeed.

 During my work with various such tools (Makefile, META, etc.), I found out
 that I rely strongly on example files that I can copy/paste and
 modify/adapt. With time I have accumulated some templates for
 Makefile/META/_tags/myocamlbuild.ml covering my basics need, and I know
 where to look for more advanced things to imitate. I have not yet
 accumulated a comprehensive set of reusable _oasis files (though the
 documentation is certainly in the good direction), but I think it's just a
 matter of time.


There are some examples linked from here:
http://oasis.forge.ocamlcore.org/documentation.html
And direct links to various other project that use OASIS in the real
life here:
http://oasis.forge.ocamlcore.org/alreadyusing.html

I will be happy to add your examples or projects there, if you
accumulate the same knowledge as with other tools.


  It's a triviality to say but I'm quite happy with the change in
 command-line
  invocation style (OASIS -setup = oasis setup). Four small comments
  regarding this : [..]

 All this seems quite reasonable. May I ask you to submit feature
 requests about this on the BTS?


 Done.


Great, they will probably be in the 0.3.0 release.

Cheers,
Sylvain Le Gall

___
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] Re: Unicode, update

2010-10-14 Thread Sylvain Le Gall
Hello,

On 14-10-2010, Paul Steckler st...@stecksoft.com wrote:
 A couple of weeks ago or so, I asked about using OCaml file primitives
 with the Camomile library for Unicode
 on Windows.  I thought I'd update people on the list about my
 resolution of these issues.

 I decided to make the application UTF-8 throughout, so that the string
 type always means UTF-8 -- OK, there
 are a few exceptions to that rule.  The SQLite3 library already deals
 with UTF-8 in a graceful way,   The same is
 true for the C/C++ parsing library I'm using.  That leaves the OCaml
 library procedures, like open_in and open_out,
 which definitely don't handle Unicode filenames on Windows.

 I took the OCaml sources and made modified versions of functions, like
 file_exists, open_in, and so on,
 that convert filenames from UTF-8 to UTF-16 and then used wide
 versions of the underlying Win32
 primitives.  In some cases, I had to convert UTF-16 back to UTF-8.
 The Win32 functions MultiByteToWideChar
 and WideCharToMultiByte handle those conversions nicely.  I link in
 these new functions, named
 file_exists_win32, open_in_win32, etc., and everything works a treat.


Would it be possible to publish them as an external library? 

Thanks for the update
Sylvain Le Gall

___
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] Re: Type constraint to explain that a polymorphic variants is included into another

2010-10-11 Thread Sylvain Le Gall
Hello,

On 08-10-2010, Jacques Garrigue garri...@math.nagoya-u.ac.jp wrote:
 On 2010/10/09, at 2:13, Sylvain Le Gall wrote:

 Hello all,
 
 I would like to build an interface for plugins that allow to extract at the
 same time a very specific data for a plugin family and to extract
 general help for plugins.
 
 Here is an example:

 [...]

 This code doesn't compile because I see no way to explain that F.kind is
 included into plugin_kind. 

 I'm not sure of what you are trying to do, but private rows where introduced
 with this goal in mind.

 The idea is to change the abstract definition of kind in PLUGIN_FAMILY to

   type kind = private [ plugin_kind]

 meaning that kind can be instantiated to any subset of plugin_kind.
 You can then use subtyping to convert from kind to plugin_kind.


Very nice OCaml extension. It indeed solves my problem. I was aware of private
type, but don't yet know how to use it.

 Here is a typable version of your code.

 let run pkg = 
  prerr_endline (help (pkg.plugin_build : MapPlugin.key));
  prerr_endline (help (pkg.plugin_install : MapPlugin.key));
  (Build.act pkg.plugin_build) ();
  Install.act pkg.plugin_install []


That is perfect. If I add the following call, with your solution:

 (Install.act pkg.plugin_build) []

I get this error:

ocamlc -o test test.ml
File test.ml, line 84, characters 14-30:
Error: This expression has type [ `Build ] plugin = [ `Build ] * string
   but an expression was expected of type
 [ `Install ] plugin = [ `Install ] * string
   These two variant types have no intersection
make: *** [all] Erreur 2

This is exactly what I want.

Thanks,
Sylvain Le Gall

___
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] Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Sylvain Le Gall
Hello all,

I would like to build an interface for plugins that allow to extract at the
same time a very specific data for a plugin family and to extract
general help for plugins.

Here is an example:

(** All the plugins I want to manage *)
type plugin_kind = [`Build | `Install]

(** Generic plugin *)
type 'a plugin = 'a * string

(** Help data for all plugin *)
module MapPlugin = 
  Map.Make
(struct
   type t = plugin_kind plugin
   let compare = compare
 end)

let all_help: string MapPlugin.t ref = 
  ref MapPlugin.empty

let help plg = 
  MapPlugin.find plg !all_help

(** Functor to build function related to one type of plugin *)
module type PLUGIN_FAMILY = 
sig
  type act
  type kind
  val kind_default: kind
end


module Make (F: PLUGIN_FAMILY) = 
struct

  module MapPluginSelf = 
Map.Make
  (struct 
 type t = F.kind plugin
 let compare = compare
   end)

  let all_act: F.act MapPluginSelf.t ref = 
ref MapPluginSelf.empty

  let act (plg : F.kind plugin) =
MapPluginSelf.find plg !all_act

  let create name help act = 
let id = 
  F.kind_default, name
in
  all_help := MapPlugin.add id help !all_help;
  all_act  := MapPlugin.add id act !all_act;
  id
end

(** Functions for build plugins *)
module Build =
  Make
(struct 
   type act = unit - unit 
   type kind = [`Build]
   let default = `Build
 end)

(** Functions for install plugins *)
module Install = 
  Make
(struct 
   type act = string list - unit
   type kind = [`Install]
   let default = `Install
 end)

type package = 
{
  name: string;
  plugin_build: [`Build] plugin;
  plugin_install: [`Install] plugin;
}

let run pkg = 
  prerr_endline (help pkg.plugin_build);
  prerr_endline (help pkg.plugin_install);
  (Build.act pkg.plugin_build) ();
  (Install.act pkg.plugin_install) ()


This code doesn't compile because I see no way to explain that F.kind is
included into plugin_kind. 

Here is the precise error:
camlc -o test test.ml
File test.ml, line 51, characters 32-34:
Error: This expression has type F.kind * 'a
   but an expression was expected of type
 MapPlugin.key = plugin_kind * string
   Type F.kind is not compatible with type
 plugin_kind = [ `Build | `Install ] 
make: *** [all] Erreur 2

Does anyone know a good solution to this problem? Does anyone have a
better solution to this problem? (different design?)

Thank you for your answers,
Sylvain Le Gall

___
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] Re: Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Sylvain Le Gall
On 08-10-2010, Jake Donham j...@donham.org wrote:
 On Fri, Oct 8, 2010 at 10:13 AM, Sylvain Le Gall sylv...@le-gall.net wrote:
 This code doesn't compile because I see no way to explain that F.kind is
 included into plugin_kind.

 As you have written it, F.kind is of course completely abstract. I am
 not sure where you need F.kind to be a strict subtype of plugin_kind,
 but you could say type kind = plugin_kind (this seems a bit useless
 however).

 I don't think there is a way to use subtyping implicitly when applying
 a functor, but you can always do it explicitly by interposing a module
 of signature PLUGIN_FAMILY which embeds the specific kind in
 plugin_kind and passes the other components through.

 You could also have a general and a specific type in the plugin
 signature, and use the general one for general operations (e.g. help)
 but the specific one wherever that is needed. I am not sure I
 understand what you're trying to achieve however.


My goal is that the compiler prevents me to do 
Build.act pkg.plugin_install 
- because plugin_install is of type [`Install] plugin and Build.act
   needs [`Build] plugin

but allow me to do 

help pkg.plugin_install 
- because help needs [`Build | `Install] plugin.

But maybe I am missing something here and try to overengineer something
simple.

Regards,
Sylvain Le Gall

___
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] [ANN] ounit v1.1.0: Unit testing framework

2010-10-06 Thread Sylvain Le Gall
OUnit is a unit testing framework for OCaml, inspired by the JUnit tool for
Java, and the HUnit tool for Haskell.

More information on [HUnit](http://hunit.sourceforge.net)

Changes:
- Add a ~pp_diff parameter to assert_equal and some classic diff operations
  (Closes: #635, #642)
- Add an assert_command function (Closes: #641)
- Add a bracket_tmpfile to ease temporary file use
- Enhance documentation, translate the docbook manual into ocamldoc and
  add content
- Allow to add extra command line arguments to run_test_tt_main 
  (Closes: #640)
- Add a -list-test options to run_test_tt_main, to list available tests
- Skip tests when using -only-test, rather than removing it. This way 
  the path is the same even if some tests don't pass (Closes: #637)
- Add backtrace support (Closes: #639), thanks to Michael Ekstrand
- Use OASIS 
- Move to OCaml Forge: http://ounit.forge.ocamlcore.org
- Maintainance is now done by Sylvain Le Gall (OCamlCore SARL), thanks to
  Maas-Maarten Zeeman for all his work


__As you see there are a lot of changes. OUnit is evolving, feel free to submit
bug reports or contribute your own OUnit snippet if it can be included in the
library.__

Homepage:
http://ounit.forge.ocamlcore.org

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/ounit

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ounit;a=summary

[Generated by 'OASIS announce']


___
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] [ANN] ocaml-expect v0.0.2: Expect-like framework

2010-09-30 Thread Sylvain Le Gall
This is a simple implementation of `expect` to help building unitary testing
of interactive program.

It helps to receive question and send answers from an interactive process.
You can match the question using a regular expression (Str). You can also
use a timeout to ensure that the process answer in time.

See the [Expect manual](http://expect.nist.gov/) for more information and
example.

Changes:
* Add a ~fmatch to expect, to dynamically define expect results
* Allow to pass environment and redirect stderr to spawn
* Add `Suffix/`Prefix/`Contains tests
* Separate Str, add Pcre, create findlib packages expect.str and 
  expect.pcre

Homepage:
http://forge.ocamlcore.org/projects/ocaml-expect/

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/ocaml-expect

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ocaml-expect;a=summary


[Generated by 'OASIS announce']

___
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] Re: what do I need to know to understand camlp4

2010-09-23 Thread Sylvain Le Gall
On 23-09-2010, ben kuin benk...@gmail.com wrote:

 Could someone give any idea how I can begin to understand how to write
 simple camlp4 extensions?


If you consider yourself as a n00b, don't start by camlp4. This is
probably the most difficult part of OCaml -- and to program camlp4 you
need to use OCaml standard syntax (or revised syntax, it depends if you
use antiquotations). 

If you still want to follow the hard path, as suggested elsewhere, Jake
Donham's blog posts are very good:

 http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html

Or if you are around, there is a tutorial session at CUFP:
http://cufp.org/conference/sessions/2010/camlp4-and-template-haskell
(but you need to subscribe).

Regards,
Sylvain Le Gall


___
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] Re: How can I set a type parameter of Map.Make(X) ?

2010-09-20 Thread Sylvain Le Gall
On 20-09-2010, Dumitru Potop-Butucaru dumitru.potop_butuc...@inria.fr wrote:

 I'm certain most users here will consider the question trivially simple, 
 but I browsed the documentation without finding a solution.


There is an ocaml-beginner list, if you feel the question is trivial:
http://tech.groups.yahoo.com/group/ocaml_beginners/

 The question is quite general: Given a polymorphic definition like 
 Map.Make(X), where
 X is some module, how can I specialize its 'a type parameter, e.g. by 
 setting it to Y, so that
 I have maps from X to Y ?


module M = Map.Make(X)

type y_map = y M.t 

(* N.B. Y is syntactically incorrect for a type identifier, you need to
use y *)

Regards
Sylvain Le Gall

___
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] Re: OCaml projects on github, hard to find?

2010-09-20 Thread Sylvain Le Gall
On 20-09-2010, Mike Lin mike...@mit.edu wrote:
 On Fri, Sep 17, 2010 at 5:04 AM, Sylvain Le Gall sylv...@le-gall.net wrote:
 Could OCamlForge be set up to do one-click read-only mirroring of
 interesting github projects?


 That is a possible project:
 https://forge.ocamlcore.org/tracker/index.php?func=detailaid=604group_id=1atid=102

 The main problem is that we need to create this kind of function. Most
 of the forge around doesn't provide an easy coordination with other
 forges. But I think, it is feasible.

 I'll just chime in my support for something like this although I am
 also too busy to work on it. I have a couple longstanding projects on
 OCaml Forge, and as much as I support concentrating OCaml stuff in one
 place, it's just very difficult to resist github's ultra-slickness.


I agree with that the ultra-slickness of github is something nice. As
far as I am concerned, I don't see as a problem to use github for source
code and distribute release through the forge. You can benefit from
BTS/mailing list/aggregated news et al on the forge. I think release
distribution, bug tracking and news is something that should be enough
to concentrate OCaml stuff in one place and provide a good indexing of
your project (not to say, that it will also cross-link your github
project, thus enhance your PageRank). 

If you want to use github, just hide the source tab of the project and
leave a note on the project webpage. Ideally, if someone has the time to
code a github plugin for the forge, you can choose github as SCM and
been redirected to the github project. 

Regards,
Sylvain Le Gall

___
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 projects on github, hard to find?

2010-09-17 Thread Sylvain Le Gall
Hello all,

Before anyone claimed that I am not honest, let me be clear: I am one of
the admin of OCaml Forge, so I am biased.

So here is my problem, from time to time I found interesting OCaml
projects on github. But some are really hard to find. Let me take some
simple examples, using google search and small projects:

project URL, description, google request - n° page where the first entry is

* http://github.com/polazarus/oclock, Access to POSIX  clock_gettime,
 ocaml clock - 7+
* http://github.com/thelema/tornadocaml, xor-based FEC,
 ocaml tornado - 7+

This is not the case for everything, (e.g. ocaml-appengine,
ocaml-orm-sqlite, ocaml-redis et al are ranked 1st page).

Even if these projects are small, it would be great that they did a
single release and to be referenced on the Hump, for example.

N.B. modifying google request can improve ranking e.g. ocaml xor fec
or ocaml fec. 

Regards,
Sylvain Le Gall

p.s.: if someone can volunteer to create a small application that
automatically fetch new projects/news from project on github/google
code/whatever, I will be happy to add it to planet.ocamlcore.org.

___
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] Re: OCaml projects on github, hard to find?

2010-09-17 Thread Sylvain Le Gall
On 17-09-2010, Martin DeMello martindeme...@gmail.com wrote:
 On Fri, Sep 17, 2010 at 2:13 PM, Sylvain Le Gall sylv...@le-gall.net wrote:
 Hello all,

 Before anyone claimed that I am not honest, let me be clear: I am one of
 the admin of OCaml Forge, so I am biased.

 So here is my problem, from time to time I found interesting OCaml
 projects on github. But some are really hard to find. Let me take some
 simple examples, using google search and small projects:

 Could OCamlForge be set up to do one-click read-only mirroring of
 interesting github projects?


That is a possible project:
https://forge.ocamlcore.org/tracker/index.php?func=detailaid=604group_id=1atid=102

The main problem is that we need to create this kind of function. Most
of the forge around doesn't provide an easy coordination with other
forges. But I think, it is feasible.

I would do it myself, but I am pretty busy with other (I hope) important
projects like OASIS-DB. If someone can provide me a solution for this, I
will be happy to put it on forge.ocamlcore.org.

A nice first step, could be to just mirror the git repository from
github.

Regards,
Sylvain Le Gall

___
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] Re: How to re-implement the GC?

2010-09-13 Thread Sylvain Le Gall
Hi,

On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
 Hi there,

 What exactly are the requirements for substituting the current GC with
 another, preferably non-locking, GC? Any pitfalls I wouldn't see just
 reading the code?


The GC is deeply interacting with the the rest of the compiler. I think
you will spend a lot of time on this task.

I would recommend you trying OC4MC, which is probably what you are
looking for:
http://www.algo-prog.info/ocmc/web/

They show quite interesting results using Thread at the last OCaml
Meeting, though they are still some bugs (almost linear speed-up with
multicore).

Regards,
Sylvain Le Gall

___
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] Re: How to re-implement the GC?

2010-09-13 Thread Sylvain Le Gall
On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
 On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
  Hi there,
 
  What exactly are the requirements for substituting the current GC with
  another, preferably non-locking, GC? Any pitfalls I wouldn't see just
  reading the code?
 

 The GC is deeply interacting with the the rest of the compiler. I think
 you will spend a lot of time on this task.


 Deeply interacting with the compiler, how? Not through the public interface
 of GC? Do you mean it is not used in a clean way?


I am not sure how you define clean way. I think it is very efficient,
but not modular or object-oriented. I would say that it is clean with
regard of the efficiency. But I won't use it to demonstrate how GC works
to student (but I won't either show them real world implementation of
other GC which are always more complex when optimization is required).

AFAIK, it uses some machine register to store a pointer to the minor
heap. But I am not a GC expert. 


 I would recommend you trying OC4MC, which is probably what you are
 looking for:
 http://www.algo-prog.info/ocmc/web/


 Yes, I've seen it but it's a work in progress, and it's being rewritten from
 scratch.



If you stick to 3.11.1 OCaml version, you'll be able to compile with one
of their latest stable patch. 

To be honest, I think that if you join your efforts with theirs, you'll
probably get something quicker than going alone on this path. But this
is only my opinion.

At least, you will need the fully-reentrant runtime they are doing. 

 They show quite interesting results using Thread at the last OCaml
 Meeting, though they are still some bugs (almost linear speed-up with
 multicore).



 What exactly is the GC being used there? Is it a custom algorithm or a known
 one? Could we plug our own algorithm to the oc4mc if it has already provided
 the basic changes to substitute the GC?


I think you won't be able to plugin your own GC. The one they provide is
a stop the world... I am not sure though, ask them directly.

Regards,
Sylvain Le Gall

___
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] Re: How to re-implement the GC?

2010-09-13 Thread Sylvain Le Gall
On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
 --===0758070018==
 Content-Type: multipart/alternative; boundary=000e0cd18672fce48b049024b79e

 --000e0cd18672fce48b049024b79e
 Content-Type: text/plain; charset=ISO-8859-1

 On Mon, Sep 13, 2010 at 3:22 PM, Sylvain Le Gall sylv...@le-gall.netwrote:

 On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
  On 13-09-2010, Eray Ozkural examach...@gmail.com wrote:
   Hi there,
  
   What exactly are the requirements for substituting the current GC with
   another, preferably non-locking, GC? Any pitfalls I wouldn't see just
   reading the code?
  
 
  The GC is deeply interacting with the the rest of the compiler. I think
  you will spend a lot of time on this task.
 
 
  Deeply interacting with the compiler, how? Not through the public
 interface
  of GC? Do you mean it is not used in a clean way?
 

 I am not sure how you define clean way. I think it is very efficient,
 but not modular or object-oriented. I would say that it is clean with
 regard of the efficiency. But I won't use it to demonstrate how GC works
 to student (but I won't either show them real world implementation of
 other GC which are always more complex when optimization is required).


 Well, programming anything in C is messy, I suppose.


 AFAIK, it uses some machine register to store a pointer to the minor
 heap. But I am not a GC expert.


 Ah, that's interesting. I wonder if it provides any real speedup on new
 architectures compared to storing the pointer in RAM.


take this with care, I am still not a GC expert
I think it provides an ultra quick way to allocate data on the minor
heap. For heavy allocating programming languages like FP, it is a good
speedup.

Other GC algorithm for Java/C# often made the assumption of long-living
objects with mutation. This is not the case for OCaml. 
/take this with care


 
  I would recommend you trying OC4MC, which is probably what you are
  looking for:
  http://www.algo-prog.info/ocmc/web/
 
 
  Yes, I've seen it but it's a work in progress, and it's being rewritten
 from
  scratch.
 
 

 If you stick to 3.11.1 OCaml version, you'll be able to compile with one
 of their latest stable patch.


 http://www.algo-prog.info/ocmc/distribution/

 Which one is it?


Maybe this one:
http://www.algo-prog.info/ocmc/distribution/oc4mc-toronto-stack32k.tar.gz

It seems to be based on 3.11.1. I really don't know in fact, I am not a
oc4mc expert.


  They show quite interesting results using Thread at the last OCaml
  Meeting, though they are still some bugs (almost linear speed-up with
  multicore).
 
 
 
  What exactly is the GC being used there? Is it a custom algorithm or a
 known
  one? Could we plug our own algorithm to the oc4mc if it has already
 provided
  the basic changes to substitute the GC?
 

 I think you won't be able to plugin your own GC. The one they provide is
 a stop the world... I am not sure though, ask them directly.



 That's unfortunate, too, because from reading their source code I had had
 the impression that they had in mind an easy way to plug-in my GC. One with
 global lock isn't good enough though, it will not have good performance with
 memory intensive programs. Hence, my question, suppose this project actually
 made progress in other parts of the code (like making the runtime fully
 re-entrant) how do I go about implementing a state-of-the-art GC for this,
 are there any special requirements or do I just have to implement a minor
 heap and a major heap etc. to match the interface and the parameters and I
 am done? I mean, is this a garbage collector as we know it, or does it have
 any exotic features or requirements? I am looking to see if a competent
 programmer without an intimate knowledge of the whole compilation system can
 do it.


I really don't know how to answer, contact directly the OC4MC team. I
only answer you with the data they give at OCaml Meeting, back in April. 

Regards
Sylvain Le Gall

___
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] Re: [ANN] camera-rescue v0.0.1: Recover JPEG files from a crashed SD/MMC/CF camera memory card

2010-09-08 Thread Sylvain Le Gall
On 08-09-2010, Gabriel Kerneis kern...@pps.jussieu.fr wrote:
 On Tue, Sep 07, 2010 at 10:50:42PM +0200, Sylvain Le Gall wrote:
 This program searches for JPEG files into a dump of a memory card (a RAW
 file). Once found, each files is saved in a different JPEG file.

 Out of curiosity, what is the difference with recoverjpeg (except the
 programming language)?

 http://www.rfc1149.net/devel/recoverjpeg


As another user points me to, there is also:
http://www.cgsecurity.org/wiki/PhotoRec

camera-rescue is probably not as good as these other tools. There are
plenty of tools like this one. But it makes a good example code ;-)

Regards,
Sylvain Le Gall

___
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] [ANN] ocaml-expect v0.0.1: Expect-like framework

2010-09-07 Thread Sylvain Le Gall
This is a simple implementation of `expect` to help building unitary testing
of interactive program.

It helps to receive question and send answers from an interactive process.
You can match the question using a regular expression (Str). You can also
use a timeout to ensure that the process answer in time.

See the [Expect manual](http://expect.nist.gov/) for more information and
example.

Homepage:
http://forge.ocamlcore.org/projects/ocaml-expect/

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/ocaml-expect

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ocaml-expect;a=summary

[Generated by 'OASIS announce']


___
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] Re: CUFP 2010 is coming! (Oct 12 in Baltimore MD)

2010-09-05 Thread Sylvain Le Gall
On 05-09-2010, Jon Harrop jonathandeanhar...@googlemail.com wrote:
 Intel is developing a functional language which will scale
 on multicore machines

 This sounds very interesting. Any references or a name?


Following links provided in the initial mail:
http://cufp.org/conference/sessions/2010/functional-language-compiler-experiences-intel

Regards,
Sylvain Le Gall

___
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] [ANN] Cryptokit 1.4

2010-09-04 Thread Sylvain Le Gall
Hello all,

We have released a new version of cryptokit. The changes are the
following:

- Added Blowfish block cipher.
- Added MAC functions based on HMAC construction applied to
  SHA-256 and RIPEMD-160.
- Added OASIS and findlib support

You can download it from:
http://forge.ocamlcore.org/projects/cryptokit/

or for testing oasis-db:
http://oasis.ocamlcore.org/dev/browse?pkg=cryptokit

Regards,
Sylvain Le Gall

___
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] Create a constraint between variant type and data list

2010-09-03 Thread Sylvain Le Gall
Hello all,

I would like to somehow enforce that a variant type is associated with
an entry in a data list. 

For example, 

I would like to define:

type license = GPL | LGPL 

and 

let data = [ GPL, GNU Public license; 
 LGPL, GNU Lesser General Public license ]


I would like to enforce that all variants of license are in the
association list.

I have tried to use polymorphic variants, but don't see how to enforce
this constraint.

The point, is that if I add a new variant to license (e.g. BSD3), the
compiler output an error because this new variant is not in data list.

Any ideas ? If you need to use another type expression rather than
variant, please do so, as long as I am able to link the license type
and data list.

Thanks all,
Sylvain Le Gall

___
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] Re: Create a constraint between variant type and data list

2010-09-03 Thread Sylvain Le Gall
On 03-09-2010, Maxence Guesdon maxence.gues...@inria.fr wrote:
 Le Fri, 3 Sep 2010 17:16:48 + (UTC),
 Sylvain Le Gall sylv...@le-gall.net a écrit :

 A solution is to add your new license to your list of associations, then
 the compiler will complain about the unknown variant :)


This is my current solutions. I try to find something better ;-)

Regards,
Sylvain Le Gall

___
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] Re: ANN: ocamljs 0.3

2010-08-27 Thread Sylvain Le Gall
Hello,

On 27-08-2010, Mihamina Rakotomandimby miham...@gulfsat.mg wrote:
 j...@donham.org :
I am happy to announce version 0.3 of ocamljs. Ocamljs is a system for
compiling OCaml to Javascript.

 What are the differences between:
 - OBrowser (http://www.pps.jussieu.fr/~canou/obrowser/tutorial/)

OBrowser seems to be replaced by Js_of_OCaml

 - Js_of_OCaml (http://ocsigen.org/js_of_ocaml/overview)
 - OcamlJS

Have a look at: 
http://ambassadortothecomputers.blogspot.com/2010/08/ocamljs-03.html

Regards,
Sylvain Le Gall

___
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] Re: Please provide at least one page for your ocaml projects

2010-08-25 Thread Sylvain Le Gall
On 25-08-2010, Sylvain Le Gall sylv...@le-gall.net wrote:
 On 25-08-2010, Maxence Guesdon maxence.gues...@inria.fr wrote:

 Indeed, having to look for this information in a tarball of a git repos
 (with gitweb) is not very convenient. Even the project page on a forge is
 not the best way to get the information quickly. It's more a view for a
 developer/contributor, not for a potential user.


 Every project on forge.ocamlcore.org can upload a simple webpage and it
 will be displayed on http://PROJECT.forge.ocamlcore.org. Just add html
 files to /home/groups/PROJECT/htdocs on ssh.ocamlcore.org, same ssh key
 as git/darcs/svn login. You can use rsync, scp or unison.

 Feel free to contact me if you need further utilities for your project.


Examples of web pages:
http://oasis.forge.ocamlcore.org/
http://ocaml-lua.forge.ocamlcore.org/
http://ounit.forge.ocamlcore.org/
http://pa-do.forge.ocamlcore.org/
http://ocamlviz.forge.ocamlcore.org/
http://cmdline-args.forge.ocamlcore.org/
http://camlbz2.forge.ocamlcore.org/
http://ocaml-autoconf.forge.ocamlcore.org/

If you lack inspiration, just copy/adapt these webpages. They are all
accessible on /home/groups/PROJECT/htdocs/.

Regards,
Sylvain Le Gall

___
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] Re: Question about float refs.

2010-08-23 Thread Sylvain Le Gall
On 23-08-2010, Ethan Burns burns.et...@gmail.com wrote:
 On Mon, Aug 23, 2010 at 8:06 AM, Christophe TROESTLER
christophe.troestler+oc...@umh.ac.be wrote:
 On Thu, 19 Aug 2010 07:52:33 -0400, Ethan Burns wrote:

 let r = ref 0.0 ;;
 for i = 0 to 10 do r := float i done;
 Printf.printf %f\n !r;
 Printf.printf words: %f\n (Gc.stat ()).Gc.minor_words

 To add a precision to others' answers : float refs are unboxed
 _locally_.  If you rewrite your code as

 let r = ref 0.0 in
 for i = 0 to 1000_000_000 do r := float i done;
 Printf.printf %f\n !r;
 Printf.printf words: %f\n (Gc.stat ()).Gc.minor_words

 then it runs at about the same speed as you other version.


 $ time ./a.out
 10.00
 words: 200367.00

 real  0m2.655s

 It does seem to run a lot faster than my first version, but it also
 seems to allocate a whole lot.  If it is still allocating just as much
 why is this version so much faster?


Allocation on the minor heap is very cheap compared to assignement into
the major heap. It is better to allocate a lot on the minor heap than to
do operations on the major heap. 

I think the main reason for the difference is that the first example
(float ref not local) implies a call to caml_modify
(byterun/memory.c|h) which has a cost. This cost is bigger on amd64
architecture because one test is quite expensive (Is_in_heap I think)
due to address space randomization.

Regards,
Sylvain Le Gall

___
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] Re: Fwd: More re GC hanging

2010-08-15 Thread Sylvain Le Gall
On 15-08-2010, Paul Steckler st...@stecksoft.com wrote:
 On Sun, Aug 15, 2010 at 7:16 PM, Basile Starynkevitch
bas...@starynkevitch.net wrote:

 Are you sure that you don't have badly coded C routines that you call
 from your Ocaml code (don't forget correct use of CAMLparam  CAMLlocal,
 read again carefully
 http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html and perhaps
 other material about precise garbage collectors).

 I'm not calling any C code directly.  I am using the ocaml-ssl
 library, which has
 some simple calls into the OpenSSL library.


Maybe it has nothing todo, but you talked about ocaml-ssl possibly and
your application hanging, it reminds me:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591891

ocaml-ssl and ocaml-dbus are involved, so maybe the guilty party is
ocaml-ssl -- this is just a guess, not sure about anything.

Regards,
Sylvain Le Gall

___
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] Re: scalable web apps

2010-07-26 Thread Sylvain Le Gall
On 26-07-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
 Hi,

 I am creating an application with ocsigen that requires to serve a lot
 of .tar.gz as static contents. 
 
 Do you think the no Unix supports non-blocking mode will cause problem
 in this case?

 I presume that application is related to the Oasis-DB initiative, right?

You guess right ;-)

 I wouldn't worry too much in that case.  First, because the Ocaml community
 is not that big (yet) as to cause such heavy traffic.  Second, because
 the set of tar.gz files is not that great (a few hundred, max?) and those
 files will tend to be small.  If your server has enough memory, there's a
 good chance many of the file blocks requested will eventually be buffered
 in memory by the kernel, thus minimising expensive disc I/O.


There is indeed a good chance that the files end up in memory.

Thank you for your remarks.

Regards,
Sylvain Le Gall

___
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] Re: scalable web apps

2010-07-26 Thread Sylvain Le Gall
On 26-07-2010, Florent Monnier monnier.flor...@gmail.com wrote:
 Le lundi 26 juillet 2010 13:20:46, Dario Teixeira a écrit :
 Hi,
 
   How does Ocsigen handle database operations?
 
  I thought it was using PG'OCaml, but maybe I'm wrong.
 
 Ocsigen itself does not use PG'OCaml.  The two are frequently associated
 because the latest versions of PG'OCaml are Lwt-friendly and therefore
 a good choice for Ocsigen apps.  (Note that internally, Ocsigen uses
 either Dbm or Sqlite to store session data).

 Both Dbm and Sqlite lock the entire files which blocks concurrent uses,
 isn't it a problem?


For sqlite, at least, it uses Lwt_preemptive.detach and sqlite3 contains
the required caml_enter/leave_blocking_section(s). So Lwt should work
without problems with sqlite.

I suppose it is the same for dbm.

Regards,
Sylvain Le Gall

___
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] Re: scalable web apps

2010-07-26 Thread Sylvain Le Gall
On 26-07-2010, Gabriel Kerneis kern...@pps.jussieu.fr wrote:
 On Mon, Jul 26, 2010 at 05:10:01PM +, Sylvain Le Gall wrote:
  Both Dbm and Sqlite lock the entire files which blocks concurrent uses,
  isn't it a problem?
 
 For sqlite, at least, it uses Lwt_preemptive.detach and sqlite3 contains
 the required caml_enter/leave_blocking_section(s). So Lwt should work
 without problems with sqlite.
 
 I suppose it is the same for dbm.

 No.  For dbm there is a separate daemon (ocsidbm) opening the file once
 and serializing requests sent from and back to Ocsigen through a pipe.


Thanks for this clarification. So basically, it also works with Lwt but
using a little bit heavier backend (i.e. launching a process rather than
launching a thread).

Regards,
Sylvain Le Gall

___
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] Re: scalable web apps

2010-07-24 Thread Sylvain Le Gall
On 24-07-2010, Joel Reymont joe...@gmail.com wrote:
 How do you build scalable web apps with OCaml?

 Do you use Apache with mod_caml? Naked Ocsigen?

 Do you put Ocsigen behind Nginx?


I think that using ocsigen should be enough. There was a nice
presentation by Dario Texeira at the last OCaml Meeting:
https://forge.ocamlcore.org/docman/view.php/77/106/ocaml-web-startup.pdf
(he talks about dispatcher from page 5 to 10, a way to use all the 
processing power of a server)

Unfortunately, he said more things than what is written. The video of
his talk is on my computer -- I will publish it when I have time.

Regards,
Sylvain Le Gall

___
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] Re: Cryptokit and HMAC-SHA256

2010-07-22 Thread Sylvain Le Gall
Hello,

On 22-07-2010, Goswin von Brederlow goswin-...@web.de wrote:
 Dario Teixeira darioteixe...@yahoo.com writes:

 Hi,

 If you decide to code the solution and provide the patch, I will be
 happy to apply it to cryptokit (if the main author of cryptokit accepts
 it, of course).

 I'm attaching the patches adding support for HMAC-SHA256 and HMAC-RIPEMD160
 (I don't need the latter, but for the sake of completeness it seemed silly
 not to support it as well).  Note that these are *very* straightforward
 patches -- kudos to Xavier for making Cryptokit so easy to extend.

 The caveat is that I'm not a cryptographer.  I did, however, verify that
 these new HMACs pass all the test cases listed in RFC4231 (for HMAC-SHA256)
 and RFC2286 (for HMAC-RIPEMD160).

 Thanks for your attention!
 Cheers,
 Dario Teixeira

 While you are patching cryptokit anyway would it be possible to also add
 functions to work on Bigarrays?


Well in fact, HMAC-SHA256 and  HMAC-RIPEMD160 has been implemented in
the source code, but never released. So no patching involved.

 One huge advantage of bigarray is that the data region is allocated
 outside the GC heap and will never move. That means one can use
 enter_blocking_section() / leave_blocking_section() while calculating
 the checksum for a block of data. For multithreaded applications that
 can speed up the program by the number of cores present.


Submit a feature request with as much data as possible on the BTS:
https://forge.ocamlcore.org/tracker/?group_id=133

Regards,
Sylvain Le Gall

___
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] Re: Cryptokit and HMAC-SHA256

2010-07-21 Thread Sylvain Le Gall
On 21-07-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
 Hi,

 I need a keyed hash function (HMAC) based on SHA256.  I looked at Cryptokit's
 support for HMAC, and though it has built-in support for HMAC-MD5 and 
 HMAC-SHA1,
 it seems HMAC-SHA256 is not directly supported, despite Cryptokit implementing
 the SHA256 algorithm.

 While RFC 2104 seems straightforward enough and there's always the option
 of adapting Cryptokit's HMAC-SHA1 code, I wonder if someone else out there
 either a) has already done this, or b) knows of an alternative library
 implementing HMAC-SHA256.


If you decide to code the solution and provide the patch, I will be
happy to apply it to cryptokit (if the main author of cryptokit accepts
it, of course).

Regards,
Sylvain Le Gall

___
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] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Sylvain Le Gall
On 06-07-2010, Guillaume Yziquel guillaume.yziq...@citycable.ch wrote:
 Paolo Donadeo a écrit :

 If anyone is interested in my prototype I could clean up the source,
 remove comments in Italian and publish it on GitHub or OCamlCore.

 I'm always interested in language bindings... And I think a few other 
 people are interested in an Lua binding.


I think Guillaume is refering to me. I am indeed quite interested in
this kind of binding, especially to measure the performance of the Lua
language interacting with OCaml. I would use Lua to create functions
to process huge amount of data and to replace a DSL I created.

So far, we have:
http://bitbucket.org/dpowers/luacaml by David Powers
a prototype by Paolo Donadeo
lua-ml by Christian Lindig

Maybe we can join our forces to create a common binding to Lua from
OCaml.

I propose to host it at http://forge.ocamlcore.org, we can even have an
hg repository if needed.

If anyone is interested, I think more forces to this effort are welcome.

I would be glad that at least David, Paolo and Christian join ;-)

Regards,
Sylvain Le Gall

ps: right now I can provide some time to setup the forge account and web
pages, but I will have to dedicate a lot of time to real life starting
on Friday (or before -- depending the time my daughter will choose to
born).

___
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] Re: exception error trace back in ocaml

2010-06-21 Thread Sylvain Le Gall
On 21-06-2010, lin hong lh...@amnh.org wrote:

 I have problem getting a full traceback of some exception error. The
 traceback looks like this:

 Fatal error: exception Invalid_argument(index out of bounds)
 Raised at file camlinternalLazy.ml, line 33, characters 10-11
 Called from file list.ml, line 74, characters 24-34

 But that's all I got, both camlinternalLazy.ml and list.ml are ocaml
 source code, I still don't know which part of my code trigger it. Also, in
 camlinternalLazy.ml line 33, there is a try  with e - raise e, is
 this the reason I don't have a full traceback -- Maybe something else
 catch the raise e ?  Any idea?


To get the full trace, you need to compile your code with -g, i.e.
ocamlc -g foo.ml 

If you don't have this debug flag, you won't see calls from the code you
compiled.

The try ... with e - raise e just re-raise the exception and you will
be able to see it in the full trace.

Regards,
Sylvain Le Gall

___
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] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Paul Steckler paul.steck...@nicta.com.au wrote:
 I've written a wee Web server in OCaml that's compiled using the ocamlopt 
 from the
 Fedora MinGW distribution of ocaml.  I'm running the server in Windows 7.

 Sometimes after receiving several requests, the Unix.send call that sends a 
 response
 back to a Web client just blocks.  The send buffer is pretty large (64k), and 
 the data
 to be sent is always much less than that.

 While it's easy to reproduce the error (a certain pattern of requests from 
 the browser),
 I can't tell what particular conditions cause the blocking behavior.

 Any help appreciated.



I don't have a clue but maybe you can tell us more about the pattern of
requests from the browser.

Regards,
Sylvain Le Gall

___
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] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Christoph Bauer christoph.ba...@lmsintl.com wrote:
  
 While it's easy to reproduce the error (a certain pattern of requests 
 from the browser), I can't tell what particular conditions cause the 
 blocking behavior.

 Any help appreciated.

 I guess you are using Unix.select. There is (was) a bug in the windows
 select implementation. It had problems with the GC.

 http://caml.inria.fr/mantis/view.php?id=4844

There was when OCaml 3.12 will be out ;-)

However, I think it should have crash if it falls into this bug.

Regards,
Sylvain Le Gall

___
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] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Török Edwin edwinto...@gmail.com wrote:
 On 06/16/2010 10:32 AM, Paul Steckler wrote:

 You could set the socket to nonblocking mode (and check with 'select'
 whether you can send), but according to the manual that doesn't work on
 the native windows port of OCaml.


select works on Windows with latest version of OCaml. But there were a
couple of bugs corrected in version 3.12 (esp. O_NONBLOCK + select).
Next version will be safer for the use of select on Windows.

Regards,
Sylvain Le Gall

___
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] Re: [ANN] Camomile 0.7.3

2010-05-14 Thread Sylvain Le Gall
In gmane.comp.lang.caml.inria, you wrote:
 2010/5/14 Dmitry Bely dmitry.b...@gmail.com

 How heavy-weight is Camomile? I was a bit scared with the size of
 its distribution. Currently I use under Windows the following my own
 simple Unicode-support module (implemented via
 WideCharToMultiByte/MultiByteToWideChar Win32 API functions). Maybe
 it's time to switch to Camomile?


 The size of the package is due to mapping tables of character encoding and
 localization data.  they occupy several mega bytes on the disk but it is
 nothing by today's standard.  If you still care, you can delete any .mar
 files in charmaps, locales, mappings directory.  (Deleting source files in
 these directory is not recommended, since it could cause a failure of
 compilation.)  If you delete such files, related encoding and locales do not
 function, but other functionality is intact.


I have just compared libcamomile-ocaml-data and locales-all packages.
The two packages contain almost the same thing:
http://packages.debian.org/sid/libcamomile-ocaml-data
http://packages.debian.org/sid/locales-all

The size is almost the same (3MB vs 5MB) but the uncompressed size is
not at all the same:
- camomile: 24MB
- locales-all (2 steps uncompression): 99MB

At least it means that camomile data is a reasonable size for this kind
of data on Linux system. On Windows system, I think these figures are
almost the same but data are part of the base windows installation.

Now, a question/suggestion/feature: is it possible to store .mar file
as .mar.gz? This would help to reduce occupation by a factor of 5...

Regards
Sylvain Le Gall

___
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] Re: about OcamIL

2010-05-14 Thread Sylvain Le Gall
On 14-05-2010, ben kuin benk...@gmail.com wrote:
 Isn't this precisely the aim of Jon's hlvm
 (www.ffconsultancy.com/ocaml/hlvm/)?


 licensing:
 Hlvm is driven by a company and its landing page is on a companies
 website and one of its protagonists is smart *and* business savvy.
 What if hlvm would really take off, could they set it free and move
 the homepage to sourceforge ?

Last time, I checked hlvm homepage was here:
http://hlvm.forge.ocamlcore.org

What difference will it make to set it on sourceforge?

The reasoning you apply to a possible change of license can be applied
to a lot of thing in Open Source World...

Regards,
Sylvain Le Gall

___
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] Re: Mbox-Readers

2010-05-11 Thread Sylvain Le Gall
On 11-05-2010, oli...@first.in-berlin.de oli...@first.in-berlin.de wrote:
 Hello,

 are there mbox-Libraries around?


You can have a look at:
https://forge.ocamlcore.org/scm/viewvc.php/trunk/mbox.ml?view=markuprevision=11root=spamoracle

There are other files in the repository that can maybe match other
requirements.

This is not a complete mbox-reader but it can help you on some points
(at least to see what other people have done). You can use it as an
helper to write your own.


 P.S.: And: what kind of License would make sense? LGPL3?


In doubt, I recommend LGPL 2.1 with OCaml linking exception.

Regards,
Sylvain Le Gall

___
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] Re: Subtyping structurally-equivalent records, or something like it?

2010-05-04 Thread Sylvain Le Gall
On 04-05-2010, rossb...@mpi-sws.org rossb...@mpi-sws.org wrote:
 Sylvain Le Gall sylv...@le-gall.net:

 This is not about optimized compiler in this case but about data
 representation. Even if you use an optimized compiler (which is not
 really the case with ocamlopt), you won't change datastructure
 representation to optimize.

 What do you mean? There is no reason in general why a compiler cannot
 optimize data representations, and some do in cases like this.


Anyway, if it comes to data alignement and things like that, the
compiler should optimize data representations. But in this case, I
really don't think we are talking about data alignement.

Regards,
Sylvain Le Gall

___
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] Re: OCaml / F# co-development

2010-05-03 Thread Sylvain Le Gall
On 03-05-2010, Benjamin Pierce bcpie...@cis.upenn.edu wrote:
 Is anybody out there developing code in the common subset of OCaml and
 F# so that it works with both compilers / libraries?  I'd be very
 interested in hearing about the feasibility of this arrangement...


There was a series of blog posts by CoherentPDF on
http://planet.ocamlcore.org 1 year ago.

Here is one of them:
http://coherentpdf.com/blog/?p=10

Browse their archives to have more:
http://www.coherentpdf.com/news-archive.html

Regards,
Sylvain Le Gall

___
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] Re: Subtyping structurally-equivalent records, or something like it?

2010-05-01 Thread Sylvain Le Gall
On 01-05-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
 Hi,

  type kinematic = { lin: Vec.t; ang: Vec.t }

 Which I've been using to represent a medley of physical attributes (force,  
 momentum, velocity, etc.).

 I second Stéphane's suggestion of using phantom types; moreover,
 I recommend you read an article that discusses them to some detail
 and covers their use for precisely this sort of problem:
 http://camltastic.blogspot.com/2008/05/phantom-types.html


I really like the use of private type abbreviation for phantom type:
http://ocaml.janestreet.com/?q=node/77

Regards,
Sylvain Le Gall

___
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] Re: Extending Set - strange behavior of abstract type

2010-04-27 Thread Sylvain Le Gall
On 27-04-2010, Dawid Toton d...@wp.pl wrote:
 I tried to extend the standard Set module with new operations. I got 
 error messages about type incompatibilities (the Set.S.t as exposed by 
 my implementation and Set.S.t used by functions from the original Set). 
 I have reduced my code to the following small example:

 module Set = struct
module Make (Ord : Set.OrderedType) = struct
  module Set = Set.Make(Ord)
  include Set
end
 end

 module OrdChar = struct type t = char let compare = compare end
 module Raw1 = Set.Make (OrdChar)
 module Raw2 = Set.Make (struct type t = char let compare = compare end)

 let aaa (aa : Raw1.t) (bb : Raw1.Set.t) = (aa = bb)
 let aaa (aa : Raw2.t) (bb : Raw2.Set.t) = (aa = bb)

 Only the last line results in an error:
 Error: This expression has type Raw2.Set.t but is here used with type Raw2.t

 All the rest of the code compiles correctly. It means that types Raw1.t 
 and Raw1.Set.t can be unified.

 My question is: why these nearly identical statements results in 
 different behavior of the type t?

 I'd really prefer Raw1 and Raw2 to be identical.

You just have to propagate the type by hand:

module Set =
struct
  module Make (Ord : Set.OrderedType) =
struct
  include Set.Make(Ord)
  module Set : Set.S with type t = t = Set.Make(Ord)
end
end

The type t = t do the trick. The first t is bound inside Set and the other
comes from include Set.Make(Ord).

Regards
Sylvain Le Gall

___
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] Re: SHA1 = stdlib ?!

2010-04-24 Thread Sylvain Le Gall
Hello,

On 24-04-2010, Oliver Bandel oli...@first.in-berlin.de wrote:

 is it planned, to also include SHA1-Hash into stdlib?


What is the advantage of having SHA-1 in stdlib rather than in cryptokit
for example?

Regards,
Sylvain Le Gall

___
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] Re: SHA1 = stdlib ?!

2010-04-24 Thread Sylvain Le Gall
On 24-04-2010, Oliver Bandel oli...@first.in-berlin.de wrote:
 Zitat von Grant Olson k...@grant-olson.net:

 On 4/24/2010 10:28 AM, Oliver Bandel wrote:

 What is cryptokit?


 A library with a bunch of cryptographic primitives, including SHA hashes...

 https://forge.ocamlcore.org/projects/cryptokit/




Cryptokit is written by X. Leroy, the same author as OCaml. There is a
debian package for it (apt-get install libcryptokit-ocaml-dev), a Fedora
package and a GODI package.

Regards,
Sylvain Le Gall

___
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] Re: ocamlcore.org not available

2010-04-24 Thread Sylvain Le Gall
On 24-04-2010, Oliver Bandel oli...@first.in-berlin.de wrote:
 Hello,


 the pages
http://ocamlunix.forge.ocamlcore.org/
 are not reachable.

 Seems to be a DNS problem.



DNS propagation problem, I think. I have a problem from 16:00 to 17:00
using orange DNS server. 

A ticket is open at OVH which hosts the DNS server that should propagate
*.ocamlcore.org domain. I have a similar problem on 2010-03-09 at 22:00
for 2 hours.

Regards,
Sylvain Le Gall

___
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] Re: Inspect libary

2010-04-15 Thread Sylvain Le Gall
On 15-04-2010, Vincent Aravantinos vincent.aravanti...@gmail.com wrote:
 Le 15 avr. 10 =E0 12:42, Kaspar Rohrer a =E9crit :

 PS: Does somebody know why all of my browsers (Firefox, Safari, =20
 Camino on OS X 10.6) do not recognize the Forge.ocamlcore.org server =20=

 certificate?

 I guess it's the same cause as this bug:

 http://forge.ocamlcore.org/tracker/index.php?func=3Ddetailaid=3D452group=_id=3D1atid=3D101=


This is not about this bug. The server certificate has been issued by 
http://www.cacert.org

If you add their root certificate, the certificate of
forge.ocamlcore.org will be recognized.
http://www.cacert.org/index.php?id=3

This is done by default on Debian for example.

Regards,
Sylvain Le Gall

___
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] Re: Caml-inspect library

2010-04-15 Thread Sylvain Le Gall
Hello,

On 15-04-2010, Kaspar Rohrer kaspar.roh...@gmail.com wrote:

 I hope nobody takes offense over the fact that I chose Github over
 Forge.ocamlcore.org.


Not at all, github is shiny and efficient to manage a git repository.

A good solution, is to host your git/bug tracking on github and download
section/website/news/mailing list on a forge.ocamlcore.org project. You
just have to remove the SCM tab and redirect the homepage to github or
write your own project homepage and put a link to github there.

This way you can benefit of the best of each hosting service.

Good luck with ocaml-inspect.

Regards,
Sylvain Le Gall

ps: maybe one day we will be able to integrate nicely github with
forge.ocamlcore.org and you will just have to hit the button Share my
projects on github through forge.ocamlcore.org... Any taker send me an
email ;-)


___
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] Re: Building ocaml on Win32 using VS 2008

2010-04-14 Thread Sylvain Le Gall
On 14-04-2010, Lally Singh lally.si...@gmail.com wrote:
 Do you have a build procedure I could use?  My own attempts have been
 rather terrible so far :-(


I can confirm that I have no particular problems building ocaml 3.11.2
with MSVS 2008.


 On Wed, Apr 14, 2010 at 12:54 PM, Alain Frisch alain.fri...@lexifi.com 
 wrote:
 On 14/04/2010 18:46, Lally Singh wrote:

   Has anyone had any success building ocaml on Win32 using VS 2008?

 We compile the win32 port with the Win7 SDK (Microsoft Windows SDK for
 Windows 7 and .NET Framework 3.5 Service Pack 1). As far as I know, this SDK
 contains the same toolchain as VS 2008. And note that despite its name, the
 SDK is not related to Win7 at all: it works for older of Windows as well.


Regards,
Sylvain Le Gall

___
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] [ANN] OASIS 0.1.0, ocamlify 0.0.1 and ocaml-data-notation 0.0.1

2010-04-08 Thread Sylvain Le Gall
OASIS
-

This is the first public release of OASIS. It aims to provide a clean
and efficient way to create a configure/build and install system for
your OCaml applications and libraries using a single '_oasis' file.

It is inspired by Haskell's Cabal.

Features:
* generate a standalone setup.ml which provides standard entry points in
* the build system,
* plugin system that allows to choose the best sub-system: OCamlbuild,
* custom build (Makefile based)...
* the file _oasis can be used as a metadata storage to help other tools
* analyze your source code
* customization of every piece of the generated build system by just
* editing the files concerned
* full OCaml script, no Unix call involved
* tested on Linux and Windows

Bonus features:
* available in french, using ocaml-gettext
* binary installers for Linux and Windows (32bits)

Website:
http://oasis.forge.ocamlcore.org

If you want to contribute:
http://oasis.forge.ocamlcore.org/contribute.html


ocamlify  ocaml-data-notation
---

These two tools are needed to build OASIS. They are released in separate
projects because I use it elsewhere and they are just pre-requisites of
OASIS. 

ocamlify helps to include files as OCaml code. The beginning of a build
rule can be copy-and-pasted from OASIS myocamlbuild.ml.

http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis;a=headblob;f=/myocamlbuild.ml

ocaml-data-notation, aka odn, dumps OCaml data in OCaml notation. It 
is inspired by JSON. It uses type-conv to create data dumper functions,
you just have to add with odn in the type definition.  There is no
load scheme, since it is used to dump datastructure into OCaml scripts.
It is mainly a code generator helper.

Regards,
Sylvain Le Gall

___
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] [ANN] OCaml Meeting 2010, final notice

2010-04-01 Thread Sylvain Le Gall

Hello all,

When you will receive this email, you will have less than 24 hours to
subscribe to OCaml Meeting 2010. We have less than 10 places remaining.

Further information, inscriptions and already subscribed people:
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

The day after OCaml Meeting, an OCaml hacking day will take place:

Further information and inscriptions:
http://wiki.cocan.org/events/europe/ocamlhackingdayparis2010

The subscription will be closed at midnight, Paris time.

Regards,
Sylvain Le Gall on behalf of the OCaml Meeting organization team.

___
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] [ANN] OCaml Meeting 2010, end of subscription is on next friday

2010-03-30 Thread Sylvain Le Gall
Original announce:
https://forge.ocamlcore.org/forum/forum.php?forum_id=572



Only 5 days before the end of subscription. We are already 60 people. 



For the third time, I am proud to invite all OCaml enthusiasts to join
us at OCaml Meeting 2010 in Paris.

This year event takes place in Paris on Friday 16th April 2010.
Subscription is opened and will be closed on Friday 2nd April 2010.

Presentations include:
* Enforcing Type-Safe Linking using Inter-Package Relationships for
* OCaml Debian packages
* The Ocamlviz visualization toolkit
* Cluster computing in Ocaml
* Ocaml in a web startup
* React, functional reactive programming for OCaml
* OASIS, a Cabal like system for OCaml
* OPA, same web, but with types and lambda
* OC4MC, Objective Caml for MultiCore
* Lwt, Cooperative Light-Weight Threads
* naclgrid: the collaborative rendering farm, a JoCaml-powered desktop
* grid

The meeting is sponsored by INRIA, the Caml Consortium and OCamlCore.
Inscription is free but the number of participants is limited.

Further information and inscriptions:br
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

The day after OCaml Meeting, an OCaml hacking day will take place:

Further information and inscriptions:br
http://wiki.cocan.org/events/europe/ocamlhackingday2010


Volunteers willing to help before/during these events can contact me
directly. We are particularly looking for a video team. You can also
forward this  invitation to any groups that can be interested in
(Haskell user group, CUFP mailing list...)

For people who need further information, you can contact me (see
wiki.cocan.org for contact details).

Hope to see a lot of you 
Regards
Sylvain Le Gall on behalf of the OCaml Meeting organization team.

___
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] Re: Shared memory parallel application: kernel threads

2010-03-12 Thread Sylvain Le Gall
On 12-03-2010, Hugo Ferreira h...@inescporto.pt wrote:
 Hello,

 I have opted to use kernel-level threads that allow use
 of the (multi-core) processors but still allow easy
 access to shared memory.

 I have done a cursory look at:
 - Ocaml.Threads
 - Ocaml.Unix (LinuxThreads)
 - coThreads
 - Ocamlnet2/3 (netshm, netcamlbox)
 (An eThreads library exists in the forge but I did not examine this)


I think you should also have a look at ocaml/mpi for communication:
http://forge.ocamlcore.org/projects/ocamlmpi/
and ancient for accessing read-only memory:
http://merjis.com/developers/ancient

MPI can work on a single computer to take advantage of multi-core
through multi-processus.

Regards,
Sylvain Le Gall

___
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] [ANN] OCaml Meeting 2010, 3 weeks before end of subscription

2010-03-10 Thread Sylvain Le Gall
Hello,

For the third time, I am proud to invite all OCaml enthusiasts to join
us at OCaml Meeting 2010 in Paris.

This year event takes place in Paris on Friday 16th April 2010.
Subscription is opened and will be closed on Friday 2nd April 2010.

Presentations include:

* Enforcing Type-Safe Linking using Inter-Package Relationships for
  OCaml Debian packages
* The Ocamlviz visualization toolkit
* Cluster computing in Ocaml
* Ocaml in a web startup
* React, functional reactive programming for OCaml
* OASIS, a Cabal like system for OCaml
* OPA, same web, but with types and lambda
* OC4MC, Objective Caml for MultiCore
* Lwt, Cooperative Light-Weight Threads
* naclgrid: the collaborative rendering farm, a JoCaml-powered
  desktop grid

The meeting is sponsored by INRIA, the Caml Consortium and OCamlCore.
Inscription is free but the number of participants is limited.

Further information and inscriptions:
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

The day after OCaml Meeting, Mehdi Dogguy from PPS helps me to organize
an informal day where OCaml teams can meet to work. We will have 2
classrooms, each can host 45 persons. There will be an internet access
and a blackboard in each room. Inscription is free.

Further information and inscriptions:
http://wiki.cocan.org/events/europe/ocamlhackingday2010

Volunteers willing to help before/during these events can contact me
directly. We are particularly looking for a video team. You can also
forward this invitation to any groups that can be interested in (Haskell
user group, CUFP mailing list...)

For people who need further information, you can contact me (see
wiki.cocan.org for contact details).

Hope to see a lot of you
Regards
Sylvain Le Gall on behalf of the OCaml Meeting organization team.

This is a forward of this announce:
https://forge.ocamlcore.org/forum/forum.php?forum_id=558


___
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] Re: gc overhead

2010-03-03 Thread Sylvain Le Gall
Hello,

On 03-03-2010, Edgar Friendly thelema...@gmail.com wrote:
 On 03/02/2010 06:09 PM, Warren Harris wrote:
 On Mar 2, 2010, at 2:03 PM, Sylvain Le Gall wrote:

 You can have a look at:
 http://ocamlviz.forge.ocamlcore.org

 Thanks! This looks very promising. I'll give it a try.


 Overall, good job.  But is it going to die or stay maintained?


Well, I hope it will stay maintained. At least source code, bugs and
release on the forge will stay there for a long time (I can make promise
on this part). And whenever current developpers become inactive,
OCamlCore.org administrators can move ownership to other (with notice to
current owner, of course):
http://www.ocamlcore.org/philosophy/ (point 4)

But anyway, this kind of tool is targeted at debugging on the first
place. It is not a mandatory piece of a software/library. You can lie
without it, when you have finished your job debugging/profiling your
program.

So I would say that long term maintainance should not bother user for
now. It is actually something that is lightweight and that works. To my
mind this is enough to consider using it. 

If a lot of people start using it, it is highly probable that it will
stay maintained.

Regards
Sylvain Le Gall

___
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] Re: gc overhead

2010-03-02 Thread Sylvain Le Gall
On 01-03-2010, Warren Harris warrensomeb...@gmail.com wrote:
 I would like to determine what percentage of my application's cpu time  
 is spent in the garbage collector (for tuning purposes, but also just  
 to monitor the overhead). Is there any way to obtain this information  
 short of using gprof? Additional information provided by Gc.stat would  
 be ideal, or perhaps a Gc.alarm that was called at the beginning of  
 the gc cycle, but neither of these seem to exist.


You can have a look at:
http://ocamlviz.forge.ocamlcore.org

This allow to instrument your code and watch GC activity. I think that
with a little a little help on program side, you can be quite precise
about GC without using gprof at all. This should also be more
lightweight than gprof.

Regards,
Sylvain Le Gall

___
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] Re: [newbie] miscellaneous on installation and web site

2010-03-01 Thread Sylvain Le Gall
Hello,

On 01-03-2010, Marco Maggi marco.maggi-i...@poste.it wrote:
 Ciao,

   I am a  True Beginner taking a look at  O'Caml; I hope not
 to  be abusing  by posting  here rather  than  the beginners
 list.

   I  think  I   successfully  compiled  ocaml-3.11.2  on  my
 i686-pc-linux-gnu, but  there seems to be no  way to install
 the package in  a temporary location via the  Linux de facto
 standard DESTDIR environment variable;  is there a way to do
 it?  (I am used to build custom packages.)


If you are really a beginner, I will really recommend to you using your
distribution OCaml packages, no matter if its ocaml 3.10.2 or 3.11.2.

Debian and Fedora provide packages (apt-get install ocaml on Debian).

   The  web site[1]  is beautiful  (no  irony) but  a lot  of
 informations look outdated, 4/5 years old; I see many O'Caml
 related sites on  the Net.  Is there one that  I can take as
 reference  for  the latest  news,  for  example about  still
 maintained library packages?

 [1] http://caml.inria.fr/

caml.inria.fr and the Hump is a pretty good place to start:
http://caml.inria.fr/cgi-bin/hump.fr.cgi

The site available here are also good points to start with:
http://caml.inria.fr/resources/index.fr.html
and especially
http://www.ocaml-tutorial.org/

Then you have ocamlcore.org related websites:
- http://www.ocamlcore.org: entry point of ocamlcore.org
- http://planet.ocamlcore.org: for the latest (general) news of the
  OCaml community
- http://forge.ocamlcore.org: participate to various OCaml projects 
  or create your own
  
Regards,
Sylvain Le Gall

___
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] Re: [newbie] miscellaneous on installation and web site

2010-03-01 Thread Sylvain Le Gall
On 01-03-2010, Marco Maggi marco.maggi-i...@poste.it wrote:
 Marco Maggi wrote:
 So am  I correct in saying  that MLGMP is  orphaned and no
 maintained GMP/MPFR/... package exists?

 Wait!  Found something here:

https://code.launchpad.net/~ubuntu-branches/ubuntu/lucid/mlgmp/lucid

This is just Debian/Ubuntu people working on the packaging (not the
library). But even if there has been no release for a while, it doesn't
mean that it is orphaned or unmaintained...

Try it to see if it is working.

Regards,
Sylvain Le Gall

___
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] Re: OCaml/C variant representation

2010-02-28 Thread Sylvain Le Gall
On 28-02-2010, Jianzhou Zhao jianz...@seas.upenn.edu wrote:
 On Wed, Feb 24, 2010 at 11:42 AM, Sylvain Le Gall sylv...@le-gall.net wrote:
 On 24-02-2010, Jean Yang jeany...@csail.mit.edu wrote:
 Please have a look at:
 http://caml.inria.fr/mantis/view.php?id=4803

 This section is misleading. You should use hash_variant for `VConstr.

 In your case VConstr of int will be Block with size = 1 and tag = 0;
 first non-constant constructor and first field contains Value_int(...)

 If I am creating an OCaml variant (string option) from C, say using 'alloc',
 does it matter which tag I am using for 'some'? Can it be only tag 0?
 I was looking at LLVM OCamling bindings, sometimes the 'some' is
 also of 'tag 1', which confused me.

I think it is an error, but since there is only one possibility in the
case of Some, maybe it is not important (i.e. you can distingish between
the two variant None | Some just looking at the fact there are block or
not).

 If my variant is A | B | C of int | D of int, does C have to start from tag 0?
 and D must be 1? Similarly, does A have to be assigned into Val_int(0),
 and B is from 1?

Yes. At least this is what I understand from section 18.3.4 Concrete
types of the OCaml manual. As a matter of fact, I never had problems
following this convention before. 

Regards,
Sylvain Le Gall

___
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] [ANN] OCaml Meeting 2010 in Paris, 2nd call

2010-02-15 Thread Sylvain Le Gall
This is a copy and paste version of:
https://forge.ocamlcore.org/forum/forum.php?forum_id=532

For the third time, I am proud to invite all OCaml enthusiasts to join
us at OCaml Meeting 2010 in Paris.

This year event takes place in Paris on Friday 16th April 2010.
Subscription is opened and will be closed on Friday 2nd April 2010.

Presentations include:

* Enforcing Type-Safe Linking using Inter-Package Relationships for
* OCaml Debian packages
* The Ocamlviz visualization toolkit
* Cluster computing in Ocaml
* Ocaml in a web startup
* React, functional reactive programming for OCaml
* OASIS, a Cabal like system for OCaml
* OPA, same web, but with types and lambda

As last year, participants are invited to give a talk on what they are
doing with OCaml. You can submit a description of your talk on the wiki
or contact me.

The meeting is sponsored by INRIA, the Caml Consortium and OCamlCore.
Inscription is free but the number of participants is limited.

Further information and inscriptions:
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

The day after OCaml Meeting, Mehdi Dogguy from PPS helps me to organize
an informal day where OCaml teams can meet to work. We will have 2
classrooms, each can host 45 persons. There will be an internet access
and a blackboard in each room. Inscription is free.

Further information and inscriptions:
http://wiki.cocan.org/events/europe/ocamlhackingday2010

Volunteers willing to help before/during these events can contact me
directly. We are particularly looking for a video team. You can also
forward this invitation to any groups that can be interested in (Haskell
user group, CUFP mailing list...)

For people who need further information, you can contact me (see
wiki.cocan.org for contact details).

Hope to see a lot of you 
Regards 
Sylvain Le Gall on behalf of the OCaml Meeting organization team.

___
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] Re: Being aware of memory overuse

2010-02-10 Thread Sylvain Le Gall
On 10-02-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
 Hi,

 I always wanted to have kernel spport for this. Some way for aplication
 to tell the kernel about freeable memory and for the kernel to request
 some memory to be freeed instead of swapping it out.

 If I recall correctly, there was an Lwn.net article reporting a lkml
 (the Linux kernel mailing list) discussion on that subject.  One of
 the proposals was for the kernel to send processes a signal (SIGFREE?)
 requesting they free up memory (by running a major GC, for example)
 whenever memory was running low.  In theory this could in some cases
 avoid the invocation of the draconian OOM killer.

 Question: just how effective such a feature would be in the Ocaml case?



I forgot to tell about other paths I have followed: setrlimit/getrlimit.
There are limits like RLIMIT_DATA, RLIMIT_RSS et al (CPU...). setrlimit
limits memory by generating ENOMEM when limits are reached and getrlimit
should give information about the current level of use of these limits.
Unfortunately, the memory consumption I get with getrlimit is not
accurate (in fact not updated).

I have OCaml bindings for this, I should published in a near future. 

Regards,
Sylvain Le Gall

___
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] Re: debugging memory leaks

2010-02-02 Thread Sylvain Le Gall
On 29-01-2010, warrensomebody warrensomeb...@gmail.com wrote:

 I know this is an old thread, but I have revised the memprof patch to work
 with ocaml-3.11.2. Please let me know if there is a maintainer who would
 like to look this over and/or distribute it. Otherwise, I'll put it up on
 github or google code. Thanks,


You could consider, putting your code on 
http://forge.ocamlcore.org

This is probably the place where it will have the best visibility for
other OCaml developers.

Regards
Sylvain Le Gall

___
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] Re: ExtLib/Camomile UTF8

2010-01-26 Thread Sylvain Le Gall
On 26-01-2010, Yoriyuki Yamagata yoriyuk...@gmail.com wrote:

 Also maybe you could host Camomile at
 forge.ocamlcore.org...

 What is the benefit of it?

There are many benefits:
- better visibility among other OCaml projects 
- beginners can easily find your library
- people that don't know OCaml can easily see that they are many
  libraries for OCaml, just having a look at forge.ocamlcore.org
- integration of news from your project directly into the feed of the
  forge which goes to planet.ocamlcore.org
- people that could fill a bug report have a high probability to be
  subscribed to forge.ocamlcore.org for their own projects

On the other hand, I don't like to criticize but Sourceforge is not
cristal clear with UI (I agree that GForge/forge.ocamlcore.org is also
not very good at this). Moreover, we do have a lot of problems with
tracking new release of Sourceforge projects in Debian: we cannot easily
access download section.

Regards,
Sylvain Le Gall

___
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] Re: Bytecode run on AIX - unknown C primitive error

2010-01-20 Thread Sylvain Le Gall
On 20-01-2010, Christoph Bauer christoph.ba...@lmsintl.com wrote:
 unfortunatly I haven't a solution for the bytecode stuff. I only use
 ocaml with native compiled code. This works very well.


I confirm that ocamlopt/AIX works well (thanks to Christoph). 

The best solution is maybe to understand why ocamlopt cannot be built ?

Regards
Sylvain Le Gall

 Christoph Bauer

 From: caml-list-boun...@yquem.inria.fr 
 [mailto:caml-list-boun...@yquem.inria.fr] On Behalf Of Dawid Toton
 Sent: Tuesday, January 19, 2010 9:32 PM
 To: caml-list@yquem.inria.fr
 Subject: [Caml-list] Bytecode run on AIX - unknown C primitive error
 
 I have installed part of this OCaml port 
 http://home.arcor.de/chr_bauer/ocaml-aix.html
 on a computer running on AIX. It seems that everything built 
 correctly except ocamlopt. So I have ocamlrun and standard 
 library and this should be enough for bytecode to run.
 
 I have to build the bytecode on a different machine (because 
 it's difficult to do on AIX). I believe this shouldn't induce 
 any problems.
 
 Trivial bytecode executes correctly regardless where it is created.
 
 I set LIBPATH to point to ocaml/stublibs and try running some 
 bytecode uning Unix module. This results in:
 Fatal error: unknown C primitive `unix_getsockopt_bool'
 
 If I compile simple let _ = Unix.sleep 1 on the target 
 machine, I get bytecode that causes ocamlrun to crash with:
 Illegal instruction (core dumped)
 
 Does anybody have an idea for workaround? Some understanding 
 what's going on?
 
 I'm using AIX 5.3
 
 Dawid
 
 ___
 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
 

Regards,
Sylvain Le Gall

___
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] [ANN] OCaml Meeting 2010 in Paris

2010-01-14 Thread Sylvain Le Gall
For the third time, I am proud to invite all OCaml enthusiasts to join
us at OCaml Meeting 2010 in Paris.

This year event takes place in Paris and tries to avoid collision with
all other events. It will be on Friday 16th April 2010. Subscription is
opened today and will be closed on Friday 2nd April 2010.

As last year, participants are invited to give a talk on what they are
doing with OCaml, submit a description of your talk on the wiki or
contact me.

The meeting is sponsored by INRIA CAML Consortium and OCamlCore.
Participation for lunch is covered by the Consortium, you just need to
subscribe. The facility can only host 80 people, so we will have to
filter the list of participants if there are more people. We will give
priority to people giving a talk and coming from abroad.

Volunteers to help before/during the event can contact me directly. We
are particularly looking for a video team. You can also forward this
invitation to any groups that can be interested in (Haskell user group,
CUFP mailing list...)

Further information:
http://wiki.cocan.org/events/europe/ocamlmeetingparis2010

For people who need further information, you can contact me (see
wiki.cocan.org for contact details).

The day after OCaml Meeting, Mehdi Dogguy from PPS helps me to organize
an informal day where OCaml teams can meet to work. There will be
internet access and a blackboard in each room. We will have 2 classrooms
(each classroom can host 45 persons). Inscription will is free, stay
tuned.

Hope to see a lot of you 
Regards 
Sylvain Le Gall on behalf of the OCaml Meeting organization team.

___
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] Re: general question, was Re: OCaml is broken

2010-01-03 Thread Sylvain Le Gall
On 21-12-2009, Keyan m...@pulsschlag.net wrote:
 Hi,

 i have a large project written in C++, for which i am planing to write
 add-ons and tools in ocaml, e.g. different tools to analyse my code
 (dependency stuff), an interpreter for a script-language i plan to
 include, etc, etc. form my time at the uni i remembered that ocaml
 allows to compile libraries which can be included in c/c++ program,
 and i know people who use it extensively in other projects. therefore,
 i decided to give ocaml a try. i like functional programming, and my
 first steps with ocaml are very promising.

 following this discussion, i am not so sure anymore, if ocaml is a
 good decision. may be i got this discussion wrong, but if ocaml is
 dying out, i might have to look for another functional programming
 language to use with my project.


OCaml is not dying out at all (v3.11.2 is being prepared, v3.12.0 is
coming soon). 

Of course, the core OCaml distribution (the one shipped by INRIA), is
missing some features. You can use libraries/alternative compiler to
have these features back (cothreads, jocaml, camlp3l). 

The only point of the whole discussion -- which is a recurring point by
some of those who participate -- is the lack of shared-memory
parallelism in the core language. Other languages like C or C++ are also
lacking this support in their core definition... I.e. there is way to
do it but you need to use pthread or Win32 thread.

All in all, you can go a long way writing your tools with OCaml without
encounting these problems. For the topic you describe, OCaml is a good
choice.

Regards,
Sylvain Le Gall

___
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] Re: OCaml is broken

2009-12-21 Thread Sylvain Le Gall
On 21-12-2009, Erik Rigtorp e...@rigtorp.com wrote:
 On Sun, Dec 20, 2009 at 17:18, Gerd Stolpmann g...@gerd-stolpmann.de wrote:

 Even if I want to process a dataset and partition it and sends the
 work to multiple processes there is no framework in OCaml for me to
 use.


There are many frameworks at hand, just search for it:
- ocamlp3l
- jocaml
- RPC with ocamlnet
- cothreads
- Ancient
- OCamlMPI

They maybe not look like exactly what you want, but they are close
enough to do what you want.

FYI, I have created a commercial application for sorting/processing big
files using OCaml. It runs using multi-processes as fast as other
commercial programs that do the same thing. In particular, it runs
faster than another well-known program written in C, using threads on
Windows and on Linux. 

Regards,
Sylvain Le Gall

___
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] Re: OCaml is broken

2009-12-19 Thread Sylvain Le Gall
On 19-12-2009, Erik Rigtorp e...@rigtorp.com wrote:

 Please fix OCaml! The first step would be to support multiple runtimes
 running in the same process communicating using message queues.


You should take a look at:
http://jocaml.inria.fr/

Regards,
Sylvain Le Gall

___
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] Re: What is CPAN? (was: Re: Hoogle for Ocaml)

2009-12-03 Thread Sylvain Le Gall
On 03-12-2009, ri...@happyleptic.org ri...@happyleptic.org wrote:
  (1) A network of redundant mirrors which means you can always get the
  tarball you need, even when the original site is down:

 If I understand correctly, GODI site does not store any of the source
 tarballs, but the makefiles download the sources directly from their
 respective home, does it ? Can't we use the MASTER_SITE_BACKUP make
 variables to have one or several backup sites ?

 If it's usefull I can try to setup a server to download every possible
 source tarballs and serve as such a site backup.

 But would it be usefull ?


Yes of course. You can use ocamlcore.org website to do that. I have
already a proof of concept using uscan + Debian watch file, to scan
for new upstream on a weekly basis.

Send me a private mail, if you want to proceed.

Once the website is setup, we can use rsync to propagate it
(ssh.ocamlcore.org has rsync installed).

Everything is ready on *.ocamlcore.org, we just need some volunteer to
do the work.

Regards,
Sylvain Le Gall

___
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] Re: Simple ocamlbuild example for C stubs?

2009-11-28 Thread Sylvain Le Gall
On 28-11-2009, Guillaume Yziquel guillaume.yziq...@citycable.ch wrote:
 Hello.

 I'm trying to build a .cma with C stubs with ocamlbuild. Linking and 
 includes are supposed to be set to non-standard directories.


You probably need to add some 'A-ccopt; Ayour-option' to the good
tag. 

Can you give more details/actual layout of your myocamlbuild.ml ?

Regards,
Sylvain Le Gall

___
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


  1   2   >