[Caml-list] Re: Logging

2010-12-21 Thread Sylvain Le Gall
On 21-12-2010, Gregory Bellier  wrote:
> Hello.
>
> Until now, whenever I needed to log something, I used my own function
> to log. From now on, I face new problems and I would like to use
> syslog to get rid of my logging functions and use the proper unix
> ones. However, from what I've seen, syslog logs in messages, user,...
> but I can't log in a specific file like "my_project.log" unless I hack
> in /etc/syslog.cnf (I don't recall the exact path).
>
> How do you do in your projects ? I tried the following package:
> libsyslog-ocaml-dev on Debian.
>
> Thanks in advance for any inputs.

There is also Lwt_log.
http://ocsigen.org/lwt/doc/api/Lwt_log.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: Lwt and OCamlMakefile

2010-12-21 Thread Sylvain Le Gall
On 21-12-2010, Jérémie Dimino  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: [ANN] OBus 1.1

2010-12-16 Thread Sylvain Le Gall
On 16-12-2010, Gregory Bellier  wrote:
> - Is OCaml 3.12 really required to be able to build it ?
>
> - By the way, I got this with Ocaml 3.11.1 and lwt 2.1.1. Maybe it's
> related to my first question.
>
> + ocamlfind ocamlopt -c -g -I src -package xmlm -package
> type-conv.syntax -package lwt.unix -package lwt.syntax.log -package
> lwt.syntax -package lwt.react -package camlp4.quotations.o -package
> camlp4.extend -syntax camlp4o -ppopt syntax/pa_obus.cmo -I src -I
> syntax -I bindings/upower -I bindings/hal -I bindings/network-manager
> -I bindings/policykit -I bindings/notification -I bindings/udisks -o
> src/oBus_string.cmx src/oBus_string.ml
> File "src/oBus_string.ml", line 35, characters 2-27:
> Error: Unbound value Printexc.register_printer
> Command exited with code 2.
> E: Command '/usr/bin/ocamlbuild tools/obus_gen_interface.native -tag
> debug' terminated with error code 10
>
 
Printexc.register_printer belongs to 3.11.2.

I think Jeremie should add:

OASISVersion: >= 3.11.2 

to its _oasis 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: [ANN] Lwt 2.2.0 released

2010-12-16 Thread Sylvain Le Gall
I think you are missing libev package. 

On Debian, you should install libev-dev package.

On 16-12-2010, Gregory Bellier  wrote:
> I can't build lwt 2.2.0 while I successfully built 2.1.1
>
> Here is the error I got (no such file or directory), followed by my
> configuration :
>
> + ocamlfind ocamlc -c src/unix/lwt_unix_stubs.c
> In file included from src/unix/lwt_unix_stubs.c:39:
> src/unix/lwt_unix.h:28:16: error: ev.h: Aucun fichier ou dossier de ce type
> Command exited with code 2.
>

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
On 07-12-2010, Alain Frisch  wrote:
> On 12/07/2010 10:03 AM, Sylvain Le Gall wrote:
>> We will provide ocamlopt (32/64 bits). But indeed, the toolchain can be
>> an issue (esp. masm). I plan to use VS2008.
>
> I don't think MASM is going to be an issue. FWIW, the Windows 7 SDK 
> (which has nothing to do with Windows 7) contains everything needed 
> (including the VS2008 C compiler, the assembler, the linker, the 
> libraries, etc).
>

Probably a good item for documentation/installation screen/link on the
future website of ocaml-installer.

>> 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 ?
>
> This native backend removes the need for an external assembler for using 
> ocamlopt. Flexdll has a standalone mode to build DLLs which works fine 
> to build pure OCaml .cmxs plugins for ocamlopt (there might be some 
> issues when linking C libraries in the cmxs). But yes, to build the main 
> program, you still need an external linker (this could be addressed by 
> working more on flexdll) and also static runtime objects and libraries.
>
> An option could be to ship a minimalistic main program, which simply 
> dynlinks .cmxs files given on its command line.
>

You mean like ld.ocaml:
https://forge.ocamlcore.org/projects/ld-ocaml/

>>> 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.
>
> The graphical toplevel does not depend on labltk, so the two issues are 
> really unrelated.  For crashes with the OCamlWin.exe, I was thinking 
> about http://caml.inria.fr/mantis/view.php?id=4399 and 
> http://caml.inria.fr/mantis/view.php?id=3052, but this might be pure 
> FUD. The real problem is that nobody seems interested enough in this 
> graphical toplevel to put serious work on it.
>

Thanks for the clarification. I didn't made a clear answer, but I know
that labltk and OCamlWin are 2 separate things. 

>
>> I will probably look for ledit (or lwt toplevel) which seems a better
>> alternative to emacs (too heavy too install).
>
> If your hope is to make OCaml accessible to beginner hobbyists under 
> Windows (I assume this is the primary audience for pre-compiled 
> binaries), you might still want to provide easy ways to use code 
> editors. Providing easy access only to the toplevel (be it graphical, or 
> with a line-editor) might be a turnoff for beginners.
>

You are right, in this case I will probably take into consideration this
project:
http://ocamleditor.forge.ocamlcore.org/

It has started 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: Pre-compiled ocaml binary for windows

2010-12-07 Thread Sylvain Le Gall
Hello,

On 07-12-2010, Alain Frisch  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: Pre-compiled ocaml binary for windows

2010-12-06 Thread Sylvain Le Gall
On 06-12-2010, Matthieu Dubuget  wrote:
> Hello,
>
>> There are still problem and we are lacking a bit of time to finish it.
>
> could you explain the problems remaining?

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 


1. is mandatory to my mind.

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


[Caml-list] Re: help with regular expression

2010-12-06 Thread Sylvain Le Gall
On 06-12-2010, David Allsopp  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


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 +0000, 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  wrote:
> On Sat, Nov 27, 2010 at 10:20:38AM +0000, Sylvain Le Gall wrote:
>> Hi,
>> 
>> On 26-11-2010, Anastasia Gornostaeva  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  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: Optimizing garbage collection

2010-11-22 Thread Sylvain Le Gall
On 22-11-2010, Damien Doligez  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] [was: Re: Is OCaml fast?] OCaml Shootout task force

