Re: [Caml-list] zero-arity constructor

2010-12-01 Thread Damien Doligez
On 2010-11-28, at 12:13, Alain Frisch wrote: > As I've been designated as the primary responsible for that uninspired change > (I plead guilty), I guess it is my responsibility to state here that frankly, > I don't give a damn. That said, enabling the warning by default sounds better > to me t

Re: [Caml-list] zero-arity constructor

2010-12-01 Thread Damien Doligez
On 2010-11-27, at 11:21, David Allsopp wrote: > and set Warning 28 to be on by default for [Foo _] - that would simply mean > that 3.11/3.12 code using that syntax would emit warnings in "3.13" rather > than actually breaking (unless you've including -warn-error - but that's > always seemed to

Re: [Caml-list] OCaml GC [was Is OCaml fast?]

2010-12-02 Thread Damien Doligez
On 2010-11-29, at 23:27, Török Edwin wrote: > This seems to be in concordance with the "smaller minor heap => more > minor collections => slower program" observation, since it is: > smaller minor heap => more minor collections => more major slices => > major slices can't collect long-lived object

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-03 Thread Damien Doligez
On 2010-12-01, at 00:08, Philippe Veber wrote: > Short story (details below): I'm currently writing a program relying on > react, lablgl and ocamlsdl. This program segfaults on my laptop under two > linux distributions (ubuntu and gentoo) but doesn't on a PC under ubuntu. The > seg fault occur

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

2010-12-06 Thread Damien Doligez
Hello, On 2010-12-03, at 21:06, José Romildo Malaquias wrote: > Hello. > > I am looking for a binary release of the latest ocaml compiler for > Windows. From the OCaml home page I can find only an older version > (3.11.0). > > Where can I find the latest version? It depends on which port you

Re: [Caml-list] Re: Where's my non-classical shared memory concurrency technology?

2008-05-28 Thread Damien Doligez
On 2008-05-27, at 11:34, Martin Berger wrote: Here I disagree. Shared memory concurrency is a specific form of message passing: Writing to a memory cell is in fact sending a message to that cell carrying two items, the new value and a return channel that is used to inform the writer that sendi

Re: [Caml-list] syntax question

2008-05-30 Thread Damien Doligez
On 2008-05-30, at 03:13, Michael Vanier wrote: I realize that this is how it works, but I don't understand why it should work this way. AFAIK elsewhere in ocaml "int * int" always refers to a tuple. Almost, but not quite: # let int = 2;; val int : int = 2 # int * int;; - : int = 4

Re: [Caml-list] Manually triggering garbage collection

2008-07-29 Thread Damien Doligez
On 2008-07-29, at 15:39, Jean Krivine wrote: OK great I' ll try, For the moment I just set a Gc alarm that detects whether memory usage is above a certain limit and if so, sets the overhead to 0, which stops completely the memory "leak". Setting the overhead to 0 seems a bit overkill. You mig

Re: [Caml-list] New Ocaml Plug-in for NetBeans

2008-07-29 Thread Damien Doligez
On 2008-07-26, at 17:22, Jon Harrop wrote: For example, I cannot even jump to the definition of an identifier reliably. OCaml 3.11 has extended .annot files that will allow external tools to do that. Also, it tells you which function calls are tail calls and which are normal calls. -- Dami

[Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Damien Doligez
Dear OCaml Users, We are pleased to celebrate the birthday of Friedrich Nietzsche by releasing OCaml version 3.11.0+beta1. We need YOU to test it thoroughly and report any problems you might have. Does your favorite software work with it? It is available as a source release only (plus document

[Caml-list] OCaml 3.11.0 release candidate

2008-11-25 Thread Damien Doligez
ok for 3.11.0+rc1) As usual, we need a few brave souls to try and install it on their favourite architecture and report the result to me. Happy hacking, -- Damien Doligez for the OCaml team. ___ Caml-list mailing list. Subscription management

[Caml-list] OCaml version 3.11.0 released.

2008-12-04 Thread Damien Doligez
Happy hacking, -- Damien Doligez for the OCaml team. Objective Caml 3.11.0: -- (Changes that can break existing programs are marked with a "*" ) Language features: - Addition of lazy patterns: "lazy " matches suspensions whose values, after

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

2008-12-05 Thread Damien Doligez
Hello, On 2008-12-05, at 04:15, Rich Neswold wrote: The link to the Mac .dmg, on your web page, file appears to be incorrect. It should be http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.0.dmg . Thanks. It is fixed now. I'm taking over part of the management of the Web site, so

Re: [Caml-list] caml_atom_table bug still present in ocaml 3.11.0

2008-12-08 Thread Damien Doligez
On 2008-12-07, at 20:21, Alexy Khrabrov wrote: Under the 2005 thread, the resolution, by John Skaller, was, it should go into the bugtracker; did it, and if not, should it now? :) I don't think it dit, and yes you should add it, although it looks like a strange gcc bug. -- Damien _

Re: [Caml-list] problems with Yahoo?

2009-03-10 Thread Damien Doligez
On 2009-03-04, at 14:39, Ed Keith wrote: Something seems to be wrong with the list, this is the 18th copy of this one message I have received! I am receiving 2 to 4 copies of most messages. -EdK Ed Keith e_...@yahoo.com Apparently, this happens only to (some) Yahoo users. You shoul

Re: [Caml-list] typing problem with sexplib and mutually recursive polymorphic types

2009-03-11 Thread Damien Doligez
On 2009-03-11, at 15:44, Markus Mottl wrote: That's true, but unlike Haskell OCaml doesn't have mandatory types. This means the user can't force the compiler to start out with user-provided type declarations. The OCaml compiler will always run type inference first and only try to unify the res

Re: [Caml-list] First release of focalize, a development environment for high integrity programs.

2009-03-25 Thread Damien Doligez
On 2009-03-24, at 11:55, David MENTRE wrote: For those interested in such details, FoCaLize seems to be under a BSD-like license (I have not made a detailed review of the code). I would be interested to know if knowledged people (e.g. Debian developers ;-) consider this code Free Software or no

Re: [Caml-list] Strange performance bug

2009-04-29 Thread Damien Doligez
On 2009-04-29, at 15:58, Markus Mottl wrote: Note that the effect of not precompiling the regular expressions is not just the overhead of this computation, but also vastly greater GC-pressure. The current GC-settings in Pcre will trigger a full GC-cycle every 500 regular expressions allocated,

[Caml-list] OCaml version 3.11.1+rc0

2009-05-19 Thread Damien Doligez
Dear OCaml users, It is our pleasure to announce that release 3.11.1 is imminent. We have uploaded a release candidate at this address: < http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.1+rc0.tar.gz > See the list of changes below. We need you to test this on as many system types as p

[Caml-list] ANN: OCaml 3.11.1+rc1

2009-06-03 Thread Damien Doligez
Dear OCaml users, We fixed a few bugs from OCaml 3.11.1+rc0, and prepared a new release candidate. The main changes from rc0 are the following. - PR#4796: ocamlyacc: missing NUL termination of string - PR#4798: compilation of ocamldoc.opt fails under windows - PR#4804: bug in Big_int.int64_of

[Caml-list] JOB: post-doc at MSR-INRIA Joint Centre

2009-06-09 Thread Damien Doligez
mmand of the English language. Location The Microsoft Research-INRIA Joint Centre is located on the Campus of INRIA Futurs, in South part of Paris, near the Le-Guichet RER station. The Tools for Proofs project-team is composed of Damien Doligez, Leslie Lamport and Stephan Merz. Contact Candidates

[Caml-list] OCaml 3.11.1 released

2009-06-12 Thread Damien Doligez
Dear OCaml users, 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: < http://caml.inria.fr/down

Re: [Caml-list] OCaml 3.11.1 released

2009-06-12 Thread Damien Doligez
On 2009-06-12, at 14:46, Damien Doligez wrote: 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. I forgot one

Re: [Caml-list] OCaml 3.11.1 released

2009-06-12 Thread Damien Doligez
On 2009-06-12, at 15:02, Stéphane Glondu wrote: The links to the sources seem to be broken. Sorry about that. It is fixed now. -- Damien ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-lis

Re: [Caml-list] Understanding GC and Alarms

2009-08-05 Thread Damien Doligez
Hello, On 2009-08-04, at 15:39, Björn Pelzer wrote: With the alarm loop, the GC will only print the first part ("Calling finalisation functions.") once at the start of the loop and then begin looping, starting new cycles but no new finalisations. Yes, the GC calls the finalisation function

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

2009-08-26 Thread Damien Doligez
On 2009-08-25, at 20:03, Christophe Raffalli wrote: [...] and the minor heap is at a higher adress than the major heap, That would be very hard to guarantee, given the current OS trend toward address randomization. How much slower is the compacting major GC comparer to the standard one ?

Re: [Caml-list] Cache algorithms: implementation or library available?

2009-09-23 Thread Damien Doligez
On 2009-09-23, at 09:54, Hugo Ferreira wrote: Funny enough I was expecting complicated uses of the Weak module. The Weak module is never the right tool for implementing a cache. -- Damien ___ Caml-list mailing list. Subscription management: http:/

Re: [Caml-list] tip for tail recursive map

2009-11-02 Thread Damien Doligez
On 2009-10-23, at 21:55, pikatchou pokemon wrote: I know this topic has been discussed several times, but I don't think I have seen the solution I use for functions of the List module which are not tail recursive. I thought sharing the tip could be nice. I will take an example, List.map. Wh

[Caml-list] A warning about warnings

2009-11-10 Thread Damien Doligez
Hello World, I've been compiling OCaml programs and libraries lately, and I've seen this kind of things in make output: ocamlc -w A -warn-error A or even: ocamlc -w Ael -warn-error Ael You should not do that, because it means your build will break with the next version of OCa

Re: [Caml-list] Random questions

2009-12-03 Thread Damien Doligez
On 2009-12-03, at 12:00, AUGER wrote: (* preliminary function: negate_minus_1 : int -> int : n |-> -n-1 *) let negate_minus_1 = (lor) (-(max_int/2)-1) (* or inline the constant *) You probably mean this: let negate_minus_1 = (lxor) (-1);; -- Damien

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

2009-12-05 Thread Damien Doligez
On 2009-12-04, at 20:09, Aaron Bohannon wrote: So in a 15 second run (with no idle time, as I said), it now does about 130 heap compactions instead of 3 and gets better total performance because of it, utterly defying my GC intuition. What is the size of your heap? Have you tried compacting

Re: [Caml-list] compiling OCaml program for supercomputer running SGI Propack 6?

2009-12-18 Thread Damien Doligez
Hi, On 2009-12-17, at 19:28, Dave Lewis wrote: [Apologies for duplication across mailing lists.] Hi - I'd like to run this OCaml program: [...] on the 3TB memory supercomputer described here http://www.ncsa.illinois.edu/UserInfo/Resources/Hardware/SGIAltix/Tec ... It appears that the

Re: [***SPAM*** Score/Req: 10.1/8.0] Re: [Caml-list] Re: OCaml is broken

2009-12-21 Thread Damien Doligez
On 2009-12-20, at 13:21, Erik Rigtorp wrote: The first step for OCaml would be to be able to run multiple communicating instances of the runtime bound to one core each in one process and have them communicate via lock free queues. Does anyone know how to do lock-free queues in a weakly-consi

[Caml-list] [ANN] Release Candidate: 3.11.2+rc1

2009-12-29 Thread Damien Doligez
Dear Ocaml Users, It is our pleasure to announce that the release of 3.11.2 is imminent. What we need now is your cooperation for testing the release candidate, especially on Windows. The release candidate is available as source code at this address: ftp://ftp.inria.fr/INRIA/Projects/cristal/oca

Re: [Caml-list] problem creating .cma library

2010-01-05 Thread Damien Doligez
On 2009-12-31, at 00:30, Guillaume Yziquel wrote: #include #include #include "../mylib/mylib.h" CAMLprim value my_print_stub(value v) { CAMLparam1(v); /* is missing here, for garbage collection purposes. */ char* str = (char*)String_val( v ); /* You

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

2010-01-05 Thread Damien Doligez
On 2010-01-05, at 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 3k -- Damien ___ Caml-list mai

Re: [Caml-list] [ANN] Release Candidate: 3.11.2+rc1

2010-01-12 Thread Damien Doligez
Hi Rich, Is there an ETA for 3.11.2? I'd very much like to include it in RHEL 6. We have some problems with Windows, and I'm not sure whether I'll do an RC2, but I hope to release 3.11.2 within 3 weeks. -- Damien ___ Caml-list mailing list. Subsc

Re: [Caml-list] Re: [ANN] Release Candidate: 3.11.2+rc1

2010-01-12 Thread Damien Doligez
On 2010-01-12, at 11:30, Sylvain Le Gall wrote: Is it this the problem you are talking about: [...] No. We have a report of build problems with MSVC when building with ocamlbuild that I need to investigate. -- Damien ___ Caml-list mailing list.

[Caml-list] ANN: Objective Caml 3.11.2 released.

2010-01-20 Thread Damien Doligez
Dear OCaml users, It is our pleasure to celebrate the birthday of Andre-Marie Ampere by announcing the release of OCaml version 3.11.2. This is mainly a bug-fix release, see the list of changes below. It is available here: < http://caml.inria.fr/download.en.html >. It is source-only for the mom

Re: [Caml-list] problem creating .cma library

2010-01-20 Thread Damien Doligez
On 2010-01-09, at 20:29, Guillaume Yziquel wrote: The remembere set, in this context, explains why I would need Store_field when dealing with pure OCaml world. When wrapping pointers to the C heap in abstract blocks, I do not see the point of Store_field, and it seems to me that Field= ass

Re: [Caml-list] A syntax extension to simplify List manipulation

2010-01-25 Thread Damien Doligez
On 2010-01-17, at 09:24, blue storm wrote: 2) The use of the Extlib module is hardcoded in the syntax extension. I would find it nicer if you only referred to "List.map" instead of "Extlib.List.map", and let the user "open Extlib" if he wants to override the stdlib. That would allow one to use

