Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Perl Monks Discussion

( #1040=superdoc: print w/ replies, xml ) Need Help??

This section is only for discussing issues pertaining to the PerlMonks web site. You can ask about how things work, or offer ideas on how the site could be improved, for example.

Unless the topic pertains to the PerlMonks web site, it does not belong in this section. If you're unsure, check out Where should I post X? and The Perl Monks Guide to the Monastery, or ask in the chatterbox.

PerlMonks Discussions
Checking Saint in our Book for ties
1 direct reply — Read more / Contribute
by chacham
on Jul 20, 2015 at 12:08

    eyepopslikeamosquito's planetscape and me: 1282 nodes apiece can be queried, or turned into a Greasemonkey script to run each time Saints in our Book loads:

    // ==UserScript== // @name PerlMonks Saints in our Book Ties // @namespace // @description Find ties in Saints in our Book, based on Writeups and + Experience // @include // @grant none // ==/UserScript== var table = document.getElementsByTagName('table')[4]; for (var i = 1; i < table.rows.length; i++) if ( (table.rows[i].cells[2].textContent == table.rows[i + 1].cells +[2].textContent) && (table.rows[i].cells[4].textContent == table.rows[i + 1].ce +lls[4].textContent) ) alert(table.rows[i].cells[0].textContent + ' ' + table.rows[i].cells[ +1].textContent + '\r\n' + table.rows[i + 1].cells[0].textContent + ' ' + table.rows[i ++ 1].cells[1].textContent);

    Alternatively, it can be turned into a bookmarklet by enclosing it in javascript:(function(){})();, to execute on demand. That is, copy and paste the following as a new bookmark:

    javascript:(function(){var table = document.getElementsByTagName('tabl +e')[4]; for (var i = 1; i < table.rows.length; i++) if ( (table.rows[i].cells[2].textContent == table.rows[i + 1].cells +[2].textContent) && (table.rows[i].cells[4].textContent == table.rows[i + 1].ce +lls[4].textContent) ) alert(table.rows[i].cells[0].textContent + ' ' + table.rows[i].cells[ +1].textContent + '\r\n' + table.rows[i + 1].cells[0].textContent + ' ' + table.rows[i ++ 1].cells[1].textContent);})();

    To test it, as it stands at the time this is being posted, it should alert you to one set of duplicates.

    Added on OpenUsersJS at PerlMonks Saints in our Book Ties

Consideration history? (No further action required.)
1 direct reply — Read more / Contribute
by BrowserUk
on Jul 15, 2015 at 12:37

    Update: Sorry people. See Re^2: Consideration history?)

    It is possible to view whether a node has been considered and subsequently un-considered (de-considered?)?

Threaded Monks Yodeling Modeling
5 direct replies — Read more / Contribute
by oiskuu
on Jul 08, 2015 at 17:54

    Consider one emergent discussion as a collective knitting job. Each monk can view it, appraise it, expand it. Or consider it a symphony of voices (Tolkien style?) In any case, some locus or front is implicit, with the work inexorably progressing along the time dimension, toward resolution. A piece that keepsmorphing while you look at it, is probably not the easiest to work on. I see the new default order, and I'm not liking it.

[Solved]: Thoughts on a section for popular one liners
3 direct replies — Read more / Contribute
by Perl300
on Jul 07, 2015 at 10:47
    Hello monks,

    I have not been a very active user until recently when I started working on perl. So please forgive me if I am not suggesting something useful or just repeating a topic that was discussed earlier as well.

    As a learner, I am fascinated with one liners in perl that could do something very useful in just one line. So this came to my mind. Would it be a good idea to have a link on perlmonks where we can have users post some interesting/useful one liners? Going further (may be) selected ones are displayed on the website.

    Just a thought that I wanted to post so new learners like me would be tempted more into perl and sooner or later start writing their own one liners :-)

    I did a quick search on net and found that there is one book as well on perl one liners by o'rielly media.

    Thanks in advance!
