1171:"Perl Problems"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Magistrates, Prelates, Moderators General

1171:"Perl Problems"

Postby Quicksilver » Fri Feb 08, 2013 5:05 am UTC

Image
http://xkcd.com/1171/
Alt Text:"To generate #1 albums, 'jay --help' recommends the -z flag."
I've not had much experience with Perl, but this sounds more like an assembler issue.
User avatar
Quicksilver
 
Posts: 423
Joined: Wed Apr 29, 2009 6:21 am UTC

Re: 1171:"Perl Problems"

Postby rhomboidal » Fri Feb 08, 2013 5:10 am UTC

"I got the rap patrol on the stat() patrol..."
User avatar
rhomboidal
 
Posts: 541
Joined: Wed Jun 15, 2011 5:25 pm UTC

Re: 1171:"Perl Problems"

Postby Doctor Device » Fri Feb 08, 2013 5:18 am UTC

I'm surprised the regular expressions only generated a single additional problem. I would expect them to generate a new problem for every problem already in the system.
User avatar
Doctor Device
 
Posts: 4
Joined: Wed Oct 10, 2007 7:20 pm UTC
Location: The Great Taupe Middle

Re: 1171:"Perl Problems"

Postby sbkp » Fri Feb 08, 2013 5:38 am UTC

Code: Select all
s/(\d+)/$1+1/e;
sbkp
 
Posts: 19
Joined: Wed Jul 04, 2012 1:29 pm UTC

Re: 1171:"Perl Problems"

Postby ysth » Fri Feb 08, 2013 5:55 am UTC

sbkp wrote:
Code: Select all
s/(\d+)/$1+1/e;

Doesn't work for me:
Code: Select all
$ perl -Mcharnames=:full -we'$problems = "\N{MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO}"; $problems =~ s/(\d+)/$1+1/e;'
Argument "\x{1d7ec}" isn't numeric in addition (+) at -e line 1.


Also,
Code: Select all
$ jay
The program 'jay' is currently not installed.  You can install it by typing:
sudo apt-get install mono-jay

Ewww, who wants mono?
Last edited by ysth on Fri Feb 08, 2013 6:20 am UTC, edited 1 time in total.
A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |
User avatar
ysth
 
Posts: 172
Joined: Wed Apr 11, 2007 7:21 pm UTC

Re: 1171:"Perl Problems"

Postby sbkp » Fri Feb 08, 2013 6:08 am UTC

This is the whole thing that worked here. I guess you're proving the comic, though. :)

Code: Select all
$_ = "99 problems";
s/(\d+)/$1+1/e;
print;
sbkp
 
Posts: 19
Joined: Wed Jul 04, 2012 1:29 pm UTC

Re: 1171:"Perl Problems"

Postby madock345 » Fri Feb 08, 2013 6:29 am UTC

Dammit. First XKCD in a long time where I didn't get any of the jokes. I hate when that happens, but I guess it wouldn't be XKCD if it didn't. I used to keep track, but It started getting so rare for me to not get one that I stopped. Guess I'm going to have to restart the timer now.
"As the size of an Explosion increses the number of social situations it is incapable of resolving approches zero"
-Vaarsuvius, The Order of the Stick
Spoiler:
ethereal_fire wrote:madock345, I like your sig : )

Qwerty.55 wrote:I like your new recursive sig even better than before.
User avatar
madock345
 
Posts: 48
Joined: Mon Apr 12, 2010 12:26 am UTC
Location: My used book store near Seattle WA

Re: 1171:"Perl Problems"

Postby dbentley » Fri Feb 08, 2013 6:32 am UTC

This is a great joke. In fact, I liked it so much, I thought of it 3 years ago. I'll claim a previous invention of it (in no way asserting Randall stole it).

"RT @dbentley: Jay-Z thought, "I know, I'll use regular expressions." Now he has 100 problems."

I'd like to link to it, but the forum is flagging it as spam. It's twitter slash jwz slash status slash 10659845358

(Retweeted on) March 18, 2010 (by @jwz)

(I am @dbentley on twitter)
dbentley
 
Posts: 2
Joined: Wed Jul 20, 2011 5:45 am UTC

Re: 1171:"Perl Problems"

Postby Tova » Fri Feb 08, 2013 6:33 am UTC