Re: [Caml-list] out of memory error

2010-02-08 Thread Damien Doligez
Hello, On 2010-02-02, at 14:31, Kihong Heo wrote: Can't I use "ocamlrun -v" for my program such that it use foreign language interface with C. If I couldn't, can you give me a good debugging methodology? It's very difficult to find out that error because of using foreign language interface.

Re: [Caml-list] no_scan_tag and int array

2010-03-29 Thread Damien Doligez
Hello, On 2010-03-06, at 10:26, ygrek wrote: > So, as expected, setting No_scan_tag on the array of integers prevents GC > from uselessly > scanning the huge chunk of memory. Looks like polymorphic array functions > still work fine and > GC correctly reclaims array memory when it is not refere

[Caml-list] OCaml 3.12.0+beta1

2010-06-16 Thread Damien Doligez
the list included below. It is available here: < http://caml.inria.fr/pub/distrib/ocaml-3.12/ >, along with the updated reference manual. Happy hacking, -- Damien Doligez for the OCaml team. -- (Changes that can

[Caml-list] OCaml 3.12.0+rc1

2010-07-23 Thread Damien Doligez
t and report any problems with compilation and installation on your favorite platform. -- Damien Doligez for the OCaml team Objective Caml 3.12.0: -- (Changes that can break existing programs are marked with a "*" ) Language features: - Shorthand notation

