caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Till Varoquaux" <till.varoquaux@gmail.com>
To: mulhern <mulhern@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Stack_overflow
Date: Sat, 1 Apr 2006 11:29:52 +0200	[thread overview]
Message-ID: <9d3ec8300604010129q6894f17jd4ddca7709abac27@mail.gmail.com> (raw)
In-Reply-To: <54f15b6e0603311623y517b605elc52d6938edea3037@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

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 = [("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

[-- Attachment #2: Type: text/html, Size: 1743 bytes --]

      parent reply	other threads:[~2006-04-01  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31 20:44 Stack_overflow mulhern
2006-03-30 23:03 ` [Caml-list] Stack_overflow Jon Harrop
2006-03-31 21:38 ` Eric Cooper
2006-03-31 21:50 ` Stack_overflow Stefan Monnier
2006-04-01  0:23 ` Stack_overflow mulhern
2006-04-01  3:31   ` [Caml-list] Stack_overflow Ingo Bormuth
2006-04-01  8:45   ` Christophe TROESTLER
2006-04-01  9:29   ` Till Varoquaux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d3ec8300604010129q6894f17jd4ddca7709abac27@mail.gmail.com \
    --to=till.varoquaux@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=mulhern@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).