The program is beginning to get large so I won't post it. Although I haven't tried with a cut down version yet. I think the first thing I need to do is install...
Matthew O'Connor
matthew.oconnor@...
Mar 4, 2002 2:24 am
156
Hello everybody I've found a nice function it's called List.split, and it's ready to use for problems like the one proposed by Johan some postings ago. # let...
Of course Rémi had already pointed that out, I see. Well! Learning is based upon repeating also... :-) Say that I wanted to say that List.split is "nice" ...
I have the following example code that I wish to get running. The coercions fail however. I want to know how I would get similar functionality without the...
Matthew O'Connor
matthew.oconnor@...
Mar 5, 2002 9:13 pm
159
Hello to everybody I'm playing with something funny, it's called STREAMS and it's a bit similar to lists. Here is a funny pattern matching: (* invoke someone...
I know it is heresy, but I would gladly give up pattern matching on record field names if I could reuse the same field names for different record types within...
... you could write it as let find_val = parser [< 'current >] -> 3 * current;; and you could make more interesting things : type expr_token = ... let rec...
Hi all, I have the following example code that I wish to get running. The coercions fail however. I want to know how I would get similar functionality without...
Matthew O'Connor
matthew.oconnor@...
Mar 6, 2002 11:56 am
164
?????????? OK, you say that your parser detects something like (,),+,*, and integers. ... type expr_token = ... Then you say that if the parser finds a...
... it's LL(1) parsing. When I wrote a parser, I alway do it in this way, because it simpler to say ... It's a classical example. It's easy once you have...
Hi, ... No, memory is not shared between processes. For every new connection, the whole memory of the master process is copied, and the connection starts with...
Gerd Stolpmann
info@...
Mar 6, 2002 10:41 pm
167
... So does the server fork away? ... Yes! they are three now and they keep being three. Are they "parent" and "children" rather than master and slaves? I must...
... I check this out and I find: LL(1): Left-to-right scan, Leftmost derivation, 1 solution fits all sub-problems. OK. ... OK ... Such as in expr+expr and...
... LL(1) parsing is done by calling different (recursive) function. So with this first grammar to parse the LL(1) parser will : - try to match expr + expr,...
Is it better to use a recursive function or an imperative loop with an exception? "Better" in this case means better in space or time usage... I don't have a...
... I've done a few benchmarks comparing recursive to imperative forms in OCaml, and I think the recursive forms may have a slight speed advantage. But I think...
Doug Bagley
doug+ml.ocaml_beginne...
Mar 8, 2002 4:17 am
172
... Yes, there is basically a fork() for every new connection. ... So the problem is that you have a graphics application, and you want to be able to react on...
Gerd Stolpmann
info@...
Mar 11, 2002 12:10 am
173
Using the following Makefile: OCAMLMAKEFILE=/usr/share/ocaml-tools/OcamlMakefile SOURCES=gtknw_glade_interface.ml gtknw_glade_callbacks.ml gtknw_glade_main.ml ...
Johann Spies
jspies@...
Mar 11, 2002 9:56 am
174
... You have to get the module Pcre. The /I +pcre tells that it should be present there. Nicolas Cannasse...
... I have it! I can compile the a bytecode (but not gtknw.opt) binary with the ... gtknw: dummy ocamlfind ocamlc -c -package lablgtk -labels -c...
Johann Spies
jspies@...
Mar 11, 2002 10:42 am
176
... It's not the problem here... once you have compiled, it may produce something like lots of files and pcre.cma + pcre.cmi try to copy theses in the ocaml /...
Why isn't the syntax for "mutable" similar to other types? I would much rather write: type foo = { bar : int; baz : int mutable; } than type foo = { bar :...
... "Mutable" does not qualify the type, it qualifies the record field. In this example: ints never change, but the actual int you store in 'baz' may be...
Le Mon, 11 Mar 2002 17:21:02 -0000 ... After a colon you must write a type expression, so "int xxx" denotes some type constructed with the type constructor...
Michel Quercia
michel.quercia@...
Mar 11, 2002 5:46 pm
180
Solution: add LIBDIRS to the Makefile: OCAMLMAKEFILE=/usr/share/ocaml-tools/OcamlMakefile SOURCES=gtknw_glade_interface.ml gtknw_glade_callbacks.ml...
Johann Spies
jspies@...
Mar 12, 2002 7:51 am
181
Hi. I have a stylistic question on the use of modules. Suppose I have a data structure for which I want to provide several different implementations (e.g....
Henrik Motakef
henrik.motakef@...
Mar 14, 2002 9:35 pm
182
# let p = Sys.getcwd;; val p : unit -> string = <fun> # p;; - : unit -> string = <fun> So how do I know what the current working directory is? I thought this...
Johann Spies
jspies@...
Mar 20, 2002 8:00 am
183
... the type of p is unit -> string so you need to give it an unit as parameter to get the string back. # let p = Sys.getcwd ();; ( In your sample, you where...
you have to do p ();; () is the first argument needed by your function (the equivalent of Sys.getcwd) you can do thing like that if you need a short cut for...