http://www.perlmonks.org?node_id=170442
jdporter's user image
User since: May 30, 2002 at 16:48 UTC (19 years ago)
Last here: Jun 16, 2021 at 15:26 UTC (3 hours ago)
Experience: 29469
Level: Canon (20)
Writeups: 3551
Location:Mastodon
Ascended:erzuuli
User's localtime: Jun 16, 2021 at 14:24 EDT
Scratchpad: View
Member of: holders of unholy power, janitors, pedagogues, pmdev, pollsters, power users, QandAEditors, SiteDocClan
For this user:Search nodes


Just FYI... I am not the jdporter who is aka boo_radley. (Indeed, he and I have been striving over the "jdporter" alias for many years. :-)


It's hardly debatable that we are indeed both (intolerant and capricious).
These are the consequences of having not rigorously defined policies and rules
and rather letting the community decide for itself what it tolerates or not,
and the makeup of the community being in a constant state of flux over time.

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

I'm not sure when I joined pmdev, but my first edit to a group wiki was on 2005-12-28 and I submitted my first patch on 2006-01-26.

I joined gods on 2015-06-21 (in the ineffably resplendent form called erzuuli).


Rooms in my treehouse:
Popular links on homenodes
Tutorials digest
Survey of POOP Modules
Some cb snippets
Bookmarks/miscellany
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/Community/Fun:
PerlMonks for the Absolute Beginner
New Service: Thread Watcher
New Snippets Index
cbshitory
XY Problem
Where should I post Y?
CrazyTachTillyN
Adso.pl
jdporter's place in the name space
test of ancient magic
test this
9
Nodes 1 .. 1000
There is no Perl Illuminati
PerlMonks Memorial Garden

