...making Linux just a little more fun!

<-- prev

The Linux Laundrette

By Jimmy O'Regan

This month's Laundrette is somewhat generated (w00t!) using a silly sed script. I don't think there are too many problems with this, and it has certainly made compiling this easier.

One thing that every group of people I have had anything to do with has had in common is a healthy collective sense of humour, and an appreciation for the surreal. (I don't think I need to point out that the group of LG regulars who have been mercilessly quoted here are no exception, but I guess I just did).

[Dave Blackburn] I appreciate your reply -- and so fast.

[Ben] [grin] It happens sometimes, around here. Other times, nobody will say anything until someone makes a comment a week down the road, and then - oh, brother, take cover! We've been known to wander from rhubarb to US history, taking a detour into European supermarkets and Cockney rhyming slang along the way... but we usually get the question answered. Some way or another.

Because the off-topic threads tend to spawn other off-topic threads, I've changed the format a little. Hopefully this will work out better, as trying to find a way to show the different reply levels has been a headache.

This means that the 'wacko topics' aren't cleanly separated from the humourous messages: though I probably could move them around, I think it gives a bit more of an insight into how our (twisted) minds work. Whether or not that's a good thing is best judged in hindsight.

It does mean that our in-jokes are a little more transparent to any unsuspecting newcomer; we can just throw out a link, and all is explained. That's pretty important to us, because here at LG, the party is open to all comers (just bring your own beer).

(That said, I'm tempted to throw in something baffling: monkeys, toasters, squid, school uniforms, tractors. A few of my co-workers should be in tears of laughter by now :)

Links

Danny O'Brien has been writing a column called "To Evil!". If you haven't been reading it, you should start: '"To Evil!"'s house rule #1 states that corporations don't wreak evil; people wreak evil. Blaming Microsoft for doing bad is a bit like smacking your aluminum siding whenever your housemates steals some toast. No-one feels guilty, no-one gets blamed. You just hurt your hand.'

Evil of September 2004
Index of Evil
RSS feed

After last month's thread about "Grocer's", there was a similar thread on afp that pointed to the Apostrophe Protection Society as well as these photos.

Found while digging through my bookmarks: False Advertising - A Gallery of Parody.

Why you shouldn't use images hosted on someone else's site (at least, without their permission).

Probably a bit late for Hallowe'en, but here's the Halloween Geek Test, and a printable mask to let you scare everyone you know!

Speaking of Hallowe'en...

For some on-topic humour, try the SCO drinking game, or find out What your choice of Linux distribution says about you.

This month, we've got some links that other TAGsters sent. Enjoy.


[Brian] I love this comic! Too bad about the site's expired digital certificate, though :-(

https://secure.linuxports.com/TUX/

It's terrible that the author hasn't drawn any new releases since 2002, though - I would have loved to have seen how it was supposed to end...


[Sluggo] Solar truck made by high-school physics teacher. It has a hydrogen fuel cell, but it can also switch to conventional petrol power from the dashboard.

Slashdot comments, including the history of alternative car research at the high school (in Phoeniz AZ).


Halloween

[ This was sent privately, but it has to be shared, what with Halloween being so close to the publishing date, and the idiocy involved ]

[Sluggo] http://seattlepi.nwsource.com/local/196371_spookban22.html
Puyallup school district bans most Halloween symbols, says they might offend Wiccans, for whom Halloween is a religious holiday and some of whom are witches.

[ A few days later... ]

[Sluggo] http://seattlepi.nwsource.com/opinion/196878_hallowed.html
Wiccans protest the ban against halloween costumes! One site calls it, "The grinch who stole Halloween."
http://www.iamawitch.com/article.php?story=20041021215234185
"Despite a public appeal Monday night, school officials said the ban stands and that kids who show up in costumes may be sent home."


Out of Memory

[Sluggo] http://lwn.net/Articles/104179/ Linux's overcommitting of memory compared to an airline flying with just barely enough fuel for the average situation.

[Brad] Hmmmmm.

I'd pay money to watch people get forcibly ejected from a plane ;)

[Ben] For a closely-related demonstration, run "swapoff" on your machine and fire up Gimp, Mozilla, and a kernel compile. Should make a nice 'whOOM' sound. :)

[Sluggo] It sounds like you've done this before.

[Ben] Not me! It was, um, a friend.

[Thomas] No -- you have that all wrong. Don't look at seeing how much RAM processes waste, just try running KDE and keep adding more RAM until it runs at a speed that is useable. :) [1]

[1] This is known as the OverLooking Other Memory.

[Ben] Once you've satisfied KDE's memory requirements (and the truck from the memory vendor's has left), everything else will run without a hitch - even your infinite loops will compute in one-tenth their usual time.

[Heather] I've got a 90Mb gimp file with um... a lot of layers, that just might do it on its own. But if you really want to do damage, have moz surf some javascript developer archives and explore the working examples. (Whether they actually work is immaterial.) That oughta do it. K isn't required to play this game.

But it kertainly helps...


Anti-Microsoft bias in classical Russian poetry

[Ben] You woudn't think it could happen, but...

Someone on anekdot.ru (a Russian humor site) noted that "bez okon, bez dverey" - a line from Pushkin's famous description of Baba Yaga's hut - can be translated as "no Wind0ws, no Gates".

[ This page has a overview of Baba Yaga. ]

[Brad] Creepy. I wonder if the author of that was a Russian cousin of Nostradamus...


Spam: Spam Jokes

A group was touring London, marveling at the historic buildings, art collections, and such. The group included people from many countries. During the tour of the Tower of London, a man from Prague and another man from Athens struck up a conversation about some point in history.

A small disagreement ensued, which rapidly became a large one. They decided to settle the matter then and there using the historical accouterments at hand. Donning armor and chain mail, they prepared for a battle to the death. This attracted the attention of the rest of the tour group, who crowded around for a better look. Inasmuch as the combatants were in period dress, the people couldn't tell one from another.

"Is that the Czech wearing the armor?" asked one tourist. "No," replied another, "The Greek is in the armor. The Czech is in the mail."


I got a new car radio yesterday. It has voice recognition. You shout "soul" and it plays a soul station. You shout "rock" and it finds rock and roll for you. You shout "country" and it finds country music.

I was enjoying this new technology when some children ran in front of my car, causing me to swerve at the last second. I yelled out: "F&**king kids!"

And my radio started playing Michael Jackson songs


"Send someone over quickly!" the old woman screamed into the phone. "Two naked men are climbing towards my bedroom window!"

"This is the Fire Department, lady," the voice replied. "I'll have to transfer you to the Police Department."

"No, it's YOU I want!" she yelled. "They need a longer ladder!"


The CIA had an opening for an assassin.

After all of the background checks, interviews, and testing were done there were three finalists - two men and one woman. For the final test, the CIA agents took one of the men to a large metal door and handed him a gun.

"We must know that you will follow your instructions, no matter what the circumstances. Inside this room you will find your wife sitting in a chair. You have to kill her." The first man said. "You can't be serious. I could never shoot my wife." The agent replies, "Then you're not the right man for this job."

The second man was given the same instructions. He took the gun and went into the room. All was quiet for about five minutes. Then the agent came out with tears in his eyes. "I tried, but I can't kill my wife." The agent replies, "You don't have what it takes. Take your wife and go home."

Finally, it was the woman's turn. Only she was told to kill her husband. She took the gun and went into the room. Shots were heard, one shot after another. They heard screaming, crashing, banging on the walls. After a few minutes, all was quiet. The door opened slowly and there stood the woman. She wiped the sweat from her brow and said, "You guys didn't tell me the gun was loaded with blanks. So I had to beat him to death with the chair."


A young blonde was on vacation in the depths of Louisiana. She wanted a pair of genuine alligator shoes in the worst way, but was very reluctant to pay the high prices the local vendors were asking.

After becoming very frustrated with the "no haggle" attitude of one of the shopkeepers, the blonde shouted, "Maybe I'll just go out and catch my own alligator so I can get a pair of shoes at a reasonable price!"

The shopkeeper said, "By all means, be my guest. Maybe you'll luck out and catch yourself a big one!" Determined, the blonde turned and headed for the swamps, set on catching herself an alligator.

Later in the day, the shopkeeper was driving home, when he spotted the young woman standing waist deep in the water, shotgun in hand. Just then, he saw a huge 9-foot alligator swimming quickly toward her. She took aim, killed the creature, and with a great deal of effort hauled it on to the swamp bank. Lying nearby were several more of the dead creatures. The shopkeeper watched in amazement. Just then the blonde flipped the alligator on its back, and frustrated, shouts out, "Damn it, this one isn't wearing any shoes either!"


Two blondes were going to Disneyland when they came to a fork in the road. The sign read: "Disneyland Left."

So they went home.


Succinctly put...

[Brian] ...thus someone named Robert becomes the brother of my parent.


Gremlins

[ Those damned Gremlins are at it again. ]

[Ben]

It may well be that the bad experience I've had was due to that
particular unit and not the make/model/flavor/serial number/gremlin that
                                                            ^^^^^^^

[Jimmy]

I'll say no more... for now. Remember - no bright lights, no water, and don't 
                                                             ^^^^^
feed them after midnight. 

[Ben] I think you've spotted the problem. That's why there are always gremlins on boats!

"Ve are gremlins/From ze Kremlin..." -- from a wonderful WWII Warner Brothers cartoon

[Jimmy] Aha. Water makes them multiply. D'oh -- I've got the theme music from the movies stuck in my head now.


Netiquette

[Ben]

On Wed, Sep 29, 2004 at 02:13:16AM +0000, Muhammad Firdaus Muhammad Firdaus wrote:

> To whom it may concern,

Let's see - you've sent your email to:

[ Several people ]

Thanks for spamming me along with everyone else you could think of. I'm sure other people will treat your "request" with the same amount of individual attention you've shown in making it.

I'll quote someone who's made the point more calmly, politely, and pleasantly than I presently care to (full credit to Rick Moen. Well said, sir.):


(You cross-posted your request for help to multiple newsgroups, or mailing lists.)

I was going to help you, until I noticed your cross-post. Now, I'll spend that time assisting someone else, who's not being a pain in the ass.

A large and growing number of otherwise helpful people are ignoring you in exactly this way. Watch and see. Unlike most, I'm taking the trouble (through referring you to this text) to tell you what's going on.

I could advise you to avoid cross-posting because it's rude to the on-line community, but saying that just conveys the message that the Internet community rewards rudeness. No, I'm suggesting you should post to a single forum at a time because you'll get more, better, quicker answers -- because you won't be widely boycotted and ignored. Yes, it's true that "other people do it". They're getting worse help and less help. They just haven't yet figured it out.

Don't clean up your act to please me. Yes, I'd prefer that you avoid acting clueless and rude on the Net, because I care about the Net, but (like many others) can and will deal with the immediate problem by disregarding your crossposted question.


For more on [1] Netiquette, see any of thousands of resources on the Net.

[1] You can stop wondering; yes, the wordplay is intentional.


Laptop Juggling

[Kapil] I would have said I would wait for the laptop that you give up on and the retailers then sell at half price :-) --- but then I would also know that it doesn't run Linux well, so that it wouldn't be worth a lot!

[Ben] Nope. But you could wait until I find one that's hitting on all 12 cylinders, or at least runs smoothly, is fuel-efficient, and has nice upholstery; I'll be reporting on every one I test. Hmm, maybe an occasional article series...

[Breen] Hmm. Jon Corbet's got the copyright on "Grumpy Editor", but maybe he'd be willing to share...

[Ben] [grin] We could always do a time-share on it. Say, why don't I email 10,000 of my closest editor (hm, typed 'closet editor' at first... makes me really wonder) friends about this special, exciting one-time offer?

That'll get me on their spam lists, they'll never darken my email gateway again. Hmmm, this may bear considering at some future point.


The Crack Pipe

[Ben] (Is it time for another hit on the crack-pipe yet? Oh, goody.)

[Vince] You say your pipe is cracked?? A good friend of mine of the Lacota Nation makes pipes that don't break <G> Made from stone... good pipe..

[Jimmy] Reminds me of a Denis Leary riff, something like "Marijuana doesn't lead to harder drugs -- it leads to DIY. Dude, we could make a great bong out of your head".

I once read a magazine that had instructions for making a pipe out of the ground :)


