Re: [Caml-list] Incremental linking

2009-09-30 Thread Xavier Leroy
Dawid Toton wrote: I have lot of modules and they are compiled to native code. So I have .cmx and .o files and want to link them faster. Is is possible to make linking an associative operation acting on modules? [...] Documentation of ld says that files produced with --relocatable can be used

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Richard Jones
On Wed, Sep 30, 2009 at 01:00:15AM +0200, Mikkel Fahnøe Jørgensen wrote: In line with what Yaron suggests, you can use a combinator parser. I do this to parse json, and this parser could be adapted to xml by focusing on basic syntax and ignoring the details, or you could prefilter xml and

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Sebastien Mondet
The discussion here has got quite theoretical, but it's not helping me to write the original 3 lines of Perl in OCaml.    my $p = XML::XPath-new (xml = $xml);    my @disks = $p-findnodes ('//devices/disk/source/@dev');    push (@disks, $p-findnodes ('//devices/disk/source/@file')); My best

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Mikkel Fahnøe Jørgensen
2009/9/30 Richard Jones r...@annexia.org: On Wed, Sep 30, 2009 at 01:00:15AM +0200, Mikkel Fahnøe Jørgensen wrote: In line with what Yaron suggests, you can use a combinator parser. It's interesting you mention xmlm, because I couldn't write the code using xmlm at all. If you can manage to

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Dario Teixeira
Hi, Ocamlduce has been mentioned before in this thread, but I didn't catch the reason why it has been discarded as a solution. Is it because you don't want to carry the extra (large) dependency, or is there some other reason? And on the subject of simple XML parsers for Ocaml, there's also the

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Richard Jones
On Wed, Sep 30, 2009 at 04:05:03AM -0700, Dario Teixeira wrote: Hi, Ocamlduce has been mentioned before in this thread, but I didn't catch the reason why it has been discarded as a solution. Is it because you don't want to carry the extra (large) dependency, or is there some other reason?

Re: [Caml-list] Why don't you use batteries?

2009-09-30 Thread Rakotomandimby Mihamina
09/03/2009 04:05 PM, Edgar Friendly: 8) Other (please explain) Some hints (I just saw it in my INBOX, I dont agree nor disagree): http://www.itworld.com/open-source/78643/how-attract-more-people-your-open-source-project -- Architecte Informatique chez Blueline/Gulfsat:

Re: [Caml-list] JIT HLVM, LLVM

2009-09-30 Thread Mikkel Fahnøe Jørgensen
First, sorry for the rough post (it was late), I see some typos and slightly more confusing mistakes, but hopefully not too bad, or please ask. A function can push other functions to the global queue. This in effect creates a continuation, and the concept is similar to continuation passing

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Richard Jones
On Wed, Sep 30, 2009 at 12:57:23PM +0100, Richard Jones wrote: On Wed, Sep 30, 2009 at 04:05:03AM -0700, Dario Teixeira wrote: Hi, Ocamlduce has been mentioned before in this thread, but I didn't catch the reason why it has been discarded as a solution. Is it because you don't want to

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Till Varoquaux
OCamlduce (Alain correct me if I am wrong) basically maintains two separate type systems side by side (the Xduce one and the Ocaml one). This is done in order to make Ocamlduce maintainable by keeping a clear separation. As a result you have to explicitly convert values between type systems using

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Stefano Zacchiroli
On Mon, Sep 28, 2009 at 01:17:45PM +0100, Richard Jones wrote: I need to do some relatively simple extraction of fields from an XML document. In Perl I would use xpath, very specifically if $xml was an XML document[1] stored as a string, then: my $p = XML::XPath-new (xml = $xml);

Re: [Caml-list] JIT HLVM, LLVM

