From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 2692FBBBB for ; Sat, 1 Apr 2006 11:29:54 +0200 (CEST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k319Tr0t024950 for ; Sat, 1 Apr 2006 11:29:53 +0200 Received: by xproxy.gmail.com with SMTP id i27so579326wxd for ; Sat, 01 Apr 2006 01:29:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ADOObe+Wv7e5RsZU5qwtIFCWNb6YRIzlMolNBNomY5AWyh0+ke677qCKPBHnQ+xuHI22HCq1p7jOXlDTAUu6QXuzJYGoH2P9GQVAQvoidgbblgS2pL+2Qe6Qnb3R58fJ3s+j6TbyVmevZO8dpF/CnzbdWWvFFmNBmuoVL9MdGSQ= Received: by 10.70.129.8 with SMTP id b8mr1489854wxd; Sat, 01 Apr 2006 01:29:52 -0800 (PST) Received: by 10.70.129.16 with HTTP; Sat, 1 Apr 2006 01:29:52 -0800 (PST) Message-ID: <9d3ec8300604010129q6894f17jd4ddca7709abac27@mail.gmail.com> Date: Sat, 1 Apr 2006 11:29:52 +0200 From: "Till Varoquaux" To: mulhern Subject: Re: [Caml-list] Re: Stack_overflow Cc: caml-list@yquem.inria.fr In-Reply-To: <54f15b6e0603311623y517b605elc52d6938edea3037@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24147_18064970.1143883792604" References: <54f15b6e0603311244u4677c290s481c4aaa859eae35@mail.gmail.com> <54f15b6e0603311623y517b605elc52d6938edea3037@mail.gmail.com> X-Miltered: at nez-perce with ID 442E4811.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; stack:01 mylist:01 ocamlc:01 stack:01 ocamlc:01 compiler:01 byte:01 mylist:01 compiler:01 byte:01 W18:98 wrote:01 wrote:01 caml-list:01 compile:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=HTML_30_40,HTML_MESSAGE, RCVD_BY_IP autolearn=disabled version=3.0.3 ------=_Part_24147_18064970.1143883792604 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/1/06, mulhern wrote: > > Thanks to everybody who responded. > > To clarify things: > I'm trying to _compile_ a list definition. > So, my .ml file looks like this: > > --- > let myList =3D [("first", ["some"; more]); > ("second", ["more"; "still"])] > --- > except that there are 12,000 elements in the list instead of two as in > the example. > _ocamlc_ throws a Stack_overflow error while compiling this list. So, > I want to know how to influence _ocamlc_ to be able to compile this or > larger lists. > > The suggestion of chunkifying the list into smaller lists is a > practical one; I may be forced to try it. > > ocamlc.opt compiles the list fine but that reduces portability. > > -mulhern Note that ocamlc.opt should produce exactly the same code than ocamlc.... The difference is that the compiler is natively compiled instead of byte-compiled. Therefor your program will run in as many places it just won't compile on plateforms without ocamlc.opt. You could put your list in = a separate module, byte compile it and "include" it in the reste of your source. This *should* solve the problem (I might be wrong) and you could still bundle the rest of your sources in a way that would allow to compile them with ocamlc. Till ------=_Part_24147_18064970.1143883792604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/1/06, mulhern <mulhern@gmail.com> wrote:
Thanks to everybody who responded.

To clarify things:
I'm trying = to _compile_ a list definition.
So, my .ml file looks like this:

= ---
let myList =3D [("first", ["some"; more]);
            &nb= sp;      ("second", ["more"; &= quot;still"])]
---
except that there are 12,000 elements in the = list instead of two as in
the example.
_ocamlc_ throws a Stack_overfl= ow error while compiling this list. So,
I want to know how to influence _ocamlc_ to be able to compile this or<= br>larger lists.

The suggestion of chunkifying the list into smaller= lists is a
practical one; I may be forced to try it.

ocamlc.opt compiles the list fine but that reduces portability.

-mulhern

Note that ocamlc.opt should produce exactly the same code t= han ocamlc.... The difference is that the compiler is natively compiled ins= tead of byte-compiled. Therefor your program will run in as many places it = just won't compile on plateforms without=20 ocamlc.opt. You could put your list in a separate module, byte compile it a= nd "include" it in the reste of your source. This *should* solve = the problem (I might be wrong) and you could still bundle the rest of your = sources in a way that would allow to compile them with ocamlc.


Till
------=_Part_24147_18064970.1143883792604--