in reply to Re: Perl 6 links
in thread Perl 6 links

How about [perl6://A6]? Is that acceptable? Can you review my patch? ;-)

Update: demerphq recommends I post the code here. Note that in the original code, this has to be one line, but, in the interests of readability, I'm going to insert some whitespace.

my ($type,$num) = $nodeloc =~ /^([aAeEsS])(\d{1,2})$/; if (defined $type and defined $num) { $type = uc $type; $num = sprintf q[%02d], $num; my %map = ( A=>['apo', 'Apocalypse'], E=>['exo', 'Exogesis'], S=>['syn', 'Synopsis'] ); $title ||=$map{$type}[1] . ' ' . $num; return qq[<a href="http://dev.perl.org/perl6/doc/$map{$type}[0]/$typ +e$num.html">$title</a>]; } else { return qq([$prefix://$nodeloc]) } }

Update 2: FYI, for those non-pmdevils who can't find out what the variables are. Although it should be obvious, $nodeloc is the part after the ://, but before the |, while $title is the part after the |.

Update 3: My submitted patch has changed to [aes://s03]. I am not that into perl 6 (I have a few questions which I'm likely to post about perl 6 when I get the time to look at it more closely) and can accept that "aes" is an accepted abbreviation here. That said, part of the point of these links are ways to make it easy to write nodes. That would include "shortcuts" such as lazily ignoring case, or skipping the leading zero.

I don't want to go away from using the [$prefix://$nodeloc] convention if only that it's way more work (beyond my skills as a pmdevil anyway), and I'd rather see something than nothing. As for the comparison to perlop - using [perlop] gets you a link to out-of-date documentation vs using [doc://perlop]. Thus, we're sticking to that, and getting [aes://s03] to be the link (which is more likely to be up-to-date) rather than [S03] (which is more likely to fall out of date when no one keeps it updated).

Replies are listed 'Best First'.
Re^3: Perl 6 links (future)
by tye (Sage) on May 13, 2005 at 15:33 UTC

    I don't think "perl6" is the proper tag to associate with this. It fits somewhat now, just like the person who registers at PerlMonks as "perlnewbie", because when you say "perl6" one of the most common responses (at this time) is concern about the emerging design of Perl6. Ten years from now, will people expect "perl6://" to link to the old hash-out-the-design documents for Perl6? Because ten years from now we'll still be serving nodes that use "perl6://" links.

    Unfortunately, I don't have an alternate solution that I find compelling. I guess ysth's suggestion of synopsis://xx, apocalypse://xx, and exegesis://xx is less worrisome for me, though I suspect we'll get a lot of spelling questions / mistakes. Perhaps adding aliases for apoc://, exeg://, and synop:// fixes that?

    Update: I also think that linking to sections within each document (they are fairly large) is particularly important here. Unfortunately, I don't think there exists a committedly long-lived hosted copy that has appropriately easy-to-link-to sections and will be kept up-to-date.

    - tye        

Re^3: Perl 6 links
by Juerd (Abbot) on May 13, 2005 at 22:31 UTC

    I agree with tye that "perl6" is not the right scheme. I suggested "aes" for a reason. "AES" is a very common way to identify the whole of apocalypses, exegeses and synopses. As are "[AES]\d\d" to identify specific documents. "S03" is as normal in Perl 6 jargon as "perlop" is in Perl 5 (it even describes the same thing: operators). It's hardly ever called "S3", "syn 3" or "synopsis 3", except by people new to the Perl 6 world.

    Because "/^[AES]\d\d$/" is such a specific pattern, and because it has achieved the same status as "perlop" in normal usage, I think this should not be changed. Because of the specific pattern, they can perhaps be made direct links, without scheme, so linking them doesn't disturb the text flow in the source.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      "AES" is a very common way to identify the whole of apocalypses, exegeses and synopses.

      I've never seen that usage. Super searching for it I find few matches, the most recent of which (outside of this thread) is "use Blowfish or AES or some other cryptographic standard".

      Because "/^[AES]\d\d$/" is such a specific pattern, and because it has achieved the same status as "perlop" in normal usage

      Never seen that either. Doing an enhanced super search for that pattern finds that it has never been used for that purpose at PerlMonks in the last year except in this thread.

      And I doubt in 10 years "A03" will immediately trigger the proper memory while "apocalypse 3" probably will.

      I'm sure you hang out in some place where the usage is as you say. But if I saw "S03" at PerlMonks, I'd have no idea what it was supposed to mean and I bet (based on data) that many, nay most, PerlMonks visitors would be as lost.

      The fact that [grep] skips searching has had its problems and so is at least partially an example of something to avoid.

      I don't see myself wanting to link to a whole apocalypse much. I see myself being much more likely to want to link to a specific part of an apocalypse. At this point I doubt the official hosts of these documents have sufficiently addressed this desire, but I'll let someone else investigate and report if they care to.

      Elsewhere you mentioned hosting the A, E, and S at PerlMonks (don't forget whatever the Pugs things are called). This was already discussed and nixed by Larry himself.

      - tye        

        I've never seen that usage. Super searching for it I find few matches

        Perl 6 discussion with people actually writing Perl 6 code has began only very recently began on PM. Compare the thousands of messages in Perl 6 mailing lists to the small number of Perl 6 related posts here, and perhaps that can explain this. Do note that AES is most often written as "A/E/S" or with some other separator, and that it's used on IRC more than in mail (afaict). (There can be no \W character in a URI scheme.)

        the most recent of which (outside of this thread) is "use Blowfish or AES or some other cryptographic standard".

        This may be a good reason not to use "aes" as a URI scheme. Although I have absolutely no idea how the cryptography thing could have any meaning in that part of a URI. I don't think it clashes.

        Never seen that either. Doing an enhanced super search for that pattern finds that it has never been used for that purpose at PerlMonks in the last year except in this thread.

        More than 10% of the 4312 messages in my perl6-language mailbox mention an AES as /[AES]\d\d/. (86 of the matching documents are written by a certain Larry Wall.) Perl Monks does not yet have a rich Perl 6 history, except discussion about its features and possible syntax. Besides that, I expect that people write it in full here, because otherwise people might not know what is meant, but see also the next comment about this.

        It does help, of course, that S03 is the actual filename used for Synopsis 3: S03.pod and S03.html. See also the update in the root node.

        And I doubt in 10 years "A03" will immediately trigger the proper memory while "apocalypse 3" probably will.

        It does not have to trigger any memory, if A03 is a link to the document in question.

        if I saw "S03" at PerlMonks, I'd have no idea what it was supposed to mean

        Except, of course, if the S03 is a link to the document. Then you'd be really stupid if you still wouldn't be able to very quickly find out its meaning :)

        I see myself being much more likely to want to link to a specific part of an apocalypse. At this point I doubt the official hosts of these documents have sufficiently addressed this desire, but I'll let someone else investigate and report if they care to.

        The documents are generated from POD, and have useful anchors for their subsections.

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Re^3: Perl 6 links
by Juerd (Abbot) on May 14, 2005 at 10:49 UTC

    As for the comparison to perlop - using perlop gets you a link to out-of-date documentation vs using perlop.

    Yes, that's extremely hateful too. However, the out-of-date documentation at least now links to where more recent documentation can be found. (This should IMO be combined with complete removal of the old contents.)

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }