Hello to everybody I've been studying the beautiful example of XML-oriented parsing written by Nicolas Cannasse and called XML Light. ... Code ... 1) Check out...
A couple of questions about classes: (1) What is the difference between a class with all virtual methods and a class type? Are they interchangeable? (2) Also,...
I tried the profiling example in the new Ocaml book, p.281ff. But I am not getting any information that seems worthwhile. I hope someone can help me... $ cat...
... There is little difference between the two. you can inherit from one, not from the others. but as you can do a class ['a] bar = object(_: 'a #foo) ... and...
Thanks for the reply. Just as a followup, is there an internal difference (more memory use, etc) between: class foo () = ... class bar ... = object ......
That does look reasonable. I am running FreeBSD 4.5-STABLE and using the gprof that comes with the distribution. Is anyone successfully profiling their OCaml...
Hi All, I have a type type testTyp = First | Second | Third | Umpteenth Is there a library function with the following behavior? f (First) = Second f (Second)...
... You can trick by doing ( only if your constructors does not have any parameters ) : let f x = (Obj.magic ((Obj.magic x : int) + 1) : 'a) but that won't...
... This function wouldn't work in the general case, e.g : type t = First of string | Second of int | ... ... If you just need a circular counter, you can...
Martin Jambon
m.jambon@...
May 7, 2002 8:01 am
270
I'm working through some of the exercises available in the O'Reily book that is available online at <http://caml.inria.fr/oreily-book/>. Here is what I came up...
Matt Armstrong
matt@...
May 8, 2002 7:04 pm
271
Hello, I got a problem, that only occurs in compilation and not in the toplevel (but the toplevel prints warnings about the type (should be unit)). Here is the...
Oliver Bandel
oliver@...
May 8, 2002 8:55 pm
272
... @ is O(n), so the whole function is O(n^2). ... It _is_ smart enough! ... Why not ... ? ... One optimization would be to accumulate by "head :: accum"...
Gerd Stolpmann
info@...
May 8, 2002 9:28 pm
273
... I guess you entered two phrases, ending every phrase with ";;". ... Either put ";;" after the "let rec" definition, or write let _ = charlist_of_string...
Gerd Stolpmann
info@...
May 8, 2002 9:35 pm
274
... Hi, I am new to this list and it was written that this is the place for not(yet)-caml-gurus, so I'll ask a question, even though some will maybe find it is...
... Good to know. ... Also good to know! :-) Actually I finally realized you can do it in this more efficient way: let rec merge_i a b = match (a, b) with ...
Le Wed, 8 May 2002 22:52:34 +0200 (MET DST) ... You forgot to end the definition of charlist_of_string with two semicolons. By the way, your code is...
Michel Quercia
michel.quercia@...
May 9, 2002 7:20 am
277
... Hi, and welcome to the group. let _ = expression ;; is just a way to say: "evaluate expression and ignore the result" As far as I know, "_" alone has no...
... I'm now using the name "xml mild" for the sake of putting the code online. You can download xml mild, that is not a library on its own but rather an ...
Hello, I want to play with ocamldap, but compiling the latest version (0.3) trigger a syntax error on a simple parser: philou@philou:~/src/ocamldap-0.3$ make ...
Philippe Strauss
philou@...
May 10, 2002 11:08 am
281
oops, forgot to mention my setup: current debian sid, with the following caml packages: philou@philou:~$ dpkg -l | grep -i caml ii camlimages 2.00-1...
Philippe Strauss
philou@...
May 10, 2002 11:17 am
282
... i don't even know what ocamldap is but did you try with camlp4? # #load "camlp4o.cma" before any [< >] expression. Bye Ernesto...
Hello to everybody I'm wondering whether in Ocaml one can roll up a string:string and then use a command that takes that string as a command, something like:...
... # let skryflys l lys = List.map (Printf.fprintf l "%s\n") lys; close_out l;; Toplevel input: # let skryflys l lys = List.map (Printf.fprintf l "%s\n") lys;...
Johann Spies
jspies@...
May 14, 2002 2:10 pm
285
... List.iter is what you need here. -- Rémi Vanicat vanicat@... http://dept-info.labri.u-bordeaux.fr/~vanicat...