[plt-scheme] planet require idea
How about (in BNF form):
;; new require spec ::= (planet SPEC)
;; SPEC ::= OWNER "/" PACKAGE VERSPEC ":" PATHSPEC
;; VERSPEC ::= "" | "/" MAJ MINSPEC
;; MINSPEC ::= "" | "/" PMINSPEC
;; PMINSPEC ::= MIN | ">=" MIN | "<=" MIN | "=" MIN | MIN "-" MIN
;;
;; where PACKAGE is a string naming a package with or without the final ".plt"
;; and PATHSPEC is a normal file (possibly with path) specification
Some examples:
(planet planet/test-connection:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt"))
(planet planet/test-connection/1:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1))
(planet planet/test-connection/1/0:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 0))
(planet planet/test-connection/1/>=2:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 (+ 2)))
(planet planet/test-connection/1/<=2:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 (- 2)))
(planet planet/test-connection/1/=5:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 (= 5)))
(planet planet/test-connection/1/1-8:test-connection.ss)
is equivalent to
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 (1 8)))
(planet planet/test-connection/1/1-8:subpath/subfile.ss)
is equivalent to
(planet "subpath/test-connection.ss" ("planet" "test-connection.plt" 1 (1 8)))
and
(planet "test-connection.ss" ("planet" "test-connection.plt" 1 (1 8)) "subpath")
In all of these cases the initial "planet/test-connection" could be
replaced by "planet/test-connection.plt" with the same effect.
Does this look reasonable to people?
-jacob
On Thu, Mar 20, 2008 at 7:25 AM, Eli Barzilay <eli at barzilay.org> wrote:
> On Mar 20, Robby Findler wrote:
> > On Thu, Mar 20, 2008 at 9:13 AM, Eli Barzilay <eli at barzilay.org> wrote:
> > > On Mar 20, Robby Findler wrote:
> > > > There's extra stuff that fits into the parenthesized version of
> > > > the names that probably wouldn't fit into these names, but it
> > > > may be worth trying to come up with a syntax. Jacob?
> > >
> > > I think so too -- just like the fact that there are some `(lib
> > > "...")' names that don't fit into the symbol version (= when the
> > > filename does not have a .ss suffix).
> >
> > Well, I'd say that the missing planet names are more useful than those.
>
> The principle is still the same... Maybe something like making
>
> (planet FILE-NAME PKG-SPEC [PATH ...])
>
> shortened as
>
> (planet <OWNER>/<PACKAGE>[:<V1>[:<V2>]]/<path>/...)
>
> where <V1> is a number and <V2> is a number or `=<number>' etc
>
> This should work out fine, since `:'s are not allowed in portable path
> names. It will even have the side benfit of requiring a few planet
> packages in a single (planet ...) form.
>
>
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> http://www.barzilay.org/ Maze is Life!
> _________________________________________________
>
>
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>