On Sat, Nov 6, 2010 at 3:43 PM, Philippe Strauss wrote:
> still in my first cut at rpc, in my app I need to react on a file
> descriptor collectings logs for a child process, how do I transform
>
>let esys = Unixqueue.standard_event_system () in
[...]
Unixqueue.run esys
>
> to somethi
On Thu, Nov 4, 2010 at 2:26 PM, Philippe Strauss wrote:
> I need to use RPC in a current project of mine, but I don't get how do you
> write the type conversion and what is provided, taking a very basic example:
>
If you are using OCaml on both ends, you might prefer to use orpc:
http://jaked
On Sun, Oct 24, 2010 at 3:34 AM, Jon Harrop wrote:
> Is there a tutorial on using something like LWT for asynchronous
> programming
> in OCaml? I'm looking for an example like an echo server that handles
> clients concurrently without blocking threads, so it can handle thousands
> of
> clients wi
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_kin
On Tue, Sep 28, 2010 at 6:13 AM, Dmitry Bely wrote:
> I have two similar syntax extension that generate some functions for
> each type in the module:
>
> EXTEND Gram
> str_item:
> [ [ "type"; tdl = LIST1 type_declaration SEP "and" ->
> ...
> END;
There is not a good solution without mo
On Thu, Sep 23, 2010 at 11:49 AM, ben kuin wrote:
> thanks Jake, after browsing through those articles I came to the
> conclusion that for understanding and using camlp4 the notion of
> quotations and antiquotations is fundamental. My absolute lack of
> knowledge in this area might be a reason why
On Thu, Sep 23, 2010 at 8:25 AM, bluestorm wrote:
> For an accessible introduction to modern (>= 3.10) Camlp4, you may be
> interested in Jake Donham's blog post series "Reading Camlp4" :
> http://ambassadortothecomputers.blogspot.com/search/label/camlp4
You can also see the articles in sequence
On Thu, Sep 16, 2010 at 4:05 AM, ben kuin wrote:
> Is there a web server interface / adapter for ocaml that abstracts
> your application from the various web server implementations?
There is no OCaml equivalent to rack / wsgi. It would be nice to have
something like this; the existing web framewo
Hi list,
If you are interested in using Jeremy Yallop's patterns extension on
OCaml 3.12.0, I have fixed it up here:
http://github.com/jaked/patterns
I haven't tried anything serious with it but the tests pass.
Also I added a little extension for "alist patterns": a pattern
alist [ "foo", x
On Sun, Sep 5, 2010 at 6:05 AM, Christophe Papazian
wrote:
> I was playing with ocamljs. It's very nice to use ocaml to
> produce javascript ! I have a question : in ocamljs, there is a support
> for style objects. However, I do not see how to use them usefully because
> there don't seem to have s
Hi list,
If you are interested in using deriving on OCaml 3.12.0, I have fixed
it up here:
http://github.com/jaked/deriving
I haven't tried anything serious with it but the tests pass.
Jake
___
Caml-list mailing list. Subscription management:
http:
On Fri, Sep 3, 2010 at 12:07 AM, Hendrik Tews wrote:
> Great! Let's collect all our Camlp4 knowledge in this wiki!
> Hopefully the wiki can replace the non-existing documentation one
> day.
For people who haven't seen it, I have a number of Camlp4 articles at
http://ambassadortothecomputers.bl
On Sep 2, 2010, at 11:16 AM, Ruslan Ledesma Garza <
ruslanledesmaga...@gmail.com> wrote:
The first paragraph of http://brion.inria.fr/gallium/index.php/Camlp4 says:
[...] nicolas.pouill...@inria.fr
Ha, I looked everywhere but there. Thanks!
___
Caml-li
Hi,
I would like to make some contributions to the Camlp4 wiki at
http://brion.inria.fr/gallium/index.php/Camlp4
but the "login / create account" page does not actually allow an
account to be created, and I can't find any contact information on the
wiki itself. Can someone help me create an ac
Hi list,
I am happy to announce version 0.3 of ocamljs. Ocamljs is a system for
compiling OCaml to Javascript. It includes a Javascript back-end for
the OCaml compiler, as well as several support libraries, such as
bindings to the browser DOM. Ocamljs also works with orpc
(http://jaked.github.com/
On Mon, Aug 23, 2010 at 2:38 PM, Yoann Padioleau wrote:
> Is there any tutorial on why such features are useful ?
> Concrete examples of their use. For instance can you implement
> python generators and its yield stuff by using this library ?
Here is an example of a particular use of Delimcc to i
On Sat, Aug 21, 2010 at 8:27 PM, Jeffrey Barber wrote:
> example code:
> http://github.com/mathgladiator/node.ocaml/blob/master/test/kvp.ml
Have you considered using Lwt (http://ocsigen.org/lwt) as a layer on
top of raw continuation-passing style? It has a lot of nice functions
for writing asynch
On Mon, Jul 26, 2010 at 12:59 AM, Jérémie Dimino wrote:
> Yes, i tried it some time ago with two small C programs which were just
> reading a file on the disk. One doing read operations in a simple loop,
> and one launching a thread for each read operation (or reusing the same
> thread). The threa
On Mon, Jul 26, 2010 at 8:41 AM, Raphael Proust wrote:
> What I basically need is to get an AST with antiquotations and quotations
> being
> special nodes. How is this achievable w/o reimplementing a whole grammar?
There is already a special node for antiquotations, but not
quotations; see below
On Mon, Jul 26, 2010 at 8:41 AM, Joel Reymont wrote:
> What if the quotation is not valid OCaml syntax, e.g. C#, and a Camlp4 parser
> for it exists?
>
> How would I tie it all together to parse the quotation, plug in
> antiquotations and end up with the custom AST that my parser outputs?
Ther
Hi list,
I am happy to announce the release of version 0.2 of the froc library
for functional reactive programming in OCaml. There are a
number of improvements:
* better event model: there is now a notion of simultaneous events,
and behaviors and events can now be freely mixed
* self-adjusting
On Tue, Apr 13, 2010 at 1:33 PM, Gregory Malecha
wrote:
> It seems like it should work, but it doesn't work if the function f doesn't
> terminate. It seems to be running everything serially. I know that threads
> aren't actually parallel, but I thought they were preemptive in which case
> it seems
Hi list,
I am happy to announce version 0.3 of orpc, a tool for generating RPC
bindings from OCaml signatures. Orpc can generate ONC RPC stubs for
use with Ocamlnet (in place of ocamlrpcgen), and it can also generate
RPC over HTTP stubs for use with ocamljs. You can use most OCaml types
in interfa
On Mon, Mar 29, 2010 at 12:15 PM, C. Fr wrote:
> It there a way to get a backtrace for exceptions occurring in the toplevel
> (for example, getting more information when the stack blows)? I’ve read that
> there was an equivalent of the -b option that ocamlrun uses, but I couldn’t
> find any subseq
On Tue, Feb 9, 2010 at 7:30 AM, Guillaume Yziquel
wrote:
> http://ambassadortothecomputers.blogspot.com/search/label/camlp4
>
> is also a good link, covering the essentials to get started with camlp4, I
> think.
Thanks for the plug; the series is sadly incomplete but I hope to get
back to it very
On Sat, Jan 23, 2010 at 9:29 AM, Guillaume Yziquel
wrote:
> I am wondering how to use a debugger with libraries in the toplevel. As
> /usr/bin/ocaml is bytecode and that the exception is raised from OCaml and
> not from C code, I do not have a backtrace:
You may find this patch helpful; it adds b
On Sun, Dec 27, 2009 at 1:33 PM, Guillaume Yziquel
wrote:
> If someone knows how to use gdb on a bytecode executable to locate the
> segfault in MonetDB's .so file, I'd be quite happy to know.
You can just gdb ocamlrun, then run with the bytecode file as
argument. (Assuming you are not building i
On Tue, Oct 27, 2009 at 3:28 AM, Marc de Falco wrote:
> Hi, I've come across a very strange error, and I'm not sure if it is
> a bug or a feature.
>
> The following code :
> type 'a p = R of 'a t | E of float
> and 'a t = { mutable p : 'a p; c : 'a }
> let f =
> let x = sqrt(2.0) in
>
On Tue, Sep 15, 2009 at 5:42 AM, Anil Madhavapeddy wrote:
> I dont believe you can add comments with camlp4; I'm using type-conv to hack
> on an ORM layer, and it would be lovely to have the generated functions also
> have comments to not dirty up the OCamldoc. And also, to maintain sanity
> when
On Thu, Sep 3, 2009 at 6:05 AM, Edgar Friendly wrote:
> 8) Other (please explain)
>
Please take this with the caveat that I have little experience with
Batteries, but my impression (from following batteries-devel) is that it
changes OCaml significantly with Camlp4 extensions, and that it is not
On Mon, Aug 24, 2009 at 3:15 PM, Warren Harris wrote:
>> Lazy cells don't just defer, they also memoize the returned value once
>> the cell is forced.
>
> Thanks Jake - I guess I overlooked that in the manual.
Hope you're doing well. Best of luck on the CUFP talk.
Jake
__
On Mon, Aug 24, 2009 at 2:57 PM, Warren Harris wrote:
> Is there any advantage to using lazy evaluation in ocaml rather than just
> using thunks to defer evaluation? E.g.
>
> let x = lazy (3+4)
> let y = Lazy.force x
>
> vs:
>
> let x = fun () -> 3+4
> let y = x ()
Lazy cells don't just defer, the
On Wed, Aug 12, 2009 at 1:51 PM, Edgar Friendly wrote:
>> - If the source is invalid UTF-8 in any way, Ulex will raise Utf8.MalFormed.
>> I can therefore assume in subsequent steps that the source is compliant.
>>
> This is the weakest assumption of the four - Ulex could parse and only
> raise Ma
On Fri, Jul 17, 2009 at 4:18 PM, Serge Leblanc wrote:
> ocamlfind ocamlc -o test -package "camlp4" -linkpkg -syntax "camlp4r"
> ./test.ml
It's useful to add the -verbose option (after ocamlc) to see what
options are passed to camlp4. In this case it's getting the -rp
option, which is apparently
On Mon, Jun 22, 2009 at 5:24 PM, Daniel
Bünzli wrote:
> But in this "chunk" can you repeatedly get external (in the sense primitive)
> input ?
I looked at your breakout implementation and I think I understand your
concern now. In your code there is a top-level select loop that feeds
keystrokes and
On Mon, Jun 22, 2009 at 5:24 PM, Daniel
Bünzli wrote:
> But in this "chunk" can you repeatedly get external (in the sense primitive)
> input ?
>
> Because _if_ you can't then in the breakout game example where you need to
> constantly gather (external) time and keyboards events you cannot "pipe"
>
On Sun, Jun 21, 2009 at 5:03 PM, Daniel
Bünzli wrote:
> Does that mean the only values froc knows how to garbage collect are those
> values that are dynamically created in an update cycle and not used further
> ? (because that's rather contrived IMHO)
Everything in froc happens on a "timeline". Wh
On Sat, Jun 20, 2009 at 1:30 AM, Daniel
Bünzli wrote:
> Theoretically React may also work in browsers via o'browsers
> (http://ocsigen.org/obrowser) but I never tried.
I have not tried either, but from a cursory glance at the code I have
the impression that React's space safety relies on support f
On Fri, Jun 19, 2009 at 11:21 AM, Daniel
Bünzli wrote:
> Not directly responding to your question but you are looking for functional
> reactive programming (frp).
>
> http://erratique.ch/software/react
You can also find FRP in froc (which is quite similar to React; the
main difference is that it w
On Thu, Jun 18, 2009 at 7:41 AM, David Baelde wrote:
> Also, note that the call to read that raises the error is from the
> same module that tries to catch the exception.
>
> I'm lost, I'd like to understand when the exception is registered: at
> runtime initialization? In this case, only one shoul
On Tue, May 5, 2009 at 9:17 AM, Sébastien Hinderer
wrote:
> Is there some code available to load an RSA public key from a
> .der file ?
Maybe this is helpful:
http://code.google.com/p/ooauth/source/browse/trunk/pem2cryptokit.c
It takes a PEM file containing an RSA key and converts it to a
mar
Hi,
I am happy to announce the release of three related projects:
ocamljs 0.2: Javascript backend for ocamlc + libraries for web programming
orpc 0.2: generates RPC bindings from OCaml signatures (ONC RPC with
Ocamlnet or HTTP with ocamljs)
froc 0.1: library for functional reactive programm
On Fri, Apr 17, 2009 at 11:24 AM, Joel Reymont wrote:
> Can someone shed light on how, where and why three different
> parsers are required for camlp4? Is this still the case with 3.11?
I haven't read the Mainland paper so I don't know exactly what he's
talking about, but with the MetaGenerator m
On Wed, Apr 15, 2009 at 1:49 AM, Joel Reymont wrote:
> Suppose I have a camlp4 parser for C#.
>
> I want to include bits of C# in my code and end up with the AST.
>
> I want to have "holes" in the above AST to plug in values.
>
> I understand that antiquotations take car of filling the holes in th
On Fri, Apr 3, 2009 at 10:55 AM, Serge Sivkov wrote:
> I 've look through sources of the netplex. For now i clearly see how
> synchronious service works,
> but i don't understand workflow of anyncronious version of netplex
> services (i'm using ocamlnet-2.2.9).
Can you explain what you're trying
On Tue, Mar 10, 2009 at 3:07 PM, Joel Reymont wrote:
> I have it like this at the moment. Are you saying it won't work?
Here's an example of what I'm talking about:
open Camlp4.PreCast
let bar = Gram.Entry.mk "bar"
let baz = Gram.Entry.mk "baz"
let bar_or_baz = Gram.Entry.mk "bar_or_baz"
On Tue, Mar 10, 2009 at 11:41 AM, Joel Reymont wrote:
> inputDeclarations:
> [
>[ "Input"; ":";
> l = LIST1 inputDeclaration SEP "," -> l
>]
> ];
>
> Is it always necessary to write [ x = inputDeclaration -> x ] instead of
> just inputDeclaration?
I don't think this is ever necess
On Thu, Mar 5, 2009 at 12:44 PM, Jon Harrop wrote:
> Is this [the lambda IL] format documented anywhere?
The ocamljs backend compiles Javascript from the lambda intermediate
language. I haven't found documentation of it, but most of it is
pretty easy to understand (a few things I've had to track
On Tue, Feb 10, 2009 at 12:20 PM, David Rajchenbach-Teller <
david.tel...@ens-lyon.org> wrote:
> camlp4o -no_comments foo.ml
>
> understands option "-no_comments" correctly and pretty-prints the
> contents of foo.ml, minus comments
>
>
> However, when using camlp4o as a preprocessor,
>
> ocamlc -i
On Tue, Jan 6, 2009 at 6:03 AM, Paolo Donadeo wrote:
> For a serializer I'm writing I need to parse simple OCaml type
> expressions composed by OCaml basic types, tuples, options and lists.
This is pretty easy with Camlp4, although as you say there isn't much in the
docs to point the way. You m
Hi list,
I've started a series of blog posts about Camlp4, containing things
learned the hard way, with pointers into the Camlp4 source. Hope you
find them interesting and useful. I would be grateful for comments and
corrections.
http://ambassadortothecomputers.blogspot.com/
Jake
One more choice is Xmlm:
http://erratique.ch/software/xmlm
It is simpler than pxp and more complete/correct than xml-light.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http:/
you will find it useful.
Jake Donham, for Skydeck
___
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_begi
On Thu, Aug 7, 2008 at 11:13 PM, Alain Frisch <[EMAIL PROTECTED]> wrote:
> You should really avoid linking two modules with the same name.
Yes, I agree vehemently :). I would like the bytecode linker to help
me out by (at least) warning me when I do it by accident.
Jake
_
Hi,
Consider the following code:
a.ml: let a () = raise (Unix.Unix_error (Unix.E2BIG, "", ""))
b.ml: try A.a () with Unix.Unix_error (_,_,_) -> ()
compiled with
ocamlc -o test unix.cma a.ml unix.cma b.ml
Run it:
> ./test
Fatal error: exception Unix.Unix_error(0, "", "")
With except
On Mon, Jul 14, 2008 at 6:52 PM, Raj Bandyopadhyay <[EMAIL PROTECTED]> wrote:
> 'camlPervasives__$5e_136'.
It's the string concatenation function (ASCII 5E is ^).
It allocates a new string and blits the two argument strings into it,
so you can probably do much better with explicit use of the Buf
ck (and have a cell phone with a major
American carrier), drop me an email (of course you don't need a
Skydeck account to use the OAuth library).
Jake Donham, for Skydeck
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-
Hi list,
I expected the following program to fail with a parse error, but it
happily ignores the extra '+'. I would be grateful if someone could
point out what I'm doing wrong. Thanks,
Jake
open Camlp4.PreCast;;
let expr = Gram.Entry.mk "expr";;
let stmt = Gram.Entry.mk "stmt";;
EXTEND Gram
Hi list,
Why does
ListLabels.find (fun _ -> true) [];;
produce
Characters 16-31:
ListLabels.find (fun _ -> true) [];;
^^^
This expression should not be a function, the expected type is
('a -> 'b) list
I thought the rule was that "if an application is total
2008/5/10 Berke Durak <[EMAIL PROTECTED]>:
> On Sat, May 10, 2008 at 10:36 AM, Christophe TROESTLER <
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>>
> wrote:
>
> >
> > Is it what you want: http://caml.inria.fr/mantis/view.php?id=4265 ?
>
>
> That's a very nice thing to have. Please, Xavier, could you ex
60 matches
Mail list logo