caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OCaml maintenance status / community fork (again)
Date: Sun, 11 Dec 2011 00:28:13 +0100	[thread overview]
Message-ID: <CAGrdgiV5hqGKNzcQNBBcJeO6ErHR1Jwd4_FLqOGFvbWs32ab2Q@mail.gmail.com> (raw)
In-Reply-To: <4EE37070.4010702@inria.fr>

On Sat, Dec 10, 2011 at 15:45, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:

> 2- As pointed out already in this discussion, it's not on the Caml compiler
> that community efforts are most needed.  For example, the most impactful
> action that his community could take, in my opinion, is to adopt and embrace
> a common packaging system like Cabal for Haskell.

This one piqued my interest somewhat. I should refrain from
commenting, but I can't help myself.

What makes the Cabal infrastructure successful is that it is three
different types of systems in one. First, there is hackage which
provides a package repository of "blessed" packages - online search of
the repository and general dumping ground of rotting packages. In
other words, a perl CPAN for Haskell. Quality varies a lot, but at
least there is a go-to place when searching for packages.

Second, Cabal provides a system for automatically building packages.
That is, if you have cabal, chances are that you can just blindly ask
it to build the source code and you are done.... when it works.

Thirdly, Cabal provides dependency tracking among packages. That is,
given a package, you can easily fetch its dependencies and build
another version of the package yourself.

That said, my personal opinion, which probably not means much as I
don't currently write scores of Ocaml or Haskell source, is still that
Cabal is somewhat overengineered. Usually you end up with trouble when
you try to build new packages. If you forget profiling flags, you have
to rebuild essentially everything. Multiple versions of packages
creates headaches when trying to use them (think the diamond-problem
in a subtyping setting with multiple inheritance or functors without
sharing constraints). And when I build Haskell source, I usually end
up cursing the hell out of Cabal :)

Erlang has a tool, doing parts two and three above: rebar. This tool
is fundamentally simpler than Cabal. Its dependency tracking is
essentially download instructions from software repositories and
that's it. Packaging is done by creating the equivalent of static
binaries .. dependencies are shoved into a release of an erlang
runtime with all the necessary modules ready into a selfhosting,
selfcontaining system. The approach is *much* simpler, but it works
tremendously well. Even if it doesn't handle the problem of the
diamond. It also allows different software to use different versions
of libraries, but it doesn't really solve dependency convergence (that
is yet another name for the diamond problem: A needs B and A needs C -
but B needs D in version 1 and C needs D in version 2):

digraph {
  D -> B -> A;
  D -> C -> A
}

In my experience, it is the simple solutions that works best, even if
they can't handle certain scenarios. In some sense a certain amount of
limitation is more a virtue than a curse. I'd also suggest splitting
the search and indexing part from the dependency tracking and building
part. They are far enough apart that they can be solved each by
themselves.

Finally there are two other things I would recommend one investigates:
FreeBSD ports or Mac OSX homebrew for the indexing part. And pythons
virtualenv (Ian Bicking was the original author). Virtualenv allows
you to build a "virtual environment" in which you install python
packages, which are distinct from the system installation. Of course
you can symlink system libraries into the virtual environment, but it
also means that programs can live next to each other and the
sandboxing going on solves a lot of dependency problems in a simple
way.

In other words, to solve this, I'd much rather try to rig the
excellent Ocamlbuild and Ocamlfind infrastructure such that it
incorporates some of the above things, ... that is if it doesn't do
that already...