All I'm getting for the comic is a swirly "busy" mouse pointer. With that title, I'd assumed that Randall was just trolling his readers again.
Tova
 
Posts: 63
Joined: Wed Mar 24, 2010 3:44 am UTC

Re: 1171:"Perl Problems"

Postby Coyne » Fri Feb 08, 2013 7:03 am UTC

This can be used for almost anything:

I got 99 problems, so I used XML; now I have 100 problems.
User avatar
Coyne
 
Posts: 402
Joined: Fri Dec 18, 2009 12:07 am UTC

Re: 1171:"Perl Problems"

Postby Max™ » Fri Feb 08, 2013 7:09 am UTC

I got 99 problems but my code ain't one, if you havin' perl problems I feel bad for you son.

I got 99 problems, so I used python, now I can fly!
mu
User avatar
Max™
 
Posts: 1792
Joined: Thu Jun 21, 2012 4:21 am UTC
Location: mu

Re: 1171:"Perl Problems"

Postby creaothceann » Fri Feb 08, 2013 8:03 am UTC

Wait, did he just simply re-use Zawinski's quote and comic 927?
User avatar
creaothceann
 
Posts: 33
Joined: Fri Jan 26, 2007 9:44 am UTC
Location: Germany

Re: 1171:"Perl Problems"

Postby Editer » Fri Feb 08, 2013 9:07 am UTC

creaothceann wrote:Wait, did he just simply re-use Zawinski's quote and comic 927?


Zawinski popularized that quote but didn't come up with it himself. FWIW.
These days, if you don't have ADD, you not paying close enough attention. -- J.P. Barlow
User avatar
Editer
 
Posts: 65
Joined: Mon Mar 31, 2008 4:17 am UTC

Re: 1171:"Perl Problems"

Postby jalohones » Fri Feb 08, 2013 9:38 am UTC

A couple of posts have explained the regular expressions side of this joke. Am I the only person who had to google Jay-Z?
User avatar
jalohones
 
Posts: 59
Joined: Wed Feb 23, 2011 5:12 am UTC

Re: 1171:"Perl Problems"

Postby Klear » Fri Feb 08, 2013 9:49 am UTC

jalohones wrote:Am I the only person who had to google Jay-Z?


You are quite lucky.
User avatar
Klear
 
Posts: 1668
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1171:"Perl Problems"

Postby jalohones » Fri Feb 08, 2013 10:07 am UTC

Klear wrote:
jalohones wrote:Am I the only person who had to google Jay-Z?

You are quite lucky.

Sweet! I'm gonna drop a bundle on a horse race now. LUCK!
User avatar
jalohones
 
Posts: 59
Joined: Wed Feb 23, 2011 5:12 am UTC

Re: 1171:"Perl Problems"

Postby Jeff_UK » Fri Feb 08, 2013 10:55 am UTC

jalohones wrote:A couple of posts have explained the regular expressions side of this joke. Am I the only person who had to google Jay-Z?

I'd heard of him, and assumed this was a reference to some lyrics of some sort didn't know the track though...
"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!
Jeff_UK
 
Posts: 31
Joined: Sat Nov 03, 2007 10:38 pm UTC

Re: 1171:"Perl Problems"

Postby rmsgrey » Fri Feb 08, 2013 11:10 am UTC

Jeff_UK wrote:
jalohones wrote:A couple of posts have explained the regular expressions side of this joke. Am I the only person who had to google Jay-Z?

I'd heard of him, and assumed this was a reference to some lyrics of some sort didn't know the track though...

Pretty much the same for me.

Oh, and my current project at work involves extensive string manipulation - faced with a choice between using pre-baked regular expression handling, or constructing my own parser with a lot of the same capabilities and features, I'm embracing the regex...
rmsgrey
 
Posts: 1560
Joined: Wed Nov 16, 2011 6:35 pm UTC

Re: 1171:"Perl Problems"

Postby HarryUrashima » Fri Feb 08, 2013 11:27 am UTC

Jeff_UK wrote:
jalohones wrote:A couple of posts have explained the regular expressions side of this joke. Am I the only person who had to google Jay-Z?

I'd heard of him, and assumed this was a reference to some lyrics of some sort didn't know the track though...