Re: [Caml-list] OCaml 3.12.0+rc1

2010-07-30 Thread Damien Doligez
Daniel, On 2010-07-24, at 12:51, Daniel Bünzli wrote: >> report any problems with [...] installation on your favorite platform. > > Don't have the time right now to test it but if the BT is up to date this : > > http://caml.inria.fr/mantis/view.php?id=5093 > > wasn't fixed. I've fixed a numb

[Caml-list] Objective Caml release 3.12.0

2010-08-02 Thread Damien Doligez
Dear OCaml users, We have the pleasure of announcing the release of OCaml version 3.12.0. This version brings many new features, see the list of changes below. It is available here: < http://caml.inria.fr/download.en.html > This is released as source for the time being, but the binary versions s

Re: [Caml-list] Converting variants with only constant constructors to integers

2010-08-23 Thread Damien Doligez
Hi Kaustuv, On 2010-06-08, at 20:22, Kaustuv Chaudhuri wrote: >> Of course intify can cause a segmentation fault! >> >> # let arr = Array.of_list [intify 1.0; 0];; >> Segmentation fault > > This may be splitting hairs, but the reason that fails is that > Array.of_list's ad hoc polymorphism heur

Re: [Caml-list] More re GC hanging

2010-09-01 Thread Damien Doligez
On 2010-08-15, at 12:45, Adrien wrote: > First, remove all non-tail-rec functions: no more List.map, @ or > List.concat. All lists were pretty short (definitely less than 1000 > elements) but maybe the amount of calls generated garbage or something > like that: I couldn't get much infos about the

