Re: [Caml-list] Lwt and Tuareg mode

2010-12-21 Thread Jérémie Dimino
On Tue, Dec 21, 2010 at 01:54:32PM -0500, orb...@ezabel.com wrote: Are there any modified versions of Tuareg mode to work with Lwt syntax extensions? I looked around but didn't see anything. I don't know Emacs lisp particularly well but will try to hack something out of nothing exists.

Re: [Caml-list] [ANN] OBus 1.1

2010-12-16 Thread Jérémie Dimino
On Thu, Dec 16, 2010 at 05:15:18PM +0100, Gregory Bellier wrote: - Is OCaml 3.12 really required to be able to build it ? Yes. If you are using debian there is a repository with ocaml 3.12 here: http://ocaml.debian.net/debian/ocaml-3.12.0 - By the way, I got this with Ocaml 3.11.1 and lwt

Re: [Caml-list] Re: [ANN] OBus 1.1

2010-12-16 Thread Jérémie Dimino
On Thu, Dec 16, 2010 at 04:23:21PM +, Sylvain Le Gall wrote: I think Jeremie should add: OASISVersion: = 3.11.2 to its _oasis file. Yes, i did not know this option (it is OCamlVersion by the way), thanks. -- Jérémie ___ Caml-list mailing

[Caml-list] [ANN] Lwt 2.2.0 released

2010-12-13 Thread Jérémie Dimino
buffer. Lwt_io.make now takes a function that uses a bigarray. * Add module {{{Lwt_switch}}} Enjoy! -- Jérémie Dimino, on behalf of the Lwt team ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo

[Caml-list] [ANN] OBus 1.1

2010-12-13 Thread Jérémie Dimino
Hi, I'm happy to announce the release 1.1 of OBus, a pure OCaml implementation of the D-Bus protocol. OBus aims to make it easy to use and provide D-Bus services in OCaml. It can generate interfaces to D-Bus services from introspection files, it provides integration of D-Bus methods, signals and

Re: [Caml-list] install lwt in solaris

2010-11-25 Thread Jérémie Dimino
On Thu, Nov 25, 2010 at 05:26:21PM -0500, HP Wei wrote: I got errors of the type: no member named 'blah'. one example: src/unix/stubs/lwt_unix_stubs.c:159 error: 'struct msghdr' has no member named 'msg_controllen' --- How do I make it right ?

Re: [Caml-list] Asynchronous IO programming in OCaml

2010-10-28 Thread Jérémie Dimino
On Thu, Oct 28, 2010 at 11:00:59AM +0200, Goswin von Brederlow wrote: Hehe, and you have prooven yourself wrong. As you said, when the file isn't cache and the syscall actually blocks there is no time difference. The reasons being that the blokcing takes the majority of time anyway and the

Re: [Caml-list] Asynchronous IO programming in OCaml

2010-10-27 Thread Jérémie Dimino
On Wed, Oct 27, 2010 at 11:33:51AM +0200, Goswin von Brederlow wrote: You aren't doing any multithreading. You are creating a thread and waiting for the thread to finish its read before strating a second. There are never ever 2 reads running in parallel. So all you do is add thread creation

Re: [Caml-list] Asynchronous IO programming in OCaml

2010-10-25 Thread Jérémie Dimino
On Mon, Oct 25, 2010 at 10:42:05AM +0200, Goswin von Brederlow wrote: Doesn't that mean you have to do polling of all pending I/O? That seems horrible ineficient (you check them all every time) or slow I/Os can starve quick ones (you only check the oldest ones). No. In the current

Re: [Caml-list] Asynchronous IO programming in OCaml

2010-10-25 Thread Jérémie Dimino
On Mon, Oct 25, 2010 at 11:34:41AM -0400, Yaron Minsky wrote: I don't quite understand how this whole benchmark holds together.  Could you post the C code?  I don't understand the differences between (1), (2) and (3) well enough to explain where the factor of 100 comes in. Yes. Here

Re: [Caml-list] Asynchronous IO programming in OCaml

2010-10-24 Thread Jérémie Dimino
On Sun, Oct 24, 2010 at 01:54:50PM -0700, Anil Madhavapeddy wrote: This should work fine for a couple of thousand clients or so, but you'll begin to see degradation as the number of clients increase. This is because LWT internally uses select(2) to wait for file-descriptors, and

Re: [Caml-list] LablGtk 2.14.2