Also check out my Free Nodelet Hacks
Also check out  
Perl/Programming:
(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
Tie::Scalar::Substring
Linked Lists With No Memory Leak
Statistics::SGT
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
Just_Chat
cbhist
cb60
Chatterbox statistics

Monks I've met in meatspace:


PerlMonks Quine:

perl -MLWP::Simple -e "getprint 'http://perlmonks.org/?node_id=170442; +displaytype=displaycode'"


Signature

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
Markdown is now supported for comments, experimentally in Perl Monks Discussion
3 direct replies — Read more / Contribute
by jdporter
on Jun 09, 2021 at 15:15

    Due to "popular demand", PerlMonks now supports Markdown formatting for writeups. Note: Initially, Markdown is only supported for comments (aka notes). If everyone likes it, we will extend the capability to root-level posts as well (SOPW posts, etc.)

    Some relevant past discussions:

    Sorry it took me a minute to implement this feature. :-D

    To enable the use of Markdown in your comments, go to your User Settings and change the "Format writeups as:" selection from 'conventional' to 'markdown'.

    Be aware that this is a global setting. You can't select the format at the time you submit the writeup.

    When you are looking at a writeup entry box (textarea), you will see a short note immediately above it indicating which markup you can use.

    This change was actually relatively simple to implement, since modules for converting markdown to HTML already existed.
    I would like to know if there is any demand for any other Lightweight markup languages.
    For example, we could add support for Textile or some flavor of wiki text.

    I reckon we are the only monastery ever to have a dungeon staffed with 16,000 zombies.
TPF's Marketing Strategy for the Next Two Years in Perl News
1 direct reply — Read more / Contribute
by jdporter
on May 20, 2021 at 15:56

    This is actually from last August, but I haven't come across it until today.

    Marketing Strategy for the Next Two Years (perlfoundation.org)

    The question for us, I think is: What impact will this have on PerlMonks? Will we be required to modify/restrict our "look and feel" to conform to the branding guidelines set by TPF?

    I reckon we are the only monastery ever to have a dungeon staffed with 16,000 zombies.
History of PerlMonks' Perl News in Meditations
No replies — Read more | Post response
by jdporter
on May 04, 2021 at 16:37

    History of PerlMonks' Perl News

    Originally, the Perl News section of the site was not a place where ordinary monks could post. Rather, it was designed to be a local "feed" of Perl-related news extracted from another site. That other site was called Perl News, at news.perl.org.

    Posts to the section were created in the name of a 'bot' account, perlnewsbot. (Presumably, perlnewsbot was the actual name of the automated background process. In all likelihood, it was vroom who created and ran the perlnewsbot.

    vroom announced New Perl News Section on 2000-07-21, and perlnewsbot made its first post that same day.

    news.perl.org was, of course, already in operation by then. the earliest snapshot in the Wayback Machine is dated 2000-01-05.

    *Confusingly, the perlnewsbot user account has a creation date of 2000-07-26 — several days after its first few posts. One possible explanation is as follows: Initially, posts were being inserted in the Perl News section by a different bot user or by some process outside of the perlmonks user-level framework. After the perlnewsbot user was created, the ownership of the prior existing posts was transferred to him. However, this is conjectural.

    perlnewsbot's run only lasted a few months, however.

    Its last post was on 2001-02-16, apparently having been halted even before news.perl.org went dark.

    The last post on news.perl.org was on 2001-03-18, with the following item:

    See use Perl;

    Perl News is going away soon (one might argue it already has :). use Perl is this site's sister site, having all the same news, plus reviews, articles, discussions, and more. The coincidence of the technical difficulties of this site and the imminent migration of use Perl to its new home makes now a good time to finalize the closing of Perl News.
    Indeed, barely a month later news.perl.org was gone.

    Even though use.perl.org - the site called use Perl; - was the ostensible replacement for news.perl.org, at least as a source of news, the perlnewsbot was never updated to pull news from use.perl.org.

    (Interestingly, use.perl.org met a similar fate a few years later. The last post there, announcing its imminent shutdown, was on 2010-09-08.)

    vroom opened up the Perl News section for posting by ordinary users in late May of 2002. Prior to that time, only perlnewsbot was able to post there. (vroom posted there himself once or twice before that, using his godly powers. The couple other posts you now see in that section prior to that date were originally posted in other sections and later moved to Perl News.)

    A noteworthy figure in all of this is Chris "pudge" Nandor. He was the man behind news.perl.org and use.perl.org. He was one of the lead developers of Slash, the perl-based engine which powered both Slashdot and use.perl.org. Of course, Slash was also the predecessor of the Everything Engine, upon which PerlMonks is built. Both are products of the tiny outfit called Blockstackers Intergalactic (BSI). Sound familiar? That is where vroom, nate, and other early creators of PerlMonks were working at the time. However, pudge says that he didn't really know those guys, even though he was in the same place at about the same time. Different projects. Here's what he told me in a private correspondence:

    I wasn’t involved in perlmonks much, but I did news.perl and use.perl. IIRC perlmonks was based on Everything, which was a separate project from Blockstackers, which also created Slash, from which Slashdot and use Perl resulted.


    Relevant chronology:

    • 2000-07-21 - New Perl News Section - vroom creates the perlnews nodetype and dbtable. He posts an announcement, saying that perlnewsbot "just sucks news from the RDF from news.perl.org".
    • 2000-07-26 - Perl News Going Away? - perlnewsbot posts here the article from news.perl.org about that site's impending demise.
    • 2001-01-09 - Perl News Credits - KM alludes to a discussion he had with pudge about it.
    • 2001-02-16 - YAPC::Europe Set for Amsterdam in August - perlnewsbot's final post.
    • 2001-04-13 - The PerlNewsBot - A user notices that perlnewsbot is no longer posting to Perl News. A commenter suggests that the bot could be redirected to use.perl.org.
    • 2001-06-04 - Is brother perlnewsbot ill? - Another exchange almost identical to the preceding.
    • 2001-06-23 - News section not being kept current? - A user notes that the section is inactive and suggests opening it up to general users, with possibly a level requirement.
    • 2001-07-28 - Why no new news? - A user notes that the section is inactive. In a comment, the OP says" "if there's no automatic news gathering (ok fine), then why doesn't vroom (or whoever) open up the news area to manual posted news?"
    • 2001-08-06 - Member Submitted News - A user suggests opening up the Perl News section to posting by general users.
    • 2001-10-21 - randomnode - (patch) - vroom creates the first patch to mention perlnews (node type) by name in its code.
    • 2001-11-03 - New use for old news - A user suggests opening up the Perl News section to posting by general users.
    • 2002-02-11 - What's happening with Perl News? - "Since it appears to be dead, Perl News should either be killed or opened up to general postings." A commenter again suggests that the bot could pull news from use.perl.org.
    • 2002-02-22 - Make (Perl News == Use.Perl.Org) Or Is This Heresy? - A user suggests that the Perl News section link directly to use.perl.org, vs reposting content here.
    • 2002-04-26 - "Perl News" is old - A user notes that "the most recent news in the Perl News node date back to one year ago."
    • 2002-05-07 - Posting Unrelated News Items - A user suggests reactivating Perl News as a "normal" section (rather than mirroring off-site news stories) where monks can post links to relevant stories." This sparked a surprising amount of debate.
    • 2002-05-24 - tye notes in the editors' wiki:
      I fixed several problems with the (apparently rather hastilly) reopened Perl News section. There is one potentially ugly problem remaining...

      Since the work to set up the (unduely complicated) "approval link type" and related baggage has not been done, you can't "approve" Perl News nodes. This means that the approval nodelet won't show. Which means that some ppl can move a node to Perl News after which only editors will be able to move it anywhere else. The best solution is probably to create all of the baggage and make Perl News items require approval.

      You have been warned. Also, if this becomes a point of abuse before an enterprising god gets around to adding "approval" for Perl News, then the ability to move to/from Perl News can very quickly be taken away by deleting one line from writeupmover.
      At the same time, in the pm-port wiki:
      I fixed several things wrong with Perl News, which included changes to: perlnews (the node type), Perl News, perlnews display page, preview settings, vote settings, writeupmover, and perhaps a few others.

      The first problem was that adding new Perl News actually added new poetry. Of course, I noticed this because someone added news so I wanted to move it into the proper section. However, the node type of perlnews uses the dbtable of perlnews in order to add a linklocation field which makes it impossible to simply "move" to/from that node type. But search internal code shows that this extra field is not used currently so I changed the node type to not use that dbtable and then made "Perl News" one of the available move-to types. And I made it so you can vote on "Perl News" nodes.

      Since the work to set up the (unduely complicated) "approval link type" and related baggage has not been done, you can't "approve" Perl News nodes. This means that the approval nodelet won't show. Which means that some ppl can move a node to Perl News after which only editors will be able to move it anywhere else. The best solution is probably to create all of the baggage and make Perl News items require approval.
      Oddly, I don't see any patches from tye (nor tye&amp;) in that timeframe, nor any patches to any of the nodes he mentioned. I believe he must have mucked with all those codes directly, using godly powers. (He became a god on 2002-02-01.)
    • 2002-05-24 - Dr. Damian Conway to speak at Dallas/Ft. Worth Perl Mongers meeting in June - This post by atcroft in the Perl News section was probably originally in Meditations and then moved. I think so because there are records in the db showing that it was at one point "approved", yet perlnews never needed approval (at that time).
    • 2002-05-26 - Perl News reopened - vroom's announcement: "I've reopened Perl News. You can now post Perl News stories there. Currently approval isn't necessary." Unfortunately, modifications to a nodetype definition (e.g. its authorized creators & writers) are not tracked and do not use the patch system. maintenances are; but unfortunately perlnews did not get its sole maintenance - perlnews maintenance create - until three months later (2002-08-23).
    • 2002-05-26 - Boston Perl Classes - uri posts what is likely the first human-user submission directly to the newly opened Perl News section. Its records in the db show no evidence of having been approved.
    • 2002-05-26 - Voting in Perl News - A user thanks vroom for reviving the Perl News section, and offers this insight:
      "One of the reasons it was originally taken out of commission was that many people thought http://use.perl.org did a better job of providing Perl-related news. While use.perl.org is an excellent site, it focuses on larger stories and probably wouldn't publish most module releases and other small events. I think Perl News would be an excellent place to announce these smaller events."
    • 2002-05-31 - Perl Monks User Search - (patch) - VSarkiss submits a patch to Perl Monks User Search "so nodes in the newly re-opened Perl News will show up"; he notes it in the pmdev wiki. Interestingly, this patch was never applied; and also interestingly predates any other patches to Perl Monks User Search! Even so, the code was updated to include perlnews at some point before the first applied patch.
    • 2002-08-23 - perlnews maintenance create - (patch) - the first patch to mention "news" in its reason.
    • 2010-10-13 - What exactly counts as "Perl News"? - Interesting commentary, especially by tye.
The Categorized Questions and Answers section has been decommissioned in Perl Monks Discussion
1 direct reply — Read more / Contribute
by jdporter
on Apr 09, 2021 at 15:47

    Effective today, the section of PerlMonks known as "Categorized Questions and Answers" is no longer in service. The section page is a tombstone. It is no longer possible to post Categorized Questions or Answers. It is also not possible to search such posts via Super Search. It wouldn't be useful anyway, because all of the posts which were Categorized Questions have been converted into SOPW posts. Likewise, all posts which were Categorized Answers have been converted into replies to those SOPW posts. In each case, the name of the CatQA 'section' in which the Question was placed has been added to the SOPW post as a keyword.

    The intent of the CatQA section will, going forward, be fulfilled by a new system, whereby "good" questions (in SOPW) and their "best" answers will be given a special flag, as well as relevant keywords.

    Some documentation and linkage changes remain to be made. If you see any, feel free to sent a msg to SiteDocClan, pmdev, or gods, depending.

    For more information on this change, see prior discussion: RFC: Better Best Answers Gets Real

    I reckon we are the only monastery ever to have a dungeon staffed with 16,000 zombies.
Banal Configuration Languages in Meditations
1 direct reply — Read more / Contribute
by jdporter
on Feb 26, 2021 at 14:10

    This is so great, I have to share it here. This guy nails it on the head. (Spring, we're looking at you.)

    I suspect a lot of abuse of config files comes from moving logic out of source code for bad reasons. There are good reasons for not hard-coding, say, ports and service endpoints in your source code, because it makes it easier to run the code in different environments. However, there are also bad reasons for taking things out of code. A couple that I have encountered:

    Pride in creating a "generic" system that can be configured to do all kinds of new things "without touching the code." Reality check: only one or two programmers understand how to modify the config file, and changes have to go through the same life cycle as a code change, so you haven't gained anything. You've only made it harder to onboard new programmers to the project.

    Hope that if certain logic is encoded in config files, then it can never get complicated. Reality check: product requirements do not magically become simpler because of your implementation decisions. The config file will become as expressive as necessary to fulfill the requirements, and the code to translate the config file into runtime behavior will become much more complex than if you had coded the logic directly.

    Hope that you can get non-programmers to code review your business logic. Reality check: the DSL you embedded in your config file isn't as "human readable" as you think it is. Also, they're not going to sign up for a Github account and learn how to review a PR so they can do your job for you.

    Marketing your product as a "no code" solution. Reality check: none for you; this is great! Your customers, on the other hand, are going to find out that "no code" means "coding in something that was never meant to be a programming language."
Detect whether a writeable filehandle has closed? in Seekers of Perl Wisdom
10 direct replies — Read more / Contribute
by jdporter
on Jan 13, 2021 at 12:26

    In my perl program I open a subprocess for writing via a pipe. It appears that this child process can decide to exit at times I don't expect. Is it possible to detect that the filehandle to the pipe is no longer usable? As it is, I now get SIGPIPE occasionally, but it seems to happen later, after I've possibly already written (tried to write) additional lines to the pipe. I want something synchronous.

    I've seen Scalar::Util's openhandle function. Does it work on pipe handles, opened for writing?

    TIA!

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Export (extract) Mozilla Firefox Bookmarks in Cool Uses for Perl
1 direct reply — Read more / Contribute
by jdporter
on Mar 05, 2020 at 12:52

    Probably reinventing the wheel, but...

    (NB: You may need to cpan install DBD::SQLite first.)

    use DBD::SQLite; use strict; use warnings; =pod This program reads a file named places.sqlite which is found somewhere under your folder named Mozilla/Firefox/Profiles You pass the pathname of this file as a command-line argument. This program outputs html. =cut my $dbfile = shift; $dbfile or die "Usage: $0 <path>/places.sqlite \n"; -r $dbfile or die "Unreadable $dbfile\n"; $dbfile =~ /\bplaces\.sqlite$/ or die "File should be places.sqlite\n" +; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","") or die "Erro +r opening db $dbfile\n"; my $bookmarks = $dbh->selectall_hashref("select * from moz_bookmarks", +'id'); my $places = $dbh->selectall_hashref("select * from moz_places",'id +'); # construct the tree: my $root; for my $b ( values %$bookmarks ) { if ( $b->{parent} ) { my $p = $bookmarks->{ $b->{parent} }; push @{ $p->{children} }, $b; } else # yep, there's exactly one. { $root = $b; } } # produce the html: local($,,$\)=("\t","\n"); sub walk; sub walk { my $depth = shift; my $n = shift; my $indent = "\t" x $depth; if ( $n->{type} == 2 ) # folder { print $indent . ($depth?"<li>":'') . "<h4>$n->{title}</h4>"; if ( $n->{children} ) { print $indent . "<ol>"; for my $c ( sort { $a->{position} <=> $b->{position} } @{ +$n->{children} } ) { walk($depth+1,$c); } print $indent . "</ol>"; } $depth and print $indent . "</li>"; } else # leaf bookmark { my $link = $n->{title}; if ( $n->{fk} and $places->{$n->{fk}} and $places->{$n->{fk}}{ +url} ) { my $url = $places->{$n->{fk}}{url}; $link =~ /\S/ or $link = $url; $link = qq(<a href="$url">$link</a>); } else { $link =~ /\S/ or $link = "$n->{type}:$n->{id}"; } print $indent . "<li>$link</li>"; } } walk(0,$root);
The Perl Foundation responds to the Raku rename in Perl News
2 direct replies — Read more / Contribute
by jdporter
on Jan 10, 2020 at 13:30

    The Perl Foundation (TPF) exists to support the Perl community and all the people within our community, including the newly renamed Raku; the name change doesn’t alter the nature of our involvement or support with Raku.

    The Grants Committee will continue to accept grant proposals for Perl 5, Raku, and other Perl-family projects work as before.

    TPF will continue to encourage development of Perl and Raku events, workshops and hackathons and generally support the global communities.

    The Perl Conference (TPC) will also continue to accept presentation proposals for all Perl-family languages, including Perl 5 and Raku.

    Read the full press release.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Complex file manipulation challenge in Seekers of Perl Wisdom
4 direct replies — Read more / Contribute
by jdporter
on Aug 13, 2019 at 12:53

    One of the packages in Scaladex (Scala's equivalent of CPAN, I guess) states its motivation in the form of the following problem:

    1. List all .csv files in a directory by increasing order of file size
    2. Drop the first line of each file and concat the rest into a single output file
    3. Split the above output file into n smaller files without breaking up the lines in the input files
    4. gzip each of the smaller output files

    How would you do this in Perl?

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
New Feature: Usergroup-Private Threaded Discussions in Perl Monks Discussion
No replies — Read more | Post response
by jdporter
on Jul 01, 2019 at 13:44

    We have a new feature: usergroup-private discussion threads.

    This lets members of groups (such as pmdev) have threaded discussions, just like in the regular sections, but completely unvisible to anyone not in that user group (aside from gods, of course).

    Up until now, user groups have always used wiki nodes for intra-group discussion; but wikis are pretty suboptimal for this purpose. (They remain useful for other purposes, such as collaboratively maintained documentation.) The esteemed chromatic made such as observation way back when the concept of the wiki nodetype was first proposed:

    IMHO wikis are best suited to accumulating community resources and keeping them relevant. I do not think that for general discussion that a wiki makes more sense than the usual noding. But if a topic comes up often, summarizing it in a wiki would make sense.

    So this new feature is intended to replace the use of wikis for discussion.

    If you're a member of a user group, try going to the group's page (janitors, pmdev, breathers of fire, etc.) and see what's at the bottom.

    One main way in which these threaded discussions are different from the regular sections is that nodes are not votable and will always have reputation zero — the idea being that it wouldn't be fair for a monk to be able benefit monetarily from posts which are not accessible to the general public.

    Consequent to that, replies are always shown newest first.

    Whenever someone posts a direct reply to a group — which is essentially a top-level post under a group — it sends a message to all members of the group, something like this:

    There is a new comment on pmdev by jdporter...

    This idea was initially floated and developed in Create new [pmdev]-only section "Pmdev Discussion" and Create new [gods]-only section "Gods Forum". But note that the final implementation of the feature did not adhere to the designs suggested in those threads.

    If you're in pmdev, you can see a technical description of the implementation by visiting the new nodetype usergroupnote; scroll to the bottom to the documentation.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
    [abbr://] tests:
    • whipuptitude
    • some 'title' text
    • some 'suffix' (no 'title')
    • some 'title' (no 'suffix')