PLaneT

(via Gordon)

PLaneT is PLT Scheme's centralized package distribution system.

PLaneT provides automatic run-time module distribution and caching.

Cute, and be sure to check out the available packages on the PLaneT website, as well as the implemenetation details.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Language feature?

The pertinent question, of course, is whether something such as this should be a language feautre, i.e, should module distribution to be supported by module systems.

One might fel that this is outside the scope of normal language design, as it is related to environment facilities that may be non-portable or not available entirely on some systems.

On the other hand there are clear benefits of buitlin language support: it can provide clean and consistent distribution semantic, it ensures soource code portability (as opposed to implementation portability), universal availability, and perhaps most importantly form a practical point of view, these days, it makes distribution by source easier, since required modules will be fetched automatically.

I am sure opinions differ.

my take

"most importantly form a practical point of view, these days, it makes distribution by source easier, since required modules will be fetched automatically."

This is 99% of the reason I wrote PLaneT in the first place. People were always making little PLT scripts for various tasks, but there was no good mechanism for sharing them: you can download and install somebody's .plt file for your own use, but your users will have to install the same libraries to be able to get your program working; if you think they'll object to having to install 80 libraries just to get your Pokemon card sorter working you're just going to do without the libraries. This happened over and over again, to the point where it was folk wisdom that every serious PLTer had built their own redundant library for every possible task, and that's no good for anybody. I figured an automatic installer was a workable answer.

As for why it's incorporated directly into the language rather than being an app that goes on the side: it tied in perfectly with the already-existing require form, it made usage much easier (ease of use was our #1 design priority), and nobody to my knowledge had done it before, so I wanted to try it out and see what'd happen.

PLaneT hasn't been out long enough for me to tell you whether that turned out to be a good idea or a bad one. I can tell you that we've found it great for distributing libraries but less great for distributing more application-like pieces of software; that's been the biggest problem we've run into so far.

Cool stuff

it tied in perfectly with the already-existing require form, it made usage much easier (ease of use was our #1 design priority)

Oh, it's cool alright. Else I wouldn't have linked to it, would I? :-)

My question was of a more general nature. Should other languages and module systems attempt to solve this issue (thus havving to deal perhaps with things like versioning, security, network access etc. etc.) or should this sort of thing be left outisde the scope of language design?

Compared to CPAN

I still think the gold standard from these things is CPAN, which is a Perl module that's external to perl. I haven't used planet enough to tell if I'd want to use it in real code. The versioning feature is nice, but none of the planet modules have multiple versions available yet, so it's not real useful right now. The docs claim there's a separate module implementing planet, but I can't find it. I'd think you'd be able to roll a CPAN like interface out of it, though.

A couple packages have multiple versions

Only the most recent version is listed on the page, though. For instance, Neil Van Dyke's webscraperhelper.plt has a version 1.0 and a version 1.1 available (those are PLaneT package version numbers, not library version numbers, so they follow a very consistent pattern, and if there's a 1.1 you can be sure a 1.0 exists as well).

IIUC

If I understand the PLT design correctly use by using the (planet . datum) form cause default module name resolver to invoke the PLaneT name resovler, which is then used to handle namespace-attach-module requests.

This extension mechanism (hook) is not PLaneT specific, I presume.

That's mostly correct

The way the module system works is that if you say (require [whatever]), that [whatever] gets shipped off to an ordinary scheme function called current-module-name-resolver that turns it into a lower-level thing and handles namespace-attach-module issues. PLaneT works by having an entry in the default current-module-name-resolver, and users are free to override that function entirely to do whatever they want.

However, if you write all your Scheme code in modules (as PLT hopes you will!), you find a problem: by the time the code that overrides the default module-name-resolver gets executed, all the requires are already done, so you can't really install a new resolver usefully (at least not within the context of a module). That's why PLaneT had to be built in to the interpreter rather than just being a pure user library.

Language Size

We often discuss the design choice between large languages with many task pecific constructs (C++) and small languages with powerful constructs (Scheme). This discussion clarifies that this dichotomy isn't reall the whole stroy.

I think a better way to describe the real choices involved is: (a) large language; (b) smaller language, with large standard library; (c) small language with some mechanism for moudule distribution and management.

All this assuming, of course, the language is supposed to have more than a single implementation.

orthogonality

Language size and library size and/or module distribution seem pretty orthogonal to me -- witness asdf-install for Common Lisp, a module distribution system for a large language (or small language with large very-standard library, depending on how you want to slice it) with multiple implementations.

language and library design

I'm not sure those categories are exhaustive, but I think one of the things we've learned about programming languages in the past several years is that for practical use, having access to large libraries is more important than the expressiveness of the underlying language. For instance, a lot of people choose to program in Java even when they like OCaml or something better just because of Java's high-quality standard library. And of course CPAN is widely touted as one of Perl's best features.

I think academic-types tend to sort-of recognize that, but since it doesn't feel like an academic problem, they dismiss it and work on problems that are more likely to lead to publication and that incidentally might help real programmers. That may just be a fundamental divide between academic language design and commercial language design, but I'd like to think that at least those of us on the academic side can put some kind of thought into how a language can best facilitate libraries. Having a big standard library (python, java, Common Lisp) is one way to go; automatic distribution (perl, Common Lisp's asdf-install, PLT) is another. But all these attempts are just stabs at something that seems like it might work; and they all do work, though it's not clear which ones are better or even what the relevant dimensions of comparison are. To my knowledge nobody's done a really thoughtful study of the subject.

They were making a mockery of my horror!

I think one of the things we've learned about programming languages in the past several years is that for practical use, having access to large libraries is more important than the expressiveness of the underlying language.

I think that's because:

  1. Few programmers (can) write non-trivial algorithms anymore.
  2. There is not much difference between the dynamic expressivities of most languages.
  3. Nobody outside academia cares about static expressivity, because they don't see the value in it.

Third Sign of the Apocalypse

Nobody outside academia cares about static expressivity, because they don't see the value in it.

Gee, Frank, that sounds an awful lot like resigning the game to the "pragamatists".

You feeling OK? ;-)

Es geht kein Weg zurück

I did not say there was no value in it, only that its value is largely unrecognized.

Du musst dein Leben ändern

I didn't think you were saying there was no value in it, just that you were giving up the fight, leaving the benighted non-academics to their fate.

For me the ongoing challenge is to find ways to make advanced PL concepts usable and relevant for practical applications. Algrithmic complexity and theorem-proving may not be in big demand, but modularity, readability of code and cooperative coding are.

Making a "sales pitch" based on these factors just might make inroads...

Motivations

Marc Hamann: Algrithmic complexity and theorem-proving may not be in big demand, but modularity, readability of code and cooperative coding are.

This is certainly what drives me. It makes me nuts that folks in academia who are striving to to improve the state of the art in software development are dismissed as ivory tower theoreticians while the "real world" is stuck with C++, Java, C#, Visual Basic... more days than not, I get up in the morning to sling C++ and ask myself why I bother, apart from the paycheck.

Not to reiterate the entire rant again, but the gap between the quality of what I can do when I get to choose the tools and what I can do when I don't get to choose is simply mind-boggling.

Geben Sie mir wieder meine Schwarzen Puppen!

At the moment, I am too benighted by my thesis to care deeply about the fates of benighted non-academics.