Re: Value types (Was: [Caml-list] ocamlopt LLVM support)

2010-12-13 Thread Alain Frisch
On 12/12/2010 08:09 PM, Benedikt Meurer wrote: The boxing involved is relevant, but boxing in general is not the issue. In this special case, the let nlen, n = if... code requires heap allocation, because of the way the pattern is compiled. This could be fixed by moving the condition out of the

Re: [Caml-list] Re: Pre-compiled ocaml binary for windows

2010-12-09 Thread Alain Frisch
On 12/09/2010 12:54 PM, Mauricio Fernandez wrote: This approach is not exactly convenient because the list of cmxs to be loaded can easily get very long... I was thinking of replacing the call to ocamlopt used to build the main program (which requires external tools) with a call to ocamlopt

Re: [Caml-list] Re: Pre-compiled ocaml binary for windows

2010-12-07 Thread Alain Frisch
On 12/07/2010 01:24 AM, Sylvain Le Gall wrote: Here is the list so far: 1. no build system setup : Martin who first did the packaging, didn't have included how to build ocaml/findlib neither the binaries itself. So basically you need to build by hand to generate the .msi. This is not

Re: [Caml-list] Desktop GUI toolkits - current state of the art?

2010-12-01 Thread Alain Frisch
On 11/24/2010 10:47 AM, Martin DeMello wrote: On Wed, Nov 24, 2010 at 5:02 AM, Alain Frischalain.fri...@lexifi.com wrote: We have a few local extensions to the OCaml compiler that makes it easier to build nice APIs for GUI toolkits, with a functional flavor: implicit subtyping and generalized

Re: [Caml-list] zero-arity constructor