Attribute Removed When Post is Listed in a PerlMonks Section
1 direct reply — Read more / Contribute
by kcott
on Jul 05, 2015 at 08:50


    Last week I wrote Syntax-highlight Non-Perl Code for HTML which I posted in Cool Uses for Perl.

    The first line contained the abbreviation CRPG. I provided a tooltip for this using the title attribute, like so:

    <span title="Computer Role Playing Game">CRPG</span>

    The tooltip showed up in both the [preview] and [create] renderings. Everything looked fine and I thought no more about it.

    That post was front-paged and I've just noticed that the version in The Monastery Gates listing (under New Cool Uses for Perl) had no tooltip for CRPG.

    I checked the source HTML in Syntax-highlight Non-Perl Code for HTML which had, as expected:

    <span title="Computer Role Playing Game">CRPG</span>

    I then checked the source HTML in The Monastery Gates which had, not as expected:


    And now, while previewing this post, I also notice that the listing in Cool Uses for Perl has no tooltip either (source HTML: <span>CRPG</span>).

    That's now potentially becoming somewhat confusing. To summarize (and clarify):

    Node ID Node Name Tooltip Source HTML
    1132421 Syntax-highlight Non-Perl Code for HTML Yes <span title="Computer Role Playing Game">CRPG</span>
    131 The Monastery Gates No <span>CRPG</span>
    1044 Cool Uses for Perl No <span>CRPG</span>

    So, while that's two PerlMonks Sections that I was able to check, this could also be happening in other sections.


    Is the title attribute (and value) intentionally removed from the listings in PerlMonks Sections? If so, what is the rationale behind this? Are attributes other than title affected? Are elements other than span affected?

    If this attribute was not intentionally removed then, presumably, that indicates a problem somewhere in the process of listing a post in various PerlMonks Sections. If this is the case, can it be fixed?

    -- Ken

Has Perlmonks become intolerant of opinion?
6 direct replies — Read more / Contribute
by Anonymous Monk
on Jun 30, 2015 at 16:21
    [oiskuu]: jeffa, aren't you too young to have worked for nixon adminis +tration? hmm [jeffa]: as if Obama's doesn't lie [jeffa]: oh "This" President is different ... he doesn't lie ... NodeReaper has swallowed jeffa, mmmmm...
    Since when it is a crime to criticize the President?
And here's why I think "downvotes" should be eliminated, or tabulated separately ...
16 direct replies — Read more / Contribute
by sundialsvc4
on Jun 29, 2015 at 14:32

    A long, long time ago now, I resigned myself to one simple observation:   that, “no matter what sundialsvc4, in particular, may say, he will promptly accumulate about 7 downvotes for the mere fact that he opened his mouth.”   (This post should immediately garner about twice that number, in the first twenty minutes or so, to punish my audacity for bringing this subject up yet again.)   After a little while, many of these posts then turn-around to acquire a positive shine, but I know that they will have had to pass through the gauntlet of obligatory down-voting to get there.

    Now, it would be a marvelous thing if an Internet forum had no signal-to-noise ratio. If every post was rated strictly on the content and not on the person who wrote it.   If personalities had nothing to do with it.   But, it seems, everyone has their enemies, and I have accumulated give-or-take seven of mine.   (They are very consistent.)

    But now, let’s talk about ... Super Search.

    We have recently learned that PerlMonks has, not only a database of more than a million entries, but a venerable database, as well.   PM has a history, and certainly one of the main attractions of other people for the site is to gain access to the high quality of technical opinion and guidance that is routinely expressed here.   With such a large database, search by attributes other than keyword (and the other handful of criteria that Super now provides) would be extremely advantageous.   One of the criteria that I (still ...) think should be available is:   per-post vote ratings.

    ... but only if the positive and the negative votes were separately tallied.

    To my way of thinking ... and this from forums besides this one ... an “up” vote indicates, both that the person casting the vote found the post to be useful to him, but also that the person understood the post in the first place.   Whereas a “down&rdquo vote ... I have no way to say it delicately, so I shall say it anyway ... is just someone pissing in the pool.   The two numbers, if tracked separately, would be (very!) useful to me in searching ... and I would ignore the negative one.   The sum of the two is seriously clouded by the summing.

    Another possible approach ... rarely seen in forums ... is to obligate the person who is casting the positive or negative vote, both to identify him/herself, but also to explain why. This being maintained as a separate thread of information apart from “the thread.”   I am not persuaded, however, that this is really worth the additional storage-space required.

    It is an unfortunate fact of PerlMonks that the site is widely regarded as being openly hostile.   (It is also observable on ChatterBox that many of the younger Monks speak derisively of that hostility.)   I don’t think that this is a good thing.   “The Go-To Site for information about Perl™” ought to be a socially pleasant place.   It should, as its whimsical name suggests, encourage the social and professional interaction that, I fear, today it is openly perceived to oppose.   Ours should not be a forum that people “put up with,” because they need information.   It should not be one in which there is fear of crucifixion.

