Re: [Caml-list] OASIS installer bug

2010-11-02 Thread Paolo Donadeo
There is an open bug here, along with a dirty workaround: http://forge.ocamlcore.org/tracker/index.php?func=detailaid=784group_id=54atid=291 I think Sylvain will fix it in the next release. -- Paolo ___ Caml-list mailing list. Subscription

Re: [Caml-list] Thread.delay to raise EINTR exception ?

2010-10-28 Thread Paolo Donadeo
It's a known pitfall. Read this discussion of some months ago: http://caml.inria.fr/pub/ml-archives/caml-list/2010/08/242cee79bb97e86bc93bc6bd88d2f256.en.html -- Paolo ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-17 Thread Paolo Donadeo
On Fri, Sep 17, 2010 at 00:04, Dario Teixeira wrote: Could you expand on the reasoning a little?  I mean, what is for you the advantage of running Eliom over Ocamlnet as opposed to over the Ocsigen server? From my point of view the problem with Ocsigen is that it requires you to install an

Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-17 Thread Paolo Donadeo
On Fri, Sep 17, 2010 at 00:27, Michael Ekstrand wrote: OTOH, if Ocsigen had a FastCGI extension, that could alleviate the need for another web server in some cases. Only if you have access to the server configuration. And I don't know a single sysadmin that will replace Apache with Ocsigen.

Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-17 Thread Paolo Donadeo
On Fri, Sep 17, 2010 at 01:55, Vincent Balat wrote: Writing a version of Eliom working with fastCGI is theoretically possible, even if it is probably a huge work. I don't know the inner details of both Ocsigen and Ocamlnet, but consider that Jake wrote lwt-equeue [1], I think this could help.

Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-16 Thread Paolo Donadeo
It would be nice to have something like this; the existing web frameworks (e.g. Ocamlnet and Ocsigen as another poster mentioned) implement the whole stack, but it would be nice to be able to mix and match (e.g. run Ocsigen's Eliom applications in Ocamlnet's Netplex server). Ah! So I'm not

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-09 Thread Paolo Donadeo
On Tue, Sep 7, 2010 at 23:48, Stéphane Glondu wrote: Well... could you provide a full self-contained example? Yes, but it could be confusing due to many other details. In any case: $ git clone http://git.ocamlcore.org/ocaml-lua/ocaml-lua.git $ git checkout

[Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Paolo Donadeo
I'm writing a Lua API binding http://ocaml-lua.forge.ocamlcore.org/ and I have a problem regarding the interaction with the garbage collector. The situation is rather canonical: a particular C data type, the Lua statehttp://www.lua.org/manual/5.1/manual.html#lua_state, is used as argument in all

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Paolo Donadeo
On Tue, Sep 7, 2010 at 23:12, Stéphane Glondu wrote: Why don't you call caml_register_global_root on (data-state_value) as well? This was a solution I tried, but with the additional global root the finalization function was never called by the GC, so it solved the segfault with a memory leak :-)

Re: [Caml-list] Thread.delay afraid of SIGTERM

2010-08-16 Thread Paolo Donadeo
Thanks Daniel and Philippe, problem solved. The lesson here is: read Unix system programming in Objective Caml *before* starting Unix system programming in OCaml :-) -- Paolo ⠠⠵ ___ Caml-list mailing list. Subscription management:

[Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
On Wed, Jul 7, 2010 at 15:50, Sylvain Le Gall gil...@centi wrote: So far, we have: http://bitbucket.org/dpowers/luacaml by David Powers a prototype by Paolo Donadeo lua-ml by Christian Lindig I didn't know! I spent a lot of time searching for material on the topic and I concluded

Re: [Caml-list] Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
How about translating a program in lua (or lua bytecode) to OCaml sourcecode automatically? Would that be possible? I see two problems with an approach like this: 1) it's complicated: consider that Lua was designed in the first place to be extremely simple to be embedded in a C program, and

[Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
It's ok for me. First thing, I'll publish my GIT repository with the prototype ASAP, even with some words and comments in Italian, so to have something concrete to discuss for. Just published on GitHub: http://github.com/pdonadeo/lua_lib If the joint project will start, I of course advocate

[Caml-list] Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-05 Thread Paolo Donadeo
Some time ago I started to write an OCaml binding to the Lua API library [1] and the so called auxiliary library [2]. My objective was a tool to give the user of an application (in this case a web application) the power to extend the application with plugins in a simple and safe environment. I

Re: [Caml-list] Escaped string in sexplib

2010-06-09 Thread Paolo Donadeo
How your function eval_string: let eval_string s = Camlp4.Struct.Token.Eval.string ~strict:() s actually modifies a string? -- Paolo ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] Escaped string in sexplib

2010-06-08 Thread Paolo Donadeo
I'm using Sexplib to store and retrieve the sessions of a web application into a data base. A session has this signature: module type SESSION_DATA = sig type t val default : t val string_of_t : t - string (* Is this what you want? *) val t_of_string : string - t (* Is this what

Re: [Caml-list] the list archives

2010-05-15 Thread Paolo Donadeo
While the NaN issue in the mailing list archives is not a good advertising for OCaml ;-), you can still access the old posts using Google Groups at this address: http://groups.google.com/group/fa.caml/topics It's always up to date. -- Paolo ___

Re: [Caml-list] Re: [ANN] Camomile 0.7.3

2010-05-14 Thread Paolo Donadeo
Of course, it's worth to remember that Camomile is heavily used in Batteries. -- Paolo ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list:

Re: [Caml-list] ocamlcore.org not available

2010-04-24 Thread Paolo Donadeo
From my PC it's ok, right now. Maybe it's a problem with your DNS? -- Paolo ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list:

