Hello, in our project we have a lot of modules. Now, we need to include camlimages to create jpeg-files. But now, we got a namespace conflict, because our own...
13175
Philippe Strauss
philou@...
Feb 1, 2012 1:57 pm
... sure, don't use : open Camlimages and call : Camlimages.write_jpeg (module and function name are prob. wrong, just for the sake of the example). Still...
13176
Andreas Romeyke
andreas.romeyke@...
Feb 1, 2012 2:32 pm
Hello, ... The problem must have another reason. The interface for our color.ml will be searched in /usr/lib/ocaml/camlimages first, instead using them from...
13177
Philippe Veber
philippeveber
Feb 1, 2012 2:53 pm
Hi Andreas, If I understood correctly, you ran into a quite common problem, which is tedious to handle with caml. Indeed, if you link with camlimages, the ...
13178
Boris Hollas
hollas@...
Feb 5, 2012 10:02 am
Hello, according to the manual, the BatArray module can be used to override the Array module. Also, the notation Array.<function> is used in the manual. ...
13179
Philippe Veber
philippeveber
Feb 5, 2012 10:16 am
Hi Boris, you can use the notation Array.<function> once you open Batteries the Batteries module is essentially composed of definitions like module Array =...
13180
Boris Hollas
hollas@...
Feb 5, 2012 10:33 am
Hello Philippe, ... now the compiler complains that no implementation is provided for module Batteries. I use ocamlfind ocamlopt -package sdl,batteries...
13181
Philippe Veber
philippeveber
Feb 5, 2012 10:44 am
2012/2/5 Boris Hollas <hollas@...> ... Please double-check what I'm going to say, but this comes from a dependency of batteries on...
13182
Boris Hollas
hollas@...
Feb 5, 2012 11:06 am
... alright, this works. Quite confusing, though. -- Best regards, Boris [Non-text portions of this message have been removed]...
13183
Gabriel Scherer
ga_sche
Feb 5, 2012 11:51 am
The next version of batteries will remove Batteries_uni and use Batteries instead (hopefully only BatteriesThread would depend on threading). This is all...
13184
Joshua D. Guttman
joshua_guttman
Feb 5, 2012 2:31 pm
Suppose that I have an OCaml program that reads from an input channel and then writes to an output channel. What's the easiest way of attaching this to a web...
13185
Philip
feucht@...
Feb 5, 2012 2:36 pm
... Hi Joshua, imho, most easy is js_of_ocaml. Have a look at: http://ocsigen.org/darcsweb/?r=js_of_ocaml;a=summary greetings, Philip ... [Non-text portions of...
13186
Gabriel Scherer
ga_sche
Feb 5, 2012 3:14 pm
For a bit more information: js_of_ocaml is a compiler from OCaml to Javascript. If you want to distribute the (compiled) code of your application to your user...
13187
Ashish Agarwal
ashish_a1975
Feb 5, 2012 8:18 pm
On Sun, Feb 5, 2012 at 9:38 AM, Philip <feucht@...> wrote: ** ... For an introduction to js_of_ocaml, a better link is: ...
13188
Francois Berenger
f_berenger
Feb 6, 2012 2:30 am
... Hi, Is it not possible to use module Array = BatArray at the top of the file?...
13189
Francois Berenger
f_berenger
Feb 6, 2012 2:34 am
... Hello, How about the performances once compiled to javascript? Regards, F....
13190
Gabriel Scherer
ga_sche
Feb 6, 2012 8:21 am
... http://ocsigen.org/js_of_ocaml/manual/performances ... [Non-text portions of this message have been removed]...
13191
Ashish Agarwal
ashish_a1975
Feb 6, 2012 10:30 pm
... Sure, either way works. It just depends on how much you use Batteries. Do 'open Batteries' to get all the modules, or pick and choose by doing 'module Foo...
13192
Francois Berenger
f_berenger
Feb 7, 2012 12:25 am
... Interesting to know. Thanks!...
13193
Francois Berenger
f_berenger
Feb 7, 2012 7:06 am
Hello, Is there a way to determine if Random has been initialized? I'd like some of my functions to fail in case the RNG is used without having been...
13194
Boris Hollas
hollas@...
Feb 7, 2012 7:51 am
... why don't you just seed the RNG instead of checking if it had been initialized? [Non-text portions of this message have been removed]...
13195
Francois Berenger
f_berenger
Feb 7, 2012 8:17 am
... Because I don't want to reset the RNG or have to track several seeds. In fact, after a quick look at the code, I kind of think there is some default...
13196
Boris Hollas
hollas@...
Feb 7, 2012 9:45 am
... I don't see a problem here. You can seed your RNG multiple times, and each time you hopefully get a new sequence of pseudo random numbers. The seed just...
13197
Alexandre Gouraud
alexandre_go...
Feb 7, 2012 10:22 am
Though if you seed two times with two seeds that are "close" to each other, you might get two correlated sequences which is to be avoided. So it is better not...
13198
Boris Hollas
hollas@...
Feb 7, 2012 10:45 am
... That's right. Or you can apply another RNG to the seed. Also, many built-in RNG such as rand() in C provide low-quality random numbers. What does Ocaml...
13199
ocaml_beginners-owner...
Feb 7, 2012 11:49 pm
Hello to everybody! As I attempt to do every year, I've put online a downloadable version of the ML archive. It is at...
13200
Francois Berenger
f_berenger
Feb 8, 2012 12:59 am
... With ocamlbrowser, it is very easy to look at sources of the std lib of ... This is a lagged-Fibonacci F(55, 24, +) with a modified addition function to...
13201
Boris Hollas
hollas@...
Feb 15, 2012 3:10 pm
Hello, I often see code such as let typ = unrollType v.vtype in let loc = v.vdecl in Would it be better to write "and" for the second binding? -- Best regards,...
13202
Lukasz Stafiniak
luk_stafi
Feb 15, 2012 3:18 pm
On Wed, Feb 15, 2012 at 4:10 PM, Boris Hollas ... I second the question. The rule of parsimony says that we should use as many "and"s as logically possible so...
13203
Richard Stoerzer
rstoerzer
Feb 15, 2012 3:39 pm
On Wed, 15 Feb 2012 16:10:14 +0100 ... I prefer "and". This way it's apparent for the reader, that a) The second binding don't depend on the first one b) the...