Additions to Approved HTML
4 direct replies — Read more / Contribute
by kcott
on Jun 29, 2015 at 04:14

    G'day All,

    This post was prompted by ambrus' comment, in Re^4: Approved PM markup?:

    "You may try to petition us with a complete proposal of what attributes to enable in what elements, and then maybe I'll write a patch and maybe some god will apply it."

    However, I'd much rather see discussion and concensus before submitting any proposal; accordingly, please freely discuss the following and let's see if a concensus can be reached.

    For reference, here's the currently approved elements and attributes: Perl Monks Approved HTML tags

    Non-standard Elements

    Firstly, the non-standard <code> tag requires a little more explanation than the remainder do, so I'll deal with that first. (Assume everything here also applies to the <c> tag.)

    I pretty much like everything about the <code> tag except for the fact that it renders Unicode characters with code points greater than 255 (U+00FF) as character entity references. To illustrate, consider this markup:

    U+007E: ~
    U+007F: DEL
    U+0100: Ā
    U+007E: ~
    U+007F: DEL
    U+0100: Ā

    which renders as

    U+007E: ~
    U+007F: DEL
    U+0100: Ā
    U+007E: ~ U+007F: DEL U+00FF: U+0100: A&#772;

    So, in order to post code containing these characters, we need to use <pre> (or <tt> for inline text). When we do this, we lose all the features of <code>, such as code-wrapping and the [download] function.

    Therefore, I'd like to suggest a uni attribute for <code> that might be used either as <code uni="1"> or, given <code> is non-standard anyway, and won't appear in the final HTML, just <code uni>. Unless feedback indicates otherwise, I'll recommend: <code uni>.

    It would, of course, be important, that <code uni> still renders character entity references as written; e.g. &gt; still renders as &gt; and not >.

    Update (code): This is not something that can be done easily, so I've removed it from the proposal. See ambrus' comment below.

    I'm not suggesting any changes to the remaining non-standard elements: <spoiler> and <readmore>. Having said that, I do note that <readmore> allows a title attribute whereas <spoiler> does not: feel free to argue the case for <spoiler title="...">.

    Standard Elements and Attributes

    These are all straightforward and simply represent attributes that are missing from certain elements but allowed elsewhere. I'm really just aiming for consistency here.

    AttributeElements to Allow this Attribute
    classAll standard elements that don't currently allow it.
    dirAll standard elements that don't currently allow it, except br.
    langAll standard elements that don't currently allow it, except br.
    titleAll standard elements that don't currently allow it.

    Unknown Element: wbr

    I've no idea what the <wbr> tag is. It's not standard HTML (see Index of the HTML4 Elements), nor is it documented as being non-standard.

    Unless there's a good reason to keep it, removal would seem to be the appropriate action. Conversely, if we want to keep it, it should be documented. I'll recommend removal unless feedback indicates otherwise.

    Update (wbr): Feedback has indicated otherwise (see Re: Additions to Approved HTML ( ISO-8859-1)): this just needs documenting.

    -- Ken

Approved PM markup?
1 direct reply — Read more / Contribute
by BrowserUk
on Jun 27, 2015 at 23:21

    Why is it that <div> is allowed, and <span> is not? Is there some particular vulnerability connected with <span>?

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
    I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
