Re: [Caml-list] How does OCaml update references when values are moved by the GC?

2010-11-02 Thread Xavier Leroy
/Cheney's_algorithm - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug rep

Re: [Caml-list] Generalized Algebraic Datatypes

2010-10-29 Thread Xavier Leroy
rly for a syntax war :-) This said, Coq could be another source of syntactic inspiration: it has several equivalent syntaxes for inductive type declarations (a superset of GADTs), one Haskell-like, others more Caml-like. - Xavier Leroy ___ Caml-l

Re: [Caml-list] Re: About Cryptokit

2010-04-30 Thread Xavier Leroy
> Does cryptokit support digesting Bigarrays? Currently no, but your PR#5005 made me think that it could be a good idea to add this functionality. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-

Re: [Caml-list] Re: Random segfaults / out of memory

2010-03-30 Thread Xavier Leroy
ay it safe and don't declare it "noalloc". Hope this helps, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner

Re: [Caml-list] testers wanted for experimental SSE2 back-end

2010-03-29 Thread Xavier Leroy
what you find objectionable here. > optimization of floating compare etc.) Where to discuss that - just > here or there is some entry in Mantis? Why not start on this list? We'll move to private e-mail if the discussion becomes too heated :-) - Xavier Leroy

Re: [Caml-list] testers wanted for experimental SSE2 back-end

2010-03-11 Thread Xavier Leroy
(based on what will become 3.12.0) can account for small speed differences. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http

[Caml-list] testers wanted for experimental SSE2 back-end

2010-03-09 Thread Xavier Leroy
;ve observed speedups of about 8% on Core 2 processors and somewhat higher on recent AMD processors. On bigger OCaml applications that perform floating-point computations but not exclusively, the performance difference was lost in the noise. Looking forward to interesting experimental results, -

Re: [Caml-list] Inside the mind of the inliner

2010-02-02 Thread Xavier Leroy
n that includes an infix operator in prefix form, not inlined. *) let list = [1;2;3] let f x = x * List.fold_left (+) 0 list let g x = f x + f x Because (+) is really fun x y -> x + y, therefore case 2 again. - Xavier Leroy ___ Caml-list mailing list.

Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Xavier Leroy
I'm doing something wrong, but can't figure out what? Try setting the OCAMLRUNPARAMS environment variable to the value "v=256". The run-time system will then print additional debug messages concerning DLL searching and load

Re: [Caml-list] Alignment of data

2010-01-27 Thread Xavier Leroy
cator, so don't expect to change this easily. What you can do, however: 1- Use the 64-bit PowerPC port. Everything will be 8-aligned then. 2- Use a bigarray instead of a float array. Bigarray data is allocated outside the heap, at naturally-alig

Re: [Caml-list] Re: multicore wish

2009-12-28 Thread Xavier Leroy
rea, start, end) to inform the run-time system that the address range [start, end) contains well-formed Caml data that polymorphic primitives can safely work on. This should solve your problem. - Xavier Leroy ___ Caml-list mailing list. Subscription m

[Caml-list] old Caml projects looking for new maintainers & contributors

2009-12-11 Thread Xavier Leroy
g. Cheers, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://ca

Re: [Caml-list] Gc.compact surprisingly helpful

2009-12-05 Thread Xavier Leroy
lly observed speed differences of 20% just from inserting or deleting dead code in a program... - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http:/

Re: [Caml-list] Binding C libraries which use variable arguments (stdarg.h)

2009-10-30 Thread Xavier Leroy
really want portability however (I want to use these bindings at least on windows too). It might be worth investigating the "libffi" library. If I guess correctly, it lets you synthesize calls to native C functions when the number and type of arguments are statically unknown. - Xa

Re: [Caml-list] How to read different ints from a Bigarray?