2010-11-22 Thread Sylvain Le Gall
On 22-11-2010, Gerd Stolpmann  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: Is OCaml fast?

2010-11-22 Thread Sylvain Le Gall
Hello,

On 22-11-2010, Thanassis Tsiodras  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] Re: Looking for stubs for sendmsg/recvmsg

2010-11-20 Thread Sylvain Le Gall
On 20-11-2010, Goswin von Brederlow  wrote:
> Sylvain Le Gall  writes:
>> On 19-11-2010, Goswin von Brederlow  wrote:
>>> Sylvain Le Gall  writes:
>>>> On 19-11-2010, Goswin von Brederlow  wrote:
>>>>> Sylvain Le Gall  writes:
>>>>>> On 18-11-2010, Goswin von Brederlow  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: [Was: OCamlJit 2.0]

2010-11-20 Thread Sylvain Le Gall
On 20-11-2010, Yoann Padioleau  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-19 Thread Sylvain Le Gall
On 19-11-2010, Goswin von Brederlow  wrote:
> Sylvain Le Gall  writes:
>> On 19-11-2010, Goswin von Brederlow  wrote:
>>> Sylvain Le Gall  writes:
>>>> On 18-11-2010, Goswin von Brederlow  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: Looking for stubs for sendmsg/recvmsg

2010-11-19 Thread Sylvain Le Gall
Hello,

On 19-11-2010, Goswin von Brederlow  wrote:
> Sylvain Le Gall  writes:
>
>> On 18-11-2010, Goswin von Brederlow  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 = 
>
> 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 "" false;
  fd
;;

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

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

(** See UnixExt.mli *)
let stdout =
  fd_open Unix.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: ocamlbuild and packs