Re: [Caml-list] [Ocaml and C] Passing Arrays and Matrices of floats from Ocaml to C and back

2010-03-04 Thread Paolo Donadeo
Did you consider using the bigarray library? http://caml.inria.fr/pub/docs/manual-ocaml/manual043.html -- Paolo ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives:

Re: [Caml-list] default arguments in classes

2009-06-16 Thread Paolo Donadeo
This should work: # class foo = object method bar = let helper a b ?(c = ) () = Printf.printf a = %d; b = %b; c = %s\n a b c in helper end;; class foo : object method bar : int - bool - ?c:string - unit - unit end Any undesired side effects? -- Paolo ~ ~ :wq

Re: [Caml-list] Strings

2009-04-03 Thread Paolo Donadeo
You clearly want both, but each with its own type and strings as immutable. Individual character mutability is rarely needed in text processing I can agree with you on this argument, but a question still remains: why should you ever do things like: # s.[0] - 'a';; Regards, -- Paolo ~ ~

[Caml-list] Re: [Batteries-devel] Still that camlp4 problem

2009-02-12 Thread Paolo Donadeo
I agree. Anybody against? I agree too. A question only: is it possible (and simple) to have two complete OCaml distribution (compiler, tools (findlib, etc...), and libraries) at the same time? In this moment I have a bunch of Debian packages installed, all compiled with 3.10.2: dropping OCaml

[Caml-list] Re: [Batteries-devel] Still that camlp4 problem

2009-02-12 Thread Paolo Donadeo
Sorry, the post was for another list. -- Paolo ~ ~ :wq ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list:

Re: [Caml-list] Parsing simple type expressions

2009-01-07 Thread Paolo Donadeo
Thanks, Matthieu and Jake, this is exactly what I had in mind. At the end, Camlp4 was the right solution to my simple problem, as I suspected from the beginning. Camlp4 is an extremely powerful tool and it's a pity it couldn't be used by everyone for lack of documentation. What is really needed,

[Caml-list] Parsing simple type expressions

2009-01-06 Thread Paolo Donadeo
For a serializer I'm writing I need to parse simple OCaml type expressions composed by OCaml basic types, tuples, options and lists. Given a string like (int * string option) list and this type: type types = | Int | String | Float | Char | Bool | Option of types | List of types |

Re: [Caml-list] Parsing simple type expressions

2009-01-06 Thread Paolo Donadeo
This is pretty easy with Camlp4, although as you say there isn't much in the docs to point the way. You might take a look at how orpc does it--see the parse_type function Thanks for this pointer! -- Paolo ~ ~ :wq ___ Caml-list mailing list.

Re: [Caml-list] The Axis of Eval (was: More cores)

2008-12-19 Thread Paolo Donadeo
I can imagine a spawn statement in a concurrent Caml that expects that the function passed as parameter be pure. This is, IMO, much more interesting than a concurrent garbage collector (no flame, please!). -- Paolo ~ ~ :wq ___ Caml-list mailing

Re: [Caml-list] New language feature in OCaml 3.11

2008-12-05 Thread Paolo Donadeo
Thanks. -- Paolo ~ ~ :wq ___ 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:

[Caml-list] A function returning itself

2008-11-24 Thread Paolo Donadeo
Hi everybody, I need your help again. In a particular application I need (or at least I think so...) to create a function that, besides it's own computation, returns itself. Something like: $ cat test.ml let rec f a b = let computation = a + b in (computation, f) ;; This file doesn't

Re: [Caml-list] A function returning itself

2008-11-24 Thread Paolo Donadeo
Usually, using an intermediate type with a constructor, you can achieve such thing. Here, something along the line of this should work : Thanks, this is exactly what I need. -- Paolo ~ ~ :wq ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included

2008-11-19 Thread Paolo Donadeo
Someone mentionned python's library, if it corresponds to this [1], then I see no hierarchy there (OTOH nobody tells me that python users are actually screaming for a hierarchy on their list). The Python library hierarchy is very flat, for example all markup tools are presented into a tree of

Re: [Caml-list] [announce] O'Browser : OCaml on browsers

2008-11-18 Thread Paolo Donadeo
O'Browser is an implementation of the OCaml virtual machine in JavaScript, designed to run in web browsers. What can I say? WOW, great idea! -- Paolo ~ ~ :wq ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-11-05 Thread Paolo Donadeo
In contrast, you can implement a GUI toolkit in OCaml that far exceeds the relevant limitations of Qt4 with quite easily. Jon, did you ever used Qt in a big C++ or Python project? Qt is the best GUI framework out there, GTK is a ridiculous toy in comparison, and it took ages to reach this level

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-11-05 Thread Paolo Donadeo
No, you just invoke the existing Python bindings. OCaml doesn't have to implement anything except bindings to Python, which are already done. From this sentence I deduce you don't know *how* the PyQt binding is generated. It's not a trivial task and the binding layer adds it's own bugs and

Re: [Caml-list] Metaprogramming features

2008-10-03 Thread Paolo Donadeo
I strongly agree with that feature request. Me too! -- Paolo ~ ~ :wq ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list:

Re: [Caml-list] Haskell vs OCaml

2008-08-14 Thread Paolo Donadeo
. [1] http://www.reddit.com/comments/6v2nl/ghc_project_switches_to_git/ [2] https://lopsa.org/node/1656 -- Ing. Paolo Donadeo Studio Associato 4Sigma Website: http://www.4sigma.it Email: [EMAIL PROTECTED] ~ ~ :wq ___ Caml-list mailing list. Subscription