Bonjour mon ami, I am trying to write a tetration to a file and it is not going so well. The math is very simple, but my computing resources and skills are a...
12532
tim_lavoie
Mar 28, 2011 6:06 pm
Hello, I was wondering if it is possible to create a type which is basically a normal integer, but restricted to a specific range of values. I know I could...
12533
Ashish Agarwal
ashish_a1975
Mar 28, 2011 8:59 pm
Here's a similar post that discusses restricting integers to natural numbers: http://tech.groups.yahoo.com/group/ocaml_beginners/message/12251 ... [Non-text...
12534
tim_lavoie
Mar 29, 2011 3:39 am
... Perfect, thanks! The data type solution was the sort of thing I was looking for, and should be easily applied to a variety of needs....
12535
Jianzhou Zhao
zjzzjz2007
Mar 30, 2011 6:07 pm
Hi, How does Ocamlbuild know that it needs to recompile a target if the dependent libs of the target were updated? I set the dependent libs in myocamlbuld.ml...
12536
ygrek
ygrekheretix
Mar 30, 2011 7:27 pm
On Wed, 30 Mar 2011 14:06:54 -0400 ... Currently - no. But one can "easily" automate this : write myocamlbuild.ml to look into all included directories and...
12537
Jianzhou Zhao
zjzzjz2007
Mar 30, 2011 8:59 pm
... What is the best way to compute such hash of these Ocaml objects? ... -- Jianzhou [Non-text portions of this message have been removed]...
12538
Sylvain Le Gall
gildor16478
Mar 31, 2011 11:11 am
This mail is a copy of a post you can find here: https://forge.ocamlcore.org/forum/forum.php?forum_id=781 == Hacking day == There will be hacking day...
12539
ygrek
ygrekheretix
Mar 31, 2011 6:42 pm
On Wed, 30 Mar 2011 16:59:39 -0400 ... Any reasonable hash will do, e.g. MD5 (implemented by Digest module in stdlib). -- ygrek http://ygrek.org.ua...
12540
Jaques Bertrand
bertrandjaques
Apr 3, 2011 8:39 pm
Hi, I did not have much success with pa_do module. I did get the program 'tetration39; compiled, but running it gave me "Fatal error: exception Out_of_memory. ...
12541
philippe_sismondi
philippe_sis...
Apr 3, 2011 11:04 pm
Hi there. I'm a total beginner, coming from Haskell. I'm learning from the Oreilly book. So far OCaml looks pretty friendly! Why must one put spaces around add...
12542
Sergei Steshenko
sergstesh
Apr 4, 2011 1:08 am
I am a total beginner, coming from Perl. For '+' it works for me without spaces: " sergei@amdam2:~/junk> ~/AFSWD/install/ocaml-3.12.0/binsh/ocaml Objective...
12543
Ashish Agarwal
ashish_a1975
Apr 4, 2011 7:44 pm
Work with or without spaces for me: # ( + );; - : int -> int -> int = <fun> # (+);; - : int -> int -> int = <fun> On Sun, Apr 3, 2011 at 7:04 PM,...
12544
philippe_sismondi
philippe_sis...
Apr 5, 2011 2:40 am
My bad. It's an emacs thing - tuareg mode seems to cause this. No spaces are required when I run ocaml toplevel directly in a shell. Thanks....
12545
Jaques Bertrand
bertrandjaques
Apr 6, 2011 4:26 am
Hi Folks, Thanks for the help and the encouragement. I was able to produce 78,914 digits using following steps in the toplevel. The larger example (2 ** (3 **...
12546
vincent
vincent.arav...
Apr 7, 2011 8:31 am
Note that you can still use "*" as a value but then you indeed need spaces around it....
12547
kicszm
Apr 7, 2011 7:31 pm
What are the %( fmt %) and %{ fmt %} patterns for? I can't even get the compiler to recognize my attempts to use them, so I can't figure out what the purpose...
... There are for using pattern in pattern: let print_money currency_fmt sum = Printf.printf "ammount due: %(%i%)" currency_fmt sum let print_dollar sum =...
12549
kicszm
Apr 8, 2011 7:32 am
Thanks! I was trying to use it with named strings which would be most useful for what I'm trying to do. Apparently the type checker requires literals. I'm...
12550
Hugo Ferreira
hugotwo3
Apr 8, 2011 8:57 am
Hello, I would like to input a float (say 1.1) and use it as a Num.num. How should I go about this? Their doesn't seem to be a direct way to do this. Note that...
12551
Francois Berenger
f_berenger
Apr 8, 2011 9:13 am
... ocaml /usr/local/godi-3.11/lib/ocaml/std-lib/nums.cma open Num;; div_num (num_of_int 11) (num_of_int 10);;...
12552
Hugo Ferreira
hugotwo3
Apr 8, 2011 9:52 am
... I was looking for a standard and general form of input. I am aware that I can implement the above in a generic form but was hoping this was already done. ...
12553
Chantal Keller
chantal.keller@...
Apr 8, 2011 9:57 am
Hi, ... Rather than rewriting a formatting function from scratch, you can use the standard one and cheat on types using the Obj [1] library. That way, you can...
12554
Chantal Keller
chantal.keller@...
Apr 8, 2011 10:00 am
... I should have warned you that this is very dangerous, though. And you lose all the good properties ensured by OCaml's type system. -- Chantal KELLER...
... Nope, it require object of type format and not of type string. You could put them in variable: #let st = format_of_string "%a";; val st : (('a -> 'b -> 'c)...
12556
Jianzhou Zhao
zjzzjz2007
Apr 10, 2011 1:32 am
Hi, I am using ocamlbuild to compile multi-targets---some *.native and *.cma. I wanted to clean only some targets but not all of them. But ocamlbuild -clean ...
12557
Jean Saint-Remy
jeansaintremy
Apr 10, 2011 6:04 am
Hi, My apologies for asking silly question. Is there a good tutorial on how to build lablGTK for OCaml? I have been trying to build and configure lablGTK2, but...
12558
Matthieu Dubuget
dubuget
Apr 10, 2011 6:38 am
Hello, I never compiled lablgtk, I think. But I have a doubt: ... Sorry if the question is offensive, but did you install the *-dev version of those packages? ...
... Well, lablgtk is not low level enough to care about wich kernel you use (it true of most if not all ocaml library). What would be interesting is which...
12560
Philippe Strauss
philou@...
Apr 10, 2011 10:00 am
all those dependencies are optional, not required btw....