[racket] Help On User Libraries - The Basics

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Aug 21 17:43:52 EDT 2011

Four hours ago, Neil Van Dyke wrote:
> Ray Racine wrote at 08/21/2011 01:06 PM:
> > So here is the scenario.  Joe the some what experienced coder
> > hears lisp is cool and Racket is the coolest lisp around.
> I understand what you're saying, and I think you've convinced me to
> change my answers.  Before, I wanted Joe to use PLaneT development
> links early and often, to smooth the transition to sharing code, but
> they are a little annoying even when you know how to use them and
> you have scripts to help automate.
> What if we initially tell Joe to just using relative filenames in
> his "require"s for his own multi-file project for now?

That's exactly the right answer.

> If Joe wants to get into packaging reusable libraries, which it
> sounds like you're doing, then he'll have a problem in most any
> language of where to put the files and how can they be found later.

Yes -- the problem there (in the racket context), is when you want to
separate out *some* of your files into a reusable library.  In this
case, relative (string) requires going from your code that is not in
this library to code that is in the library should change -- because
the library is going to have a different "standard" name (with planet,
it'll be some `planet/foo/blah').  Since this is an inherent change in
library naming, I don't see how it could be resolved without running
into the same kind of issues.

> Finally, we have a section buried somewhere for people who have a
> lot of proprietary reusable collections and don't want to hassle
> with PLaneT development links for it, and for whatever reason don't
> want to just have the configuration management checkouts put the
> files in standard relative locations... when we tell them the secret
> of "PLTCOLLECTS".  Then we tell them life will be easier if they
> just use relative filenames for proprietary code, and PLaneT
> development links for open source code.

Right -- PLTCOLLECTS has an important role, but it not something that
should be used too early.  I think that there's not enough warnings to
make people avoid using it.  (And when you do use it, the environment
variable is better than racket command-line options, since it'll get
used by all other racket applications.)

> Every time Joe expresses confusion about whether he should be using
> PLaneT development links or "PLTCOLLECTS", and he's not sure they're
> the right way and not sure he's doing it right... we apologize for
> ever mentioning those, as well as for what we're about to do... and
> hypnotize him and clear the slate, and when he wakes, he will
> remember only relative filenames.


          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.