Archive for January, 2006

Declarators are fun!

Saturday, January 7th, 2006

I was reading the C99 standard (because, you know, I’m Bored) and found a couple of interesting tidbits. Read on and see…

6.7.6[3]:

EXAMPLE The constructions

  1. int
  2. int *
  3. int *[3]
  4. int (*)[3]
  5. int (*)[*]
  6. int *()
  7. int (*)(void)
  8. int (*const [])(unsigned int, ...)

name respectively the types (a) int, (b) pointer to int, (c) array of three pointers to int, (d) pointer to an array of three ints, (e) pointer to a variable length array of an unspecified number of ints, (f) function with no parameter specification returning a pointer to int, (g) pointer to function with no parameters returning an int, and (h) array of an unspecified number of constant pointers to functions, each with one parameter that has type unsigned int and an unspecified number of other parameters, returning an int.

6.7.5.3[16]:

EXAMPLE 1 The declaration

int f(void), *fip(), (*pfi)();

declares a function f with no parameters returning an int, a function fip with no parameter specification returning a pointer to an int, and a pointer pfi to a function with no parameter specification returning an int. …

See also part II.

On distributed piloting

Friday, January 6th, 2006

“Distributed piloting” is a term invented by Peter Hosey in 2006 (i.e. made up by me just now) for websites like Control Our Junk (which I found on Digg) that promise to let you control some real-world object from the internet. In the case of Control Our Junk, the objects to be controlled are a radio-controlled car, a train, and an airsoft gun.

The problem with it is that in any such system, you either have nobody controlling it (nobody’s heard of your website) or thousands of people trying to control it (front page of Digg). In the latter case, either people get kicked off, or all the control commands mix together into discord. The car goes every which way, the gun fires at everything, and the train is constantly going back and forth, with no apparent pattern. I guess you could call it a form of entropy.

I think a better system might be to get ~200 (maybe more) RC cars, and put them in a big arena, and give everybody at least five (or maybe ten) minutes of time. If there are <200 cars in use, a new user simply gets one of the free cars. Otherwise, if at least one person has been using a car for more than five minutes, the person who’s been on the longest is kicked off. Otherwise, the new user waits in a queue for somebody to hit their five-minute limit.

OK, now somebody go do that. I want to play with an RC car over the internet. ☺

Not a miracle

Friday, January 6th, 2006

I just want to point out one thing, regarding something said by a family member (Anna Kasto [sp?]) of one of the dead miners (Otto Withers). I heard her say this on the 2006-01-04 edition of NBC Nightly News:

We’re Christian people, ourself. We have got some of us is right down to sayin’, that we don’t even know if there is a Lord anymore. We had a miracle, and it was taken away from us.

Not so. The miracle she’s talking about is the survival of 12 of the 13 miners, instead of just one. She basically says that this miracle was somehow withdrawn, but in fact, it never occurred. Human misreporting is not the same as the divine repossession of a miracle.

The quote starts at 8 minutes and 8 seconds in the Nightly News podcast for that night.

UPDATE 2006-01-06: I just corrected the date above. I did not hear her say this one year before it happened. (Yes, I’m still used to writing “2005”.)

Fisking p2pnet #1

Thursday, January 5th, 2006

Looks like both sides of the music-downloading debate have their stupid moments. Consider this lame article from p2pnet, which I shall fisk below.

p2p news / p2pnet: Sony BMG, Vivendi Universal, Warner Music and EMI, the Big Four Organized Music cartel members, aren’t the only ones to have New York attorney general Eliot Spitzer breathing down their necks.

So far, so good.

“A trade group for digital-music services said Tuesday that its members have now also received information requests,” says CNET News, quoting Jonathan Potter, executive director of the Digital Media Association, which represents companies including Yahoo, Apple Computer and America Online.

AHHH! Run-on sentence!

Potter says the inquiry could become, “full-blown” —

Oh noes!

— and, “Everybody expects to be contacted, and some already have been”.

At this point in time, there’s no viable corporate online music business.

What? Huh? What about iTunes?

This reality is surprising given that hundreds of millions of people around the world regularly and routinely use the p2p networks —

(illegally)

— and independent artist and download sites for their music fixes, —

How many of those hundreds of millions do you figure are going to the independent artist sites? Not to diminish the independent artists, but I honestly don’t believe the percentage is all that high.

— and that thousands of new music lovers are logging on and tuning in every day.

Thousands every day? For that matter, hundreds of millions? Care to back these figures?

Reading Big Four Organized Music cartel press releases, always faithfully reproduced as-is, and without question or verification, by the mainstream media, one could be forgiven for thinking significant numbers of people are hitting the various sites backed and supported by the Big Four, and paying handsomely for the privilege.

CONSPIRACY!

So, who exactly are the Big Four Organized Music cartel?

However, it’s all pure PR baloney.

New from Oscar Mayer.

Organized Music —

— is wholesaling identical, —

