Hi, I would like that a method of an object to be called when this object is finalized. Is it possible ? -- thanks...
Florent Monnier
fmonnier@...
May 2, 2006 6:54 am
5852
... I think the answer is _no_, because calling the method of an object assumes that you have a pointer to the object around, and if you have a pointer to the...
... I am discovering the Gc module thanks to your message. In the OCaml documentation, a warning says that the registered callback has to be out of the scope...
... This is my revised version, but I still can't get it to run the finaliser ... #!/usr/bin/ocamlrun ocaml let finaliser obj = obj#finaliser let () = let obj...
... I believe the problem here is that the compiler doesn't notice your object is unreachable when you call Gc.full_major: it is a bit unclear for me, but...
... Exactly. More precisely, when you compare let bla = new foo in let bla = () in bar baz to let bla = new foo in bar baz then if you bytecompile it, it is...
A version which works: let finaliser obj = obj#finaliser;; begin let obj = object (self) method hello = prerr_endline "hello" method finaliser = prerr_endline...
I'm trying to get unison up and running on HP-UX. my error is on the "make compiler" part. I get a core dump often cd stdlib; make COMPILER=../boot/ocamlc all ...
... Can you post the actual error message please. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team...
Shalom, Matt. ... MG> Or if you are writing a general-purpose library, where you cannot make MG> any assumptions about what is "typical data." In any case...
Shalom. I'm writing a library which works with one of three predefined implementations of some thing. If I will make a module of each implementation, their...
... [snip other methods] Does the user mind recompiling, or should the selection happen at runtime? What's your objection to functors + ocamldefun? That would...
Hi, type truc = A of int | B of int From the type above, is it possible to get the constructor and the value of an expression like this one (A 3) from the C...
Florent Monnier
fmonnier@...
May 5, 2006 6:42 pm
5864
Hello, I think about using ocamllex for scanning binary files. Can this be done somehow? (I have not found informations on how to give the lexer e.g. octal...
Oliver Bandel
oliver@...
May 8, 2006 11:09 am
5865
... Interesting... you can use any binary char code; '\xxx' (I think it has to be exactly three digits -- ie must zero pad). Jon...
Hi, I have core dump problems with the byte code, too. When you install ocaml, you should compile everything under byterun/ with gcc -O0. This solves the...
Christoph Bauer
Christoph.Bauer@...
May 8, 2006 11:48 am
5867
Does anyone have an example of a purely functional tree structure which allows one to update within the tree? I've been through several iterations of a...
... Without thinking too hard about your problem, it does seem as if zippers might be what you are looking for. It's fairly close to what you are trying here,...
... Also, Huet's paper is available online at: http://www.st.cs.uni-sb.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf William D. Neumann ... "There's...
Hi! I'm trying to install the rpm pachage ocaml-3.09.1-1.rhfc4.src.rpm on Fedora Core 5. But I got these messages: [root@ICT19-10 paola_lecca]# rpm -i...
Lecca Paola
lecca@...
May 9, 2006 1:31 pm
5871
Thanks. It was an interesting paper, but I'm now tempted to solve this imperatively :-( Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and...
... You're installing a source RPM for FC4 on FC5, which is basically why it doesn't work. Try rebuilding from the source RPM. Something like: rpmbuild -ba...
... Why!? Just enable the 'extras' repo and do: yum install ocaml You'll even get the latest ocaml. Matt...
Matthew Hannigan
mlh@...
May 9, 2006 10:58 pm
5874
That is the error message. "Don't know how to make ocamlc." Thanks in advance for the help. ... __________________________________________________ Do You...
... Oops. That should work better: input_char stdin Martin -- Martin Jambon, PhD http://martin.jambon.free.fr Edit http://wikiomics.org, bioinformatics wiki...
... Year, indeed :) I've updated it : http://www.linux-nantes.org/~fmonnier/OCaml/brainfuck.ml.php thanks! And for the OCaml style, is it good one? or there...
Florent Monnier
fmonnier@...
May 10, 2006 11:16 pm
5879
... A quick look at the code looks fine. Though in dump, instead of "((List.rev acc) @ buf)", just use "List.rev_append acc buf", which is tail recursive and...
... Thanks a lot! I've updated : http://www.linux-nantes.org/~fmonnier/OCaml/brainfuck.ml.php ... [...] ... Do you mean the esoteric characters ? These are...