Hi, I have this snippet of code that drives me crazy. I just don't see why my types are mismatching. It's rather ugly code anyway but I couldn't think of a...
It's because your optional argument can't be erased, confusing the type checker. Adding an explicit type (foo list) to newghostparts, Expecting function has...
... Just to emphasize this point, from "4.1.1 Optional arguments" of the OCaml manual we have "A function taking some optional arguments must also take at...
Hi Jonathan, I feel stupid but I didn't understand your remedy. I tried to explicitly state the type of my optional argument but the error stayed the same....
... let newlist = ... in newgparticles opart gplist ~newghostparts:newlist And you'll get the warning about the optional argument not being able to be...
... Your dbs object is not exactly an array, it is an option type: its value is either "None" or "Some a" where "a" is an array. If you want to get the length...
... No, it's a very general and powerful mechanism in OCaml. These kind of types are called sum types or variants, and the "match with" stuff is what is called...
Hi, After a careful evaluation process, candidate languages for a proposed financial markets analysis programming project have been narrowed down to a very...
... Indeed, F# has many useful features that OCaml lacks and concurrency is one of them. However, there is a considerable cost to having a concurrent GC and, ...
... [...] Shouldn't it be easy toparallelize, when using fork() to make seperate processes? There is one thing that would be nice to have: IPC. Ciao, Oliver...
Oliver Bandel
oliver@...
Jan 6, 2007 2:11 pm
7037
... # let precision_round x digits_after_decimal = let multiplier = 10. ** (float_of_int digits_after_decimal) in (float_of_int (int_of_float ((x *....
Hi, The best way is to download the OCaml source code. Under the 'otherlibs/num' directory, you will find ratio.ml[i]. Neither file is flush with comments,...
... You need to load it first. From the manual: Programs that use the num library must be linked as follows: ocamlc [other options nums.cma other files ...
... you can also use ceil : let precision_round x digits_after_decimal = let multiplier = 10. ** (float_of_int digits_after_decimal) in (ceil ((x *....
On Sat, Jan 06, 2007 at 03:07:50PM +0100, Oliver Bandel wrote: [...] ... [...] Especially SharedMem would be fine. Thinking about it.... wouldn't it be...
Oliver Bandel
oliver@...
Jan 6, 2007 11:16 pm
7044
... My int_of_float version is rather long, and also always rounds up for negative numbers. It looks to me like Remi's ceil version always rounds up. It seems...
If I'm understanding http://en.wikipedia.org/wiki/Reentrant as describing your problem, it seems like Unix.fork (ie fork()) would do the trick. Threads made...
... You might want to check out a recent announcement on the OCaml list from Gerd Stolpmann on December 28 titled "ocamlnet-2.2 released". Robert Roessler ...
... OCaml code can run in at most one thread at a time, and the reason for that is that the garbage collector isn't reentrant. If it was reentrant, it'd pay a...
... Maybe I'm oversimplifying, but since the "-thread" option is already needed to enable threaded code, couldn't there be a "-multithread" option to enable a...
Hi all, I am considering Ocaml for a project where a client requests JPEG images from multiple databases running on remote machines. On the client GUI I want...
... I think it would work ok, if you indeed plan to sleep in the threads most of the time. I believe the blocking functions (like sleep) releases the mutex...
... OCaml does have thread support, so this will work fine. You're a bit vague on essential details like what database(s) you're querying and what GUI system...
... At this prelim stage I am thinking of using Sqlite and Labltk (is there a better GUI library in ocaml?). I have not started coding and I am a complete...
... Okayyyy. SQLite is a fine choice of database, but (AIUI) it's not the sort of database which needs a server, so I'm not sure in what sense such a database...