"If you're having girl problems I fell bad for you son
I've got 99 problems but a bitch ain't one"
HarryUrashima
 
Posts: 1
Joined: Thu Sep 01, 2011 9:09 pm UTC

Re: 1171:"Perl Problems"

Postby rjsteg » Fri Feb 08, 2013 12:24 pm UTC

This is not a shocking result.

For me, perl is the *only* language that I cannot *read* another programmer's program!!
rjsteg
 
Posts: 17
Joined: Wed Dec 28, 2011 2:41 pm UTC

Re: 1171:"Perl Problems"

Postby leifbk » Fri Feb 08, 2013 12:42 pm UTC

Coyne wrote:This can be used for almost anything:

I got 99 problems, so I used XML; now I have 100 problems.


«XML is like violence; if it doesn't work, then you're not using enough of it.»
leifbk
 
Posts: 31
Joined: Wed Nov 26, 2008 7:24 am UTC
Location: Bærum, Norway

Re: 1171:"Perl Problems"

Postby Dthen » Fri Feb 08, 2013 12:44 pm UTC

If you havin' Perl problems I feel bad for you, son, I got 99 problems, but a glitch ain't one.
I like cats.
User avatar
Dthen
You talk too much, you talking cat
 
Posts: 460
Joined: Sat Jan 02, 2010 6:35 pm UTC
Location: Ayrshire, Scotland

Re: 1171:"Perl Problems"

Postby Klear » Fri Feb 08, 2013 1:12 pm UTC

Dthen wrote:If you havin' Perl problems I feel bad for you, son, I got 99 problems, but a glitch ain't one.


That's better than the comic itself =)
User avatar
Klear
 
Posts: 1668
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1171:"Perl Problems"

Postby sbkp » Fri Feb 08, 2013 2:02 pm UTC

rjsteg wrote:This is not a shocking result.

For me, perl is the *only* language that I cannot *read* another programmer's program!!


Perl does have the reputation of being a "write-only" language.
sbkp
 
Posts: 19
Joined: Wed Jul 04, 2012 1:29 pm UTC

Re: 1171:"Perl Problems"

Postby orthogon » Fri Feb 08, 2013 2:26 pm UTC

sbkp wrote:
rjsteg wrote:This is not a shocking result.

For me, perl is the *only* language that I cannot *read* another programmer's program!!


Perl does have the reputation of being a "write-only" language.


Brilliant. :lol: As sbkp implies, you have to be a pretty skilled perl programmer to be able to read your own program. I like to think that I'm pretty good at syntax, and only in perl do I have to resort to trial-and-error to get the result I want. I have written lines of perl for which I have absolutely no idea how/why they work.
orthogon
 
Posts: 1116
Joined: Thu May 17, 2012 7:52 am UTC
Location: The Airy 1830 ellipsoid

Re: 1171:"Perl Problems"

Postby rcox1 » Fri Feb 08, 2013 2:45 pm UTC

Just a generally funny comic. Haven't had one of these in a while
rcox1
 
Posts: 112
Joined: Wed Nov 11, 2009 11:23 pm UTC

Re: 1171:"Perl Problems"

Postby cellocgw » Fri Feb 08, 2013 2:58 pm UTC

As long as we're into songs about 99 (and I sure hope NOT involving balloons),

Aleph-null bottles of beer on the wall, Aleph-null bottles of beer, Take one down, and pass it around, Aleph-null bottles of beer on the wall
(attributed to Rentain & Dundes)
Former OTTer
Vote cellocgw for President 2016. #ScienceintheWhiteHouse http://cellocgw.wordpress.com
"A man's got to know his limitations." Harry Callahan <--> "A man's got to know his limits." L'Hopital
"The Planck length is 3.81779e-33 picas." -- keithl
User avatar
cellocgw
 
Posts: 1093
Joined: Sat Jun 21, 2008 7:40 pm UTC

Re: 1171:"Perl Problems"

Postby synaemnid » Fri Feb 08, 2013 3:23 pm UTC

rjsteg wrote:This is not a shocking result.

For me, perl is the *only* language that I cannot *read* another programmer's program!!


The fun part of reading Cryptonomicon was figuring out what the Perl program did before it was explained. I didn't know Perl, so I had to also decipher the syntax (without googling!)
synaemnid
 