jQuery Customizations to Enhance the PerlMonks Experience
1 direct reply — Read more / Contribute
by aaron_baugher
on Jun 27, 2015 at 21:57

    A while back I got tired of scrolling back to the top of a post after reading it and deciding to vote on it, so I wrote a little Javascript/jQuery to move the buttons to the bottom of a reply. I insert it in the page using a Chromium extension called Personalized Web, but you can use any browser plugin/extension that does the same thing, or insert it using the Free Nodelet Settings as jdporter said here. I've added some other features to it, and thought I'd share it in case others can get some use from it.

    The code has four parts:

    1. This one line adds a [vote!] button for each post, so I don't have to scroll to the bottom of the page when I'm ready to submit my votes.
    2. This moves the vote buttons for each reply to the bottom of the reply, so they're accessible when you've read to the bottom of the reply.
    3. This does the same with the vote buttons for the main post at the top of the page.
    4. (This one may be controversial, so use it or delete it as you like.) I tend to find Anonymous Monk replies, let's say, less useful than non-Anonymous Monk replies, so I thought I'd like to hide them but make it easy to see them in case I want to for context. This hides the reply itself, shrinks the header a bit, changes its background color to make it stand out, and makes it clickable. Clicking on it toggles the visibility of the reply, so I can click to see it and then click it back out of the way.

    If you like it, use it however you like. If you have any questions or suggestions, please share them.

    <script src="//"></script> <script type="text/javascript"> jQuery(document).ready(function(){ // 1. add vote button next to each set of voting radio buttons jQuery('div.reputation center').append('<input style="margin-left: +20px" type="submit" name="sexisgreat" value="vote!" />'); // 2. move vote buttons for replies jQuery('td.reply-body').not('td.adjunct-links').each(function(){ var $m = $(this).children().first(); var $t = $m.html(); $m.remove(); $(this).append('<div class="reputation">'+$t+'</div>'); }); // 3. move vote buttons for main post var $m = $('div.reputation').first(); var $t = $m.html(); jQuery('div.doctext').append($t); // different classes depending +on jQuery('div.notetext').append($t); // whether top of thread $m.remove(); // 4. hide and de-emphasize Anonymous Monk replies var $anon = jQuery('span.attribution:contains("Anonymous Monk")'). +parents('tr.reply'); $anon.css({'font-size':'50%','background-color':'#dd7'}); $; ${ e.preventDefault(); jQuery(this).next().toggle(); }); }); </script>

    Aaron B.
    Available for small or large Perl jobs and *nix system administration; see my home node.

Dates of Monk promotion
7 direct replies — Read more / Contribute
by u65
on Jun 16, 2015 at 06:20

    Is there any way to determine the date a Monk reached a certain level?

planetscape and me: 1282 nodes apiece
7 direct replies — Read more / Contribute
by eyepopslikeamosquito
on Jun 15, 2015 at 23:54

    As a long time student of Saints in our Book, I noticed something unusual today, so unusual I took a snapshot of it before it disappeared:

    #UserExperienceLevel WriteupsUser SinceLast Here
    37planetscape29659Canon (20)12822005-03-27 09:2814 hours ago
    38eyepopslikeamosquito29559Canon (20)12822002-06-23 06:021 second ago

    Two adjacent monks in Saints in our Book with identical number of Writeups! Never seen that before.

    planetscape, after more than ten long years at the monastery, we wind up together on 1282 posts apiece, at least for a little while. I'm very happy about that because I've always enjoyed your thoughtful and insightful posts.

    Update: July 08 2015, exactly level now, both XP and Writeups! :)
    #UserExperienceLevel WriteupsUser SinceLast Here
    37planetscape29891Canon (20)12892005-03-27 09:281 hour ago
    38eyepopslikeamosquito29891Canon (20)12892002-06-23 06:021 second ago

perl poetry is spam?
1 direct reply — Read more / Contribute
by Anonymous Monk
on Jun 11, 2015 at 20:07
    Hmm, i tried to post some perl poetry, got permission denied ... huh?
Show on the "Perl People and Organizations" page?
1 direct reply — Read more / Contribute
by u65
on Jun 11, 2015 at 08:59

    The opinion of the Monks is not to have a separate Perl 6 section, but shouldn't the Perl 6 web site ( be shown on the subject page?

Terminal decline?
11 direct replies — Read more / Contribute
by BrowserUk
on Jun 11, 2015 at 01:37

    A few numbers:

    node number: date: days: 100,000 26/07/2001 200,000 23/09/2002 424 300,000 17/10/2003 389 400,000 17/10/2004 366 500,000 13/10/2005 361 600,000 14/02/2007 489 700,000 24/07/2008 526 800,000 08/10/2009 441 900,000 18/04/2011 557 1000,000 19/10/2012 550 1100,000 09/09/2014 690 ... 1130,000 11/06/2015 275 today. ... 1200,000 14/03/2017 (917)(projected) 1300,000 17/09/2020 (1283)(projected)

    Those are the dates on which the N-hundred-thousanth node was posted; and the number of days to accumulate that 100,000 posts.

    Today we will likely reach 1,130,000. It will have taken 275 days to do so. projecting forward, 275 / 3 * 10 = 917 means it will be another 2 years before this place reaches the next 100,000 milestone.

    It took 25% more days to accumulate the 11th 100,000 than it did the tenth.

    Based on the projection, it will take 32% longer for the 12th than it did the 11th.

    And projecting that rate of decline forward means that we won't reach the 13th milestone until September 2020.

    You don't want to know about the one after that; because it won't happen.

    There are 2 choices

    1. Do something.

      Open our minds. Invite new blood. Fight to retain (or even return) old blood.

      Change something.

    2. Do nothing.

      Continue as we are; cloistered in our declining; deteriorating; smug little world.

      And die!

    Your choice guys. I've tried to liven this place up. Posted what I hoped would be interesting questions. Proposed change. Taken the insults.

    Now its down to the rest of you. Hide in the shadows pouring scorn and derision upon any and every suggestion. Or stand up and be counted.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Discussion Item
Give us your input:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (8)
    As of 2016-02-11 09:17 GMT
    Find Nodes?
      Voting Booth?

      How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

      Results (364 votes), past polls