caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@ozemail.com.au>
To: John J Lee <jjl@pobox.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Executable size?
Date: 16 Nov 2003 05:07:37 +1100	[thread overview]
Message-ID: <1068919657.25869.276.camel@pelican> (raw)
In-Reply-To: <Pine.LNX.4.58.0311151503532.5150@alice>

On Sun, 2003-11-16 at 02:13, John J Lee wrote:
> On Sat, 16 Nov 2003, skaller wrote:

> > The Ocaml equivalent of a C stub program which dynamically
> > links to the C run time is bytecode.
> 
> And, you're implying, even C's "hello world" *is* using the C standard
> library, because of printf -- and O'Caml is using it's standard library
> for the same reason.  

I think I'm saying that a 'fair' comparison would be between
C shared library partitioning of code, and Ocaml driver
program (top level) which loads bytcode dynamically:
when Ocaml is statically linking native code it is going
for all out blinding speed and ease of moving the
application executable around, instead of a small footprint
and portability of the application.


> So, an O'Caml .DLL or .so is implemented using O'Caml bytecode?

If you want dynamic loading, you have to use either bytecode
or a patched native code compiler (at least on the x86/Linux
platform).

This is a bit of a pain, I'd love to generate shared libraries.
[I only use the native code system]

> 
> > In my opinion, you best bet is to generate bytecode
> > and distribute that. Your clients WILL have to download
> > the bigger ocamlrun driver harness, but hopefully
> > only once.
> 
> That's not useful in the case where the user is only downloading one
> program, unfortunately.

True it will not reduce the footprint. Perhaps it will even be
larger. However, it *will* help make the code more portable,
since you can separate the one off task of building a custom
top level for each platform, and then building platform independent
application code.

I do this in Felix, and luckily for me the standard toplevel
has all the resources I need, so I can just rely on the Ocaml
team to build toplevels for each system, and let the client
build my product using bytecode if there is no native 
compiler for their platform.

If you do that, the footprint will vary depending on
the target platform. (Which it will anyhow I suppose :-)


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-11-15 19:08 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 16:14 John J Lee
2003-11-12 17:33 ` Richard Jones
2003-11-12 18:06   ` Dustin Sallings
2003-11-12 18:31     ` Sven Luther
2003-11-12 18:50       ` John J Lee
2003-11-13  9:10         ` Sven Luther
2003-11-13 13:46           ` John J Lee
2003-11-13 14:28             ` Sven Luther
2003-11-12 18:21   ` John J Lee
2003-11-12 22:53     ` Richard Jones
2003-11-12 23:50       ` John J Lee
2003-11-15 12:48     ` skaller
2003-11-15 15:25       ` John J Lee
2003-11-12 19:06   ` Brian Hurt
2003-11-12 18:38     ` Sven Luther
2003-11-12 19:04       ` Karl Zilles
2003-11-12 21:29         ` Brian Hurt
2003-11-12 20:03       ` Brian Hurt
2003-11-13  4:14         ` Kamil Shakirov
2003-11-13  9:06           ` Richard Jones
2003-11-13  9:18         ` Sven Luther
2003-11-12 18:46     ` John J Lee
2003-11-12 20:40       ` Brian Hurt
2003-11-12 20:10         ` Basile Starynkevitch
2003-11-12 20:35         ` John J Lee
2003-11-12 21:51           ` Brian Hurt
2003-11-12 21:35             ` David Brown
2003-11-12 22:12           ` Eric Dahlman
2003-11-12 23:32             ` Brian Hurt
2003-11-12 22:53               ` Eric Dahlman
2003-11-12 23:35               ` John J Lee
2003-11-12 23:44             ` John J Lee
2003-11-13  0:26               ` Karl Zilles
2003-11-13  1:29                 ` [Caml-list] F-sharp (was: Executable size?) Oleg Trott
2003-11-14  6:04                   ` [Caml-list] float_of_num Christophe Raffalli
2003-11-13 15:43               ` [Caml-list] Executable size? Eric Dahlman
2003-11-13 19:58                 ` John J Lee
2003-11-13 20:36                   ` Eric Dahlman
2003-11-13 22:16                     ` John J Lee
2003-11-15 13:41                   ` skaller
2003-11-15 15:13                     ` John J Lee
2003-11-15 18:07                       ` skaller [this message]
2003-11-15 13:36                 ` skaller
2003-11-15 15:01                   ` John J Lee
2003-11-15 17:53                     ` skaller
2003-11-13 13:37         ` Florian Hars
2003-11-12 18:05 ` Dustin Sallings
2003-11-12 18:36   ` John J Lee
2003-11-12 19:04     ` Dustin Sallings
2003-11-12 20:17       ` John J Lee
2003-11-12 20:01     ` Vitaly Lugovsky
2003-11-13  1:23 ` Nicolas Cannasse
2003-11-15 12:09 ` skaller

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=1068919657.25869.276.camel@pelican \
    --to=skaller@ozemail.com.au \
    --cc=caml-list@inria.fr \
    --cc=jjl@pobox.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).