Spam: Spam cuteness

[Ben] Well, now - here's an interesting one. In one of my "Perl One-Liner of the Month" articles, I predicted that spammers would eventually catch on to the hex-encoding method I'd used to obscure email addresses. Didn't take long, did it?

---------------------------------------------------------------------
From: Smith Barney <custservice.ref.num1615018258@smithbarney.com>

To: [address removed]
Cc: 
Bcc: 
Subject: ****SPAM**** Smith Barney Notification
Reply-To: 

<html><p><font face="Arial"><A hREF="https://www.smithbarney.com/cgi-bin/login/confirm.cgi"> <map name="FPMap0"><area coords="0, 0, 639, 336" shape="rect" href="http://%32%30%39%2E%31%32%2E%31%31%34%2E%31%33%39:%38%37/%73%62/%69%6E%64%65%78%2E%68%74%6D"> </map><img SRC="cid:part1.03030205.07080805@identifdep_op32255487058@smithbarney.com" border="0" usemap="#FPMap0"></A></a></font></p><p><font color="#FFFFF3">Sterling Marlin in 1985 Dragonball in 1882 Cindy Margolis a collect call Just tell Jennifer Lopez Come on! Horoscopes cats and dogs I can't get through in 1801 Gladiator Penthouse Bible pretty much. Dragonball in 1841 Sites Thanks for visit Try to connect you Websites Windows 2000 Love Poems </font></p></html> ---------------------------------------------------------------------

The above flips to "http://209.12.114.139:87/sb/index.htm", which resolves to some company based in Arizona. I've become so used to these things coming out of China that it seems, well, weird to see this. What's even more interesting is the port they're using (87): Mozilla is smart enough that it pops up an "Access to this port has been disabled for security reasons", but Dillo and w3m go right to chewing on the thing (anybody want to make a bet on IE behavior for this?)

