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...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 7472 - 7501 of 11541   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
7472
It's amazing how fast OCaml deals with factorial computations up to 170 using Float type. Since the result is like 7.25741561531e+306, I would like to see it...
LORENZO
arniwarp
Offline Send Email
Apr 3, 2007
3:56 pm
7473
... You do realize that performing 170 multiplications using normal floating point numbers shouldn't take a whole lot of time, regardless of what language is...
Lars Nilsson
larsn66
Offline Send Email
Apr 3, 2007
4:06 pm
7474
... OK... this is a good example of where floating point computation might let you down -- it's not exact. Consider your example above, computing 170! using...
William D. Neumann
scoey13
Offline Send Email
Apr 3, 2007
6:03 pm
7475
... One other thing to note here. If you are satisfied with an approximate answer, such as the one computed by the float factorial, you may also be happy with...
William D. Neumann
scoey13
Offline Send Email
Apr 3, 2007
6:44 pm
7476
Hello, I would like to know witch is the best documentation generator for OCaml so that in the end I can have something looked alike the C programing ...
Manuel Preliteiro
mpreliteiro
Offline Send Email
Apr 4, 2007
2:25 pm
7477
... Well, I have no idea what you mean by teh C programming documentation, but the two documentation generators I use are ocamldoc and ocamlweb. OCamldoc is...
William D. Neumann
scoey13
Offline Send Email
Apr 4, 2007
3:37 pm
7478
I've adapted Dave Benjamin's notes into a quick tutorial on the wiki: http://www.ocaml-tutorial.org/ledit martin...
Martin DeMello
martindemello
Online Now Send Email
Apr 4, 2007
5:27 pm
7479
module MultiSet = Map.Make(struct type t = char let compare = compare end) let add letter bag = try let n = MultiSet.find letter bag in MultiSet.add letter...
Martin DeMello
martindemello
Online Now Send Email
Apr 4, 2007
8:48 pm
7480
... What's causing it is that the semicolon expects the expression in front of it to have type unit. That is, a; b us sort of like let () = a in b, only the...
William D. Neumann
scoey13
Offline Send Email
Apr 4, 2007
9:05 pm
7481
... Solved it - should've been with Not_found -> let _ = MultiSet.find '*' bag in bag;; martin...
Martin DeMello
martindemello
Online Now Send Email
Apr 4, 2007
9:07 pm
7482
... Just to make sure I've understood the issue, is the right way to look at it that MultiSet.find produced an int, so something had to consume the int, even...
Martin DeMello
martindemello
Online Now Send Email
Apr 4, 2007
9:08 pm
7483
... <snip> Thanks for the explanation. This one seems like the nicest option ... though ignore probably makes the intention more explicit. Is calling something...
Martin DeMello
martindemello
Online Now Send Email
Apr 4, 2007
9:17 pm
7484
... Depends on who you ask. I agree that they tend to be overused, and something like the option types of version 4 are better. Why? There are a few...
William D. Neumann
scoey13
Offline Send Email
Apr 4, 2007
9:53 pm
7485
... I don't think it's necessarily bad style. But if I were going to choose between the options he gave, I would have to say that... let remove_blank bag = try...
Karl Zilles
kzilles
Online Now Send Email
Apr 4, 2007
9:57 pm
7486
... Nice, thanks! I also got it to compile using OCamlMakefile - here's the Makefile I used: OCAMLMAKEFILE = OCamlMakefile RESULT = ledit SOURCES = cursor.mli...
Dave Benjamin
ramenboy420
Offline Send Email
Apr 4, 2007
10:27 pm
7487
Hi ! I've 2 questions about this module : * I have no idea about any possible use of Hashtbl.fold... * Iterating through the table by key ? Hashtabl.iter doc...
Fabrice Marchant
fabrice.marc...
Offline Send Email
Apr 5, 2007
10:40 am
7488
... Hashtbl itself is a little bit strange because of the single key / multiple value thing. It was originally designed to store the symbol tables inside the...
Richard Jones
rwmjones
Offline Send Email
Apr 5, 2007
4:28 pm
7489
this is in revised syntax: open Tk; value root = opentk (); value entry = Entry.create root; bind ~events:[`KeyPress] ~action:(fun event -> Printf.fprintf...
jshaw10
Offline Send Email
Apr 6, 2007
1:21 am
7490
I just got the same result under windows....
jshaw10
Offline Send Email
Apr 6, 2007
2:44 am
7491
... Hash: SHA1 Hi, I am seeing some unintuitive behavior that I can't understand. I have a simple module type signature: module type Mytest = sig val id : int...
Peng Zang
peng.zang@...
Send Email
Apr 6, 2007
3:10 pm
7492
This is a bit confusing, but module signatures and function signatures are different beasts. A module signature is its interface... the module signature...
jshaw10
Offline Send Email
Apr 6, 2007
5:20 pm
7493
... Hash: SHA1 Ahh.. of course, your explanation makes perfect sense. A module signature defines an interface and is used for restricting. It cannot...
Peng Zang
peng.zang@...
Send Email
Apr 6, 2007
6:11 pm
7494
Hi Rich ! Thank you for your precious answer. ... Ah, this solves my two questions ! It is useful to build a list from the table. I will hack your Counter.read...
Fabrice Marchant
fabrice.marc...
Offline Send Email
Apr 6, 2007
10:40 pm
7495
... Hash tables are faster and smaller than maps in OCaml. Hash tables provide a default structural hash function which, when it works (when structural ...
Jon Harrop
harropjon
Offline Send Email
Apr 7, 2007
1:53 am
7496
... In addition to Jon's answer: Map requires use of the functor syntax. This can be quite obscure -- I know that I usually have to look up the syntax when I...
Richard Jones
rwmjones
Offline Send Email
Apr 7, 2007
8:42 am
7497
... I added an article to the Wiki describing how you can use Ledit with OCamlMakefile, including findlib support: ...
Dave Benjamin
ramenboy420
Offline Send Email
Apr 7, 2007
6:17 pm
7498
... Also, since Map requires the type of keys to be given at module construction time, it's not possible to do certain things with Map like write a function...
Dave Benjamin
ramenboy420
Offline Send Email
Apr 7, 2007
8:39 pm
7499
... On the contrary, there are many ways to abstract that function. The simplest is to factor out the fold that is used: let keys fold m = List.rev...
Jon Harrop
harropjon
Offline Send Email
Apr 7, 2007
10:11 pm
7500
Thanks Jon for the explanations about differences between Map and Hashtbl. I wonder how it is possible to discover these properties because I do not saw such a...
Fabrice Marchant
fabrice.marc...
Offline Send Email
Apr 7, 2007
10:29 pm
7501
... Read my book. :-) While you're there, please add it to the list of books on Wikipedia's OCaml page! -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml...
Jon Harrop
harropjon
Offline Send Email
Apr 8, 2007
2:32 am
Messages 7472 - 7501 of 11541   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

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