2010-11-19 Thread Sylvain Le Gall
On 18-11-2010, Thomas Gazagnaire  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
On 18-11-2010, Goswin von Brederlow  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: Native toplevel? (was: OCamlJit 2.0)

2010-11-17 Thread Sylvain Le Gall
On 17-11-2010, Alain Frisch  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-17 Thread Sylvain Le Gall
On 17-11-2010, Goswin von Brederlow  wrote:
> Sylvain Le Gall  writes:
>
>> Hi,
>>
>> On 15-11-2010, Wolfgang Draxinger  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: SMP multithreading

2010-11-16 Thread Sylvain Le Gall
Hi,

On 15-11-2010, Wolfgang Draxinger  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  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  wrote:
> On Thu, 04 Nov 2010 13:31:35 +0100, Sylvain Le Gall   
> 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: Help with Elliom syntax

2010-11-04 Thread Sylvain Le Gall
Hello,

On 04-11-2010, Till Crueger  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: type inference problem with Printf.sprintf ?

2010-11-03 Thread Sylvain Le Gall
Hello,

On 03-11-2010, Gregory Bellier  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 
>
>> On Wed, Oct 27, 2010 at 08:44:10AM +1100, Arlen Cuss wrote:
>> > # open CalendarLib;;
>> > # Calendar.now ();;
>> > - : CalendarLib.Calendar.t = 
>> > # 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, Lukasz Stafiniak  wrote:
> On Sun, Oct 31, 2010 at 3:35 PM, Sylvain Le Gall  wrote:
>> On 31-10-2010, Wojciech Daniel Meyer  wrote:
>>> bluestorm  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-31 Thread Sylvain Le Gall
On 31-10-2010, Wojciech Daniel Meyer  wrote:
> bluestorm  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-29 Thread Sylvain Le Gall
On 29-10-2010, Jacques Le Normand  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=1704671501085578312&hl=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] 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  wrote:
> On Fri, Oct 22, 2010 at 7:51 PM, Sylvain Le Gall wrote:
>
>> 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: [ANN] oasis v0.2.0: Architecture for building OCaml libraries and applications

2010-10-22 Thread Sylvain Le Gall
On 22-10-2010, bluestorm  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, Dario Teixeira  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] [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] [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] Re: Unicode, update

2010-10-14 Thread Sylvain Le Gall
Hello,

On 14-10-2010, Paul Steckler  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  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] 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  wrote:
> On Fri, Oct 8, 2010 at 10:13 AM, Sylvain Le Gall  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] 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] [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  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: OCaml projects on github, hard to find?

2010-09-20 Thread Sylvain Le Gall
On 20-09-2010, Mike Lin  wrote:
> On Fri, Sep 17, 2010 at 5:04 AM, Sylvain Le Gall  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=detail&aid=604&group_id=1&atid=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] 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  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-17 Thread Sylvain Le Gall
On 17-09-2010, Martin DeMello  wrote:
> On Fri, Sep 17, 2010 at 2:13 PM, Sylvain Le Gall  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=detail&aid=604&group_id=1&atid=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: Create a constraint between variant type and data list

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

On 03-09-2010, Sylvain Le Gall  wrote:
> 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" ]
>
>

Thank you for all your answer. I pick the one from o...@okmij.org, I
hide the license with a type and the creation of license is done in the
module. The to_string/from_string is done by registering extra data in
an Hashtable.

See the implementation here.
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis;a=headblob;f=/src/oasis/OASISLicense.mli
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis;a=headblob;f=/src/oasis/OASISLicense.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


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

2010-09-13 Thread Sylvain Le Gall
On 13-09-2010, Eray Ozkural  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 wrote:
>
>> On 13-09-2010, Eray Ozkural  wrote:
>> >> On 13-09-2010, Eray Ozkural  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.
>


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. 


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

2010-09-13 Thread Sylvain Le Gall
On 13-09-2010, Eray Ozkural  wrote:
>> On 13-09-2010, Eray Ozkural  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
Hi,

On 13-09-2010, Eray Ozkural  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: [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  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] Re: Possible ocamlmpi finalization error?