2010-09-17 Thread Jérémie Dimino
The link to download the tarball seems to be broken: it ends with lablgtk-2.14.2.gz instead of lablgtk-2.14.2.tar.gz On Fri, Sep 17, 2010 at 05:59:19PM +0900, Jacques Garrigue wrote: Dear Camlers, Following a number of bug fixes, and particularly a serious incompatibility in ocaml 3.12 (due

Re: [Caml-list] scalable web apps

2010-07-27 Thread Jérémie Dimino
On Mon, Jul 26, 2010 at 11:19:20AM +0300, Török Edwin wrote: How about using linux's AIO and eventfd? Linux's AIO are Linux specific and not implemented on all file-systems, so i am not sure it is the best way to go. Best, -- Jérémie ___ Caml-list

Re: [Caml-list] camlp4 infix let

2010-04-07 Thread Jérémie Dimino
Hi, Le mercredi 07 avril 2010 à 15:05 -0400, Jacques Le Normand a écrit : Dear List, I'm writing a camlp4 syntax extension and I'd like to write :expr let ( = ) = Bar.( = ) in 5 but camlp4 complains: While expanding quotation expr in a position of expr: Parse

Re: [Caml-list] Toplevel debugging.

2010-01-25 Thread Jérémie Dimino
Le samedi 23 janvier 2010 à 18:29 +0100, Guillaume Yziquel a écrit : # Fatal error: exception Sys_blocked_io yziq...@seldon:~/git/mlgame$ It is because mlgame set stdin into non-blocking mode (file input.ml, line 81) and the toplevel does not support that. If you want to be able to put

Re: [Caml-list] Re: Recursion on React.events.

2009-12-11 Thread Jérémie Dimino
Le jeudi 10 décembre 2009 à 23:24 +0100, Guillaume Yziquel a écrit : Yes. It's also here where I worry about a few things concerning Lwt: In Lwt, you have a monadic way to do context switches for multithreading withing a single real thread. So if you use Lwt inside the update cycle, you

Re: [Caml-list] Creating an lwt toplevel

2009-10-06 Thread Jérémie Dimino
Hello, Le mardi 06 octobre 2009 à 16:48 +0200, Alan Schmitt a écrit : I am trying to experiment with some code that uses lwt, and I would like to do it in a toplevel. Unfortunately I seem to be missing a step. Here is what I tried: # #load unix.cma;; # #load

Re: [Caml-list] Constructors are not functions

2009-10-06 Thread Jérémie Dimino
Le mardi 06 octobre 2009 à 14:01 +0200, Chantal KELLER a écrit : Dear Ocaml users, Is there a reason for constructors not to behave like functions? For instance, one cannot make a partial application from a constructor: # type foo = | Bar of int;; type foo = Bar of int # let foobar =

Re: [Caml-list] interface mismatch on camlp4_import

2009-04-15 Thread Jérémie Dimino
Joel Reymont wrote: Camlp4: Uncaught exception: DynLoader.Error (/usr/local/lib/ocaml/ site-lib/ocsigen/xhtmlsyntax.cma, interface mismatch on Camlp4_import) What does this mean and how do I fix it? This means that xhtmlsyntax.cma requires a different version of the Camlp4_import module

Re: [Caml-list] storing object in record

2009-04-08 Thread Jérémie Dimino
Michael wrote: it seems that I'm not able to figure out how to do this: class baseclass = object(this) method asBase = (this : baseclass) (* ... *) end;; class ex = object inherit baseclass method name = ex end type state_rec = { mutable state: 'a. #baseclass as 'a };; There

Re: [Caml-list] storing object in record

2009-04-08 Thread Jérémie Dimino
Le mercredi 08 avril 2009 à 12:29 +0200, Michael a écrit : There is no value of type: forall 'a. #baseclass as 'a. is this similar? : type 'a xx = 'a constraint 'a = asBase: baseObject; .. ;; (why does: type 'a xx = asBase: baseObject; .. as 'a not work instead? ) No, [type 'a xx

Re: [Caml-list] Int64 comparison

2009-03-17 Thread Jérémie Dimino
Le mardi 17 mars 2009 à 08:51 -0400, Elnatan Reisner a écrit : Do the polymorphic ordering functions -- (), (), etc. -- correspond to the numerical ordering for Int64s and Int32s? I assume so, but I didn't see this specified anywhere. Yes, int64s and int32s are represented in memory by

Re: [Caml-list] Reference to undefined global `Camlp4_config'

2009-03-11 Thread Jérémie Dimino
Joel Reymont wrote: ocamlfind ocamlc -package 'oUnit, extlib, *camlp4*' -linkpkg -g src/ easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo src/token.cmo src/static1.cmo src/easy_parser.cmo src/test_tools.cmo src/parser_test.cmo src/test.cmo -o src/test.byte File

Re: [Caml-list] Parsing 64-bit ints in 32-bit OCaml

2009-03-07 Thread Jérémie Dimino
Jon Harrop wrote: Is there a better workaround? A (maybe overkill) solution is to use optcomp [1]. What you have to do is to add word_size variable: Pa_optcomp.define word_size (Int Sys.word_size) Then you can write: let gcd3 = #if word_size = 32 715827883 #elif word_size = 64

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

2008-12-05 Thread Jérémie Dimino
On Fri, Dec 05, 2008 at 12:57:42PM +0100, Paolo Donadeo wrote: - Subtyping is now allowed between a private abbreviation and its definition, and between a polymorphic method and its monomorphic instance. Is there anybody who wants to elaborate this with an example, especially the second

Re: [Caml-list] Private types

2008-10-30 Thread Jérémie Dimino
David Allsopp [EMAIL PROTECTED] writes: I thought that the point of private types was that you could deconstruct them... so values of type M.t are valid wherever an int is used but not the converse. It should probably be ok for immutable data but not for mutable ones. One example is using