Search the web
Sign In
New User? Sign Up
ocaml_beginners · Ocaml Beginners
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Messages 7024 - 7053 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
7024
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...
Christian Lerrahn
js.fan
Offline Send Email
Jan 5, 2007
3:02 am
7025
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...
Jonathan Roewen
consulatewizard
Offline Send Email
Jan 5, 2007
3:30 am
7026
... 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...
Robert Roessler
robertr959
Offline Send Email
Jan 5, 2007
4:47 am
7027
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....
Christian Lerrahn
js.fan
Offline Send Email
Jan 5, 2007
4:52 am
7028
... let newlist = ... in newgparticles opart gplist ~newghostparts:newlist And you'll get the warning about the optional argument not being able to be...
Jonathan Roewen
consulatewizard
Offline Send Email
Jan 5, 2007
5:38 am
7029
# let dbs = list_dbs db ();; val dbs : string array option = Some [|"mysql"; "radius"; "test"|] If I'm trying: # Array.length dbs;; I'm teceive: This...
al_kolesnikoff
Offline Send Email
Jan 5, 2007
6:26 pm
7030
... 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...
Martin Jambon
BioMim
Offline Send Email
Jan 5, 2007
6:51 pm
7031
... value ... Does this method only for work with "option type" ? Thank you very much for your answer! Alexander...
al_kolesnikoff
Offline Send Email
Jan 5, 2007
7:21 pm
7032
... 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...
Martin Jambon
BioMim
Offline Send Email
Jan 5, 2007
8:03 pm
7033
Hi, After a careful evaluation process, candidate languages for a proposed financial markets analysis programming project have been narrowed down to a very...
Eric Berend
tradewisdom
Offline Send Email
Jan 6, 2007
12:06 pm
7034
... 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, ...
Jon Harrop
harropjon
Offline Send Email
Jan 6, 2007
12:45 pm
7035
... int_of_float rounds down. # int_of_float 3.0;; - : int = 3 # int_of_float 3.4;; - : int = 3 # int_of_float 3.5;; - : int = 3 # int_of_float 3.6;; - : int =...
Eric Lavigne
lavigne.eric
Offline Send Email
Jan 6, 2007
2:06 pm
7036
... [...] 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@...
Send Email
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 *....
Eric Lavigne
lavigne.eric
Offline Send Email
Jan 6, 2007
3:08 pm
7038
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,...
Sachin Shah
zakaluka
Offline Send Email
Jan 6, 2007
3:12 pm
7039
... 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 ...
William Neumann
scoey13
Offline Send Email
Jan 6, 2007
5:07 pm
7040
... you can also use ceil : let precision_round x digits_after_decimal = let multiplier = 10. ** (float_of_int digits_after_decimal) in (ceil ((x *....
Remi Vanicat
dl_ens
Offline Send Email
Jan 6, 2007
7:00 pm
7041
... Beware of sign issues with ceil or int_of_float/truncate since ceil (-.x) <> -. ceil x -- Martin Jambon http://martin.jambon.free.fr...
Martin Jambon
BioMim
Offline Send Email
Jan 6, 2007
11:04 pm
7042
... Arghhh, no, not int_of_float or truncate. -- Martin Jambon http://martin.jambon.free.fr...
Martin Jambon
BioMim
Offline Send Email
Jan 6, 2007
11:16 pm
7043
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@...
Send Email
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...
Eric Lavigne
lavigne.eric
Offline Send Email
Jan 7, 2007
2:38 am
7045
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...
jshaw10
Offline Send Email
Jan 7, 2007
6:16 am
7046
... 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 ...
Robert Roessler
robertr959
Offline Send Email
Jan 7, 2007
10:14 am
7047
... 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...
Richard Jones
rwmjones
Offline Send Email
Jan 7, 2007
2:18 pm
7048
... 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...
Jonathan T Bryant
jonboy3182
Offline Send Email
Jan 7, 2007
5:14 pm
7049
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...
deech_99
Offline Send Email
Jan 7, 2007
7:19 pm
7050
... 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...
Lars Nilsson
larsn66
Offline Send Email
Jan 7, 2007
7:43 pm
7051
... 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...
Richard Jones
rwmjones
Offline Send Email
Jan 7, 2007
9:22 pm
7052
... 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...
deech_99
Offline Send Email
Jan 7, 2007
9:53 pm
7053
... 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...
Richard Jones
rwmjones
Offline Send Email
Jan 7, 2007
11:30 pm
Messages 7024 - 7053 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help