Rapid debunking of conspiracy theories with Perl
Thursday, 26 April 2007
use Date::Calc "Delta_Days"; my $days = Delta_Days( 2001, 9, 11, # US 2004, 3, 11 ); # Spain print $days, $/;
912.
You’re solid gold, I’ll see you in Hell.
Thursday, 26 April 2007
use Date::Calc "Delta_Days"; my $days = Delta_Days( 2001, 9, 11, # US 2004, 3, 11 ); # Spain print $days, $/;
912.
About · Referring queries · Random article · Random doc · Recent comments (XML) · Contact · XML/Atom
articles · document pages
Anyone can double click to edit the block below. Its content is not necessarily from Sedition·com or reviewed or approved by us. Your chalkboard entry will stay there until someone else does the same or the server cache is reset or expires in a week. Rules: you can use basic Markdown or XHTML strict, no styles, no scripts, no <pre/>, no attributes except href for links, 750-ish characters, and, as usual, threats and abuse won’t be tolerated unless they’re very, very funny.
Why would you want to do this? You can put an ad and link for your site there. You can put a “Sedition·sucks” there. It’s above the fold on the top page and it’s all yours until the next visitor comes along.
Why would we want to do this? 1) Free speech is fun. 2) Cross-pollination is fun. 3) A Web 2.0 résumé point is nice when poking the job market with a sharp stick.
» Your candidate, I presume? #2.1
» Your candidate, I presume? #2
» Austin, Texas is the new Austin, Texas
» George Foreman I is going down in the first
» I don’t win every fight in my dreams
» How on Earth are there only two results in Google for this?
» You know what occurs to me seeing Harvey Weinstein doing the perp walk?
» Dennis Perrin’s still got it –OR– #Oprah2020
» Those who do not leave a reason…
» Re: The deaths in Charlottesville, Virginia today
» Is there anything more insulting…
» How to run *old* perl Kwiki (like 0.38) on PSGI
» Convert image sources to data URI with Perl: img2data
» Flugblätter der Widerstandsbewegung in Deutschland.
» Flugblätter der Weissen Rose. IV
» Flugblätter der Weissen Rose. III
We use carbon neutral web hosting to serve pages and our software, images, and auxiliary content are developed using 100% wind power; no, seriously.
A Wolf prowling near a village one evening met a Dog. It happened to be a very lean and bony Dog, and Master Wolf would have turned up his nose at such meager fare had he not been more hungry than usual. So he began to edge toward the Dog, while the Dog backed away.
“Let me remind your lordship,” said the Dog, his words interrupted now and then as he dodged a snap of the Wolf’s teeth, “how unpleasant it would be to eat me now. Look at my ribs. I am nothing but skin and bone. But let me tell you something in private. In a few days my master will give a wedding feast for his only daughter. You can guess how fine and fat I will grow on the scraps from the table. Then is the time to eat me.”
The Wolf could not help thinking how nice it would be to have a fine fat Dog to eat instead of the scrawny object before him. So he went away pulling in his belt and promising to return.
Some days later the Wolf came back for the promised feast. He found the Dog in his master’s yard, and asked him to come out and be eaten.
“Sir,” said the Dog, with a grin, “I shall be delighted to have you eat me. I’ll be out as soon as the porter opens the door.”
But the “porter” was a huge Dog whom the Wolf knew by painful experience to be very unkind toward wolves. So he decided not to wait and made off as fast as his legs could carry him.
Take that, subspace.
Discussion
Comments
A missing-the-point comment
What editor do you use for perl? I've always used emacs with cperl-mode, but those don't look like the standard colors for either of emacs' perl modes. Anything you'd suggest?
By Jen on 26 April 2007 · 12:50
Re: Rapid debunking of conspiracy theories with Perl
I also use Emacs with cperl-mode—or sometimes perl-mode which indents some things better—but what’s printed up there is dynamically generated from the software which runs the site. I added the code coloring just a couple of days ago.
It uses the wonderful PPI to walk through and add spans around different code tokens. Then it’s just a little CSS to color it (I haven’t settled on a final scheme yet, I’ll probably rip off perldoc.perl.org’s lovely scheme. I was planning on posting a code sample of it but haven’t got to it yet. I want to do a section of nothing but code snippets because I’ve got 1,000+ lying around. That is shaping up and I’ll add something in the sidebar like “New non-journal stuff” when it’s together.
By A is A on 26 April 2007 · 13:10
Re: Rapid debunking of conspiracy theories with Perl
Never even heard of PPI. Pretty cool stuff. Isn't it a bad sign for the readability of a language if it isn't possible to parse it without the actual interpreter? But that's just my reaction from reading all the we-will-never-be-perfect stuff... I haven't checked out what PPI can acutally do.
And code snippets would be awesome... I do luvs them snippets.
By Jen on 26 April 2007 · 20:42
Re: Rapid debunking of conspiracy theories with Perl
PPI is very, very good at parsing Perl but, like the man said, only perl can parse Perl (meaning, only the actual interpreter can parse the language). This is because Perl is extremely dynamic for things like self-generating code or on the fly namespace manipulation; you might not even know what your program looks like until it’s running, or has been running. This is part of its curse and its charm. Why it’s both so easy and so easy to write badly. I think it’s safe to say I would not be a hacker, of any material cloth, without Perl because I’d never be charmed by any of the other languages.
By A is A on 26 April 2007 · 22:56
Re: Rapid debunking of conspiracy theories with Perl
Hmm.. that's odd. On this page there's a link to the next post, "I like insects better than you #26: sweat bee", but as of 11:45 EST, it doesn't seem to exist.
By Jen on 26 April 2007 · 20:45
Re: Rapid debunking of conspiracy theories with Perl
:) Sweat bee might be next… I must have broken the search_live ResultSet call—that post is not “live” yet but scheduled to post in the future—when I reordered the arguments earlier to allow for something else. You can have a top secret preview for being so observant: sweat bee.
I’m fiddling lots of little stuff right now to allow for different kinds of hierarchical/tree posts in and outside the “blog” line.
By A is A on 26 April 2007 · 22:48
Re: Rapid debunking of conspiracy theories with Perl
hierarchical/tree posts........... line ?
By anne on 27 April 2007 · 21:07