It's quite cute; if it wasn't for their stupid little trick with the random text, it would look fairly real (there's a GIF of an official-looking, "Smith Barney wants you to click this" note attached to the original email.) It just ain't safe to be gullible these days.


Spam: Again, regarding your request. Please reply.

[Brian]

Corinne Vega wrote:
Hi again,

This is Corinne Vega. I am writing to you to confirm that we have
accepted your mortgage application.

How thoughtful to accept my application from your future, in my past.

Our office has confirmed that you can get a $220,000 loan for as low
as $352.00 per month payment.

Now, is the mortgage for Ben's boat that I'm taking out, or is it for the newly beach-front property in Florida, or perhaps that holiday home I just built on the flanks of Mt. St. Helens.

[Sluggo] Yeah yeah yeah, I couldn't let Ben and his hurricanes have all the fun.

[Brian] Ooooo, errr... Now, with those payments, you haven't specified a loan rate, so lessee here. At 0% interest, that's a 52 year loan. Lucky for you my family tends to live into the three digits, or you'd be SOL sooner or later.

[Ben] Why, Brian! You missed the salient factor, the very fact that makes this The Offer Of The Century: since they've reversed the flow of time, as you noted above, the interest is negative - that is, they pay you for taking out the loan.

[Jason] So it's sort of like how you pay for a meal at the restaurant at the end of the universe?

[Ben] In fact - the calculations are a bit difficult, but bear with me - eh, carry the 9, divide by the prime rate on 10/29/29, subtract the number of polar bears in Zimbabawe, raise to the power of the tea index in China, drop the first seven digits... there we are. You'll have it paid off in about 1.03453464557 microseconds, give or take a century.

[Jason] Well, yes, but that figure is useless unless you perform a simple test to see if the lender is running a scam. Just fill out the application forms, and then look to see if the DOB given is yesterday.

[Ben] Best of all, you can borrow the money for the payments from Corinne - the interest from that second loan will easily pay for the first one, and leave you enough cash to start a loan company of your own!

Now, that's what I call high finance. Must have required snorting several grams of funny white powder and smoking a couple of pounds of radioactive waste to come up with a "special offer" like that one...

[Brian]

The approval process takes no longer than a minute, so please fill
out the form on our website:

I'm sure that it's easier for you to just copy my data from the application that I will fill out in the future and send back to you somehow. Remit payment to the same swiss bank account that's been flogged about in this mailing list recently. I'll find a way to get the funds drawn from there, perhaps with the KIND ASSISTANCE OF ALL MY NEW FREIEIENDS ON THE NIGERIAN INTERNET.

http://rygig.jlfbkmne.info/?dqLwLxdeNhkK.xdYXQVY

nice URL, did you pay much for it? I can sell you a better name, cheap!

Corinne Vega
First Account Manager

I'm not sure you're senior enough to represent your firm to this entire list. Can we speak to a second account manager?

Sigh. Isn't there more to life?

[Ben] All right, congratulations! Maybe you won't have to take Corinne up on her offer after all.

[Brian] Oh, yes, there is. I just got a new gig. I'll be the Sysadmin at (nfr)(security), starting later this month. That makes up for the fall on the stairs two weeks ago, and the little dog we own that laid open my lip to the tune of 5 stitches last Thursday. Her new name is FaceBiter.

[Ben] OW! Gotta watch out for those little ratweilers. There's a tiny little chihuahua-like critter over by my yoga studio that thinks it's bigger and tougher than my motorcycle; just launches into the most vicious-sounding, hysterical barking whenever it hears my engine. Even revving to 10 grand doesn't discourage the damn thing (certainly drowns it out, though. :) I might have to start carrying a water pistol.


Gouranga

[ I'm including this because it's bizarre ]

[NitaiGouranga] Call out Gouranga be happy!!!
Gouranga Gouranga Gouranga ....
That which brings the highest happiness!!


Wacko Topic: Guns & Crime

[Sluggo] I was talking with an NRA fan last night, and he said guns were banned in the UK only a few years ago, crime has increased fourfold since then, and London now has a worse crime rate than New York City. Sounds far fetched but could there be some truth in it?

[Pete Jewell] Sounds like absolute rubbish to me. There has been gun controls in place as long as I can remember - perhaps there wern't any at the beginning of the 20th century. Not sure where your fan got their crime figures - were they talking about a particular type of crime, or overall?

If anything there has been a tightening of gun laws over the last two decades, especially after the tradegy in Hungerford.

[ http://en.wikipedia.org/wiki/Hungerford_Massacre ]

[Neil] Someone is severely twisting the facts to fit an argument here. We've had gun controls for as long as I can remember and OK they were tightened beyond what I would consider reasonable in the wake of the Hungerford shootings, but we've never had anything like the American gun culture.

A fourfold increase in crime in a few years? Hey, you'd think I might have noticed, living in Britain as I do. Certainly there's been an increase in gun crime over the last couple of decades, but that hasn't been affected in any way by the change in the law AFAICT. The apparent size of the increase in relative terms is probably down to starting from a very low base at least in comparison to the USA. In absolute terms, I believe we still have a very long way to go to catch up with the US in terms of murders/shootings per head of population (that statement made without checking any facts).

[Ben] Interesting. I'd imagine the peak of this has passed, but does the above take into account 30 years (or so) of IRA battles? I would think that the figures for the UK would be quite high as compared to New York - or any other part of the US.

Just to keep parity, I haven't checked any facts either. :)

[Neil] 30 years or so of IRA battles didn't really amount to a fraction of what you seem to think. ISTR that statistically more people are killed on the roads in a year than were killed in the whole of "the troubles".

[Ben] OK; I did say that I hadn't checked. However, comparing murder stats to car accident stats is anything but complimentary to the former; there are a HUGE number of car-related deaths. The fact that no one is going to do anything about them doesn't make the number low.

[Neil] OK. I was just trying to put the whole IRA thing into some kind of perspective. I have the possibly mistaken impression that most Americans believe that Britain during the troubles was a dangerous place and that London was far too dangerous to visit.

[Ben] I'm not sure about "dangerous" on an absolute scale, WRT that perception; more dangerous by some small measure, surely, but lots of people continue to visit Israel - which is in the middle of a war. I don't think London lost much in a way of tourism due to it; a quick look at Net resources says that it grew pretty steadily, up to 5 mil last year.

IMO, most Americans see London as a romantic and historically fascinating place; I doubt that anyone who had the time, the interest, and the money to travel there would seriously consider that sort of "danger".

[Sluggo] People have visions of bombs going off every day in Northern Ireland; most people would not even consider visiting it. However, I've never heard of anybody putting off travel to Britian because of the few isolated bombings there.

[Neil] I grew up in London during that period and there were occasional bombs, I even missed a couple by an hour or two, but really it had little impact on the mainland, except for a few unlucky people who were in the wrong place at the wrong time. The effects in Northern Ireland were far nastier and more pernicious, even if the actual number of deaths were low.

[Sluggo] A lot of yanks viewed it in terms of British colonialism/imperialism; that they were interfering in Ireland for their own advantage the way they had meddled in our country. Of course, nobody stopped to ask what exactly what the Crown would gain from such a policy; NI is not exactly a financial powerhouse, nor does it export any goods not available elsewhere. People viewed it as "having territory for bragging rights". And of course, ppl couldn't really relate to terrorism before 9/11; it was too abstract, too unimaginable.

[Jimmy] A big part of the problem is that a lot of people in Ireland, North and South, on both sides, have been fed a load of bullshit packaged as history. I won't go into this in detail, because it's too tiring. I proofread part of a very good (though more than slightly biased towards the British side) account, written at the time that Irish Home Rule was being discussed, for Distributed Proofreaders, which debunks several of the myths of Irish "history". I'll send you a link when it's posted.

[Sluggo] That's what I thought when I went to NI, but I left with a very different impression, that it was a "made in Ireland" problem. I visited Scotland and England immediately afterward and found the Brits, rather than anxious about losing the territory and their prestige, instead wishing the NI problem would just go away. As my friend in Bristol (a British nationalist) put it, "I'd be happy to give Northern Ireland independence today if it meant no more subsidies from our treasury."

[Jimmy] It's not really a made in Ireland problem, as such. There's a bit of the same sentiment in Scotland.

[Sluggo] Of course, these views would be obvious to anybody putting the Irish and British newspapers side by side. However, most yanks have never even gone into the foreign section of a newsstand, never heard the BBC, etc.

[Ben] What foreign section of the newsstand? It's you tofu-eating, tree-hugging, Prius-driving, Kerry-voting West Coast liberal types that have access to such things; the rest of America gets the Fox News version ("OK, there's a country called Russia. And maybe another one called Iraq. We'll let you know, once a week, whether they're good or bad.")

[Sluggo] After the Good Friday Agreement and subsequent events, there was more of an acceptance in America that there's two sides to the issue. Nevertheless, I continue to see disurbing graffiti in pub bathrooms, "IRA all the way" and the like.

Regarding the forefold increase, my NRA friend said it was Australia, not Britian.

Dunno if they excluded political crimes from the crime statistics, but I think they should have. Whether location X was bombed doesn't tell me anything about whether a mugger is likely to stalk me, which is what I want to know.

[Jimmy] Just FYI: there has never been an incident of IRA sponsored gunfire in Britain. It has always been explosives.

[Ben] Interesting. I wonder what the rationale behind it was. More bang for the buck, probably - and the evidence mostly destroys itself, which isn't the case with firearms.

[Jimmy] I had an argument on Wikipedia once, with someone who wanted to remove the word "terrorist" (to be replaced with "freedom fighter") from any articles relating to the IRA (one of the oddities of Wikipedia's Neutral POV policy - since then, the article on the Provisional IRA has had a footnote added which justifies the use of that word at great length - see here).

Basically, the P-IRA wanted to flex its muscles at the British government, but did not usually wish to harm "civilians" - they used to phone ahead, using a codeword, and give advance warnings so civilians could be evacuated.

[Ben] I did become curious about the above comparison, though. Seems that, according to your own Telegraph, the number has at least doubled recently.

http://www.telegraph.co.uk/news/main.jhtml?xml=%2Fnews%2F2004%2F03%2F21%2Fnmurd21.xml

[Neil] Interesting. It seems worse than I thought, but that particular statistic could be a bit of a freak. I'd be interested in whether the full year figures have doubled.

[Jimmy] A friend, who has studied both Irish Law (heavily based on British Common Law, even more so than American law) and History & Politics, tells me that British law was changed in the past few years with regard to the reporting of crime -- if I were to report something stolen, for example, and then discover it had merely been misplaced, it would still be reported as a crime -- so that even minor crimes, even those that are not crimes, are reported as incridents of crime. With this in mind, it's not surprising that crime in Britain seems to be on the rise.

[Ben Whyte] Also mobile phone companies require you to report your phone lost to the police which gets recorded as a crime even if you loose it.

Same applies to wallets, credit cards etc.

[Ben] Not from what I saw; however, criminologists in the UK and the US both are pointing out that murders are on the rise on your side of the pond, while property crimes have long been higher than the US. The conservatives (European ones, anyway) like to point to the influx of foreigners and the formation of minority gangs. I don't know enough to say one way or the other, myself.

[Neil] Just looking back at the Telegraph article, the figures in it show a drop, followed by a rise. Although it seems to have doubled over a 1 year period, the rise over 3 years is 50%, still too much, but nothing like the 4 times increase over a couple of years implied by the original message. The statistics in the article are:

Q4 2000: 40 murders 
Q4 2001: 43 murders 
Q4 2002: 31 murders 
Q4 2003: 61 murders

I don't think that establishes a definite trend.

[Ben] Some commentators are indeed tying it to disarming the population, and pointing out that, e.g., New Hampshire - where the average truck driver carries more firepower than entire EU armies - has a very low crime and murder rate. Kennesaw county (Georgia) which had (and probably still does) a mandatory gun possession requirement maintained a zero violent crime count for many years. The Swiss probably don't do too bad either.

[ Gun Law Ordinances

Sec. 34-1 Heads of households to maintain firearms.

(a) In order to provide for the emergency management of the City, and further in order to provide for and protect the safety, security and general welfare of the city and its inhabitants, every head of household residing in the City limits is required to maintain a firearm, together with ammunition therefore.

(b) Exempt from the effect of this section are those heads of households who suffer a physical or mental disability, which would prohibit them from using such a firearm. Further exempt from the effect of this section are those heads of households who are paupers or who conscientiously oppose maintaining firearms as a result of beliefs or religious doctrine, or persons convicted of a felony.

Crime statistics ]

[Neil] Well tying British changes in crime rate to disarming the population is bullshit. The British population has never had much in the way of guns. I don't think anybody I know has ever owned a more powerful weapon than an air pistol. (Not quite true, I once knew someone with a crossbow.)

As for the wider issues the correlation between gun ownership and violent crime just isn't there. You can find examples of high guns, high crime, high guns, low crime and low guns, low crime. I'm wouldn't expect there to be any low guns, high gun crime examples out there, but that may depend on what you are counting. Illegal guns are ususally much harder to count than legal ones and definitions of what constitutes high gun crime may vary.

[Ben] There's a bit of circular reasoning in the above... no, you're not going to have high gun crimes in a society with a low gun count. By the same exact token, then, you can't tie the number of murders in, say, Washington DC, to the availability of guns. The US, in places, is a violent society; guns are certainly not a cause - although they may be part of the effect.

"Fear no man, no matter what his size
Just call on me and I will equalize"
-- stamped on the first Colt models

[Ben] Laws only affect the law-abiding.

[Neil] Even criminals obey a lot of laws and laws may have indirect effects on criminals. No doubt the NRA would argue that Kennesaw County was an example of the latter.

[Ben] By definition, they do not obey the laws which make them into criminals. A murderer may not have too many traffic tickets - but this does not make him any less of a murderer.

We all live in societies that allow - in fact, reward - murder when it is done under the auspices of the government, as warfare. If it is moral then, why would it be immoral otherwise?... by such a model of "morality", which has now been trained into thousands of young men and women by Bush, Blair, and the rest, we've just created a large pool of people who are restrained from murder by a very thin veneer of civilization.

As if we hadn't learned enough from Vietnam...

[Sluggo] Egads, and a neoconservative told me recently, "The protesters think it's still 1968 and never learned the main lesson of Vietnam: all dissent STOPS when war is declared."

[Ben] ... well, no, that's not the most stupid thing I've ever heard. I can think of one that was worse. Two, if I concentrate really hard.

Dissent only exists and makes sense when there's something to dissent from. Nobody needs to march in the streets and shout for the sun to shine. And the main lesson of Vietnam was that our politicians are perfectly willing and fully able to casually murder our young men and women - as well as those of "the enemy" - based on outright lies, and are perfectly capable of abandoning them after shoving them into an inferno. Cam Ranh Bay, WMDs - the lie can change, but the basic facts remain.

For that matter, I wish it was the late '60s in political terms:

"In his inaugural address, President Richard M. Nixon asked the American people to lower their voices, to search for unity instead of divisiveness, for harmony instead of discord. The speech struck a responsive note in an exhausted nation that had just lived through a year of violence and turmoil..."
-- Collier's Year Book

[Sluggo] Funny, I learned a completely different lesson from Vietnam. That is, "Be suspicious of anything your government is doing."

[Ben] Odd how you're not the only one who learned that lesson... to my sorrow, not enough people have learned it, though. Although the current administration is doing all they can to drive it home.

[Neil] The source of the increases we have had is probably enormous quantities of cheap weapons being exported from the the former Soviet Union. Changes in the law have made no difference that I can see, other than closing down legitimate shooting clubs, due to public hysteria.

Is London crime worse than New York? Well New York is supposed to have improved enormously, but there are few areas of London I would feel unsafe walking in at night. How about New York?

[Sluggo] My totally subjective impression has been the following:

  - Menacing, as in watch your back:
    - Moscow (1995/1996)
    - London (1998/2000/2002)
    - Los Angeles (2001)

  - Safe:
    - NYC (2003/2004, although I didn't venture into Harlem or the Bronx)
    - Chicago (2002/2003, although I didn't venture to the south side projects)
    - San Francisco (1998/2003/2004)
    - St Petersburg (1995/1996)
    - Rheinland in Germany, Liege in Belgium (2000)
    - Portland, Seattle, Vancouver BC, Toronto, Halifax, and everywhere smaller
    - England (Bristol, Manchester, Brighton, Blackpool, Cambridge -- 2002)
      Although my mate has had trouble in Bristol.
    - Scotland (1998/2000/2002)
    - Ireland, N Ireland (2000)

Daytime/nighttime doesn't seem to make much difference. The menace I've felt is mostly in the daytime; e.g., in Hollywood and south LA you never know when some tough might appear who wants to mug/gangbang you. London has that same sense sometimes, or at least parts of it do.

Peaceful chat about fighting

[Sluggo] ... although I'd still list DC as a "safe" place. Never been to Baltimore.

[Ben] [laugh] Especially when the two of us ambled down the street, discussing martial arts and such. Not that DC hasn't seen anything like that before, but you can pretty much bet that some people were whispering "ohshit, cops!" and fading into alleys.

[Sluggo] And you said 'tis nobler to run away than fight, and one should fight only if the person persues you and leaves you no other choice. That blew my mind, even though I recognized the martial arts philosophy behind it. The western (ahem, skinhead) mindset is quite different, "Fight immediately and never run away."

My philosophy is somewhere between the two.

[Jimmy] You know my philosophy on this: it's better to make them think they'd rather not start a fight after all :)

[Ben] "Listen, we can both walk away from this and go home - dinner, girlfriends, quiet night's sleep, and so on. The other choice is where one of us can go to the emergency room or the morgue, and the other one gets hauled off by the Gardai for inhuman cruelty, vicious mutilation, and possibly cannibalism. Let's just do the first one instead of ruining each other's lives, OK?"

[grin] Something like that, Jimmy?

[Jimmy] Something like that, except it's not so much what I say -- I like to be more subliminal^Wsubtle than that.

[Sluggo] Wanna elaborate for the benefit of TAG?

[Jimmy] Sending conflicting messages with body language is a major part of it -- for example, when someone doesn't want a fight, they put their hands up, palms open and facing outward to show that they're not a threat. I do this, but move into a fighting stance. I also keep my hands at throat height, fingers pointing at the throat -- if I only get one shot, it's going to count, and I don't mind telegraphing that.

Another aspect is facial expression and voice tone -- with both, I try to express surprise that someone wants to start a fight with me; my words say "I'm sure we can work this out" while my face and tone of voice say "because you really don't want to fuck with me".

I don't want to give away all of my secrets though :) (There's at least one thing that's hard to explain anyway (I only put the pieces together a couple of days ago, and even harder to reproduce).

Jimmy's haircut

[Jimmy] I cut most of my hair off Friday though, and it seems I won't have as much need to use that set of mind tricks as frequently as I used to.

[Ben] JPEG! JPEG!

[Sluggo] Ben's beard is next....

It's about time. Get a haircut and get a job. Do we get to see a pic of the new Jimmy?

[ See my bio picture, below ]

[Ben] Ye Ghods. Jimmy, did your son recognize you after, or did he start crying when the strange-looking man showed up?

[Jimmy] Nah. He was there while my sister cut my hair. He did let out a startled gasp when he saw me with my beard cut off though.

[Ben] Oh, and you're right about the above. Just think about the lovely side effect, one I try hard to cultivate (with only indifferent success, I'm afraid) - there are going to be a number of people out there who will presume that your "corporate lawyer" appearance means that you're harmless ... It's a nice advantage to have.

You've read my "combat mentality" rap; in fact, I wrote it when you asked me for details. To be precise, my philosophy is more like "talk until it's not an option anymore" - where the other person closes off the option by showing unmistakeable signs of physical aggression - at which point you take them down as hard as necessary. Running away isn't an option for me: I'm not much of a runner.

[Jimmy] Running away mentioned without a pTerry quote?

'Haven't you noticed that by running away you end up in more trouble?'

'Yes, but you see, you can run away from that, too,' said Rincewind. 'That's the beauty of the system. Dead is only for once, but running away is for ever.'

'Ah, but it is said that a coward dies a thousand deaths, while a hero dies only one.'

'Yes, but it's the important one.'
-- Terry Pratchett, "The Last Continent"

Bobbing for apples, trolling for traffic...

[Rick] Mike, you wouldn't be trolling for list traffic, would you? ;->

[Sluggo] Who, me?

[Ben] You forgot the innocent [blink, blink] tag, Mike. After all, this is text-mode communication, and the subtler shades of meaning are easily lost; you wouldn't want people to assume you weren't being sincere...

Guns and Blackmail

[Vince] I do not like weapons but I live in the country and I must have two weapons... a 22 cal. Springfield and an H&K 12 gauge shotgun... I do not hunt but from time to time I have to dispose of an injured or sick animal... as a last option...

[Ben] [blink] A 12-ga is a hell of a mercy weapon. I've found that a 22 suffices for anything of that sort; back in the days when I hunted, I used my Ka-Bar knife when a coup de grace was necessary (only once, as I recall; I'm quite a good shot.)

[Jimmy] My guess is the 22 is the mercy weapon, and the shotgun is used to chase away scavengers - a shotgun is a standard piece of farming equipment over here too.

[Vince] BTW none of my weapons are registered... both were bought many years ago... the Springfield rifle was bought before WWII

[Ben] Ahem. I presume you realize you've just announced that on a public list? Not that we have any intention of publishing it... heh, heh, heh...

(I'll contact you later with the Swiss bank account number; you can transfer the million dollars into it anytime during the next three days.)

[Vince] So I placed it on a public list... no biggie... local law enforcement know me and know my weapons... I mean they were bought before the second world war...

[Ben] I'm picturing Vince with a 75-caliber blunderbuss.

"Heck, Sheriff, these ain't really what you'd call dangerous weapons - I mean, an Uzi, that's a dangerous weapon!"

* BOOOMMM!!! *

"Ooops. Spark from my cigarette musta fallen in the pan. You didn't need that arm anyway, didja, Sheriff?"

[Vince] As for the 12 gauge... I use a one once slug almost exclusively leaves less to dig a hole for...

[Ben] [nod] I always wondered about those folks who went deer-hunting during the shotgun season. Sure, there are such things as sabots, but most of the ones I'd talked to were just using slugs. What did they do, go scrape the deer off the trees afterwards and freeze the puree for the winter?

[Vince] If you are in a situation of a screwed up bull moose or bear... a 22 don't cut it... Generally I borrow my neighbors 50 caliber for that...

[Ben] Nice. Black powder, I presume? I've seen a few firearms that would toss the modern .50 a few miles, but those are pretty expensive and somewhat unusual. Sure would stop a moose, though...

Speaking of meese, here's one from Russia - this is the kind of thing they've got wandering around Siberia and such.

russian_hunter.jpg

[Vince] As for the Swiss bank account <heh> glad your doing so well... unfortunately I just paid my property tax ($6K) and I am broke... and don't expect to get a landfall of much more than snow.... even my Linux box is made of throw out parts from several sources...

[Ben] Yeah, well - those imaginary Swiss accounts are pretty cheap. I can get you a few hundred of them at a discount, if you want; I know the guy who thinks'em up.

[Vince] p.s. did I hear you guys might need proof readers??? I can read but I have no proof...

[Ben] I've got no proof either - at least when I'm not hanging out with my Russian friends. Then, if I get cut, they have to call the fire department.

[Jimmy] Uh... Ben... Here's a writing exercise: construct a sentence using these four words -- "advice", "your", "follow", "own".

[Ben] Shhh! If you don't say it too loud, nobody will notice. At least I think that's how this email stuff works, anyway. Besides, I didn't publish the account number - I put it in a Micr0s0ft Wallet, where it'll be secure forever and ever! They SAID so!

[John] Hmm, what's the new name for Carnivore? The FBI should be contacting you shortly. ;^>

[Vince] Have you ever sat back and tried to create, hypothetically, a system that monitors all Internet actions? And all individual actions on the internet?

Let's see... there are a limited amount of Cray computers in this world and..

<HEH>

[Ben] Heck, that's not the point. Who will watch and decide on the information presented by those Crays? And, even more importantly, who will watch them? It's an infinite progression.

As Thomas' recent .sig noted, it's not a new problem.

Quis Custodiet Ipsos Custodes? (Who will watch the watchers themselves?)
-- Juvenal (Decimus Iunius Juvenalis, 55-127 A.D.)

[Sluggo] Testing my Lgang access.

[Ben] We can't see you.

[Sluggo] But we can build you.

(Allusion to Philip K Dick story title.)

[ "Gentlemen, we can rebuild him. We have the technology. ... Better than he was before. Better, stronger, faster." ]

Java should not be trusted with nukes, Microsoft says

[Jason] I was looking through the Microsoft EULA[1] to see what kind of disclaimer they had and found pretty much the standard stuff. (ie, "We could use this software to kill your cat, and it wouldn't be our fault.") But there was one clause that I found...interesting:

9. NOTE ON JAVA SUPPORT. THE SOFTWARE PRODUCT MAY CONTAIN SUPPORT FOR PROGRAMS WRITTEN IN JAVA. JAVA TECHNOLOGY IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED, OR INTENDED FOR USE OR RESALE AS ON-LINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF JAVA TECHNOLOGY COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE.

Interesting, no?

[1] Specifically, this was the EULA that Midtown Madness, a Microsoft game, shipped under.

[Jimmy] Actually, no. This is part of Java's licence. Microsoft licenced Java from Sun, rather than writing their own implementation, which is why Sun were able to sue them for making changes to their version of Java.

[Ben] Amusingly, I wrote an article for Java Developer's Journal a couple of years ago - "Java Under Linux: Ten Feet Tall and Bullet-Proof" - that began with the very clause you quote, and made that very point. Got quite a number of comments about it, too.

[ http://okopnik.freeshell.org/articles/JDJarticle.html ]

More of... everything, really

[Ben] Back on the net, hi-ho!

...at least for the moment. I can only hope that this machine will give less trouble than the old one; it's scarcely possible to give more.

[Jimmy] And there you go tempting fate again. It's getting to be a hobby.

[Ben] Where did you think pTerry got the idea of the guy standing on a mountaintop in copper armor during a thunderstorm and shaking his middle finger at the sky? I'm the original prototype.

[Brian] You? YOU?!? Put these concepts together in a single brain: Toshiba 64M laptop, Wireless PCMCIA card, Windows XP Home.

[Ben] Ah. I was just wondering how they measured the length of, e.g., the Mesozoic era. The above setup makes it trivial: turn it on, and when it's finished booting - voila! - continental drift and such have occurred in not only measurable but gross amounts.

[Brian] Stir in one college age owner of said box, coat evenly and scream. The gods TRULY are bastards.

[Ben] And our capacity for self-torture is nearly infinite as well... Perhaps I am getting a bit wiser as I get older, but I'm becoming rather aware of the "tar babies" in my life, and am quite emphatic about shedding them or even avoiding getting involved with them in the first place. This, of course, presumes the ability to afford such solutions.

[Brian] I had to come home, compile some software, then use gdb and strace to try to get it working, just to get rid of the shakes.

Given that we had our tornado in California (anyone else remember the Mary Avenue touchdown in Sunnyvale, about 4 years ago? Half a block away!), earthquakes a-plenty, hurricane Isabel last year here on the right coast ... Volcanos are next on the list, and after working on that Windows box, I might welcome the change.

[Ben] I find that hurricanes often suffice to put an end to nasty electronic creatures that refuse to die in any other way; I've just replaced a 10-year old GPS that sang its swan song (reasons unknown) during the last one. Oh, my hand-held GPS went along - misery loves company, I suppose - and so did my iPaq handheld. They say that hurricanes are necessary because they strip the coating of old, dead organisms off the coral beds, which allows the coral to breathe and grow; I can assure you that it strips old electronics off boats just as efficiently. Presumably, this allows GPS manufacturers to breathe and grow...

[Brad] Maybe he can scare fate away with a Perl One-Liner that draws an ASCII monster ;-)

[Jimmy] Not Perl, but...

$ cowsay -f daemon 'Boo!'
 ______
< Boo! >
 ------
   \         ,        ,
    \       /(        )`
     \      \ \___   / |
            /- _  `-/  '
           (/\/ \ \   /\
           / /   | `    \
           O O   ) /    |
           `-^--'`<     '
          (_.)  _  )   /
           `.___/`    /
             `-----' /
<----.     __ / __   \
<----|====O)))==) \) /====
<----'    `--' `.__,' \
             |        |
              \       /
        ______( (_  / \______
      ,'  ,-----'   |        \
      `--{__________)        \/ 

[Ben] Excuuuuse me? Whaddaya mean, "not Perl"?

ben@Fenrir:~$ file `which cowsay`
/usr/bin/cowsay: perl script text executable

[grin] We Are Everywhere.

[Jimmy] <backpedal> erm... I meant "not a Perl one-liner" </backpedal>

Though if you really need one:

perl -e 'print`cowsay -f daemon "Boo!"`' 

[Jimmy] I had this in the Laundrette draft:

Murphy's Law has been formalised

((U+C+I) x (10-S))/20 x A x 1/(1-sin(F/10))

where U=urgency, C=complexity, I=importance, S=skill, A=aggravation, and F=frequency; each is a value between 1 and 9, except A, which is set at 0.7.

"There is, of course, a Sod's Law factor to the equation. If you judge your ratings wrongly, you might become too optimistic - and calamity will strike."

[Ben] Just as it will if you base anything important on the above formula. Never forget that Murphy's Law is also subject to Murphy's Law.

[John] I.e., it's recursive!

[Brian] Thus a close relative of the GNU/Linux clan: A self-referential, empirically reentrant and recursing formula. Yes, recursing.

[Ben] Precisely the word that fits the situation, on occasion (when simply cursing isn't enough.)

[Brian] Wasn't there a whole section of Hofstadter's GEB devoted to this?

[Ben] I need to pick up a copy; it's probably about time. Certain books should be reread every few years. As an example, I've just reread Pirsig's ZATAOMM - my fourth reading of it or so - and was struck, again, by how much that book has influenced my life and attitudes in general since the first time. More so with the passing years.

[Jimmy] Yep. That didn't stop me from trying to brush up my C with two versions of a program to calculate that :)

[Ben] Heh. Makes sense to play with with the simpler stuff before you dive into the dark depths of Moria (watch out for that Balrog; he's still wandering around somewhere down there.)

[Jimmy] Here's the short version. (Long version)

[Ben] Let me give it a shot - I haven't done any Perl for a while now, too bloody long.

#!/usr/bin/perl -w

@vals = qw/urgency complexity importance skill frequency/;

die "5 arguments required: (@vals)\n" unless @ARGV == 5;

for (@ARGV){
        die "Each argument must be between 1 and 9\n" unless /^[1-9]$/;
}

 # YANETUT
@v{ map chr ord, @vals } = @ARGV;

printf "%3.3f\n", ( ( $v{u} + $v{c} + $v{i} ) * ( 10 - $v{s} ) ) / 20 *
        0.7 * ( 1 / ( 1 - sin( $v{f} / 10 ) ) );

There. I figure that's the short version... :)

[Jimmy] Or, the Perl NQ1L

perl -e'@i=@ARGV;print((($i[0]+$i[1]+$i[2])*(10-$i[3]))/20*0.7*(1/(1-sin($i[4]/10))))' 5 6 7 8 9

[Ben] Oh. Well, heck, if we're going to do that...

perl -alne'print((($F[0]+$F[1]+$F[2])*(10-$F[3]))/20*.7*(1/(1-sin($F[4]/10))))'
1 2 3 4 5
2.42040302288669

Or we could just eliminate "print" altogether, just for fun - although the first version is shorter:

perl -alpe's#.*#((($F[0]+$F[1]+$F[2])*(10-$F[3]))/20*.7*(1/(1-sin($F[4]/10))))#e'
1 2 3 4 5
2.42040302288669

...or, shortest yet:

perl -alpe'$_=((($F[0]+$F[1]+$F[2])*(10-$F[3]))/20*.7*(1/(1-sin($F[4]/10))))'

Oh yeah - and we can get rid of all that LISP-looking stuff, too.

perl -alpe'$_=($F[0]+$F[1]+$F[2])*(10-$F[3])/20*.7*(1/(1-sin$F[4]/10))'

Now it's shortest. I think. :) It's somewhere around the 18th hole of Perl golf, anyway.

[Brad] I wonder if Woomert or Frink would ever alias this in their ~/.bashrc...

[Ben] Woomert would probably spotted the tortured math stuff and made it even shorter thereby:

perl -pale'$_=($F[0]+$F[1]+$F[2])*(10-$F[3])/20*.7/(1-sin$F[4]/10)'

Other than that, it could happen...

[ Meanwhile, back in the main thread... ]

[Ben] Acer has replaced my previous lemon^Wlaptop with a newer model,

[Sluggo] A computer that looks like a lemon... Maybe it'll be the next iMac design. Bright yellow for lemon, bright green for lime.

[Ben] Actually, I'd expect it to be "bright yellow for Golden Delicious, bright green for Granny Smith", if anything. I mean, the company's called Apple, for Ghu's sake. The last thing they'd want to imply is that they were selling lemons.

I've actually considered buying an Apple, primarily because of their history (in my experience and reports from others) of reliability. On the other hand, I understand that Linux on Macs still has a few rough edges... and having seen the spindled, folded, and mutilated version of BSD used by OS/X, I'm not willing to go that way, either.

(Yeccch. It was that much nastier because I actually like BSD.)

[Ben] an Aspire 2012... although I'd be hard-put to say anything especially exciting and wonderful about it. Yeah, the video controller is different (an RV350/Radeon 9600 instead of the 9200 that was in it previously); other than that, it's missing the LCD one-line display and the weird "multimedia" setup that (theoretically) allowed you to play CDs, DVDs, etc. without actually booting the machine (I've mentioned this; it was a tiny Linux partition with "mplayer".) [shrug] No loss, AFAIC. On the other hand, the Intel wireless 2100 interface has been upgraded to a 2200G - which handles A, B, and G, something I do see as an improvement. They also seem to have resolved the extremely weird "key delay" problem that the Aspire 2003 had (if you typed too quickly, pressing 'b' immediately after 'a' would result in a second 'a'!) Otherwise, it looks and acts much the same as the old gadget.

Let's see how this one holds up...


Recursion

[Ben] Searching the Net for recursion-related bits in the GEB, I found the following:

If you already know what recursion is, just remember the answer.
Otherwise, find someone who is standing closer to Douglas Hofstadter than you are; then ask him or her what recursion is.
-- Andrew Plotkin

[Jay] Recursion: see recursion. See also tail recursion.

Tail recursion: see recursion.

[Ben] Both of the above are listed. :)

[Jay] Yeah. :-) Where did you find that?

[Ben] Google for 'Hofstadter GEB recursion', then grab the Wiki entry near the top of the page. If this fails to satisfy, think of a better set of search strings and... ooops, sorry, never mind. :)))

[ http://c2.com/cgi/wiki?DouglasHofstadter ]

Getting the system out of your system

[Kapil] Failing this of course, you can go run a marathon, climb a mountain, read a good book, play the flute, prove the Riemann Hypothesis --- in other words do anything that will get the "need" out of your system.

[Ben] I like the way you think, Kapil. :) Geeks of the world, untie! [1]

[1] Sure, the dyslexics too. However, they don't need the impetus of Kapil's options.


Standard

[Thomas] [1] While awk, perl, etc, reside in /usr/bin, they are not standard or essential to get a system operating and working. They're simply a convenience.

[Ben] Depends on the meaning of 'essential', I suppose. Perl is my OS of choice; Linux just happens to be the best VM to run it under. :)))


C Loops

[ Yep, something that's on-topic. Just for variety, y'understand ]

[Jason]

"Jimmy O'Regan" wrote:
<snip>
	for (i=0,j=1;i<5,j<6;i++,j++)
		in[i] = atoi(argv[j]);

Wouldn't be simpler just to say

 
for(i = 0; i < 5; ++i)
       in[i] = atoi(argv[i+1]);
 

[Jimmy] Yeah, but I'm trying to get my head around C again, and wanted to juggle two variables in the for loop to see if I got it right.

[Ben] Beware the Fencepost Error, son - The j's that bite, the i's that catch...

Me, I dislike even the idea of loops where you have to keep the index manually; I think that the concept itself is broken (and yes, it's a requirement in C, given its data structures - and the right thing to practice if you're going to be using it.)

[Jason] I agree; I really think it should be the compiler's job to figure where something starts and ends, and how we can iterate over each element in turn. It's not hard. But this is C we're talking about:

> Beware: you could be talking to a minor. Some say that such immoral
> material (C code) should be kept away from the impressionable minds of
> The Children (tm).
 
That is why, when you mention the C language in front
of a child, you should spell the name...
		-- Hal E. Fulton on comp.lang.ruby

:-)

[Ben] This may or may not be indicative, but I haven't used a loop of the above type - even though Perl supports it - ever since I learned Perl, except to explain them (and deprecate their use) to my students. If I had to use it for some reason, I'd at least let the compiler handle the exit condition:

for (i=6; i;) in[i] = atoi(argv[i--]); 

[Jason] Just looking at this, I can't figure out what it's supposed to do. What is the value of "i" when used as "in[i]"? Does it get the old value of "i" or the new value? I think it's undefined how C should handle this. At least gcc doesn't like it:

~/prog/c$ cat post-increment-operator.c
#include <stdio.h>

int main() {
        int i = 0;
        printf("i: %d, i++: %d\n", i, i++);
        return 0;
}
~/prog/c$ gcc -Wall post-increment-operator.c -o post-increment-operator

[Ben] [shrug] "-Wall" is a maiden aunt on the edge of a nervous breakdown. IMO, most of what it complains about never comes to pass.

That's not to say that it's not useful at times, but paying scrupulous attention to every one of its hysterical pronouncements of doom isn't a good strategy. As an example, I've never seen a kernel compile that didn't generate a stack of warnings - and yet, all but one or two worked fine.

[Jason] Or, for that matter, compiling almost any large software project seems to generate a pile of warnings. And, yes, most of the time, everything works fine.

[Brad] I use -Wall because I can't stand streams of silly warnings; they force me to write better code and more maintainable code. This, IMO, is a Good Thing.

[Ben] Oh, I'm all for enabling warnings - I don't write Perl code (other than Perl Golf) without "-w" or "use warnings", and anything over 10 lines gets "use strict" as well. I just think that "-Wall" goes way overboard... but I guess it's more of a response to the way that C itself is rather than twitchiness on the part of the developers. Whenever blowing your nose has a perceptible chance of destroying the entire Universe, a bit of reticence becomes understandable.

[Jason]

post-increment-operator.c: In function `main':
post-increment-operator.c:5: warning: operation on `i' may be undefined
~/prog/c$ ./post-increment-operator 
i: 1, i++: 0
~/prog/c$ 

NOTE: The program "runs fine". But the minute you try it on a different compiler, you're probably going to get different results.

[Ben]

ben@Fenrir:/tmp$ cc foo.c; ./a.out>sample_run.txt
ben@Fenrir:/tmp$ for n in `apropos "C[+ ]*compiler"|awk '{print $1}'`
do $n foo.c; echo $n: $?; ./a.out|diff sample_run.txt -; done
c++: 0
c89: 0
c99: 0
cc: 0
g++: 0
g++-3.3: 0
gcc: 0
gcc-3.3: 0
i386-linux-g++: 0
i386-linux-g++-3.3: 0
i386-linux-gcc: 0
i386-linux-gcc-3.3: 0
i486-linux-g++-3.3: 0
i486-linux-gcc-3.3: 0
no makefile or Makefile found
ccmakedep: 1

Whups, 'ccmakedep' snuck in where only compilers belong. Otherwise, seems like none of them had a problem - and the program output was exactly the same in all cases.

[Jason] When I said "different compiler", I had in mind non-gcc based compilers. So, just to see what a different compiler would do, I downloaded tcc and compiled the program. Exactly the same output as gcc. Hmmm.

So, I'll change my assertion from "the minute" to "five years into a project, after you've ported it to 10 platforms, you're probably going to get different results." :-)

[Ben] [grin] Sounds reasonable.

[Jason] But seriously, I think that if you're using C, you should avoid that type of construct, because you don't know how the compiler is going to define it. You can find out how this compiler defines it, and maybe all the compilers you use do it the same way. But maybe it will change in the new version; maybe you need to use a different compiler.

Coding in C is like playing with fire. You do one thing wrong, and BAM! Segfault, or worse, obscure bug, or worse yet, undetected security hole. I think using a construct whose behavior is undefined makes it more likely that you'll get "one thing wrong".

Just my 2 cents.

[Ben] Oh, I agree. It's why I avoid coding in C anymore; haven't done it for years now. I've come to believe that the terms "fragile" and "programming" shouldn't be allowed near each other, whereas C plans the wedding, sends out the invitations, and writes the piranha-infested prenuptial agreement.

[Jason] Heh heh, I keep forgetting that the best possible C coding practice is "Don't".

[Ben] On the other hand, I won't be writing any device drivers in Perl. (Contrariwise, one of my former students designed a website back-end database that uses "grep" plus an odd directory structure, and it turned out to be consistently faster than MySQL. Go figure.)

[Jimmy] The Top 10 Ways to get screwed by the "C" programming language:

(which has 17 ways)

[Ben] The poor bugger used C to count, obviously.

[Sluggo] "There must be fifty ways to leave your lover....

You just slip out the back, Jack
Make a new plan, Stan
You don't need to be coy, Roy
Just get yourself free
Hop on the bus, Gus
You don't need to discuss much
Just drop off the key, Lee
And get yourself free"

Paul Simon, "50 Ways to Leave Your Lover"

[Brian]

I can't let you inject THAT song into my brain, turning what little is left into gibbermushingfrooms without appropriate revenge:

In the middle of the earth in the land of the Shire
lives a brave little hobbit whom we all admire.
With his long wooden pipe,
fuzzy, woolly toes,
he lives in a hobbit-hole and everybody knows him

Bilbo! Bilbo! Bilbo Baggins
He's only three feet tall
Bilbo! Bilbo! Bilbo Baggins
The bravest little hobbit of them all

...

The Ballad of Bilbo Baggins (© Leonard Nimoy 1968)

on and on, ad nauseum. Take that! At least it wasn't the Carpenters... AAAAAAAAAAAaaaaaaaaaaaaaaaaa...

[Jimmy] Close to yo-ou

[Ben] Ah - ear worms. Be glad that no one has invoked the Barney Song; that one trumps all, and requires a large drill press and a long sharp extractor bit to remove from the sufferer's head.

[Brad]

do {
"This is the song that never ends,
It goes on and on my friends!
Someone started singing it not knowing what it was,
and they'll continue singing it forever just because,"
}
while (1);

[Ben]

- "You can write a Perl script to do anything."
- "Hah! I'd like to see you write a Perl program to cut down a Redwood with a banana!"
- "Easy."

1 while 'banana'; # wait for the tree to rot and fall over

-- several of the wizards in C.L.P.M.

I suspect that your version would cause it to rot and die much faster.

[Breen] There are advantages to not being a TV-watcher. I've managed not ever to have heard that tune.

I plan to keep it that way, too...

[Jimmy] You lucky bastard. That's one of the biggest disadvantages of being a parent -- the rubbish that kids watch [1]. Most recently, I told my son I'd take him to the cinema and regretted it -- I thought he'd want to see "Shark Tale", but instead he made me sit through "YuGiOh - The Movie" (a movie based around a lesser Magic: The Gathering clone with dialogue that serves only to explain the game and the properties of each card).

[Brian] Linux tie-in: HP off-site rendering on Linux-based HP Utility Rendering Service

[Jimmy] My son has become a mini-Linux advocate since he found out that it was used to make the Harry Potter films :)

[Jimmy] [1] Though obviously not the programmes I watched when I was a kid -- we had quality TV in my day[2].

[Brian] I've a number of friends who assure me that Shark Tale is quite good. At least one such, sadly unburdened by rug rats, still has gone to see it at least three times.

[Jimmy] Yeah. Both Pixar and Dreamworks have made some great computer animated films. "Finding Nemo" is probably the best of the bunch. "Toy Story" was great, but it'll forever be marred for me, because of the guy who was sitting in the same row as my then-girlfriend and me who was enjoying it a bit too much.

[Jason] I don't know about the rest of you, but whenever I see a CG movie, I can't help thinking things like: "Wow! Look how good they did the water!" or "Haha! It's just a flat textured surface!"

[Brian] I've assured him that the next time I go to see a cartoon in the movies, it'll be an hour plus of collected Wylie Coyote shorts. Effectively that means never, as there are too many non-PC references, making Warner's lawyers alternate between quivering in fear and salivating at the prospective fees, win or lose.

[Jimmy] Most, if not all, of them are available on VHS, so that + TV tuner card + DVD burner + issue83/stoddard.html = Wile E. Coyote, the collected works.

[Jimmy] [2] I'm too young to be using phrases like "in my day" -- another disadvantage.

[Brian] You're NEVER too young to use the phrase "in my day". For instance, in the third grade, when your brother is coming into first grade for his first day, this is appropriate: "In my day, they used to glue your thingy closed if you asked to go to the bathroom too many times. You'll be fine, I"m sure..." I think he's blocked out the memory of that day.

[Jimmy] Good point. My youngest sister started Secondary school this year and had to be briefed on the various things my brothers and I did so she wouldn't be surprised about the extra surveillance.

[Brian] There are times, however, when it's not prudent: At the birth of your daughter's first child, "In my day we just screamed a few times, popped the babies out, and went back to work in the fields." Remember that she's lying in an OR setting with plenty of sharp instruments around.

[Jimmy] Heh. Reminds me of when my son was born - I was, until then, blissfully unaware of such things as vacuum deliveries or episiotomies and in the hour-long seconds when my newly delivered little boy spent showing no signs of life I had measured the distances between me, nearest sharp object, and doctor's throat.

[Brian] Then there's the "In my day" sayings that refer to times that should be forever forgotten: "In my day we wore white polyester and vinyl, and we were happy to do so." Statements like that are conversation killers.

[Jimmy] Erm... yes.

/me slowly backs away.

[Brian] .brian (who remembers to add the X-Gazette-Tag about 50% of the time)

[Jimmy] I think we're off-topic enough for that to not matter :)

[ Earlier in this thread... ]

[Ben] or, since this is a "single-use" loop (as I recall it) -

int i = 6;
while (i) in[i] = atoi(argv[i--]);

[Jason] Essentially the same loop as before, so the same problem. I'm not 100% sure that the C standard says it's undefined, but at the very least, it strikes me as not the best coding style for C.

[Ben] [grin] Oh, certainly not. It's just me and my prejudices.

[Jason] Oh! Do you mean, that because of our different (programming) language background, we would of course code in C using styles from the other language that we are most familiar?

[Ben] Computers are supposed to work hard so we don't have to, dammit.

[Jason] C is not my "first language", so I don't try to take too many shortcuts, for fear of getting lost. For instance:

~/prog/c$ grep '!= 0' *.c
atime-check.c:          if(stat(filename, &fileinfo) != 0) {
atime-check.c:          if(stat(filename, &fileinfo) != 0) {
findmagic.c:        if(stat(filename, &fileinfo) != 0) {
findmagic.c:                if(strcmp(filetype, "data") != 0)
link.c: if(syscall(__NR_link, argv[1], argv[2]) != 0) {
listdir.c:      DIE_IF(closedir(d) != 0);
loop.c: if(pipe(fds) != 0)
~/prog/c$ 
 

It doesn't really make sense to say that in C ever because true is basically defined as "not zero". And yet I say it anyway, because I always have to think twice whenever I see

if(variable)
        do_stuff();

<shrug> It's a style issue. I don't think correct behavior should be a side-effect.

[Ben] Heh. No, it's supposed to be a language-enforced feature, in something supposedly as clearly-defined as C. In practice, well, that's a different story.

[Brad] As you said, it's a CodingStyle thing, but I find that "when in doubt, use prefix". It tends to help when you SIGSEGV in a loop and can't figure out why ;)

[Jason] Yeah, I try to use the prefix form as much as I can. When I want strange side effects, I'll ask for it, thankyouverymuch. :)

[Ben] Yup. "When in doubt, write it out" is not a bad strategy for avoiding a certain class of problems in C coding. This, of course, is self-defeating to a degree - more lines means more debugging and increases the chance of a typo - but that's what "lint", "-Wall" and so on are for.


TAG Lottery

[Kapil] I know this is linux-questions-only and so on but here goes:

[Sluggo] It's just a question of whether you win the TAG lottery. Answering questions gives you good karma, which makes it more likely you can ask a Windows question without getting flamed.


Procmail

[Jay] Yeah. Gmail massages the reply-to on outgoing mail to force a carbon to the sender, and puts that first, screwing up my mutt save-file.

I wish they'd add it at the end.

[Ben] You could always "mung it back to normal" in your ~/.procmailrc. Shouldn't be too hard, I'd think.

[Jay] If I were running procmail. :-}

[Ben] Well, yes, you would have to purchase this expensive piece of software, wait for it to be shipped to you, agree to the shrink-wrap EULA, attach the special enabler dongle to your serial port, get the coded, limited-time key from the vendor after paying the per-seat fee, spend several years configuring the incredibly complex operation of it, perhaps buy a new computer because the current one isn't powerful enough... it is quite the hassle, I understand. :/

[Jay] Well, clearly that was sarcasm.

Except for the "incredibly complex ... configuration" part. :-)

But that does entail mindreading, and I so hate that.

[Ben] Nah, no mindreading necessary. Installing a single package fits, without any odd corners sticking out, into "Shouldn't be too hard, I'd think."

[Jay] No, my point was that there are sometimes good reasons to put an added reply-to first: TAG ourselves, for example.

But gmail's reasons aren't good. IMHO.

[Kapil] As far as I can see, this is one of those "active developer/backward compatability" (AD/BC) issues. The AD wanting to move to GUI (yes, it was a while ago but we CLI types don't die easy :)) Unfortunately, when the "shell" was designed it was assumed (ah-ha!) that no one would run programs (except daemons) other than from the command-line or from other running programs and so on recursively (*).

(*) Hofstader-ise that one.

[Ben] Naw, a recursive statement of a recursive problem is beautiful just as it is. Why spoil a good thing? :)


English words appearing in the 20th century

[Sluggo] http://news.bbc.co.uk/2/hi/uk_news/magazine/3755482.stm

[Jimmy] Not quite - the list has "awesome", "hip", "acid", and "cool", which definitely existed before the 20th century. The article picks words that sum up something about the year (miniskirt in 1965, 9/11 in 2001), or that were used in their current sense long before most would guess (hip in 1904, pop in 1921).


Post-hurricane news

[Ben] FYI, folks - I'm alive and well. Don't know about the boat yet - I've spent the hurricane over at a friends' house. I'll see what's up tomorrow, but I'm assuming it's all good; I've got good anchors, and the winds in St. Augustine shouldn't have gone much above hurricane force, if at all.

[Jimmy] Glad to hear it. Also glad to hear that this isn't an email from beyond the grave

[Ben] Two people have been reported dead, so far - one of them from alcohol poisoning during a hurricane party. Just wanted to reassure everyone that it's not me, despite the amount of vodka consumed in this house in the past day (yep, these friends are Russian. :)

 


[BIO] Jimmy has been using computers from the tender age of seven, when his father inherited an Amstrad PCW8256. After a few brief flirtations with an Atari ST and numerous versions of DOS and Windows, Jimmy was introduced to Linux in 1998 and hasn't looked back.

Jimmy is a father of one, a techno-savvy seven year-old called Mark. When he isn't cutting pieces off himself at work, he likes to play guitar and read -- not normally at the same time, but the picks make handy bookmarks.

Jimmy likes to collect the off-topic threads that crop up on The Answer Gang's mailing list, mainly because it's a good excuse for keeping these threads going.

Jimmy is currently job hunting.

Copyright © 2004, Jimmy O'Regan. Released under the Open Publication license

Published in Issue 108 of Linux Gazette, November 2004

<-- prev
Tux