-- 
J.


  parent reply	other threads:[~2011-12-10 23:28 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  9:10 Benedikt Meurer
2011-12-08  9:54 ` Alain Frisch
2011-12-08 10:28   ` Benedikt Meurer
2011-12-08 10:46     ` Alain Frisch
2011-12-08 11:08       ` Benedikt Meurer
2011-12-08 16:42       ` Fabrice Le Fessant
2011-12-08 10:47     ` ivan chollet
2011-12-08 14:07       ` oliver
2011-12-08 11:11     ` Pierre-Alexandre Voye
2011-12-08 18:18       ` Török Edwin
2011-12-09 21:42         ` oliver
2011-12-08 10:16 ` Gabriel Scherer
2011-12-08 11:07 ` Stéphane Glondu
2011-12-09  2:11 ` Jacques Garrigue
2011-12-09 10:37   ` Jérémie Dimino
2011-12-09 11:03     ` Gabriel Scherer
2011-12-09 11:17       ` Stefano Zacchiroli
2011-12-09 11:50         ` Jonathan Protzenko
2011-12-09 12:36           ` Alain Frisch
2011-12-09 23:22         ` Goswin von Brederlow
2011-12-09 22:33       ` oliver
2011-12-09 14:24     ` Benedikt Meurer
2011-12-09 17:00       ` Mehdi Dogguy
2011-12-09 17:36         ` Benedikt Meurer
2011-12-09 17:45           ` Mehdi Dogguy
2011-12-09 23:24             ` Goswin von Brederlow
2011-12-10  9:31               ` Benedikt Meurer
2011-12-10 14:45 ` Xavier Leroy
2011-12-10 15:58   ` Benedikt Meurer
2011-12-12 10:21     ` Xavier Leroy
2011-12-12 10:59       ` Benedikt Meurer
2011-12-12 12:20         ` Mehdi Dogguy
2011-12-12 15:17           ` Goswin von Brederlow
2011-12-19  4:09           ` Romain Beauxis
2011-12-19 17:35             ` Alain Frisch
2011-12-12 12:57         ` Gerd Stolpmann
2011-12-10 17:06   ` Török Edwin
2011-12-10 18:28   ` Jérémie Dimino
2011-12-10 18:34     ` Wojciech Meyer
2011-12-10 19:10       ` Wojciech Meyer
2011-12-10 20:55         ` Jérémie Dimino
2011-12-10 21:40           ` [Caml-list] Camlp4/p5 type reflection [was: OCaml maintenance status / community fork (again)] Wojciech Meyer
2011-12-10 23:34             ` Gabriel Scherer
2011-12-11  0:47               ` [Caml-list] Camlp4/p5 type reflection [ Wojciech Meyer
2011-12-11 11:19                 ` Gabriel Scherer
2011-12-11 18:14                   ` Jérémie Dimino
2011-12-11  9:04               ` [Caml-list] Camlp4/p5 type reflection [was: OCaml maintenance status / community fork (again)] Stéphane Glondu
2011-12-11  9:36                 ` Török Edwin
2011-12-11 10:29                 ` Gabriel Scherer
2011-12-11 11:23                   ` Gerd Stolpmann
2011-12-11 11:38                     ` Gabriel Scherer
2011-12-11 10:20               ` Fabrice Le Fessant
2011-12-11 10:47                 ` Gabriel Scherer
2011-12-11 13:27               ` Alain Frisch
2011-12-11 13:35                 ` Gabriel Scherer
2011-12-11 13:42                   ` Alain Frisch
2011-12-11 13:36                 ` Arnaud Spiwack
2011-12-11 13:46                 ` Stéphane Glondu
2011-12-10 23:28   ` Jesper Louis Andersen [this message]
2011-12-11 11:02     ` [Caml-list] OCaml maintenance status / community fork (again) Gerd Stolpmann
2011-12-13 19:36       ` oliver
2011-12-14 12:13         ` Gerd Stolpmann
2011-12-16 10:03           ` Stéphane Glondu
2011-12-11 13:33   ` Goswin von Brederlow
2011-12-11 13:59     ` [Caml-list] Community distribution [was: OCaml maintenance status / community fork (again)] Benedikt Meurer
2011-12-12 17:48   ` [Caml-list] OCaml maintenance status / community fork (again) Stéphane Glondu
2011-12-13 20:39     ` [Caml-list] New experimental ARM backend [was: OCaml maintenance status / community fork (again)] Benedikt Meurer
2011-12-14  9:18       ` Mark Shinwell
2011-12-14 21:51         ` Benedikt Meurer
2011-12-18 11:57       ` [Caml-list] " Benedikt Meurer
2011-12-18 13:08         ` Benedikt Meurer
2011-12-18 14:50           ` Alexandre Pilkiewicz
2011-12-18 16:42             ` Benedikt Meurer
2011-12-18 17:23           ` Stéphane Glondu
2011-12-21 10:11             ` [Caml-list] " Benedikt Meurer
2011-12-18 13:16         ` [Caml-list] " Benedikt Meurer
2011-12-17 18:36   ` [Caml-list] OCaml maintenance status / community fork (again) Stéphane Glondu
2011-12-18  4:25     ` Till Varoquaux

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=CAGrdgiV5hqGKNzcQNBBcJeO6ErHR1Jwd4_FLqOGFvbWs32ab2Q@mail.gmail.com \
    --to=jesper.louis.andersen@gmail.com \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    /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).