];
Options.ocaml_libs := [ unix; oUnit];
| _ - ()
end;;
--8--
Then you can just invoke ocamlbuild test_setup.native.
Cheers,
--
Stéphane Glondu
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml
Warren Harris wrote:
I've been wondering whether the ocaml compiler does any sort of
parameter passing optimizations for data structures, e.g. stack
allocating, or destructuring them when it can determine their scope does
not escape the call. My first conclusion is that it does for tuples
Jan Kybic wrote:
I would need an equivalent of Printf.sprintf where the
format string is not constant, it is read from the command line.
The motivation is to let the user specify a template for file names,
such as img%03d.png. Can this be achieved in Ocaml? It seems not, as
bill yan a écrit :
I noticed there are some static libraries(.a) installed with ocaml, for
example, /usr/lib/ocaml/bigarray.a. What's the purpose of those static
libraries? Thanks a lot.
They contain (natively) compiled OCaml code. An OCaml library compiled
in native mode (usually) consists
Jason Noakes wrote:
Are there any tools or examples that would allow me to take a .cmo or .cmx
file and produce a list of the external modules that are referenced from
that file?
There is ocamlobjinfo. But it seems to work only with bytecode objects
(.cmo/.cma).
If I could just read a list
Hello,
Are there cases where ocamlopt -shared is useful without -linkall?
Cheers,
--
Stéphane Glondu
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Stefano Zacchiroli wrote:
How can I tell ocamlbuild to copy into the _build/ directory my
snippets?
You can use copy_rule in a plugin.
Cheers,
--
Stéphane
___
Caml-list mailing list. Subscription management:
Stefano Zacchiroli wrote:
Still, the idea of doing the pack on the client-side is an interesting
one. [...]
BUT
that would horribly break down with checksum assumptions, I believe.
It would also mean someone's executables (contents and size) will depend
on the libraries installed during
Richard Jones wrote:
coq
--
Strange camlp4 problem, not yet resolved. Maybe just a missing
BuildRequires:
OCAMLClib/pp.mli
OCAMLC4 lib/pp.ml4
sh: camlp4o: command not found
File lib/pp.ml4, line 1, characters 0-1:
Error: Preprocessor error
This is
Jacques Carette a écrit :
I have two (related) questions:
1) Has anyone transcribed the TypeRep library into ocaml?
http://people.cs.uu.nl/arthurb/dynamic.html
2) How do I embed 'dynamically known' data into a single ocaml
data-structure?
[...]
You might be interested by the following:
Jacques Carette wrote:
You might be interested by the following:
http://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/lib/dyn.ml?rev=5920root=coqview=markup
Scarily enough, I do believe that that is exactly what I need. I guess
I was hoping to avoid Obj, but this may be one of those
Erick Matsen a écrit :
[...]
/usr/lib/libblas.a(xerbla.o): In function `xerbla_':
(.text+0x0): multiple definition of `xerbla_'
/usr/lib/liblapack.a(xerbla.o):(.text+0x0): first defined here
/usr/lib/ocaml/3.10.2/libasmrun.a(unix.o): In function `caml_dlopen':
(.text+0x223): warning: Using
Gerd Stolpmann a écrit :
I've just uploaded findlib-1.2.4. This is a bugfix release:
* For ocaml-3.11 some camlp4 libs no longer include dynlink.
Findlib has a fixed META definition.
* Bigarray needs unix: This has been fixed in the META file, too.
* Attempt to fix
Sam Steingold a écrit :
I would like to announce the release of otags version 3.09.0 for
ocaml 3.09.0. otags generates tags files for both emacs and
vi/vim from ocaml sources.
has this project been abandoned?
what do people use instead?
I won't answer directly to the question. However,
Stéphane Glondu a écrit :
I won't answer directly to the question. However, the last upstream
version seems to be 0.9.3.3:
http://www.cs.ru.nl/~tews/otags/
And the version in Debian is 0.9.3 and it compiles with the following
patches: [...]
Of course, replace 0.9.3 with 3.09.3
Alan Schmitt a écrit :
[...] For instance, could I use lwt under Windows?
FYI, Unison uses lwt and works under Windows.
Cheers,
--
Stéphane
___
Caml-list mailing list. Subscription management:
John Prince a écrit :
4) What kind of YAML support is there? I've seen an ad-hoc writeup to
read in JSON in an ocaml program, but I'm much more familiar with YAML.
http://ocaml-syck.sourceforge.net/
It is packaged in Debian. I've never used it, though...
Cheers,
--
Stéphane
Joel Reymont a écrit :
That would be my fault (I guess). See PR#3047. I haven't tested the
patch with the ocamlbuild-based build system, but I guess initgroups.o
and setgroups.o are missing from otherlibs/unix/libunix.clib... Could
you check that updating libunix.clib solves your build
Sylvain Le Gall a écrit :
Xavier talked a little about it on 2009 OCaml Meeting. It seems that he
is interested in maintaining it but there is problem with floating point
computation (depending on some modes you can have hard/soft/semi-soft...
floating point computation). I don't know the
Damien Doligez a écrit :
We need you to test this on as many system types as possible. Please
report success or failure to damien.doli...@inria.fr as usual.
It looks like ocamlbuild plugins do not work anymore... maybe because
`ocamlbuild -where` now points to the same location as `ocamlc
Sébastien Hinderer a écrit :
Just out of curiosity: does anybody see what could cause the -lcurses
flag to be present when -custom is specified ?
OCaml has probably been compiled this way. You can see configure options
in `ocamlc -where`/Makefile.config.
I guess this is just a trivial
Damien Doligez a écrit :
It is our pleasure to celebrate the 30th anniversary of the first
human-powered flight over the English channel by announcing the
release of OCaml version 3.11.1. This is mainly a bug-fix release,
see the list of changes below.
It is available here:
Romain Beauxis a écrit :
We have had a strange bug report on our code. Somehow, an Unix.Unix_error
exception was not caught while it ought to be. See:
http://savonet.rastageeks.org/ticket/269
[...]
We believe that the issue is raised because the module that uses Unix.read is
compiled
David Baelde a écrit :
Both liquidsoap and ocaml-duppy are compiled with -threads, so they
are using the same version of Unix. Duppy is not linked against Unix,
only requires it through ocamlfind. Could it be that ocamlfind (on
some versions) links Unix twice in liquidsoap? I did not know it
Warren Harris a écrit :
Is there any advantage to using lazy evaluation in ocaml rather than
just using thunks to defer evaluation? [...]
Two things I can think of right now: they are evaluated only once (even
if you call Lazy.force several times), and you can do pattern matching
with them.
Jean-Christophe Filliâtre a écrit :
I like writing my own libraries when I need some.
Unfortunately, many people do that.
The problem with this approach (from a FOSS point of view) is with
external contributors (who can fix bugs or develop features). A (big)
project using non-standard libraries
Pierre Etchemaite a écrit :
I imagine there are a fair number of people who take parts bits and
pieces out of the batteries sources and use those in their projects.
I've seen this in too many OCaml projects indeed, and that approach
has its own problems too. Fixes and improvements do not
Daniel Molina a écrit :
I have searching in the net about ocaml compatibility for automake. I
have found a patch from automake by Tom Murray in 2003
http://sourceware.org/ml/automake/2003-12/msg00153.html
There are autoconf macros for OCaml available there:
Vincent Aravantinos a écrit :
There is also this project:
http://forge.ocamlcore.org/projects/ocaml-autobuild/
which seems quite dead, though.
The last commit was two months ago:
http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ocaml-autobuild;a=summary
I don't think this qualifies as
Mikkel Fahnøe Jørgensen a écrit :
But this requires the function to be designed in a clean way and
conform to certain monadic rules, and getting it wrong creates a mess
in the type errors.
Actually, I find the typing discipline enforced by the monadic
abstraction very helpful (and elegant).
Hello,
The Lwt team is pleased to announce the release of Lwt 2.0.0. You can
download it at:
https://ocsigen.org/lwt/install
This new version brings a lot of new features, including:
* GLib integration: it is now possible to write cooperative
application using GTK!
* Terminal
Mathias Kende a écrit :
let rec g = f g
What about:
let rec g x = f g x
--
Stéphane
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's
Mathias Kende a écrit :
[...] I also want to write :
let rec h = t (f h)
(with t : ('a - 'b) - 'a - 'b) but here, I can't afford to use
let rec h x = t (f h) x
because t as some side effects and I need it to be evaluated only once.
Then what about:
let h =
let tmp = ref (fun x
Tim Hanson a écrit :
I've been trying to use Lwt in my application (robot control). [...]
Hummm... How familiar :-)
I compile with the following line:
ocamlfind ocamlc -c -package lwt,lwt.unix,lwt.syntax -syntax camlp4o relay.ml
Try instead:
ocamlfind ocamlc -c -package
Erik Rigtorp a écrit :
However OCaml is broken! It does not provide any support for multicore
architectures, which by now is considered a bug! [...]
You might be interested by OCaml4Multicore:
http://www.algo-prog.info/ocmc/web/
It's still experimental, but its authors would love to have
Damien Doligez a écrit :
After testing this release candidate, please send a mail to
damien.doli...@inria.fr and tell us what you tested and whether
it worked.
I've successfully recompiled most of the packages depending on ocaml
currently available in Debian sid on amd64. The missing packages
Richard Jones a écrit :
camlp5 - When you compile, it complains it doesn't know anything about
3.11.2 and that this will require an upstream change.
The first patch attached adds support for 3.11.2 (see comments in it).
I've also added some fixes to the manpage that are of course irrelevant
for
Guillaume Yziquel a écrit :
My question is: do I have to put a line like module X = OCamlR in
quantmod.ml, [...]
Sounds good. But in case the compiler is too smart and discards this,
I'd rather export explicitly an initialization function (or some dummy
value to force the dependency order) in
Guillaume Yziquel a écrit :
# type untyped;;
type untyped
# type 'a typed = private untyped;;
type 'a typed = private untyped
# type -'typing tau = private obj
and 'a t = 'a typed tau
and obj = private untyped tau;;
type 'a tau = private obj
and 'a t = 'a typed tau
and obj = private
Guillaume Yziquel a écrit :
Because subtyping seems more efficient than applying a noop function.
And this code might run really often, so I do not like very much the
idea of having noop functions running really often.
FWIW, I don't think you have any penalty if you declare your identities
as
Dario Teixeira a écrit :
A simple nonsensical example that illustrates the problem is listed below; the
type-checking error occurs in function step1, where the optional parameter
story
is used as an object of type title:string; .. . In function step3,
this
parameter story is actually
descriptors were not monitored correctly
Enjoy!
--
Stéphane Glondu, on behalf of the Lwt team
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list
David MENTRE a écrit :
I also used Cryptokit once. It was pretty useful and easy to use.
However I had to modify a few lines in it in order to allow me to do
some compositions with Cryptokit building blocks.
Could you be more specific?
Cheers,
--
Stéphane
Sam Steingold a écrit :
Now, with his blessing, Jane Street Capital took over maintenance of the
code from him, and released Tuareg Mode v. 2.0.0.
It is available for download at
http://www.janestreet.com/ocaml/tuareg.tgz.
Is there some kind of project page, with available versions? A place
Fabiano a écrit :
Am I right? Is ocaml able to generate native code on armel (arm eabi)?
In case, have you suggestions in order to solve the issue?
See [1]. In a nutshell: it will be, with OCaml 3.12.0.
FWIW, almost all Debian packages compile natively on armel with it [2].
The notable
Sam Steingold a écrit :
I have the same problem with 22.3.1
playing around, this construction seems to be causing some invalid modifier
errors:
(skip-syntax-backward \s-)
in tuareg-find-colon-typespec and other places
what kind of error?
I.e., start emacs like this:
$ emacs -q
Hello,
This is a follow-up on PR#5049 [1], but the bug has been closed and it
seems no longer possible to comment on it now (and reopening doesn't
seem relevant).
[1] http://caml.inria.fr/mantis/view.php?id=5049
Alain Frisch wrote:
The list of platforms where natdynlink is supported is given
Le 16/06/2010 06:07, Damien Doligez a écrit :
We have the pleasure of celebrating Bloomsday by announcing the release of
OCaml version 3.12.0+beta1.
This is a beta release, available as source only and intended for power
users to test new features and report bugs (if any). [...]
I've
Le 14/07/2010 01:23, Michael Ekstrand a écrit :
[...] I seem to remember a discussion about whether or not a
VCS is sufficient distinction to meet the requirements of the QPL, but
do not remember its outcome.
http://article.gmane.org/gmane.comp.lang.caml.general/42200
--
Stéphane
Le 19/07/2010 09:30, Keyan Zahedi a écrit :
class myclass =
object
val mutable _myfunc = (* a function of type string - bool)
method set_myfunc f = _myfunc - f
method my_func f = _myfunc f
;;
I am not sure of what blocks you. Just making your snippet syntactically
correct works:
class
Le 23/07/2010 18:04, Damien Doligez a écrit :
[...]
so you'd better test it and report any problems with compilation and
installation on your favorite platform.
I've successfully recompiled (almost) all (relevant) Debian packages
with this new version. The only package that needs more work is
Le 23/08/2010 12:57, Paul Steckler a écrit :
I'm getting segmentation faults when using dynamically linked native
code in 64-bit OCaml 3.11 running
on Linux (Fedora 12 x64). [...]
I've written some small example programs with a similar structure, and
those work just fine. In my real,
large
Le 23/08/2010 14:09, Florent Monnier a écrit :
Is there a way to get a string from C to OCaml without the caml_copy_string
function, or is there a version that doesn't copy the string?
an alternative method is to provide a string from ocaml to c then c fills
this
buffer, then you can save
Le 23/08/2010 14:12, Paul Steckler a écrit :
[...]
Oh, we just added the Dynlink stuff. There haven't been any recent
crashes until
just now. That could be an unhappy coincidence; the real issue might
lurk in unrelated
code, as you point out.
Note that Dynlink can point out bugs (even in
Le 07/09/2010 22:58, Paolo Donadeo a écrit :
I'm writing a Lua API binding
[...]
typedef struct ocaml_data
{
value state_value;
value panic_callback;
} ocaml_data;
[...]
/* alloc space for the register entry */
ocaml_data *data = (ocaml_data*)caml_stat_alloc(sizeof(ocaml_data));
Le 07/09/2010 23:23, Paolo Donadeo a écrit :
Why don't you call caml_register_global_root on (data-state_value) as well?
This was a solution I tried, but with the additional global root the
finalization function was never called by the GC, so it solved the
segfault with a memory leak :-)
Le 17/09/2010 09:59, Paolo Donadeo a écrit :
Could you expand on the reasoning a little? I mean, what is for you
the advantage of running Eliom over Ocamlnet as opposed to over the
Ocsigen server?
From my point of view the problem with Ocsigen is that it requires you
to install an HTTP
Le 03/11/2010 16:09, Sebastien Ferre a écrit :
Nous essayons d'installer le package ocaml pxp après avoir installé avec
succès pcre requis.
L'installation de pxp crach avec des problèmes avec pcre ...
[...]
ocamlfind ocamlc -g -package netstring -o lexpp -linkpkg uni_types.cmo
uni_lexer.cmo
Le 12/11/2010 06:57, Elnatan Reisner a écrit :
Playing around a bit more, I seemed to find that every time you access
an 'external' function, you get a distinct reference (is there a better
term?) to it. This seems a bit odd to me. Can someone explain?
Think of externals as constructors: they
59 matches
Mail list logo