(as opposed to illegally-downloaded songs, which vary widely)

— low-fidelity, heavily compressed versions of songs —

That NEVER happens on P2P networks.

— its owners have already created for CD releases to the same companies, such as Apple, RealNetworks and Napster, —

Wait, huh? CD releases to the online music stores?

This forces Apple, et al, to try to off the tracks for a dollar and more each, depending on which countries they’re selling in. And the Big Four apparently want to introduce variable pricing with something in the region of $1.50 for ‘premium’ product at the top end.

Worth more, costs more. I’m not seeing the flaw in this plan. (FTR, I do prefer the flat 99-cent price.)

No one in his right mind is going to pay upwards of $1 for lossy, inferior quality, cookie-cutter corporate ‘product’ drawn from tightly limited catalogues —

Yes, no-one.

— when for pennies, they can —

(illegally)

— tap into not only everything the Big Four have to offer online, but also millions of other tracks, new and old, from allofmp3.com and similar sites.

SHAMELESS PLUG!

They can also buy from the many independent sales pages set up by new artists as well as established star performers who’ve discovered they can do much better for themselves and their fans online and off without the “help” of the major labels.

Name ‘em.

Meanwhile, nine times out of ten, —

More made-up statistics.

— music industry ‘premium’ product, going out at $1 and more, isn’t worth a light, —

Candle-light? Incandescent light? Halogen light?

— which is one of the reasons OM is reporting plummeting sales. …

Ommmmmmmm…

Currently, the Big Four spending most of their marketing resources on a bizarre sue ‘em all campaign through which they’re trying to blackmail people into buying ‘product’.

Actually, they’re trying to punish them for stealing “product”. If you don’t steal music, you don’t get sued, whether you buy the music or not. Also, I haven’t heard of the RIAA withdrawing a lawsuit because the defendant turned around and legally bought the music that was stolen.

I agree that the tactic won’t work in the long run, but this characterisation of it is inaccurate.

They’re doomed to fail on all fronts …

Tell me more about your crystal ball.

The Big Four have already been found guilty of numerous dirty tricks designed to boost sales and keep prices high.

They have? Please cite cases.

Also, um, isn’t boosting sales kind of the idea? Same with keeping prices as high as the market will bear. I believe it is called “making a profit”, and it is the end goal of every business.

Stay tuned.

Same bat-time. Same bat-website.


My main problem with this article (and others like it on p2pnet) is that the site bills itself as “news”, but it is really just an editorial platform. Serves to remind you that this is the internet — take everything with a grain of salt.

How not to retain my business

Thursday, January 5th, 2006

So last night, we had KFC for dinner. We went to a different KFC from the one we usually go to. This didn’t work out so well.

  1. Give me the wrong order

    Part of our order was three crispy strips, chicken only. We got three barbecue strips. Smelled good, but it wasn’t what I ordered.

  2. Give somebody else half their order

    The person who was in line ahead of us ordered two meals—one for him, one for his wife. He got one meal—and an empty plate. How does THAT happen? He complained, and received the second meal that he was owed.

  3. Be apathetic towards customers’ property

    Specifically, their car batteries. I saw that the car next to us had its lights still on. I went in and told them about it. Their response was essentially “So what do you want us to do about it?” I suggested that they could make an announcement or something, but they didn’t seem interested. (Yes, I know I could have made the announcement myself. I thought of this on the way out of the parking lot.)

We shall be going to our usual KFC from now on.

Coolest program name ever: pstops.

Monday, January 2nd, 2006

Even better, it accepts line noise as input. From the manpage:

To put two pages on one sheet (of A4 paper), the pagespec to use is:

2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)

To select all of the odd pages in reverse order, use:

2:-0

To re-arrange pages for printing 2-up booklets, use

4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)

for the front sides, and

4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)

for the reverse sides.

pstops is part of psutils.

The pointer talk, version 1.1

Sunday, January 1st, 2006

Bigger and better. The old version is still available in a zip file, if you want it.

Safari feed icon, continued

Sunday, January 1st, 2006

Mac OS X Hints has an article on adding the standard feed icon to Safari. Of course, I already created one and put it on my website. I also sent in my own hint linking to my icon; my hint was not accepted.

The Mac OS X Hints post has several mentions of different Safari feed icons in the comments, including me mentioning my own. One problem with the hint’s instructions is that the generated TIFF file will not have an alpha channel, leading to the ugly black corners that you see in the screenshot. AFAIK, none of the other renditions have this. Another problem is that it doesn’t affect the “Hide” button—when you go to a feed page, the button will change to say “RSS” again.

You should try all the versions, as everybody seems to have a different taste for how the “Hide” button should work. If you can’t find one you agree with, feel free to make your own interpretation.

New and interesting ways to boot your Mac

Sunday, January 1st, 2006

This technical Q&A lists some of the keys you can hold down to make something happen at boot. Most people know about C, and some might know about ⇧⌘⌥⌫, but how many know about D or Z?