2010-09-08 Thread Sylvain Le Gall
On 08-09-2010, Eray Ozkural  wrote:
> --===0522474025==
> Content-Type: multipart/alternative; boundary=0016369204e79d9601048fb8ae36
>
> --0016369204e79d9601048fb8ae36
> Content-Type: text/plain; charset=ISO-8859-1
>
> I'm recently getting errors that are past MPI_Finalize. Since both
> init/final and communicator allocation is managed by ocamlmpi, is it
> possible this is a bug with the library? Have you ever seen something like
> this?
>
> Using openmpi on OS X. Here is the log message:
>
> *** An error occurred in MPI_Comm_free
> *** after MPI was finalized
> *** MPI_ERRORS_ARE_FATAL (goodbye)
>
> In the code I'm using both point-to-point and collective communication, and
> as far as I know the code is correct. Could this be due to memory
> corruption, or should this never happen?
>

Maybe, you can give a minimal code to reproduce this error?

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

2010-09-07 Thread Sylvain Le Gall
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.

This tool scans for JPEG markers inside the RAW. When a SOI (Start of Image)
marker is found, the tool scan the content to find a consistent EOI (End of
Image) marker.

It doesn't need to have a valid filesystem so it can handle most of the
crashed memory card. It recovers the image data and EXIF information.

Homepage:
http://forge.ocamlcore.org/projects/camera-rescue/

Get source code:
$ darcs get http://darcs.ocamlcore.org/repos/camera-rescue

Browse source code:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=camera-rescue;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.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: ocamlmpi reduce_int_array, showstopper?

2010-09-06 Thread Sylvain Le Gall
On 04-09-2010, Mike Lin  wrote:
> Hi Sylvain, Xavier,
> I have encountered what seems to be a serious problem with
> reduce_int_array in ocamlmpi, namely, in a trivial test case it
> successfully returns incorrect results. This is my test code
>

[...]

>
> [mike...@honest3 ~/]$ uname -a
> Linux honest3.ncsa.uiuc.edu 2.6.18-92.1.10.el5_lustre.1.6.6smp-perfctr
> #7 SMP Tue Nov 10 10:41:00 CST 2009 x86_64 x86_64 x86_64 GNU/Linux
> [mike...@honest3 ~/]$ which mpiexec
> /usr/local/mvapich2-1.2-intel-ofed-1.2.5.5/bin/mpiexec
>
> see also: 
> http://www.ncsa.illinois.edu/UserInfo/Resources/Hardware/Intel64Cluster/
>
> I know the ocamlmpi code has been stable for some time, but I wonder
> if it's been tested on x86_64? Let me know if you're able to reproduce
> this.
>

I can confirm the bug. I have commited a fix in the svn. Though, I am
not an MPI expert.

I think the problem was related to a double in-place re-encoding of
integer in the array. I'll wait for Xavier review to do a release.

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: CUFP 2010 is coming! (Oct 1&2 in Baltimore MD)

2010-09-05 Thread Sylvain Le Gall
On 05-09-2010, Jon Harrop  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] Re: Create a constraint between variant type and data list

2010-09-03 Thread Sylvain Le Gall
On 03-09-2010, bluestorm  wrote:
> Hi,
>
> Finally, I have a third solution based on code generation : given my
> first solution (turning the association list into a function), what
> you need is only a list of all the constructors (and you can build
> your assoc list with List.map (fun x -> x, assoc_function x)). This
> can easily be generated from the datatype declaration using direct
> camlp4, or Markus Mottl's type-conv (
> http://www.ocaml.info/home/ocaml_sources.html#toc11 ).
>

Your answer and the one from Martin/Ashish, makes me think that I need
to go back to camlp4/type-conv... I would have like to avoid this
solution, but I think it is the best one.

Thanks for all your answer...

Regards,
Sylvain Le Gall

p.s.: this remains an open problem, so solutions are still welcome ;-)

___
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  wrote:
> Le Fri, 3 Sep 2010 17:16:48 + (UTC),
> Sylvain Le Gall  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] 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: ANN: ocamljs 0.3

