... Yes, thanks. Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Who is like unto thee, O...
Johann Spies
jspies@...
Dec 1, 2006 11:35 am
6874
If the signature name of a module is conventionally written in capital letters why doesn't the Ocaml reference manual strictly adhere to this convention? What...
I am having some trouble trying Brian's module in my code: module MinHeap(Ord: Map.OrderedType) = struct This is a functor that takes a structure that adheres...
... Because it's not really a convention? I know that they use it in the manual in section 2, but that doesn't make it gospel. It's a bit like insisting that...
... Well, I haven't looked too much at the minheap code, so I'll use the Map module which uses the Map.OrderedType module type. Essentially, you need to make...
... You have to always rememder that when you put something in a file, filename.ml, the entire contents of that file is implicitly placed inside a module...
... Take Brian's code and save it in a file called 'minheap.ml' and compile it like so: ocamlc -c minheap.ml Then take the following and put it into a file...
If I try the following code it compiles fine type r = { n : int; mutable x : float } module MyMinHeap = Minheap.MinHeap( struct type t = r let compare r1 r2 =...
... The only rule is that the module name has to begin with a capital letter. Personally I'm glad they didn't use ORDEREDTYPE, because it's very hard to read....
... Thanks Rich and all the others who replied. I was looking at Unix.open_process_in but was uncertain how to use it in this case. I will look at your code. ...
Johann Spies
jspies@...
Dec 4, 2006 10:14 am
6884
Hello, I have the following code snippet (simplified): ..................................................... type node = { mutable chld : edge symlist } and...
Hello, I am collecting examples of pieces of codes leading to compilation errors difficult to interpret for newbies. If you have experienced such difficulties...
... Martin Jambon has been collecting such a list here: http://www.ocaml-tutorial.org/common_error_messages Rich. -- Richard Jones, CTO Merjis Ltd. Merjis -...
The sphere online judge has an apparently simple problem which has never been solved in ocaml before. http://www.spoj.pl/problems/MUL/ I'm trying to be the...
Hi, ... I see. ... I read this over several times. Still cannot figure out what is the problem (although I think it is because my example is immediately ...
I want to be able to do this on the command line program -i someinputfile -o someoutputfile *.log where for example *.log expands to 1.log 2.log 3.log and in...
Johann Spies
jspies@...
Dec 5, 2006 10:11 am
6894
Virgile, Appreciate the feedback. I will stick to "manual inlining" otherwise I will never see the end of this project. Regards, Hugo F....
... Sometimes asking a question helps me to get think clear ... ... but not if I type nonsense like this :( Apologies for that. Anyhow after reading getop.ml...
Johann Spies
jspies@...
Dec 5, 2006 10:29 am
6896
The link should work fine - it works even though I'm not logged in. Well anyway, you can just go to http://www.spoj.pl/ and browse to problem number 31....
I've gotten a little more information about the run time of the solutions I've tried on the spoj system: -bignum solutions require 4.5 seconds -array solutions...
[This is getting off-topic, but..] JShaw> The array solution is probably so bad because of the issues discussed JShaw> in the link I gave in my first post in...
... OK, well after looking at the problem specification, I can tell that whoever submitted it is a bit off their rocker. The spec calls for up to 1000...
William> simply converting from strings to numbers William> and back again takes about 47 seconds on my machine How about using a radix-10000 bignum...
... I don't suppose you have one lying around... BTW: in case anyone cares GMP provides an approximate 15x speedup, dropping my test time from ~75 seconds to...