[plt-scheme] PlaneT, plts and distributing software.

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Oct 25 21:04:41 EDT 2005

On Oct 25, Yoav Goldberg wrote:
> [...] I think writing and distributing a small script that will
> connect to PLaneT, download the package you want and install it as a
> collect, would be extremely usefull [...]

But it is installed as a collection.  The planet cache is used as
another item on the list of directories to search (when the `planet'
syntax is used to specify a module.)

> While we're at it, I think it will also be extremly usefull to add
> the <path-of-main-file>/collects to the
> current-library-collection-paths[2] list, [...]

How do you determine the "main-file"?  You're talking about the file
that is used with "-f" -- what about multiple "-f"'s and direct use of
"load"?  If you want to just require some module relative to the
current one, then you should just use a relative name (which is always
relative to the source file that does the require).

> [...] if I can't control the server, I'm not going to use it.

(That's a very 90's thing to say.)

> [1] Maybe there's documentation on the HelpDesk, I never use the
> HelpDesk [...]  and it has a really tiny font for my eyes.

Start DrScheme, change the font size, quit DrScheme.

> [2] What I currently do is to "load" a file that does just that on
> the top of my "main file", but I think that system support for it
> will be nicer. (The method I use prevents my main module from being
> "required" from somewhere else as a module).

Relative paths should work fine any way of requiring the file.

On Oct 25, Pupeno wrote:
> > Seriously, it is a bit farcical to not use the tools provided (and
> > hence my farcical response).  Planet and .plts works across more
> > platforms that PLT targets than Debian or Portage does (and in
> > particular on Windows).  You can't seriously expect PLT to
> > distribute their packages using, say, the Debian system.
> Oh! I don't, I don't expect any software to be distributed in a
> platform specific way but I also don't expect software to be
> distributed in a way that can't be packaged for a platform.

This is not too easy any way you look at it.  If you want to
distribute collections, you have to distinguish installing them in the
plt tree which makes them available for any user on the system, or
installing them in a specific user directory.  For installation in the
main plt tree, what you need (if you want to use some other package
system) is to package up the contents of that collection.  In the
script section that is in charge of installing the package, you need
to invoke "setup-plt -l <new-collection>".  To find the current
PLTHOME, you can run this:

  mzscheme -meev '(require (lib "plthome.ss" "setup"))' \
                 '(printf "~a~%" plthome)'

But note that installing a new version of plt will usually want to
create its directory from scratch.

> > If you have a need to use Debian or Portage I'm sure you can find
> > a way to integrate Planet with either (perhaps by writing a custom
> > Planet server), but I don't think you should use that as a reason
> > to not use Planet or .plts
> If I can't build .debs out of .plts (like I can build .debs out of
> .tar.gz having source code and autotools/scons scripts), then, I'll
> have to look into other alternatives.

Using the above you should be able to do that.

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

Posted on the users mailing list.