Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation


by jdporter (Canon)
on May 30, 2002 at 16:48 UTC ( #170442=user: print w/replies, xml ) Need Help??

I'm not sure when I joined SiteDocClan, but my first edit to the SDC wiki was on 2003-08-27.

I'm not sure when I joined pmdev, but my first patch was on 2006-01-26.

Rooms in my treehouse:
Popular links on homenodes
Tutorials digest
Survey of POOP Modules
Some cb snippets
Restyling PerlMonks
Sitedoclet usage analysis
Scratchpads & Blogs:
pad for admin-related stuff
pad for pmdev-related stuff
pad for other stuff
User Posts
CPAN contribs

Some of my root (and root-like) posts you may find interesting:

PerlMonks for the Absolute Beginner
New Service: Thread Watcher
New Snippets Index
XY Problem
Where should I post Y?
jdporter's place in the name space
test of ancient magic
test this
Nodes 1 .. 1000
There is no Perl Illuminati
PerlMonks Memorial Garden

Also check out my Free Nodelet Hacks
Also check out  
(RFC) Arrays: A Tutorial/Reference
Tk Photo Slideshow, with scrolling and scaling
Simple Console Menuing System
Control and Query Win32 Services at the command line
Strategy Handles
Linked Lists With No Memory Leak
There's Only One Way To Do It
Read and write Windows "shortcut" links
Create and Pop Up Outlook Notes from Perl
IO::MultiHandle - Operate on multiple file handles as one
map-like hash iterator

Here are some links I keep handy in my Free Nodelet:

Free Nodelet Settings
User Settings
Display Settings
Nodelet Settings
log out
PerlMonks statistics
Message Inbox
last hour of cb
Full-Page Chat
Chatterbox statistics

Monks I've met in meatspace:

PerlMonks Quine:

perl -MLWP::Simple -e "getprint '; +displaytype=displaycode'"


Previously, I used this:

Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.
This is a line (my own translation) from the classic movie Metropolis. Incidentally, my homenode pic above is a frame cap from this movie as well.

In the movie, the building of the mega-city Metropolis is likened to the legendary tower of Babel. This was intended as a warning: Knowing the fate which befell Babel, the builders of the present age should take care to avoid the same sins, and thus the same fate. Specifically, the builders of Babel lacked "heart" (a spirit of compassion and a willingness to compromise), and this resulted in a cataclysmic conflict between management and labor.

Most languages are like StackOverflow: I have a question, I want the best answer.
Perl is like PerlMonks: I have a doubt, I want to read an interesting discussion about it that is likely to go on a tangent. q-:

tye, in Re: What is PerlMonks? (why Perl)

<input type=submit value="border-width=d" " />

Posts by jdporter
RFC: Better Best Answers in Perl Monks Discussion
5 direct replies — Read more / Contribute
by jdporter
on Sep 12, 2016 at 17:50

    It has long been understood, and I have long felt, that the Categorized Questions and Answers section is fundamentally suboptimal in how it works from the users' perspective; and I can tell you that it would be essentially impossible to improve by a sequence of minor tweaks. What we need is a fresh start. And whatever that looks like, it should reduce the complexity of the site, not add to it. I would suggest that the QA section should be eliminated entirely, and instead have some means to identify and indicate "good questions" and "best answers" among the nodes in the Seekers of Perl Wisdom section. Here are my thoughts; please share yours.

    QandAEditors would have a way to attach a "good" flag to nodes in SoPW.

    A root post (question) so flagged would be analogous to our current "approved questions", and a reply so flagged would be a "good/best answer".

    (By procedure, but without enforcement, QandAEditors would generally only mark first-level replies as "good".)

    Monks of sufficient venerability would be given special bonus votes to help raise the reputation of worthy replies.

    Monks of Level 11 (Chaplain) and above would receive, each day, bonus votes equal to their level minus 10.
    These bonus votes can only be spent according to the following restrictions:

    • Only on replies in SoPW, not on root posts and not in any other section;
    • Only to upvote, not to downvote; and
    • Only on nodes which the monk has already upvoted.
    In effect, a Level 11 monk would get a chance, once per day, to give +=2 to a SoPW reply of hir choice.

    Ancillary to all the above, there would of course be a way visually to indicate which replies to a question were deemed "best". There may even be a reply sorting option to put best answers at the top. An option could be added to Super Search to let the user get only "best answers", if desired.

    If this proposal is enacted, then we could theoretically create a batch process to convert all of the existing Categorized Questions to SoPW posts with the "good" flag set, and their answers to replies similarly. That would fairly trivial.

    Why Level 11? Because any time we come up with an idea for a new "level power", I like to try to assign it to a level which currently has none. Ideally, each level would offer some new prize as an enticement. And looking at Number of Monks by Level, I see the numbers jump at level 11. For this arrangement to be worthwhile, we'd need a goodly number of monks to participate.

    Credit goes to the author of Re^2: Threaded Monks Yodeling Modeling, for stimulating me to think more about this problem and try to come up with a potential solution.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Editing your writeup is now a separate action from viewing a thread and voting on replies in Perl Monks Discussion
5 direct replies — Read more / Contribute
by jdporter
on Jun 13, 2016 at 16:12

    Historically, when you view one of your writeups (e.g. a CUFP post), you are given a form right there in which to edit your post if you wish. The form fields for that were in the same form as the node voting buttons. This enabled surprising behavior, described here. Therefore, I have removed the "edit" form from the main display view of your posts and pushed it off into a separate edit page. So now, if you visit one of your writeups, you won't see an edit form right there, but you will see an 'Edit' link in the upper right.

    This change has already been in effect for about three months (as I mentioned) for certain sections — Obfuscated Code, Perl Poetry, Meditations, maybe others — and is now in effect for all sections: CUFP, PMD, Obfu, Meditations, News, SoPW, Tutorials, Inner Scriptorium, Poetry, Snippets, Code Catacombs, even Craft, as well as your replies in any section, and any posts of yours which have been thrown into the Off Topic bin.

    Update: Based on feedback from users such as BrowserUK below, I have added a user display option to have the writeup edit form directly on the display page, below the writeup, as previously. However, it is now enclosed in a separate form from the voting buttons, so that the "surprising behavior" can no longer occur.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
'Bare' display style now supports css styling in Perl Monks Discussion
1 direct reply — Read more / Contribute
by jdporter
on Mar 22, 2015 at 13:24

    Logged-in users can now apply a css stylesheet to nodes rendered using the 'bare' display style. To do so, go to your Display Settings, and look for the text field labeled "Link to External CSS stylesheet for 'bare' display style:", near the bottom. Only "external" css is supported in this way; the text field's value must be a URL for a page of css.

    For starters, here is some simple css which makes it easier to see the tree structure of replies and to distinguish one reply from another:

    li.reply { border: 1px solid black; margin:5px; counter-increment: re +ply-list; margin-top:20px; }

    You can actually use that "[download]" link, there, as the URL in the Display Settings field. :-)

    To see a page rendered in the 'bare' display style, either add ;style=bare to the URL of the page, or insert /bare/ in the path part of the URL. Examples:


    More ideas:
    form > div.reputation, div.comment-on { padding:8px; border:4px outset #0A8; } div.comment-on br { display:none } div.body { padding:12px } div.pmsig { border: 1px dotted black; margin:5px; } div.header, div.footer { padding:4px; border:3px outset #666; } ul.inline-list li { display:inline; } ul.inline-list li:before { content:"\2023"; margin-left:1em; margin-ri +ght:0.2em; } ul.replies { list-style: decimal; counter-reset: reply-list; } li.reply { border: 1px solid black; margin:5px; counter-increment: re +ply-list; margin-top:20px; }
    For pmdev:
    p.titlechooser { display:none; }
    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Message Inbox: Retain Deleted messages longer in Perl Monks Discussion
1 direct reply — Read more / Contribute
by jdporter
on Feb 04, 2014 at 21:38

    My hallucinogenic memory tells me that I read, somewhere, a long time ago, that any messages in your 'Deleted' folder get purged every day, or something like that; and my experience certainly seems to bear that out.

    Can we please change that to a week, or at least several days? Thanks you!

    (And if anyone can tell me where the code that implements this is -- and if it's a code node -- I'd be happy to code the implementation myself.)

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Proposal: Have Image Macros in Perl Monks Discussion
12 direct replies — Read more / Contribute
by jdporter
on Jul 10, 2012 at 22:30

    So, in my quest to identify ways in which to increase the fun and "value" of PerlMonks, I thought of image macros.

    (Background: Here's the wikipedia article on image macros, though I don't think it describes it clearly.)

    My proposal is simple:

    1. Image macros would be inserted in a post with shortcut-like markup, e.g. [macro://advicedog|use strict and warnings/RTFM] which would result in an image like this.
    2. The available images would be strictly controlled by TPTB (gods, maybe pmdev). The ability to upload an image for the purpose, or to link to an off-site image for the purpose, would be explicitly unpossible. Of course, users would be free to suggest new images via PMD, /msg [pmdev], etc.
    3. Image macros would only work in posts, not in the cb.
    4. There would be a checkbox in one's user settings by which the fuddy-duds could turn off the funk. For them, the above could be rendered as advicedog says: use strict and warnings/RTFM maybe. (I know this example is lame. This kind of cleverness is not my strong suit.)
    5. We could make it so that it would only work if the author of the post was at least a certain level. I'm thinking something relatively low, since the potential for abuse is so small. How about Level 6: Scribe, which currently has no other special powers/privileges?
    6. Update: Additional ideas courtesy of kcott, below.

    7. The images — which would be hosted here on-site, probably — would be limited in size to something reasonable. (200x200?)
    8. You would only be able to insert one per node.
    9. The macro would be rendered with appropriate markup for styling, e.g. <span class="imagemacro advicedog" ... This would enable you to, for example, hide macros altogether, if even the non-image rendering (see #4 above) is too much for you.

    By the way — even if this feature does get approved for the pmdev to-do list, its priority is likely to be pretty low. There are too many other enhancements of much greater impact and benefit to be done yet.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
(OT) Your Dream OS in Meditations
16 direct replies — Read more / Contribute
by jdporter
on Apr 12, 2012 at 12:30

    Thinking about various operating systems and what makes them more or less preferable to others. So I'd like to put this question to you: If you could create a new OS with the best aspects of other existing systems — a "love child", if you will — what would it have? What are the things that set your favorite system(s) apart?

    I'm phrasing the survey like this:

    My ideal environment would have:

    • the    (noun)    of Linux,
    • the    (noun)    of Mac, and
    • the    (noun)    of Windows.


    My ideal environment would be:

    •    (adjective)    like Linux,
    •    (adjective)    like Mac, and
    •    (adjective)    like Windows.

    Feel free to use other systems (Plan9? VMS?) as you like, though I'm mainly interested in these "big 3".

    For myself, I think my ideal environment would have:

    • the simplicity, power, and FOSSitude of Linux,
    • the sane and elegant UX of Mac, and
    • the ubiquity (with all that entails — well, all the good stuff, anyway) of Windows.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Try DuckDuckGo:// in Perl Monks Discussion
4 direct replies — Read more / Contribute
by jdporter
on Oct 12, 2011 at 09:30

    There is a new shortcut type for searching via the DuckDuckGo search engine. You can write [ddg://...] (which is an alias for the verbose [duckduckgo://...]).

    DuckDuckGo is incredibly powerful, and I'm really excited about it. (It also does All The Right Things with regard to privacy, which is one area where Google is seriously at fault.) Take a look at the goodies, and in particular, the !bang commands. We're in there! (Also, fwiw, DDG is largely written in Perl. :-)

    However, I would caution that currently DDG has a ways to go in terms of forwarding queries to various sites properly. For example, in the case of !perlmonks, the query is passed literally to our Search box, i.e. ?node=query. Which means if there is no node with that exact title, it gets passed through to Super Search, with its default of parsing search terms on space. So a query !perlmonks "author wish" does not DWYM! Quote marks are apparently not parsed specially by DDG when delegating a search to the target site.

    Anyway, please kick the tires of this thing and let me know if you find any other snags. We may be able to forward our findings to the DDG team.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Policy clarification regarding the deletion of user accounts/content in Perl Monks Discussion
1 direct reply — Read more / Contribute
by jdporter
on Jul 13, 2011 at 22:22

    Well lately we've had another case of someone not finding the PerlMonks experience to their liking and wanting to wipe themselves off the site. Since the PerlMonks FAQ did not sufficiently address this scenario, we've written up a new FAQlet in order to explicitly lay it down: How can I wipe every trace of myself from PerlMonks?.

    I figured it was worth bringing this to y'all's attention. :-)

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
RFC: Eliminate the "Offer Your Reply" links in Perl Monks Discussion
6 direct replies — Read more / Contribute
by jdporter
on Feb 07, 2011 at 14:01
Not using "non-breaking hyphen" U+8209 in timestamps in Perl Monks Discussion
2 direct replies — Read more / Contribute
by jdporter
on Jan 15, 2011 at 18:52

    For some time now, the monastery has been returning timestrings with the date parts separated by the Unicode "non-breaking hyphen" character, U+8209. I just changed the relevant code (the two places I could find) to use a regular hyphen character, because while the U+8209 character displays just fine in normal HTML text in a browser, it doesn't DWIM in any other context (afaik), of which there are many, including in normal web browsing — For example, when using it in the title attribute of an element, which gets displayed as a Tooltip in some (most?) browsers. (The general principle there is that attribute values are not supposed to be HTML.) (To see this in action, go to the Chatterbox (or last hour of cb) and hover your pointer on the name of a chatterer. The tooltip shows the date/time at which that message was chatted.)

    Please tell me what, if anything, I've broken in exchange for this rather substantial fix.

    What is the sound of Windows? Is it not the sound of a wall upon which people have smashed their heads... all the way through?
Log In?

What's my password?
Create A New User
[stevieb]: I'm learning that no matter how good a piece of software is at what it's supposed to do, it's a piece of shit without providing any API documentation. (Talking about C++ here currently). Seriously... write software for an embedded platform and make...
[stevieb]: guess based on the sparse examples, and the header files that are spread out illogically?
[stevieb]: document the public facing functions/methods people... ALL OF THEM.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-05-28 23:45 GMT
Find Nodes?
    Voting Booth?