From: Alain Frisch <alain@frisch.fr>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Shared run-time DLLs for commerce
Date: Wed, 09 Jan 2008 10:17:41 +0100 [thread overview]
Message-ID: <47849135.8000605@frisch.fr> (raw)
In-Reply-To: <200801071951.25170.jon@ffconsultancy.com>
Jon Harrop wrote:
> Yes. The concern here is not loss of sales but loss of competitive edge. With
> direct access to a comprehensible implementation of the complex algorithms
> inside the software, people will nick the algorithms even if they don't nick
> the source code. After 9 years of work, I'd rather not see that happen... :-)
If your target audience is people who already use OCaml (and who come
with request for support for specific versions of OCaml), I doubt you'll
get direct competition on this niche, so it should be safe to ship the
source code. If you target the widest audience of people looking for
good visualization solutions, you might want to drop the tiny fraction
of those who insist on using an old version of OCaml. Anyway, that's
none of my business.
> I was thinking that externalizing an interface to the intermediate
> representation might be another solution?
The first intermediate language where pattern matching is already
lowered (the lambda code) already has strong dependencies to specific
interfaces (e.g. it makes to references fields of external modules by
position). Moreover, there is no guarantee that the internal
representation of this lambda remains compatible across versions of OCaml.
> In many cases a separate server would work well. However, this is an
> OpenGL-based application so I think this would require one process to be able
> to render efficiently into an OpenGL context from another process. I'm not
> sure how or if that can work or whether or not it would be portable.
Cannot you put the low-level OpenGL part in the main process (shipped
with source code) and the high valued algorithms in the server?
> I'd be very happy if the brittle digest comparison were replaced with a
> structural API comparison instead. That would save me a lot of time and
> effort.
Compiled code depends on specific locations for elements coming from
external modules. Basically, if a version of OCaml adds a new field
around the top of Pervasives, the code compiled against the old version
becomes invalid.
What you can do is to ship your library as a single module abstracted
over all its dependencies (that is, a functor which takes as arguments
modules from the stdlib and other dependent libraries). You can put in
the interface whatever you expect from these modules, so the same
functor could be used with future versions if they only add new fields
(but not new constructors or record fields, for instance). Again, some
Camlp4 hack could somewhat automate this.
The module still depends on a specific version of OCaml, but now, it
could make sense to add to the compiler features to read and write
version-independent representations of .cmi and lambda-code files.
(But honestly, I don't believe this will happen in the official OCaml.)
I've a final suggestion:
- automate the compilation of your library for several versions of OCaml
and of dependent libraries; it's not as if there were 200 versions of
each to support, 5-6 should be enough, right? A single command could be
enough to compile and package your library for all the possible
combinations. If you write a generic and robust tool for this task, you
might even be able to sell it. Now, your customers would get a small
installer that checks their installed versions and download the relevant
version of your library.
-- Alain
prev parent reply other threads:[~2008-01-09 9:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 11:30 Jon Harrop
2008-01-07 13:03 ` [Caml-list] " Alain Frisch
[not found] ` <200801071503.26977.jon@ffconsultancy.com>
2008-01-07 15:54 ` Alain Frisch
2008-01-07 17:32 ` Kuba Ober
2008-01-07 19:51 ` Jon Harrop
2008-01-07 21:17 ` Stefano Zacchiroli
2008-01-08 19:39 ` Christophe TROESTLER
2008-01-08 19:42 ` Jon Harrop
2008-01-08 20:18 ` Richard Jones
2008-01-08 16:03 ` Richard Jones
2008-01-08 18:35 ` Jon Harrop
2008-01-09 9:17 ` Alain Frisch [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=47849135.8000605@frisch.fr \
--to=alain@frisch.fr \
--cc=caml-list@yquem.inria.fr \
--cc=jon@ffconsultancy.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