... I'm using the mingw version of OCaml under windoze. ocamlc and ocaml work properly when invoked from the DOS prompt, but ocamlopt doesn't. I suspect it's ...
6357
Bill James
w_a_x_man
Aug 2, 2006 7:59 am
I'm going to post this on comp.lang.ruby, where a C goon has been beating his chest and crowing about the fact that C is so much faster than Ruby and even...
6358
Bill James
w_a_x_man
Aug 2, 2006 8:40 am
... elements of ... let doubled a b = List.for_all2 (fun m n -> m = 2 * n) (List.sort compare a) (List.sort compare b) ;;...
6359
Richard Jones
rwmjones
Aug 2, 2006 9:01 am
... I don't have a faster version (see below for why), but I will make some comments on the code / coding style. ... On my computer this takes ages to run if I...
6360
Bill James
w_a_x_man
Aug 2, 2006 5:32 pm
... Yes, when running benchmarks like this one has to redirect the output. ... I had to make a program that did the same thing as the C program. ... Good...
6361
Brian Makin
merimus
Aug 2, 2006 7:00 pm
It appears that threads in ocaml are implemented as user level threads within a single kernel thread. Is there a kernel level thread module or some way to do...
6362
Richard Jones
rwmjones
Aug 2, 2006 10:36 pm
... It depends which threading library you use, but normally it will use kernel threads. http://caml.inria.fr/pub/docs/manual-ocaml/manual038.html Anyhow, the...
6363
Brian Makin
merimus
Aug 3, 2006 2:13 am
I have a C++ library which contains a class and I am trying to create an interface from ocaml. I have created something like this in a c++ file. extern "C" { ...
6364
prosysd
Aug 3, 2006 3:30 am
Hi Everyone, I am trying to read float values from file. When I read 2.03032177023e-40 and convert to a float with float_of_string, I get 0.0000. Can someone...
6365
Joshua Smith
kognative
Aug 3, 2006 3:39 am
I have some Ocaml and C code that can be found at (I would paste it in, but formatting and stuff makes it easier to post than paste). ...
6366
Jonathan Roewen
consulatewizard
Aug 3, 2006 3:47 am
I can only guess it's use of caml_copy_string mixed with caml_alloc_string. If you're going to copy a C-string (what caml_copy_string is for), perhaps try...
6367
prosysd
Aug 3, 2006 4:49 am
Please ignore this post. Thanks. George...
6368
Richard Jones
rwmjones
Aug 3, 2006 9:01 am
... Tricky one ... I would start by adding '-cclib -lXXX' where XXX is whatever library C++ programs need these days. That ought to get rid of at least two...
6369
Matthieu Dubuget
dubuget
Aug 3, 2006 9:31 am
... According to http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc229, you should use CAML macros. value create_class(value v1) { CAMLparam1 ( v1...
6370
Jon Harrop
harropjon
Aug 3, 2006 12:26 pm
... I just posted an improved version on there which is more array-based. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists ...
6371
Brian Makin
merimus
Aug 3, 2006 2:02 pm
Aight, changed to the CAML macros. also added -cclib -lstdc++ g++ -c -I/usr/lib/ocaml db.cpp ocamlmktop -custom -o foo_top db.o foo.ml -cclib -lstdc++ ...
6372
Richard Jones
rwmjones
Aug 3, 2006 2:32 pm
... This symbol should be coming from libcamlrun.a, normally found in /usr/lib/ocaml/<version>/libcamlrun.a Rich. -- Richard Jones, CTO Merjis Ltd. Merjis -...
6373
Brian N. Makin
merimus
Aug 3, 2006 2:59 pm
My c version sharing a struct works fine. camlrun is on the link line, it has the symbol in it. adding -lcamlrun doesn't help, and explicitly including ...
6374
William D. Neumann
scoey13
Aug 3, 2006 3:11 pm
... First of all, are you sure that the string is being read in correctly? If you print it out (or look at it in the toplevel, whatever), does it have the...
6375
Richard Jones
rwmjones
Aug 3, 2006 4:15 pm
I know in your original code you wrap the whole function definition with extern "C" { ... }. However is that sufficient to cause the call to caml_alloc to...
6376
Brian N. Makin
merimus
Aug 3, 2006 4:35 pm
Ummm, yea. That would be a problem. I wrapped my caml headers in extern "C" and it works fine. Anyone on the Ocaml dev team reading? If noone speaks up I'll...
6377
William D. Neumann
scoey13
Aug 3, 2006 4:44 pm
... They prefer you to just submit the bugs anyway, as that ensures it gets into the system. William D. Neumann ... "There39;s just so many extra children, we...
6378
Brian N. Makin
merimus
Aug 3, 2006 4:56 pm
will do....
6379
Chris Campbell
chrisdanx
Aug 3, 2006 9:11 pm
It works fine now. The problem was it would not compile but the library used to link wrong (should have used lablgtk2, not lablgtk). Sorry I wasn't clear....
6380
Brian N. Makin
merimus
Aug 4, 2006 7:36 pm
Anytime I try any of the example code with deals with streams and [< ... >] syntax I get a Syntax Error on '[<39; for example # [< '1 >] ;; ^^ Syntax error what...
6381
Jonathan Bryant
jonboy3182
Aug 4, 2006 7:42 pm
#load "camp4o.cma" --Jonathan Bryant...
6382
Matt Gushee
mcgushee
Aug 4, 2006 7:54 pm
... You're just following instructions. Unfortunately, the instructions aren't very clear on one essential point: you need CamlP4 to support the stream literal...
6383
Brian N. Makin
merimus
Aug 4, 2006 8:16 pm
dangit, I thought I had tried that. thank you very much. ... and [< ... instructions ... support the...
6384
Martin Jambon
BioMim
Aug 4, 2006 8:22 pm
I'd rather to that: (toplevel) #load "camlp4o.cma";; (compilation) ocamlc -pp camlp4o toto.ml -- Martin Jambon, PhD http://martin.jambon.free.fr...