2010-11-28 Thread Alain Frisch
On 11/27/2010 11:31 AM, bluestorm wrote: Reversing the specific 0-ary modification suggested by Alain is probably easier, as I suspect most users don't use that one much, but Alain probably makes use of it; As I've been designated as the primary responsible for that uninspired change (I plead

Re: [Caml-list] Desktop GUI toolkits - current state of the art?

2010-11-24 Thread Alain Frisch
On 11/24/2010 10:47 AM, Martin DeMello wrote: No, I'm on linux, but CSML does look very interesting. Does it work well with Mono? Yes, CSML itself has been adapted to work with Mono and I did a few tests (some of screenshots show Windows Forms GUIs controlled by OCaml code, under Linux with

Re: [Caml-list] Desktop GUI toolkits - current state of the art?

2010-11-23 Thread Alain Frisch
On 11/23/2010 3:19 PM, Martin DeMello wrote: What are the actively developed options for writing desktop GUI apps in OCaml? Anything other than lablgtk2 (which, at least from a brief look through the examples, looks rather ugly, codewise, compared to, say, vala or ruby/gtk)? I'll use lablgtk2 in

[Caml-list] Native toplevel? (was: OCamlJit 2.0)

2010-11-17 Thread Alain Frisch
On 11/16/2010 03:52 PM, Benedikt Meurer wrote: OCamlJit 2.0 was specifically designed for desktop processors and is not really portable to anything else in its current shape, because the target audience are people using the interactive top-level and the byte-code interpreter for rapid

Re: [Caml-list] Emulating width subtyping with 1st-class modules

2010-08-05 Thread Alain Frisch
On 08/05/2010 06:10 PM, Philippe Veber wrote: I have a related question: the only reason why i'm not fully happy with objects used as anonymous records is that i sometimes use them as mere data containers and need to save (marshal) them at some point. Which is not permitted as soon as you want

Re: [Caml-list] Emulating width subtyping with 1st-class modules

2010-08-05 Thread Alain Frisch
On 08/05/2010 05:02 PM, Dario Teixeira wrote: I have a problem where some form of width subtyping for records would be useful. At the present I'm taking advantage of the structural subtyping nature of Ocaml's object system to emulate the width subtyping. This works and is reasonably compact,

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Alain Frisch
On 7/21/2010 8:41 PM, Dumitru Potop-Butucaru wrote: If I understand well, what I try to do is impossible for some deep theoretical reason. Can someone explain this to me, or point me to a relevant paper explaining it? Turning a module type into a module is not possible in general: if the

Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.

2010-07-05 Thread Alain Frisch
On 07/02/2010 07:48 PM, Daniel Bünzli wrote: Now on Linux 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010 i686 GNU/Linux with exactly the same code that know works on osx and ocaml 3.12 from svn. I get the following problem when running my test program. error loading shared

Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.

2010-07-05 Thread Alain Frisch
On 07/02/2010 07:48 PM, Daniel Bünzli wrote: I tried to add /usr/local/lib/ocaml to LD_LIBRARY_PATH but without success. Any hint ? Is that a bug or am I missing something ? As a side node , you should also always link the main program with -linkall (to make sure all the modules that plugins

Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.

2010-07-02 Thread Alain Frisch
On 07/01/2010 09:16 PM, Daniel Bünzli wrote: Well in fact this looks like dll bug since if the interface of M.test doesn't match in a/m.cmx and b/m.cmx then a segfault occurs. Something similar is reported here : http://caml.inria.fr/mantis/view.php?id=4839

Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.

2010-07-02 Thread Alain Frisch
On 07/02/2010 10:27 AM, Daniel Bünzli wrote: (Note: for dynlink, I believe that loading modules in private mode should be safe.) No, at least not in 3.12.0+beta1. Ah yes, sorry, I did not ready your original post carefully enough. I think the problem is that dlopen is called (in

Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.

2010-07-02 Thread Alain Frisch
On 07/02/2010 10:40 AM, Alain Frisch wrote: I'll try to apply a fix. I've committed a tentative fix (version/3.12 on the SVN repository). Can you try it and see if it solves your problem under Mac OS ? Alain ___ Caml-list mailing list

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-03 Thread Alain Frisch
On 02/06/2010 19:36, Eric Cooper wrote: Is it possible to marshal and unmarshal these packages? Yes, this is possible, but: 1. Extremely dangerous: there is no runtime type-checking. If you marshal a module, you need to unmarshal it to the same package type, exactly (no coercion allowed).

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-03 Thread Alain Frisch
On 04/06/2010 03:34, Jacques Garrigue wrote: For instance, you can easily build a list of such plug-ins, with an uniform interface, and add elements to this list through dynamic loading. They can even expose internal data, with an abstract type. Indeed! That's basically our primary use of

Re: [Caml-list] Architectures with natdynlink support...

2010-05-31 Thread Alain Frisch
On 05/28/2010 11:06 PM, Stéphane Glondu wrote: Is there a practical test to be sure whether natdynlink works or not? The only way to test if natdynlink works that I know is to try it. In the current trunk, set NATDYNLINK=true in config/Makefile after configure, compile everything, and then

Re: [Caml-list] Bigarrays and blocking_section..

2010-05-26 Thread Alain Frisch
On 5/25/2010 6:25 PM, Romain Beauxis wrote: My understanding is that after the line frame_of_value(_rgb,rgb);, the C object rgb only contains ints and a pointer to a block of memory allocated by malloc. Did you allocated the C array yourself with malloc? (And then used alloc_bigarray to wrap

Re: [Caml-list] recursive module and types

2010-05-19 Thread Alain Frisch
On 05/19/2010 02:24 PM, Christophe Raffalli wrote: Does anyone see a way to avoid it I propose: module rec T : sig type t = U.t val compare : t - t - int end = struct include U let compare u v = match u, v with Leaf, Leaf - 0 | Node u', Node v' - S.compare u' v' | Leaf, Node

Re: [Caml-list] about OcamIL

2010-05-05 Thread Alain Frisch
On 05/05/2010 02:06 PM, ben kuin wrote: I'm waiting for the day that microsoft release f# under a official open source license. It has been promised several times, but its still only available under the Microsoft Research Shared Source license agreement and meanwhile I'm not sure if it ever

Re: [Caml-list] Some obsolete constructions ?

2010-04-30 Thread Alain Frisch
On 04/30/2010 03:23 PM, Emmanuel Dieul wrote: - Pcf_let : a let construction as a class field ? AFAIK, this one is obsolete. - Pexp_letmodule : ? let module L = List in ();; - Pexp_override : an override expression ? object(this) method m = { } end;; - Ppat_type : a type pattern

[Caml-list] Subtyping of first-class module types

2010-04-16 Thread Alain Frisch
Dear caml-list, During today's ocaml meeting, the question of whether first-class module types could support subtyping was asked. I'd like to give a more detailed answer here. The explicit subtyping construction (e : t1 : t2) could easily be extended to support subtyping of the form

Re: [Caml-list] Building ocaml on Win32 using VS 2008

2010-04-14 Thread Alain Frisch
On 14/04/2010 18:46, Lally Singh wrote: Has anyone had any success building ocaml on Win32 using VS 2008? We compile the win32 port with the Win7 SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1). As far as I know, this SDK contains the same toolchain as VS

Re: [Caml-list] Building ocaml on Win32 using VS 2008

2010-04-14 Thread Alain Frisch
On 14/04/2010 19:13, Lally Singh wrote: Do you have a build procedure I could use? My own attempts have been rather terrible so far :-( I don't think we do anything special (regular configuration steps for the Win32, and then make -f Makefile.nt world). -- Alain

Re: [Caml-list] Optimizing Float Ref's

2010-03-31 Thread Alain Frisch
On 31/03/2010 19:21, Dmitry Bely wrote: On Thu, Sep 3, 2009 at 1:44 PM, Xavier Leroyxavier.le...@inria.fr wrote: (...) But, I thought that float ref's were automatically unboxed by the compiler when they didn't escape the local context. Yes, if all uses of the float ref are unboxed, which is

Re: [Caml-list] Lazy modules

2010-03-17 Thread Alain Frisch
On 3/17/2010 6:42 PM, David Allsopp wrote: AFAIK local modules is a syntax extension not a compiler extension - I expect (not looked at it) that the syntax extension simply alpha renames all the local module declarations to make them unique and puts them globally... a very useful extension but

Re: [Caml-list] The need to specify 'rec' in a recursive function defintion

2010-02-09 Thread Alain Frisch
On 2/10/2010 1:07 AM, Guillaume Yziquel wrote: Is it possible to have polymorphic recursion with vanilla 'let rec' invocations? This is something that Jacques recently merged in the current development branch. The code below should work with OCaml 3.12. let length v = let rec f : 'a. int

Re: [Caml-list] Polymorphic values in local modules

2010-02-03 Thread Alain Frisch
On 03/02/2010 11:05, Tiphaine Turpin wrote: It is possible however, provided you wrap the argument inside a polymorphic record field (or object) as follows: type t = {f : 'a. 'a - 'a} let test f = let module Foo : Foo_sig = struct let foo = f.f end in () Another

Re: [Caml-list] Thread safe heterogenous property lists (dictionaries)

2010-02-02 Thread Alain Frisch
On 02/02/2010 14:12, Daniel Bünzli wrote: The second one uses Maps for logarithmic time lookups. Operations on dictionaries are thread safe. However key creation is not because unique ids need to be generated for them. FWIW, a thread-safe way to generate fresh ids is: let fresh_id () = Oo.id

Re: [Caml-list] ocaml as editor extension language

2010-01-05 Thread Alain Frisch
On 05/01/2010 08:24, Joel Reymont wrote: You cannot embed OCaml and use it as an editor extension language unless 1) your editor is open source, or 2) you are a member of the consortium and pay 2K EUR/year Is that correct? Depending on the level of integration you need, you might also call

Re: [Caml-list] Favorite OCaml editor?

2010-01-05 Thread Alain Frisch
On 05/01/2010 09:13, Jon Harrop wrote: I think the best way to write a decent editor for OCaml would be to write one using LablGTK for the GUI and camlp4 to parse OCaml code. It is indeed very tempting to reuse an existing OCaml parser in order to support syntax-related features (indentation,

Re: [Caml-list] Favorite OCaml editor?

2010-01-05 Thread Alain Frisch
On 05/01/2010 11:44, Nicolas Pouillard wrote: Reusing the work done in the Yi [1][2] editor for the Haskell syntax should be pretty straightforward. Very long and painful however due to the complexity of the grammar of a real language. [1]: http://www.haskell.org/haskellwiki/Yi [2]:

Re: [Caml-list] Cannot build OCaml using Cygwin

2009-12-16 Thread Alain Frisch
On 16/12/2009 16:48, Andre Tampubolon wrote: I'm trying to build OCaml 3.11.1 using Cygwin. It's still unsuccessful. $ make -f Makefile.nt world cd byterun ; make -f Makefile.nt all make[1]: Entering directory `/cygdrive/c/cygwin/home/ocaml-3.11.1/byterun' gcc -mno-cygwin

Re: [Caml-list] Embedding the ocaml runtime in a shared library on amd64/x86_64

2009-12-03 Thread Alain Frisch
Joost Yervante Damad wrote: Reading up on this, I don't think using -fPIC on amd64 has a performance penalty since it has the %rip register. Also it appears that gcc by default uses indirect addressing via %rip in the generated asm. I did some benchmarks when switching the ocamlopt AMD64 code

Re: [Caml-list] Howto execute a command without the cmd windows opening?

2009-11-04 Thread Alain Frisch
Matthieu Dubuget wrote: Is there any way to run a program and get the process status without using cmd.exe ? Did you try Unix.create_process? Alain ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-05 Thread Alain Frisch
Gerd Stolpmann wrote: While cygwin cannot load shared libraries from bytecode, it still can load pure bytecode dynamically. Since OCaml 3.11 and the use of flexdll, all the windows ports (including the Cygwin port) are supposed to be able to load stub DLLs produced by flexlink. This has not

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Alain Frisch
Richard Jones wrote: let devs = {{ map [xml] with | domain..[devices..[disk..[source dev=(Latin1 s) .._]]] | domain..[devices..[disk..[source file=(Latin1 s) .._]]] - [s] | _ - [] }} in The following should work: let l = {{ [xml] }} in let l = {{ map l with domain..l - l |

Re: [Caml-list] xpath or alternatives

2009-09-30 Thread Alain Frisch
Richard Jones wrote: On the other hand, the code is hard to understand. It's not clear to me what the .( ) syntax means, nor why there is an apparently trailing / character. From the manual: If the x-expression e evaluates to an x-sequence, the construction e/ will result in a new

Re: [Caml-list] Partially hiding modules in packages

2009-09-09 Thread Alain Frisch
On 9/9/2009 9:00 PM, Alexey Rodriguez wrote: My question is about how to hide modules (or parts thereof) in an ocaml package from the outside world (users of the package). It is not a well-known fact, but it is possible to provide an explicit interface for the packaged module (just create an

Re: [Caml-list] Dynamic loading of native code : what about librairies and packs ?

2009-09-01 Thread Alain Frisch
Pierre-Loïc Garoche wrote: error loading shared library: blabla/MyPlugin.cmxs: undefined symbol: camlHashtbl__create_79 You need to ensure that the main program is linked with all the modules that are needed by the dynamically loaded modules (including the modules from the standard

Re: [Caml-list] Re: OCaml and kernels

2009-08-19 Thread Alain Frisch
Richard Jones wrote: On Wed, Aug 19, 2009 at 09:43:18PM +0900, Alexander Danilov wrote: + out of box support for native executables creation for win32/mingw Not sure what you mean here, because I've built Win32 native executables from OCaml using both the INRIA-supplied binaries and our

Re: [Caml-list] Re: ocaml sefault in bytecode: unanswered questions

2009-08-09 Thread Alain Frisch
On 8/9/2009 2:06 PM, ivan chollet wrote: I would have thought physical equality implies structural equality, but it doesn’t seem like it. Can you please explain to me what’s wrong there? There are two modes for the generic comparison. The total mode (Pervasives.compare) creates a total

Re: [Caml-list] Re: ocaml sefault in bytecode: unanswered questions

2009-08-09 Thread Alain Frisch
On 8/9/2009 8:56 PM, Elnatan Reisner wrote: My other issue is that the description of (==) for mutable structures doesn't specify that it is symmetric; reading the documentation literally only implies that e1 is a substructure of e2. Even just adding 'and vice versa' might clean this up: |e1 ==

Re: [Caml-list] Physical counterpart to Pervasives.compare?

2009-07-29 Thread Alain Frisch
On 7/29/2009 3:25 AM, Elnatan Reisner wrote: Is there something that can complete this analogy: (=) is to (==) as Pervasives.compare is to ___? That is, is there a polymorphic total ordering with respect to *physical* entities, rather than to their structure? Not really. The physical location

Re: [Caml-list] Manipulation objet files

2009-07-17 Thread Alain Frisch
Ed Keith wrote: Before I reinvent the wheel I thought I'd ask is anyone knows of any libraries, that can be accessed from ocaml, to read and write object files. In particular I need to read and write ELF files, Windows PE files, the .obj files generated by Visual C++ (I think there are PE

[Caml-list] Behavior of %F

2009-06-08 Thread Alain Frisch
Hello, The behavior of Printf w.r.t. %F changed recently. Before (OCaml 3.10.0, and presumably 3.11.0): # Printf.sprintf %F 1.;; - : string = 1. Now (OCaml 3.11.1+rc1): # Printf.sprintf %F 1.;; - : string = 1.00 This change comes from:

Re: [Caml-list] Strange performance bug

2009-04-29 Thread Alain Frisch
Brighten Godfrey wrote: (Changing to the precompiled regexp does make this bug go away -- but so do many other small changes, like commenting out the last line of the code, *after* the parsing is complete.) This last line (List.length first) + ...) forces the values first, second and third

Re: [Caml-list] Strange performance bug

2009-04-29 Thread Alain Frisch
Brighten Godfrey wrote: That occurred to me too, but there is no swapping. The process uses less than 40 MB of memory. Also, this wouldn't explain why it suddenly becomes slow exactly when it starts parsing the file the second time. This point is interesting: it is where PCRE starts

Re: [Caml-list] Building pcre-ocaml on OCaml 3.11.0 on MinGW

2009-04-23 Thread Alain Frisch
Hi David, David Allsopp wrote: I've just had an enlightening few hours getting pcre-ocaml to compile under Windows ... The main thing that's got me puzzled is the renaming of libpcre.dll.a and libpcre.a that I have to do to get the thing to link. Thanks for investigating this issue! The

Re: [Caml-list] (no subject)

2009-04-08 Thread Alain Frisch
DESMONS Bertrand wrote: It is really strange for me... 'ls' recognizes liblapack.a, but I don't see it using 'dir' ... ? There is also no liblapack.a.lnk, but isn't that due to the fact that liblapack.a is a symbolic link? As far as I understand Cygwin, if liblapack.a is a Cygwin symlink,

Re: [Caml-list] flexlink + lacaml (lapack)

2009-04-07 Thread Alain Frisch
DESMONS Bertrand wrote: Hello, Compiling a little program using Lacaml (in a cygwin shell) gives me the error: The library file seems to be a symbolic link. flexlink is a regular Win32 application and does not know about this Cygwin-specific notion. The good news is that it can use the

Re: [Caml-list] Dynamic loading of native code : what about librairies and packs ?

2009-03-31 Thread Alain Frisch
Pierre-Loïc Garoche wrote: ** First: what about external libraries ? Could you detail the behavior of the linking process of cmxs file with respect to dependancies. If I understand well any library used to compile cmx files should be - either know by the software dynamically loading the plugin,

Re: [Caml-list] Dynamic loading of native code : what about librairies and packs ?

2009-03-31 Thread Alain Frisch
Pierre-Loïc Garoche wrote: Do you suggest to create a first cmx pack and then make it dynamically loadable ? Yes, absolutely. -- Alain ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] Problem during Godi bootstrap_stage2 (Windows mingw)

2009-03-19 Thread Alain Frisch
Alan Schmitt wrote: I had to reinstall my environment to develop OCaml applications under Windows (using mingw), and I'm having some problem during bootstrap_stage2. Here are the last few lines before the problem occurs: I think the problem comes from a recent update in Cygwin. Now, gcc is a

Re: [Caml-list] Re: Strange compilation problem - solved

2009-02-11 Thread Alain Frisch
Matthieu Dubuget wrote: Here is a patch against subversion version of flexlink that solves my problem. Thanks Matthieu! The patch has been applied to flexlink's SVN repository. -- Alain ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] wrapping external classes

2008-12-11 Thread Alain Frisch
Mauricio Fernandez wrote: class foo s n = object(self) val handle = create s n method compute = compute handle initializer (* use a destroy method explicitly if you need to make sure the destructor * is called --- Gc.finalise doesn't guarantee this (e.g. the program might *

Re: [Caml-list] Native dynlink on 3.11: a request for packagers

2008-11-22 Thread Alain Frisch
On 11/22/2008 4:00 PM, Daniel Bünzli wrote: Thus just generating a cmxs for a module won't allow you to use it dynamically. You'll need support from the module no ? Well, if your program is only composed of .cmxs plugins (libraries + your own program), then you can have a generic driver that

Re: [Caml-list] Re: Wanted: your feedback on the hierarchy of OCaml Batteries Included

2008-11-18 Thread Alain Frisch
David Teller wrote: I thought the linker only linked in symbols which were actually used? No, it is not the case. The only automatic mechanism for code pruning is at the level of individual modules embedded in a library. As soon as you pack, you obtain a monolithic module which can only be

Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included

2008-11-18 Thread Alain Frisch
On 11/18/2008 7:17 PM, Jon Harrop wrote: I don't follow. Can you not use include to extend an existing module: # module Array = struct include Array let empty = [||] end;; module Array : sig external length : 'a array - int = %array_length ... val empty : 'a

Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included

2008-11-18 Thread Alain Frisch
On 11/19/2008 12:49 AM, Jon Harrop wrote: Perhaps that could be solved with extensive Camlp4 hacking to rename the previous modules (even coming from an include) to avoid the clash? I don't think so. It seems you need type information. That brings its own problems, of course. You no longer

Re: [Caml-list] BDD reloaded

2008-11-12 Thread Alain Frisch
Pietro Abate wrote: + Do you know if there is an ocaml binding for buddy ? = I guess no, but I hope I'm wrong... I believe that Akihiko Tozawa wrote such a binding for his XSLT0 typechecker. You should check with him. -- Alain ___ Caml-list

Re: [Caml-list] Relevance of explicit -linkall with ocamlopt -shared

2008-10-30 Thread Alain Frisch
Stéphane Glondu wrote: Are there cases where ocamlopt -shared is useful without -linkall? Yes, I think so. First, of course, when you don't link any library in the .cmxs, only modules, then -linkall is not needed (but admittedly it wouldn't hurt). Second, imagine you want to create an addin

Re: [Caml-list] RE: understanding weak

2008-10-30 Thread Alain Frisch
Warren Harris wrote: On Oct 30, 2008, at 11:48 AM, CUOQ Pascal - [EMAIL PROTECTED] wrote: In short: don't use weak pointers to make caches. Thanks for the advice -- but I thought this was exactly what weak hash tables were intended for. Although there is some similarity between a weak

Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-16 Thread Alain Frisch
David Allsopp wrote: The install target of flexdll's Makefile suggests copying: flexdll_initer.c, flexdll.c Surely these aren't needed once it's compiled? Indeed. However, some people might want to recompile them (e.g. to keep debug symbols, or to use a specific version of their C

Re: Re : [Caml-list] OCaml version 3.11.0+beta1

2008-10-16 Thread Alain Frisch
Adrien wrote: How often should we expect new releases of flexlink ? Basically, the question is : will it have to be updated from time to time or can we just drop it somewhere and forget everything about it ? There will be new releases when bugs are found and fixed. It's hard to predict. I

Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Alain Frisch
Andres Varon wrote: Thanks for the good work. I would like to know exactly what architectures support the native Dynlink? I did not see this information in the release notes. The native Dynlink is known to work under Linux x86, Linux AMD64, Win32 (mingw/msvc ports). It has been lightly

Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Alain Frisch
Daniel Bünzli wrote: And on macosx ? It seems here on 10.5.5 that only dynlink.cma and dynlink.cmi for bytecode get installed. So I guess there's no support. What about the future ? Native dynlink used to work on Mac OS X 10.5 (x86 only). The new linker in 10.5 does not support linking

Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Alain Frisch
Andres Varon wrote: One more question: is it always compiled? or is dynlink.cmxa simply not available in some architectures? if yes, what are those? As far as I can tell, dynlink.cmxa is always compiled. You will get error when ocamlopt -shared on those architecture where natdynlink is not

Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Alain Frisch
Andres Varon wrote: OK. Would you recommend that configure scripts use this test to verify if the functionality is supported? Yes. -- Alain ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] What's the purpose of the static library?

2008-09-25 Thread Alain Frisch
bill yan wrote: By my understanding, unlike dlllibrary.so and liblibrary.a give user an option to choose compile dynamically or staticly, it seems for library.a, user can only choose static method. Does that mean compiled native code can only be staticly linked to user's application? In

[Caml-list] CSML: now under GNU/Linux + Mono

2008-09-23 Thread Alain Frisch
Hello all, There is a new release of CSML that works under GNU/Linux on top of Mono (tested with Mono 1.2.4). Even the Windows Forms example works fine. http://www.lexifi.com/csml/ The CSML compiler produces the same output for the Windows/.Net and the Linux/Mono version (there is a tiny

Re: [Caml-list] What's the purpose of the static library?

2008-09-23 Thread Alain Frisch
Richard Jones wrote: File: library.cma -- This is just a set of *.cmo files combined together. Created by: 'ocamlc -a' Used: Same as for module.cmo .cma files also contain extra linking directives like references to C libraries. Files: module.o and module.cmx

Re: [Caml-list] csml: high-level bindings between OCaml and .Net

2008-09-19 Thread Alain Frisch
Ludovic Coquelle wrote: Probably something went wrong somewhere ... I did use PInvoke intensively on mono and I never experienced problem (I do not remember which version of mono, it was around 2 years ago). I have absolutely no doubt that P/Invoke does work under Mono. I'm just saying that I

Re: [Caml-list] csml: high-level bindings between OCaml and .Net

2008-09-16 Thread Alain Frisch
Stefano Zacchiroli wrote: Out of curiosity: is CSML specific to Windows or not? Currently CSML only works under Windows. I've briefly tried to make it work under Linux with Mono some months ago but I stopped very quickly; I could not even call a simple C function in a shared library from C#

Re: [Caml-list] on polymorphic compare and objects

2008-09-03 Thread Alain Frisch
Peng Zang wrote: For objects, we require that all objects implement an equal method that satisfies the semantic contract. How do you ensure that the method is indeed implemented and has the correct type? A more robust approach to attaching custom generic operations to arbitrary data would

Re: [Caml-list] linking the same module more than once

2008-08-08 Thread Alain Frisch
Jake Donham wrote: There is no trouble linking a module more than once, but different parts of the code can wind up linked to different instances of the module, leading to the confusing behavior that exception handling seems not to work (and generally that things you think are equal are not).

Re: [Caml-list] native vs bytecode

2008-08-06 Thread Alain Frisch
Ben Aurel wrote: - is it possible to dynamically load bytecode libraries into a bytecode program? Yes: http://caml.inria.fr/pub/docs/manual-ocaml/manual041.html - is it possible to dynamically load native libraries into a native program? This will be possible in the next release of OCaml

Re: [Caml-list] Memory statistics tool

2008-07-24 Thread Alain Frisch
Dr. Thomas Fischbacher wrote: The OCaml manual gives no guarantee that Hashtbl.hash does not cons, so I cannot assume this. Indeed, Hashtbl.hash can cons, but this does not contradict my point: its result does not depend on the physical location of objects in memory (if it did, it would be

Re: [Caml-list] Compiling a shared library with amd64

2008-07-23 Thread Alain Frisch
Jonathan Marchand wrote: I got rid of the complains with 3.10.2 version (for libasmrun.a only). In the CVS version, if I compile by adding -fPIC in *COMOPTS, I still have some errors with libasmrun.a: Here is the complete build trace for rocaml (I use it as an exemple as it the same problem

Re: [Caml-list] Memory statistics tool

2008-07-23 Thread Alain Frisch
Many thanks! I just had a glance at it, but it seems to be just how one would have to approach such a problem. (The issue with hash-based approaches to find previously visited substructures is that during traversal, a GC may occur. Now I just assume that this may involve relocation and heap

Re: [Caml-list] toplevel

2008-07-04 Thread Alain Frisch
Jean Krivine wrote: Hello I am trying to make a toplevel including differnent cmo (OBJS=./dir1/obj1.cmo ./dir2/obj2.cmo ...) contained in different directories (OCAMLINCLUDES= -I ./dir1 -I ./dir2 ...). If I type make toplevel (see excerpt of my makefile below) I obtain a toplevel that does what

Re: [Caml-list] GODI News: RocketBoost Beta

2008-06-16 Thread Alain Frisch
Gerd Stolpmann wrote: The big news is that GODI now supports the MinGW port of OCaml for Windows (besides the Cygwin port). This means that it is now possible to create native Windows applications with GODI. That's really great news! A lot of the porting effort was about Cygwin

Re: [Caml-list] GODI News: RocketBoost Beta

2008-06-16 Thread Alain Frisch
Gerd Stolpmann wrote: That's great. Thanks for doing that. I'll see how to integrate flexdll - is it needed before ocaml is built, or can it be installed later? (That looks like a bootstrap problem.) Yes, it is currently assumed that a binary version of flexdll is available when ocaml is

Re: [Caml-list] A functor to produce recursive modules ?

2008-05-23 Thread Alain Frisch
Fabrice Marchant wrote: Hi ! Apologize. This topic isnt't exactly at its right place : belongs to Beginners-list. However no answer about this question there and so much clever people here, a denser traffic... Please how to define recursive modules that are parametrized by an

Re: [Caml-list] Indentifying OCaml exceptions from C

2008-05-01 Thread Alain Frisch
Raj Bandyopadhyay wrote: Hi ocaml folks I have a C program that makes callbacks to the OCaml runtime via the callback_exn() mechanism. Unfortunately, the OCaml code is raising some exception. It seems to be one of the built-in OCaml exceptions, and not something that I have defined in my