"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 usi
t all the C++isms of Qt in the ocaml
application.
- this would make Qt available to any languages that have DBus.
For ocaml i am currently writing a pure ocaml DBus implementation [2].
[1] http://en.wikipedia.org/wiki/D-Bus
[2] http://forge.ocamlcore.org/projects/obus/
--
Jérémie Dimi
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 th
Dawid Toton writes:
> Make record fields acting as projection functions?
This can be done with camlp4 + type-conv, i put an example here:
http://www.dimino.org/projection.tar.gz
Jérémie
___
Caml-list mailing list. Subscription management:
http://yqu
Jan Kybic writes:
> Good morning. I have looked at ocamlopt and it looks very useful.
> Are there any plans to include macro expansion in ocamlopt?
Right now there is no plan for that. My only intention when i started
optcomp was conditional compilation, and i made choices making it
incompatib
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
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 "
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
Tiphaine Turpin wrote:
> has type string. But %a breaks this rule. Wouldn't it be simpler to have
> two separate directives which accept respectively string printers and
> channel printers, regardless of the outer printing function ?
Note that you can do it with batteries and the new printf.
The
Conglun Yao wrote:
> I tried to achieve the following syntax extension, but failed.
>
> Add expression .[ ] after a module name, inside .[ ] I want to refer
> to the specified module, like
>
> let _ = M1.M2.[ here is my syntax, using M1.M2 module ]
You should have a look at delimited overloadin
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 '
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,
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
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 "/Users/schmitta/godi/li
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 foo
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,
> yo
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
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":
>
On Mon, Jul 26, 2010 at 10:29:04AM +0300, Török Edwin wrote:
> Lwt's Lwt_preemptive seems to allow one to use 'preemptive
> threads' (which I assume are just usual OCaml threads).
> So would it be possible to put the file I/O on Lwt_preemptive.detach
> threads?
Yes.
> Has anyone tried to measure
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
On Mon, Jul 26, 2010 at 12:57:55PM -0700, Jake Donham wrote:
> > BTW it is planed to add some kind of asynchronous file I/O support in
> > Lwt by using mmap and mincore.
>
> How would this work? Is it possible to be notified when the page comes
> into core (mincore appears to support only polling)
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 (d
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
>
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 implementa
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
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
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
On Thu, Nov 18, 2010 at 06:40:51PM +0100, Goswin von Brederlow wrote:
> 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 m
On Thu, Nov 25, 2010 at 07:48:49PM +0300, Sergey Plaksin wrote:
>What's wrong in code? Why it raise Canceled exception?
It was a bug in Lwt 2.1.1, it has been fixed in the development version.
Cheers,
Jérémie
___
Caml-list mailing list. Subscriptio
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
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
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
On Mon, Dec 13, 2010 at 05:47:09PM +0100, David MENTRE wrote:
> Are there any example of the use of OBus?
There are small examples in the archive. I don't think there are yet
applications using it, except one i wrote as part of the control system
of a robot.
> Was OBus written for certain applica
On Thu, Dec 16, 2010 at 05:05:31PM +0100, 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/uni
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
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 mai
On Thu, Dec 16, 2010 at 05:54:52PM +0100, Hans Ole Rafaelsen wrote:
> Does this added requirement limit its portability to other platforms e.g.
> Windows?
No, libev should work on Windows.
--
Jérémie
___
Caml-list mailing list. Subscription management
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`
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.
T
39 matches
Mail list logo