My understanding is that contrib began as a "staging ground" for
core. If libraries or functions proved themselves useful, then they
could be promoted to core.
I get the feeling that things have changed since then. For one, core
doesn't seem to grow that way any more. There was talk of moving some
functions from contrib to core way back in November, but that doesn't
seem to have gone anywhere. I understand there's good motivation to keep
core small, but perhaps it's time to rethink what contrib is for.
The feeling I get now is that contrib is a bucket-o-code. Since we as a
community don't have any widely-accepted mechanisms for dependency
resolution, there's a quite understandable motivation to put useful
libraries in contrib so that other clojure hackers can make use of them
with minimal hassle.
Right now if you want to handle nontrivial dependencies in your project,
you need to use Maven or Ivy. Many are reluctant to try these out since
they're perceived as heavy-weight, and the idea of writing executable
XML is rightfully viewed with suspicion by folks who're familiar with
Greenspun's Tenth Law; it's certainly tacky. But these tools have the
advantage that they work right now.
I think things could be improved by creating a tool that wraps the
functionality that Maven provides in a more pleasant s-expression-based
interface and focuses just on the parts of Maven that are relevant to
building a Clojure project, but that's a discussion for another thread.
I wonder if improving the dependency management story of Clojure will
help to clear up the confusion surrounding contrib. I certainly think
there's room for a "standard library" that ships with Clojure, and
precedent for this seems to be there with the existence of clojure.xml
and clojure.zip, but we need some discussion about why these libraries
are included and what others might also be worth including.
It also may help to think about moving things out of contrib in two
ways: in one case functions would be moved into the core.clj namespace
(this was proposed of duck-streams' spit function) and in the other
whole libraries would get moved into the main Clojure distribution. It's
important to be very cautious with the first as these increase the
complexity of Clojure for everyone since they get loaded on startup, but
I suspect there's room for more growth in the second case.
Would love to hear what folks think about this.
thanks,
Phil
I am new here and new to Java and the JVM as well. Contrib strikes me
as an improvement over the situation with Ruby where tons of code was
dumped into the Ruby distribution and much of it rotted. Using it as a
staging area seems wise and has my vote. However I am not opposed to
having a rather large library, provided it is concise and well-
maintained. Haskell and Python are both testaments to the power of a
large standard library.
Dependency tracking and library discovery and installation are
extremely important to the success of any new language. It would be
wise to see where the predecessors have gone awry. For example, Ruby
Gems seem to fall down in a highly distributed setting in which the
same library exists in many different forks and there are no official
releases. I am not in favor of programming that way but if people are
going to (and they are likely to) then hopefully one has systems that
can cope with it. There are also system administration headaches that
arise from having two separate databases managing software on the same
system.
I don't know if Maven solves these same problems or not; I don't know
anything about Maven. But Clojure seems to have been well-served
during its short life by leveraging Java's strengths and building
orthogonally against its weaknesses. Utilizing whatever Java library
distribution/dependency tracking systems are available certainly
prevents Clojure from becoming a walled garden, which seems good. But
if Maven and friends are found to be inadequate, I would recommend
building something new, with heavy consideration after reviewing the
faults of our peers and predecessors.
—
Daniel Lyons
http://www.storytotell.org -- Tell It!
> Now that Clojure 1.0 is out, I think it's a good time to take a
> look at
> contrib. I noticed it didn't get an official 1.0 release along with
> Clojure core. I wonder if this is because its role is just not very
> well-defined. Several people have expressed this opinion here on the
> mailing list and on IRC.
I'd say the real question is not "what is contrib?" but "what kind of
library system should Clojure have?"
I think that it is clear to most of us that contrib started as
something which it isn't any more. At the moment, it's a bucket of
code whose only common point is the licence, which allows it to be
distributed under exactly the same terms as Clojure itself, whatever
those may become.
As I have said before, I strongly believe that Clojure should have a
standard library. Contrib could then become the staging ground for
both code and the standard library. But the important question is
about the standard library, not about the fate of contrib.
Alternatively, we could also envisage something like the Haskell
platform:
http://hackage.haskell.org/platform/
This is a collection of separately written libraries distributed as a
single package with a single installation procedure. I think an
officially labelled and maintained standard library is important, but
there could well be a collection of independent (and differently
licenced) libraries on top of that.
Konrad.