Posts: 3
Joined: Mon Mar 14, 2011 9:03 pm UTC

Re: 1171:"Perl Problems"

Postby TheEponymousBob » Fri Feb 08, 2013 3:42 pm UTC

Jay-Z is probably the best rapper ever to be named after the vertical component of quantum angular momentum. Similarly for Alt-J and the laplacian.
TheEponymousBob
 
Posts: 7
Joined: Fri Jul 02, 2010 7:55 am UTC

Re: 1171:"Perl Problems"

Postby O-Deka-K » Fri Feb 08, 2013 4:28 pm UTC

creaothceann wrote:Wait, did he just simply re-use Zawinski's quote and comic 927?


HarryUrashima wrote:"If you're having girl problems I fell bad for you son
I've got 99 problems but a bitch ain't one"


Huh. Maybe the joke is that Jamie Zawinsky == Jay-Z.
O-Deka-K
 
Posts: 22
Joined: Fri Oct 12, 2012 3:40 pm UTC

Re: 1171:"Perl Problems"

Postby ahammel » Fri Feb 08, 2013 5:06 pm UTC

The year is '94 and the code was raw
In the bug report queue is a motherfucking log
I got two choices y'all, patch it quick or
Wait for the next release and show the feature the door
Now I ain't trying to see no flame war with the users
And I got a few hours while IT fixes my computer
So I...branch the repo and pop open the code
And I see:
Code: Select all
# Son, do you know what this regex is for?
Does it parse the input to a sick ass flow?
Do I look like a mind reader, sir? I don't know
Did you write a unit test or should I guess some more?
Code: Select all
# Well my manager complained that I was coding to slow
Uh huh..
Code: Select all
# Maybe you could write the test now, if you're so smart
# Are you a 1337 h@><0r? I know a lot of you are
I ain't testing your shit, all my code is legit!
Code: Select all
# Well do you mind refactoring this class a little bit?
Well, it's full of hacks and kludges and that's a nasty patch.
And I'm busy, so talk to my manager about that.
Code: Select all
# Why aren't you sharp as a tack? Are you a hacker or something?
# Maybe you're somebody important or something?
Naw I ain't RMS but I know a little bit.
Enough to not waste all my time fixing your shit.
Code: Select all
# Shows how smart you are, it's just a fencepost error son
You got 99 problems but somehow solved 101

Hit me.
I also answer to 'Alex'

YES, IT'S SPACEY-WACEY!
User avatar
ahammel
My Little Cabbage
 
Posts: 1528
Joined: Mon Jan 30, 2012 12:46 am UTC
Location: Vancouver BC

Re: 1171:"Perl Problems"

Postby Tynach » Fri Feb 08, 2013 5:15 pm UTC

I don't know perl, but I learned perl-compatible regex in my PHP class.

I had the hardest time understanding them, so just for... Uh, fun? I decided to choose the most unrealistic goal possible with regex to force myself to learn it. What'd I choose? The URI specification from Sir Tim Burners Lee. The result:

http://regexlib.com/REDetails.aspx?regexp_id=3246

And yet, I am afraid to use it. I don't think it would properly validate a URI, I just know that it does match any existing proper URI. So I can't use it anyway.
Tynach
 
Posts: 15
Joined: Fri Dec 02, 2011 6:26 am UTC

Re: 1171:"Perl Problems"

Postby WeWanttheFunk » Fri Feb 08, 2013 5:25 pm UTC

ahammel wrote:The year is '94 and the code was raw
In the bug report queue is a motherfucking log
I got two choices y'all, patch it quick or
Wait for the next release and show the feature the door
Now I ain't trying to see no flame war with the users
And I got a few hours while IT fixes my computer
So I...branch the repo and pop open the code
And I see:
Code: Select all
# Son, do you know what this regex is for?
Does it parse the input to a sick ass flow?
Do I look like a mind reader, sir? I don't know
Did you write a unit test or should I guess some more?
Code: Select all
# Well my manager complained that I was coding to slow
Uh huh..
Code: Select all
# Maybe you could write the test now, if you're so smart
# Are you a 1337 h@><0r? I know a lot of you are
I ain't testing your shit, all my code is legit!
Code: Select all
# Well do you mind refactoring this class a little bit?
Well, it's full of hacks and kludges and that's a nasty patch.
And I'm busy, so talk to my manager about that.
Code: Select all
# Why aren't you sharp as a tack? Are you a hacker or something?
# Maybe you're somebody important or something?
Naw I ain't RMS but I know a little bit.
Enough to not waste all my time fixing your shit.
Code: Select all
# Shows how smart you are, it's just a fencepost error son
You got 99 problems but somehow solved 101

