... When you link an OCaml program, order of the compilation units matters. If a.cmo uses b.cmo, then b.cmo must be given first. You can't have mutually...
... Actually not so. Ocamlopt does very smart things to optimize these operations: see: http://www.merjis.com/developers/ocaml_tutorial/ch11/ Rich. -- Richard...
Hi all, Could anyone explain to me how to interpret map_file of the Bigarray lib? What I don't get is: "The data contained in this big array are the contents...
... This is a mapping, so the representation in the file must be exactly the same that the one in memory. (it is one of the reason why this is so efficient)....
Sorry, yes, of course, that is why it is mapping and not parsing, sure. BTW, if I create a bigarray, I can marshal it to and from a file with Marshal. But how...
... I don't see any other way that to map a new bigarray (in a shared map), and then to copy the one you want to save in it. ... It is not specified, and I...
Hello, I'm an OCaml newbie (actually, I'm new to functional languages altogether and, for all intents and purposes, to compiled languages as well). I've...
I have date and time types defined as: type date = { year : int; month : int; day : int; } type time = { hour : int; min : int; sec : int; microsec : int; ...
... The internal order of the fields follow the type definition (necessary for interfacing with C). But nothing is specified about the behavior of "compare"...
(There was a discussion on this a few months ago on one of the lists but I can't find it now ...) Does anyone have a library or code for sharing strings? I...
... I would have said the same. However, the strings will not be garbage-collected. Maybe using one which is based on weak pointers could be better. It exists...
... Ah yes, well spotted! So what's really needed is a weak hash table which only stores the strings once ... Rich. -- Richard Jones. http://www.annexia.org/...
... No, you just store a "pointer" value. You can also store () instead of the string itself, but I don't think it would make a big difference. Martin...
Hi all, I have (once again) a question about network in ocaml. I'm trying to write a simple "browser" but even after hours of reading about ocaml, network,...
... open_connection *should* work with Win2k. On the other hand, Andrei Formiga was saying on this list that he could not get it to work. The problem seemed...
... What you really want is to use "hash consing". The idea is similar to what is being already been posted(using a hashtbl), but you can also get a nice...
... [...] ... I don't know if perl4caml works with Win2K. If it does, then you'll be able to save yourself a lot of aggrevation by just using LWP::UserAgent...
In Haskell there's a way to make an ordinary function into an infix operator. I think the syntax is: f `map` [1;2];; (or whatever the equivalent Haskell...
... ... Yes you can, if your function takes 2 args. For instance: Objective Caml version 3.07+2 # let myfun x y = x + y;; val myfun : int -> int -> int = <fun>...
JM Nunes
Jose.deAbreuNunes@...
May 11, 2004 8:35 am
1925
... I'm aware of this, but in this case I want my functions to have easy to remember names. Rich. -- Richard Jones. http://www.annexia.org/...
This script runs without a problem on Debian Sid but not on Woody with 3.06 installed. I would like to know why? #!/usr/bin/ocaml #use "topfind";; (* On the...
Johann Spies
jspies@...
May 11, 2004 10:33 am
1928
... I guess it is because the system thinks that ocaml is a script (its first line is #!/usr/bin/ocamlrun), thinks it might be dangerous and uses /bin/sh. One...
... This is right - running scripts as interpreters is a security risk. Another solution is to compile your own toplevel. This is useful since you can also...
... Thanks Martin. That makes a difference. Now it complaining about the lines with #use and #require. I suppose one will have to compile that into a new...