In any discussion of Perl 6, links to apocalypses, synopses and exegeses are more important than links to individual functions. For the latter, we can simply wrap [] around them to get linkification.

I request&suggest that [Sxx], with S being one of A, E or S, and xx being a 2 digit number, be made links to the design documents.

(Update - People might not know that they documents are actually named like this. S03.pod is the source filename, S03.html is the resulting HTML document. It's neither S3 nor syn03. Just like we have perlop, not perl_op.)

Alternatively, but it's really too much typing: [aes://Sxx].

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

Replies are listed 'Best First'.
Re: Perl 6 links
by ysth (Canon) on May 13, 2005 at 13:34 UTC
    :) What about poor old S17 and A42?

    I don't like either suggestion; how about synopsis://xx, apocalypse://xx, exegesis://xx? IMO the default text shown for the link should be self-explanatory.

      I don't like either suggestion; how about synopsis://xx, apocalypse://xx, exegesis://xx?

      If I said (and I did) that I find "aes://" too much typing, then I think you can guess very easily what I think about this. Even linking to http://tnx.nl/S03 is easier than using these way-too-long words. I want it to be simple, so it gets more natural to link to the stuff. The same way we are used to wrapping [] around perldocs and perlfunc items, but not around module names. We need something short, preferrably without any scheme.

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

        Things without any protocol:// will only link to local nodes; I don't see the point of special-casing something to work differently, when this is exactly the kind of problem the protocol: form was meant to solve. I actually wouldn't have any objection to someone creating nodes for each of those documents (with links to the live versions and a possible-staleness warning), but I hope they'd name them in full (i.e. Synopsis 3: Summary of Perl 6 Operators, not S03), so that doesn't really solve your problem.

        After more thought, I'd like to avoid even reserving things like synopsis:// for just perl6 documents; maybe we'd want it to mean something different at some other point. p6aes://xx may be as good as you are going to get...

        I would like to see the requirement for // after the colon go away, though...

Re: Perl 6 links
by jdporter (Paladin) on May 13, 2005 at 17:35 UTC

    Actually, it's high time we had a generic, extensible way to make common shortcuts to other sites. This problem is already well in hand in the wiki world. Most wiki engines support "InterWiki" links, which typically use a syntax like [Wiki:Page|link text]. The engine translates this into a live link based on a lookup table (map): for each wiki name (e.g. "Meatball"), it gets a URL template, substitutes or appends the page name, and uses the given link text.

    It should be clear that there is nothing really wiki-specific about this technique. It is a general markup-shortening device for hyperlinks. Everything (and thus PerlMonks as well) has adopted the same philosophy to short-hand markup.

      PM alreayd has something like this -- just consider every different wiki out there a different psudoprotocol. Works the same way as what you proposed, except with a :// instead of a :. Is there some other difference I am not seeing? PM's isn't a simple table of templates, but rather a dispatch table, but that allows more complex mappings (which are used in some cases -- for example doc:// acts differently if the argument begins with perl.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

        OK; I'm just proposing that we make a concerted effort to get on board the InterWiki wagon. It will mean significant additions to the shortcut handler settings, and would probably necessitate additional logic code for genericity. (See scrottie's excellent overview of the issues at Was, a Wiki for Perl.)

        We should also give mind to playing the other side of the InterWiki game as well, though there may be nothing more to this than is already supported by our http://perlmonks.org/?node=search,terms syntax.

Re: Perl 6 links
by demerphq (Chancellor) on May 13, 2005 at 13:42 UTC

    You have missed some essential parts out of your request, and have formed your request in such a way it won't happen. If you want a linktype then it has to match with the type://value|string syntax. Otherwise its a nonstarter. Next you havent specified where these links are supposed to map to. Unless one of the other gods feels like doing your homework for you there is nothing to be done from this request.

    ps: I recommend you use something like perl6:// but doing so doesnt guarantee that this will happen.

    ---
    $world=~s/war/peace/g

      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).

        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        

        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' }

        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' }

      If you want a linktype then it has to match with the type://value|string syntax.

      aes:// does that, and Axx isn't weird either, since we already have things like perlop and unpack. I can even imagine mirroring the documents locally, to keep them in a PM layout -- with banner.

      Next you havent specified where these links are supposed to map to.

      Clearly I overestimated you.

      Unless one of the other gods feels like doing your homework for you there is nothing to be done from this request.

      It's a request, not a patch. I'm not going to be the one to do the work, indeed, but I'm also not forcing anyone to do so.

      It's a request. Again: a request. If you don't want to do it for whichever reason, then don't do it.

      I really did overestimate you. Sorry.

      I shouldn't have brought this up for discussion, and should have went ahead with programmatically creating nodes of these titles, with simple links in them to the documents. This kind of useless, unproductive, mud throwing and inflammatory discussion really is a big waste of time. For this too, I am sorry. Consider it never requested.

      The worst thing is that deep inside, I already knew this was going to happen, and I ignored that, hoping that something had changed.

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

        Juerd, check out Personalizing the linkers which is a much better version of a similar equest to the one you made, but actually contains sufficient info that an implementation was put into place almost immediately. The only thing you overestimated is my knowledge the locations of the perl6 docs and desire to go hunt the required url schemes down. OTOH, you were lucky that Tanktalus was a little more motivated.

        The point here is that requests like this should be thought out when they are posted. Would it have been that hard to actually have included the links you wanted? Anyway, i guess my tone wasn't that great in the node. If so I apologise, its just I guess i expect someone clever and an old site hand like yourself to provide a better spec. Cheers.

        ---
        $world=~s/war/peace/g

Re: Perl 6 links
by gaal (Parson) on May 13, 2005 at 13:35 UTC
    May I extend the suggestion? Pugs tests have been using a nice format to link to a specific section, or even line, in the spec. There we use POD-compatible syntax like:

    L<S05/"Hypothetical variables" /backtracks past the closure/>

    This is a link to an arbitrary line, and won't be supported by regular HTML. But we can do section-level granularity easy, I think, if we have an appropriately anchored version somewhere. So this is nice and can probably be made to work easily:

    [S05/"Hypothetical variables"]

Re: Perl 6 links
by dragonchild (Archbishop) on May 13, 2005 at 13:30 UTC
    This is more a response to demerphq, but this would be the perfect place for a suggestion I have made . . .

    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

      IMO this is a great example of why your idea isnt that great. So the OP would go and define his own link formats, which would then apply to his nodes only. You of course liking the idea would come up with a similar set of links, since youd both be able to do it independently there is a good chance that the two schemes would be different, so now the complexity of link handling by the site and external repeaters goes through the roof.

      Seriously im not inclined to saying that i think user requests like this shouldnt happen, but the idea you are referring to just has too many issues for me to agree that its worthwhile.

      OTOH i have nothing against allowing for more link types. And for making it easier for users to request new ones. Im just not sure how it should work. I also dont mind allowing for user customization of how the links render to themselves. But of course all of this requires work.

      ---
      $world=~s/war/peace/g