2009-09-30 Thread Stéphane Glondu
Mikkel Fahnøe Jørgensen a écrit : But this requires the function to be designed in a clean way and conform to certain monadic rules, and getting it wrong creates a mess in the type errors. Actually, I find the typing discipline enforced by the monadic abstraction very helpful (and elegant).

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Richard Jones
On Wed, Sep 30, 2009 at 09:33:07AM -0400, Till Varoquaux wrote: OCamlduce (Alain correct me if I am wrong) basically maintains two separate type systems side by side (the Xduce one and the Ocaml one). This is done in order to make Ocamlduce maintainable by keeping a clear separation. As a

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Till Varoquaux
If I am not mistaken you are selecting a domain whose first child is a device node whose only child is disk node ... instead of: domain..[devices..[disk..[source dev=(Latin1 s) .._]]] you should aim for something in the vein of: domain .. [_* (devices.. (disk..(source dev=(Latin1 s)| souce

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Gerd Stolpmann
Am Mittwoch, den 30.09.2009, 15:39 +0200 schrieb Stefano Zacchiroli: On Mon, Sep 28, 2009 at 01:17:45PM +0100, Richard Jones wrote: I need to do some relatively simple extraction of fields from an XML document. In Perl I would use xpath, very specifically if $xml was an XML document[1]

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Alain Frisch
Richard Jones wrote: let devs = {{ map [xml] with | domain..[devices..[disk..[source dev=(Latin1 s) .._]]] | domain..[devices..[disk..[source file=(Latin1 s) .._]]] - [s] | _ - [] }} in The following should work: let l = {{ [xml] }} in let l = {{ map l with domain..l - l |

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Richard Jones
On Wed, Sep 30, 2009 at 04:51:01PM +0200, Alain Frisch wrote: Richard Jones wrote: let devs = {{ map [xml] with | domain..[devices..[disk..[source dev=(Latin1 s) .._]]] | domain..[devices..[disk..[source file=(Latin1 s) .._]]] - [s] | _ - [] }} in The following should

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Stefano Zacchiroli
On Wed, Sep 30, 2009 at 04:49:37PM +0200, Gerd Stolpmann wrote: No. However, there is a little XPath evaluator in SVN: https://godirepo.camlcity.org/svn/lib-pxp/trunk/src/pxp-engine/pxp_xpath.ml Cool, and you have even already implemented all of the XPath 1.0 standard library! I have never

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Alain Frisch
Richard Jones wrote: On the other hand, the code is hard to understand. It's not clear to me what the .( ) syntax means, nor why there is an apparently trailing / character. From the manual: If the x-expression e evaluates to an x-sequence, the construction e/ will result in a new

Re: [Caml-list] JIT HLVM, LLVM

2009-09-30 Thread Jon Harrop
On Wednesday 30 September 2009 02:08:06 Mikkel Fahnøe Jørgensen wrote: 2009/9/27 Jon Harrop j...@ffconsultancy.com: On Sunday 27 September 2009 20:23:13 kche...@math.carleton.ca wrote: If Grand Central Dispatch makes its way into *nix... Incidentally, what exactly (technically) is Grand

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Jordan Schatz
I hope this is germane, I am very new to Ocaml. Do these help at all? http://packages.debian.org/sid/libxml-light-ocaml-dev http://tech.motion-twin.com/xmllight.html I expect it wouldn't be to difficult to write a wrapper around libxml http://xmlsoft.org/index.html -Jordan

[Caml-list] Re: Compiling 3.11.1 with MinGW/Windows

2009-09-30 Thread Jeff Shaw
Matías, I have a problem where the shortcuts the cygwin installer creates aren't recognized by windows. If you go to your bin/ directory and copy gcc-3.exe to gcc.exe (replacing the shortcut), perhaps that will help. Jeff ___ Caml-list mailing

Re: [Caml-list] JIT HLVM, LLVM

2009-09-30 Thread Mikkel Fahnøe Jørgensen
2009/9/30 Stéphane Glondu st...@glondu.net: Mikkel Fahnøe Jørgensen a écrit : Actually, I find the typing discipline enforced by the monadic abstraction very helpful (and elegant). For some purposes - for example filtering and transforming large data sets, but perhaps less so for ad hoc tasks

Re: [Caml-list] JIT HLVM, LLVM

2009-09-30 Thread Mikkel Fahnøe Jørgensen
Using one work stealing deque per core is much more efficient than the work sharing queue you described for two reasons: 1. Less global syncronization. 2. Subtasks are likely to be executed on the core that spawned them, which improves cache efficiency. You could also create larger task

[Caml-list] overbld -- OCaml / MinGW / Win32

2009-09-30 Thread dmitry grebeniuk
Hello. I have an OCaml / MinGW / Win32 build system that I've described in the post http://caml.inria.fr/pub/ml-archives/caml-list/2009/09/1e88034bf03350ad0488a20dce729f79.en.html For now, it is a mercurial repository with http pull access with url http://gdsfh.dyndns.org:8000/ (so you can clone

Re: [Caml-list] overbld -- OCaml / MinGW / Win32

2009-09-30 Thread Mykola Stryebkov
Hi, On 30 Вер 2009, at 23:30, dmitry grebeniuk wrote: Repository hosting is not fast -- it's my own home host, 256kbit/s outgoing only. I haven't found any acceptable hosting for this kind of project. freehg.org is buggy with heavy downtimes, bitbucket.org won't host such a big repository,