[armedbear-devel] Proposal for URL to be used as Pathnames

Alan Ruttenberg alanruttenberg at gmail.com
Thu Apr 1 03:08:33 UTC 2010

On Mon, Mar 29, 2010 at 5:07 AM, Mark Evenson <evenson at panix.com> wrote:
> On 3/28/10 5:26 PM, Alan Ruttenberg wrote:
> […]
>> The reserved characters are scheme specific. I'd suggest that there be
>> a generic function eql dispatch on the scheme to compute namestrings.
> Since URL handlers can be added at runtime, which is the case with the
> OSGi handler for the "bundle" scheme that we are interested in
> supporting, we can't make an EQL specializer ahead of time for
> everything we will encounter.  I was hoping to use the Java
> implementations of the URLStreamHandler for the schemes help out here,
> but I don't see much.  At the moment I'm favoring just implementing such
> a specializer for "http" and "bundle", creating a protocol for a user to
> add a specializer, and calling it a day.

+ ftp, https, urn, info would all be common in my world.

btw, I'm not sure mixing the authority and port is the best choice -
they tend to be separate items.
Also, how to do fragments ("#anchor") and queries (?q=blah)  for http URIs?

> Do we want the namestring to always be the encoded form?  I was planning
> to have the namestring be what the user used to create the URL-PATHNAME,
> but always encode before going to the network.  I need to think about
> this more.

It's a good question. The thing is that with an http URI you want to
be able to format it for inclusion in a web page, or to execute an
http get on it. So you need to access the encoded form in an easy way.
I'm leaning to namestring as the way of retrieving that, but I suppose
it doesn't matter as long as their's some function.

>> Will the logical pathname system interact with URL pathnames? I'm
>> thinking I could probably make use of the analogy between prefixes and
>> logical hosts.
> By prefix you mean schemes like "http" or "ftp" right?

No, I mean qnames/curies
http://www.w3.org/TeamSubmission/turtle/#terms "@prefix"

> I was currently
> planning to have URL pathnames explicitly not be allowed as logical
> hosts, because if one defined a logical host named "http", one could
> then never unambiguously construct an "http" scheme URL via
> #P"http://example.org/foo.lisp".  We could require that a logical host
> *has* to be in upper case?  In that case, I guess the two could co-exist.
> Could you give an example of the sort of logical pathname definitions
> you would use?  Incorporating something like wildcards for the URI
> authority is going to need some thought, but wouldn't be impossible.

I hadn't thought about wild cards at all. Maybe the use of logical
pathnames for this is overambitious and I should think of this
facility for URLs and retain my current system for dealing with URIs.




> --
> "A screaming comes across the sky.  It has happened before, but there
> is nothing to compare to it now."
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel

More information about the armedbear-devel mailing list