Hit me.


Put your hands together!
WeWanttheFunk
 
Posts: 6
Joined: Fri Feb 08, 2013 5:23 pm UTC

Re: 1171:"Perl Problems"

Postby duckshirt » Fri Feb 08, 2013 5:46 pm UTC

O-Deka-K wrote:
creaothceann wrote:Wait, did he just simply re-use Zawinski's quote and comic 927?


HarryUrashima wrote:"If you're having girl problems I fell bad for you son
I've got 99 problems but a bitch ain't one"


Huh. Maybe the joke is that Jamie Zawinsky == Jay-Z.
Came here to suggest that as well. That makes it a bit more clever.
lol everything matters
-Ed
User avatar
duckshirt
 
Posts: 404
Joined: Thu Feb 15, 2007 1:41 am UTC
Location: Emerald City

Re: 1171:"Perl Problems"

Postby O-Deka-K » Fri Feb 08, 2013 7:40 pm UTC

ahammel wrote:The year is '94 and the code was raw
...snipped...
Hit me.

AWESOME
O-Deka-K
 
Posts: 22
Joined: Fri Oct 12, 2012 3:40 pm UTC

Re: 1171:"Perl Problems"

Postby Max™ » Fri Feb 08, 2013 7:43 pm UTC

O-Deka-K wrote:
ahammel wrote:The year is '94 and the code was raw
...snipped...
Hit me.

AWESOME

Agreed, your rhymes are truly dope, ahammel.
mu
User avatar
Max™
 
Posts: 1792
Joined: Thu Jun 21, 2012 4:21 am UTC
Location: mu

Re: 1171:"Perl Problems"

Postby Falling » Fri Feb 08, 2013 8:28 pm UTC

Here's a bit of backstory on the problems quote.
Falling
 
Posts: 175
Joined: Mon Nov 24, 2008 4:30 pm UTC

Re: 1171:"Perl Problems"

Postby ShadedKnight » Fri Feb 08, 2013 8:36 pm UTC

Max™ wrote:
O-Deka-K wrote:
ahammel wrote:The year is '94 and the code was raw
...snipped...
Hit me.

AWESOME

Agreed, your rhymes are truly dope, ahammel.


I felt the sick fires from all the way over here.

On another note, I still have no experience with perl so I get what the comic is saying I think, but I would be lying if I said I get the whole thing.
Bassoons.
I misspell wierd on purpose. It's still I before E dammit.
༼ つ ◕_◕ ༽つ Praise Helix ༼ つ ◕_◕ ༽つ
User avatar
ShadedKnight
 
Posts: 37
Joined: Tue Dec 20, 2011 1:35 am UTC

Re: 1171:"Perl Problems"

Postby Steeler » Fri Feb 08, 2013 10:13 pm UTC

xkcd's been on a roll ever since Debugger, but this one is the best yet! I think a lot of the feel of the older comics is back.
"What would happen if did you first know that do I say tell me about your feelings about him that you came to me the real reason explain anything else that you came to me?"
-Emacs Psychiatrist upon repeated presses of the enter key
User avatar
Steeler
 
Posts: 36
Joined: Sat Feb 05, 2011 2:00 am UTC

Re: 1171:"Perl Problems"

Postby Dthen » Sat Feb 09, 2013 12:09 am UTC

Klear wrote:
Dthen wrote:If you havin' Perl problems I feel bad for you, son, I got 99 problems, but a glitch ain't one.


That's better than the comic itself =)

Thanks! It's what I expected the punchline to be.
I like cats.
User avatar
Dthen
You talk too much, you talking cat
 
Posts: 460
Joined: Sat Jan 02, 2010 6:35 pm UTC
Location: Ayrshire, Scotland

Next

Return to Individual XKCD Comic Threads

Who is online

Users browsing this forum: Google [Bot] and 25 guests