Re: [Caml-list] Re: Segfaults with Dynlink with OCaml 3.11

2010-09-03 Thread Damien Doligez
On 2010-08-25, at 06:00, Paul Steckler wrote: > Today, I found the culprit. Here's the pattern: > > dynamically load .cmxs file > query list mutated by .cmxs file (* no problem *) > Gc.set { (Gc.get()) with Gc.minor_heap_size = ...}; > Gc.set { (Gc.get()) with Gc.major_heap

Re: [Caml-list] Segfault with humongous heap size

2010-09-03 Thread Damien Doligez
On 2010-09-02, at 13:23, Paul Steckler wrote: > If I enter this in my shell: > > declare -x OCAMLRUNPARAM="h=32" > > every OCaml program I run yields a segfault. I have OCaml 3.11.1+rc1 > installed > on Fedora 12 x64. > > Of course, that heap size, 3.2G words, is larger than the mem

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Damien Doligez
On 2010-09-07, at 22:58, Paolo Donadeo wrote: > The problem is that, for several good reasons, I need a copy, or a reference, > to the OCaml value representing the lua_State (v_L in the code above) inside > the Lua state (I mean the C data structure). That creates a cross-heap reference loop a

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

2010-10-29 Thread Damien Doligez
On 2010-10-28, at 23:48, Jon Harrop wrote: > How does OCaml update references in the stacks and heap when values are > moved by the GC? They are updated by the GC, of course. -- Damien ___ Caml-list mailing list. Subscription management: http://yque

Re: [Caml-list] Optimizing garbage collection

2010-11-22 Thread Damien Doligez
On 2010-11-21, at 20:26, Eray Ozkural wrote: > I've been thinking whether some kind of doubling strategy would work for the > minor heap size. What do you think? Sounds like an interesting idea, but what heuristic would you use? When everything is smooth, the running time decreases something li

Re: [Caml-list] OCaml + mingw-w64

2010-11-22 Thread Damien Doligez
On 2010-11-22, at 13:04, Christoph Cullmann wrote: > In ocaml 3.12, in byterun/major_gc.h, there is: > > intnat caml_major_collection_slice (long howmuch) > > whereas in the .c file that is: > > intnat caml_major_collection_slice (intnat howmuch) > > As intnat is with mingw-w64 long long, thi

Re: [Caml-list] Optimizing garbage collection

2010-11-23 Thread Damien Doligez
On 2010-11-22, at 19:38, John Carr wrote: > I don't understand "smooth". Minor heap size should be based on the > rate of garbage generation relative to allocation to balance cache > misses with GC cost. The ratio may be small or large independent of > whether it varies during the program. Wh