2010-08-27 Thread Sylvain Le Gall
Hello,

On 27-08-2010, Mihamina Rakotomandimby  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  wrote:
> On 25-08-2010, Maxence Guesdon  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: Please provide at least one page for your ocaml projects

2010-08-25 Thread Sylvain Le Gall
Hello,

On 25-08-2010, Maxence Guesdon  wrote:
>
> For this reason, I have a look at every project announced on the caml-list
> and it seems to me that there are more and more projects providing only
> links to tarballs or git repositories.
>
> I think these projects would take advantage of having at least one web page
> giving all basic information: description, status, license, author(d),
> download links.
>

I am working on OASIS and OASIS-DB. The latter aims to translate _oasis
file into simple web pages (including markdown translation).

Have a look at:
http://oasis.ocamlcore.org/dev/browse?ver=0.2.0~alpha1&pkg=oasis

This web page has been translated from:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis;a=headblob;f=/_oasis

(this package is pretty complex, so there is a lot a library/exec/tests
but what is translated is basically Synopsis + Description).

If you add an _oasis file to your project and upload it to
oasis.ocamlcore.org it will generate this kind of pages.

Maxence, does it fit your requirement?

(the project is still at an early stage, but the upload is working)

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

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  wrote:
> On Mon, Aug 23, 2010 at 8:06 AM, Christophe TROESTLER
> 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  wrote:
> On Sun, Aug 15, 2010 at 7:16 PM, Basile Starynkevitch
> 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, Gabriel Kerneis  wrote:
> On Mon, Jul 26, 2010 at 05:10:01PM +0000, 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-26 Thread Sylvain Le Gall
On 26-07-2010, Florent Monnier  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, Dario Teixeira  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
Hello,

On 25-07-2010, Dario Teixeira  wrote:
>
> The only circumstance where I would be cautious on relying solely on a
> naked Ocsigen is if you are also required to serve plenty of static content
> (images, etc).  Even though Ocsigen includes an extension for serving static
> pages, for hysterical reasons no Unix supports non-blocking mode for regular
> files, which of course causes problems for Lwt-apps (see the Lwt manual for
> more information on this).  Therefore, in this context you may get better
> results by having another server (like Nginx) dedicated to static content.
>

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?

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
Hello,