2009-10-28 Thread Xavier Leroy
more elegantly. > > Is it worth the overhead of calling a C function to write optimized > stubs for this? The only way to know is to benchmark both approaches :-( My guess is that for 16-bit accesses, you're better off with a pure Caml solution, but for 64-bit accesses, a C function

Re: [Caml-list] forbidden construct as right hand side of "let rec"

2009-10-28 Thread Xavier Leroy
instead of lists: type 'a lazylist = 'a lazylist_content Lazy.t and 'a lazylist_content = Nil | Cons of 'a * 'a lazylist Hope this helps, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.in

[Caml-list] public access to the SVN repository for OCaml

2009-10-22 Thread Xavier Leroy
the following page: http://caml.inria.fr/ocaml/anonsvn.en.html The old CVS repository on camlcvs.inria.fr is still accessible but no longer updated. It will go away in a few weeks. Subersively yours, - Xavier Leroy ___ Caml-list mailing list

Re: [Caml-list] Incremental linking

2009-09-30 Thread Xavier Leroy
ix linkers are quite fast, and the additional link-time work that OCaml does is small. Let us know if you manage to narrow the problem. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/c

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-25 Thread Xavier Leroy
ow-level and unsafe parallel programming model that you'd need to tame by developing clever libraries that mere mortals can use effectively (Apple's Grand Central was mentioned on this thread; it's a good example)... In summary, Philippe and his coauth

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

2009-09-03 Thread Xavier Leroy
oduces the problem. 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 the case in your code. - Xavier Leroy ___ Cam

[Caml-list] book "Le langage Caml"

2009-07-20 Thread Xavier Leroy
0.7 reference manual. For completeness, we also made it available: http://caml.inria.fr/pub/distrib/books/manuel-cl.pdf Both texts are distributed under the Creative Commons BY-NC-SA license. Enjoy, - Xavier Leroy ___ Caml-list mailing list. Sub

Re: [Caml-list] Ocamlopt x86-32 and SSE2

2009-05-12 Thread Xavier Leroy
mediate results and double rounding into account... To finish: I'm still very interested in hearing from packagers. Does Debian, for example, already have some packages that are SSE2-only? Are these packages specially tagged so that the installer will refuse to install them o

Re: [Caml-list] Ocamlopt x86-32 and SSE2

2009-05-08 Thread Xavier Leroy
es-ouvertes.fr/hal-00128124/en/ Computing intermediate results in extended precision has pros and cons, but my understanding is that the cons slightly outweigh the pros. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http:

Re: [Caml-list] Custom blocks and finalization

2009-05-08 Thread Xavier Leroy
l roots operations are OK. As for not using the CAMLparam, etc macros in these functions: since these functions must not allocate, the macros are certainly not needed. I don't think that actually using them could cause a problem, but that would be silly anyway, so don't use them in this

Re: [Caml-list] arm backend

2009-05-05 Thread Xavier Leroy
e command-line. (It looks like one of those Microsoft SDK's that assume everyone is developing from the vendor-supplied IDE...) Again, I welcome feedback and patches from iPhone development experts. - Xavier Leroy ___ Caml-list mailing list. S

Re: [Caml-list] Ocamlopt code generator question

2009-05-05 Thread Xavier Leroy
" does not currently take advantage of this possibility, since floats are passed between functions in boxed state. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] C wrappers for Ocaml functions

2009-04-14 Thread Xavier Leroy
.o ht.ml ocamlopt -c ht_wrap.c gcc -o htt ht_test.c ht_lib.o ht_wrap.o -L`ocamlopt -where` -lasmrun -lcurses -lm Hope this helps, - Xavier Leroy #include #include #include #include #include "ht.h" struct hashtable { value v; }; static struct hashtable * ht_alloc (value v) { st

Re: [Caml-list] OCaml and Boehm

2009-04-13 Thread Xavier Leroy
ated memory spaces would be more robust, if feasible. - Xavier Leroy (*) In 3.10 and earlier releases, OCaml sometimes used mmap() instead of malloc() to obtain these blocks. Starting from 3.11, malloc() is the only interface OCaml uses to obtain memory from the OS. __

[Caml-list] Re: LLC book [was: Questions]

2009-04-02 Thread Xavier Leroy
27;s worth the effort to resurrect this old text, but if a group of motivated volunteers arise, let's discuss it privately. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list A

Re: [Caml-list] questions

2009-04-01 Thread Xavier Leroy
I saw Xavier Leroy teach caml at the CNAM in france, and he know how to teach. Just for the record: I never lectured at CNAM, but probably you're thinking of Pierre Weis, who taught a great "programming in Caml" course there for several year. That course was the main startin

Re: [Caml-list] questions

2009-03-31 Thread Xavier Leroy
time in writing good intro to Caml programming books. Don't brush their efforts aside. One last word to you, that Xah Lee troll, and anyone else on this list: if you're not happy with the existing material, write something better. Everyone will thank you and you'll get to better a

Re: [Caml-list] PowerPC 405

2009-03-27 Thread Xavier Leroy
Just to complement Basile's excellent answers: > Do you know if it is possible to compile caml code on a PowerPC 405 > from the Vertex 4 family ? > We'd like to put this processor in a FPGA. On the Caml's website, > it is written "PowerPC" but is it only for Macintosch ? Not just Macintosh: Powe

Re: [Caml-list] Récursivité terminale

2009-03-26 Thread Xavier Leroy
d reversing the accumulator at the end. For instance, List.map f l (not tail-rec) can be rewritten as List.rev (List.rev_map f l) (tail-rec). For more complex data structures than lists, Huet's zippers can often be used for the same purpose. Happy Googl

Re: [Caml-list] Google summer of Code proposal

2009-03-24 Thread Xavier Leroy
would have switched to that compiler a long time ago. MLton can probably outperform Caml on some symbolic codes, but not by a large factor and not because of data representation strategies (but rather because of more aggressive inlining and the like). - Xavier

Re: [Caml-list] Google summer of Code proposal

2009-03-23 Thread Xavier Leroy
d program that reads the Cmm code and transforms it. "But shadow stacks are the only way to go for GC interface!" No, it's probably the worst approach performance-wise; even a conservative GC should work better. Hope this helps, - Xavier Leroy

Re: [Caml-list] caml trading

2009-03-17 Thread Xavier Leroy
(I know I should let this thread die, but I can't resist!) Mike Lin wrote: > But seriously, I'd suggest that your company could augment its > excellent technical outreach efforts to the > academic/engineering/free-software crowd with some education about > why you are proud of your business. Wise

Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)

2009-03-02 Thread Xavier Leroy
t noting that they don't quite fit this exact purpose.) What we now have is lawsuit material... I sincerely hope some kind of agreement can still be found at this point. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem

Re: [Caml-list] speeding up matrix multiplication (newbie question)

2009-02-20 Thread Xavier Leroy
erations will take exactly the same time in single or double precision. What single-precision bigarrays buy you is halving the memory footprint of your matrices. That could result in better cache behavior and therefore slightly better speed, but it depends very much on the sizes and number of your

Re: [Caml-list] Lazy and Threads

2009-02-20 Thread Xavier Leroy
ns are generally small). Or do you want speculative execution? (Both threads may evaluate the suspended computation.) There is no unique answer to these questions: it all depends on what you're trying to achieve... - Xavier Leroy ___ Caml-list

Re: [Caml-list] What is a future of ocaml?

2009-01-18 Thread Xavier Leroy
> necessary resources. That sounds like an interesting offer indeed. We'd have to discuss actual contents of the site, but, yes, this is an area where outside help would be welcome. - Xavier Leroy ___ Caml-list mailing list. Subscription management: h

Re: [Caml-list] Why does value restriction not apply to the empty list ?

2009-01-11 Thread Xavier Leroy
ype string This is Hindley-Milner polymorphism at work: only "let"-bound variables can have polymorphic types, while function parameters are monomorphic. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/

Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?

2009-01-11 Thread Xavier Leroy
g.o gcc -I`ocamlc -where` -c add5wrapperlib.c gcc -c main.c gcc -o mainprog.opt main.o add5wrapperlib.o add5-prog.o \ -L`ocamlc -where` -lasmrun -ldl -lm Add "-static" to the last line if you know you really need it. Hope this puts you back on tracks. - Xavier Leroy

Re: [Caml-list] Freeze in 64-bit Windows Num module

2008-12-18 Thread Xavier Leroy
> I have an issue with using the Num module in my Win64 OCaml compile. > Whenever I try to operate on numbers that are too large it will lock up. I'll try to look into this, but it would help if you'd submit a problem report through the bug tracking system.

Re: [Caml-list] fork() and threads in ocaml 3.11

2008-12-18 Thread Xavier Leroy
itation. > I tried ocaml from yesterday's CVS, but it does not help. The "release 3.11" branch of the CVS contains a tentative fix for PR#4666. It isn't yet propagated to the CVS trunk. You can get this branch using "cvs co -r release311". Hope this helps, - Xa

Re: [Caml-list] OCaml version 3.11.0 released.

2008-12-11 Thread Xavier Leroy
t week. Binary distributions for Windows (MSVC and Mingw toolchains) are now available from the usual place: http://caml.inria.fr/download.html Enjoy, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/

Re: [Caml-list] OCaml 3.11.0 release candidate

2008-11-26 Thread Xavier Leroy
release; this is one of them. A patch is available at http://gallium.inria.fr/~xleroy/ocaml-3.11rc1-win64.patch The CVS release branch contains this fix. Regards, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.in

Re: [Caml-list] Tutorial example for nat dynlink

2008-11-26 Thread Xavier Leroy
Hello Yves, > I have been trying to build a small example "hello world" program > using native dynlink, but I don't manage to make it work. Could > please send me some advice? The issue here is that when Dynlink.loadfile is called, module Toto is not yet completely evaluated, therefore it is not

Re: [Caml-list] OCaml 3.11.0 release candidate

2008-11-26 Thread Xavier Leroy
can be browsed online at http://caml.inria.fr/pub/docs/manual-ocaml-311/index.html Enjoy, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginn

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

2008-10-17 Thread Xavier Leroy
etty sure that if Microsoft's PSDK for x86-64 works well on Vista 64, so should OCaml. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginn

Re: [Caml-list] Re: Road to native windows OCaml...

2008-10-15 Thread Xavier Leroy
code emitters. The world doesn't need yet another symtax for x86 assembly language. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria

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

2008-10-15 Thread Xavier Leroy
e to support native dynlink on OS X 10.5, but Apple is not helping in the least by crippling their linker compared with the one in 10.4. If anyone from Apple is on this list, feel free to contact us at [EMAIL PROTECTED] for more information on this regression. - Xavier Leroy _

Re: [Caml-list] [ANN] OCamlSpotter: OCaml compiler extension for source browsing

2008-09-18 Thread Xavier Leroy
not one at a time. It is probably too late for inclusion in 3.11, but as long as these extensions are backward compatible, inclusion in bugfix releases can be considered. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http:/

Re: [Caml-list] ocamlopt generates binaries with executable stacks

2008-09-18 Thread Xavier Leroy
someone with access to other Linux platforms is willing to experiment and confirm that it works, let me know. This said, the configure trick above might do the job just as well. - Xavier Leroy ___ Caml-list mailing list. Subscription manage

Re: [Caml-list] 3.11?

2008-09-02 Thread Xavier Leroy
of getting 3.11 into Fedora 10, if the release > happens real soon. I'm afraid 3.11 will not be ready in time for Fedora 10. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/ca

Re: [Caml-list] 'Nondeterministic' evaluation wrt exceptions

2008-07-25 Thread Xavier Leroy
n waiting until its value is needed as in the case of lazy evaluation. Hope this might help, - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Begin

Re: [Caml-list] Heaps size problems with "caml_alloc_small" in foreign function interfaces

2008-07-11 Thread Xavier Leroy
report on the bug tracking system, so that others can have a look at it. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's lis

Re: [Caml-list] Problem of compilation with ocamlopt

2008-07-11 Thread Xavier Leroy
the issue. Make sure to mention the OS and the architecture (x86 or x86-64). I'll look into it. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria

Re: [Caml-list] thousands of CPU cores

2008-07-11 Thread Xavier Leroy
se of amount of RAM, this can be an issue. The correct solution to this issue isn't to artificially split your program in multiple processes, but to move to 64-bit architectures. You would be hard pressed to buy a desktop PC today that isn't

Re: [Caml-list] Building a Set module for elements of a Map

2008-06-26 Thread Xavier Leroy
types: module F (M: Map.S) (MKeySet: Set.S with type elt = M.key) = struct ... end - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner'

Re: [Caml-list] Strange behaviour of string_of_float

2008-06-23 Thread Xavier Leroy
it of an overkill, and I strongly suggest using the result of Int64.bits_of_float as the exact, serializable representation of a Caml float. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/list

Re: [Caml-list] ocamlopt generates binaries with executable stacks

2008-06-16 Thread Xavier Leroy
"gcc -c -Wa,--noexecstack" This could be one of the rare cases where addressing the issue at the level of the packages is safer than by changing the source distribution. - Xavier Leroy ___ Caml-list mailing list. Subscription managemen

Re: [Caml-list] Release date for 3.11?

2008-06-03 Thread Xavier Leroy
> I'm sure the answer will be 'when it's ready', but is there a release > date (month / year / ...) for 3.11 or release candidates of 3.11? I'd like to release by late August, provided no show-stopping problems show up by then. - Xavier Leroy _