On 25-07-2010, Yoann Padioleau  wrote:
> On Jul 25, 2010, at 2:45 PM, Dario Teixeira wrote:
>> 
>> 
>>> Or if you prefer think of it this way: People are using really
>>> unsuitable languages (PHP) and really slow languages (Ruby, PHP,
>>> Python, Perl) on some massive websites out there.
>> 
>> Yeap.  Personally, I find Ocsigen's greatest advantage to be the safety
>> and expressiveness that it brings to backend programming (and soon also
>> to the frontend).  The fact that it's also fast is just icing on the cake...
>
> My biggest issue with OCsigen is the lack of documentation and examples.
> With rails you got lots of books, and you got example of non trivial websites
> like a mini amazon (called depot: 
> http://pragprog.com/titles/rails2/source_code)
> in less than 2000 lines of code.
>

There are examples of ocsigen websites:
http://ocsigen.org/ocsimore/sources/
https://forge.ocamlcore.org/scm/viewvc.php/?root=ocsforge
http://ocsigen.org/ocsigenserver/sources/examples

You could even found some of them outside ocsigen websites:
https://forge.ocamlcore.org/scm/viewvc.php/?root=lambdoc
http://github.com/mfp/ocsiblog

But, I think the documentation issue is a chicken and egg problem. If
more people are interested in ocsigen, the documentation will improve...

I am experimenting with ocsigen since one month and I think it is a good
framework. It provides a good type checking of HTML struct, errors
outputted are not very clear, but you know where the problem is.

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  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  wrote:
> Dario Teixeira  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  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  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  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, Török Edwin  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: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Christoph Bauer  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, Paul Steckler  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: about OcamIL

2010-05-14 Thread Sylvain Le Gall
On 14-05-2010, ben kuin  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: [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 
>
>> 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: [ANN] Camomile 0.7.3

2010-05-14 Thread Sylvain Le Gall
On 14-05-2010, Yoriyuki Yamagata  wrote:
> 2010/5/13 Sylvain Le Gall 
>
>> On 13-05-2010, Yoriyuki Yamagata  wrote:
>> > 2010/5/13 Sylvain Le Gall By the way (and for your
>> boss), I consider camomile as a first class
>> OCaml library. Your work on this is really important.
>>
>> What do you need to prove what I said? Other OSS products using camomile?
>>
>>
> - download statistics.  Is there a way to see download statistics of Debian
> package?

http://qa.debian.org/popcon.php?package=camomile

But there is a lot of uncertainty around these figures.

I take into account the "vote" field which reflects regular users of
camomile: 25. (comparable figures: janest-core: 10; ocaml-fileutils: 11;
ocaml-gettext: 12; ocaml-nox: 479; extlib: 138).

There are ~75k voters but we estimate the number of installed computer at
around 500k (min) to 1M (max). So you could consider that there are
between 160 to 330 regular users of camomile... Of course this is an
approximation, there are many unknown figures.

Concerning other OSes, there is also Ubuntu, but this is basically
exactly the same package as Debian.

What are the statistics of sourceforge downloads?

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-13 Thread Sylvain Le Gall
On 13-05-2010, Yoriyuki Yamagata  wrote:
> 2010/5/13 Sylvain Le Gall 
>
>>
>> ps: as asked on the BTS, a way to be able to relocate the .mar file
>> would be something great -- this actually prevents me to distribute my
>> projects built with camomile. (relocate -> remove the hardcoded path)
>>
>>
> Hmm...  you should be able to relocate .mar file by providing the location
> of .mar files through the functor CamomileLibrary.Main.Make.  If you do not
> link CamomileLibrary.Default, Camomile won't load the data from the
> hardcoded path.  If it does, then  I regards it as a bug.
>

Will try, thanks.

By the way (and for your boss), I consider camomile as a first class
OCaml library. Your work on this is really important.

What do you need to prove what I said? Other OSS products using camomile? 

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-12 Thread Sylvain Le Gall
On 12-05-2010, Yoriyuki Yamagata  wrote:
>
>   I would appreciate your comments or/and opinions.  In particular, I'd like
> to know whether you can successfully operate Camomile in your platform.  I
> have complaints on Mac and MinGW environments, and although I believe that
> the problems are fixed, I'm too lazy to find spare Mac around and test the
> package :-)  Also, I would like to hear about a success ( /failure ) story
> of Camomile.  Do you use Camomile?  What for?  This is important since I
> have to convince my boss to allow me to invest some spare time to Camomile
> project.
>

I use camomile as the default implementation for ocaml-gettext:
http://forge.ocamlcore.org/projects/ocaml-gettext

Basically I do encoding conversion with it. Projects of mine built with
ocaml-gettext use camomile as well.

Regards
Sylvain 

ps: as asked on the BTS, a way to be able to relocate the .mar file
would be something great -- this actually prevents me to distribute my
projects built with camomile. (relocate -> remove the hardcoded path)

___
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  wrote:
> Hello,
>
> are there mbox-Libraries around?
>

You can have a look at:
https://forge.ocamlcore.org/scm/viewvc.php/trunk/mbox.ml?view=markup&revision=11&root=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: about OcamIL

2010-05-07 Thread Sylvain Le Gall
On 07-05-2010, Dmitry Bely  wrote:
>> On Thursday 06 May 2010 06:43:21 am Dmitry Bely wrote:
>>> Ironically it's also not entirely true. F# works well under Mono/Unix.
>>>
>> A little off topic, but how is Mono/Unix these days?  Last I checked (>2 
>> years
>> ago) it implemented the basic libraries and runtimes but had terrible
>> performance.  Is it now on par with Windows?
>
> It's hard to say: personally I don't use Mono (neither Windows nor
> Linux) yet. But indeed I was overoptimistic. Mono still uses Boehm GC
> so it should be slow enough. Nevertheless things are changing:
>
> http://www.mono-project.com/Compacting_GC
> http://lists.ximian.com/pipermail/mono-devel-list/2009-November/033421.html
>
> Let's wait for mono 2.8 and see how the new generational GC works.
>

I can give you a very personnal POV, I don't really use Mono but I
attended various demonstration of it, by Miguel de Icaza, some people
from Second Life and some people from the me Moonlight project, back in
February at FOSDEM 2010. Don't take my opinion for sure.

Overall the effort about Mono is impressive but it doesn't yet match
C#/.NET in term of performance and stability. During the demonstration a
lot of things didn't work (video in Silverlight, compilation of various
compilation unit). 

I was not very impressed by the whole Mono, I acknowledge the effort
toward a compatibility with .NET. But since the other end doesn't seem
cooperative, they will have a lot of work ahead.

Concerning F#/Mono, I am not sure that the Mono version will be
supported in the future. Now F# is a first class language in Visual
Studio, so I suppose they will put a bigger effort to integrate F# with
Visual Studio (e.g. to be able to build GUI application using a GUI
builder...) This integration will probably be a higher priority than the
Mono compatibility and probably will reduce it. 

My 2 cents,
Sylvain Le Gall

ps: this is really a personnal POV and guess, I am not a .NET/Mono
expert, only someone who have some interests in it.

___
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  wrote:
> "Sylvain Le Gall" :
>>
>> 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: Subtyping structurally-equivalent records, or something like it?

2010-05-04 Thread Sylvain Le Gall
On 04-05-2010, AUGER Cédric  wrote:
> I am not expert in Ocaml, is the following the same in terms
> of performances as the phantom types?
>
> type kinematic = ...
>
> type force = Force of kinematic
> type momentum = Moment of kinematic
> ...
>
> That is does the constructor introduce an overhead or not?
> As there is only one constructor, no overhead should be done in an
> optimized compiler.
>

The variants are represented using a block. If you introduce a single
variant, it will create a block that points to kinematic. E.g. "Force of
kinematic" will create a pointer to the kinematic structure. 

Your construction of force and momentum will add a level of indirection
for every use of the kinematic structure.

Phantom type doesn't add a level of indirection and left no trace in the
generated assembler. 

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.

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  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  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  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-25 Thread Sylvain Le Gall
On 25-04-2010, Vincent Hanquez  wrote:
> On Sat, Apr 24, 2010 at 03:29:08PM +0000, Sylvain Le Gall wrote:
>> Cryptokit is written by X. Leroy, the same author as OCaml.
>
> what about technical arguments/reasons instead of fanboyism ?
> cryptokit has lots of good things, and some reason to choose them over my
> ocaml-sha bindings, but i find the argument you just made pretty distasteful.
>

This is pure information, no fanboyism intended. Concerning technical
arguments/reasons, I think a simple "it computes SHA1" is the only
argument I can give and it was implied in my answer ;-) Perhaps, it is
also because I use it. 

Regards,
Sylvain Le Gall

ps: distasteful is a bit strong especially because you took an
information for an argument. 

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

2010-04-24 Thread Sylvain Le Gall
On 24-04-2010, Oliver Bandel  wrote:
> Zitat von "Grant Olson" :
>
>> 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: SHA1 => stdlib ?!

2010-04-24 Thread Sylvain Le Gall
Hello,

On 24-04-2010, Oliver Bandel  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: Caml-inspect library

2010-04-15 Thread Sylvain Le Gall
Hello,

On 15-04-2010, Kaspar Rohrer  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: Inspect libary

2010-04-15 Thread Sylvain Le Gall
On 15-04-2010, Vincent Aravantinos  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=3Ddetail&aid=3D452&group=_id=3D1&atid=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: Building ocaml on Win32 using VS 2008

2010-04-14 Thread Sylvain Le Gall
On 14-04-2010, Lally Singh  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  
> 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


  1   2   3   >