here is friday's random selection of [ripped] albums from my library:




























redrawing the european map, or freudian slip of the union: lovely new euro coin, but carefully redrawn. turkey's real place in many european minds have been clear to observers for a long time, but never so pungent, and so idiotic. it is an urgent reminder to turks where the future lies, and what to do with the current government's deception about a future membership.NEW YORK — I write pulp. I write noir. Open one of my books and you'll see I'm not lying. I write about people killing each other and suffering or not suffering the consequences. I write about the halt and the lame and the addicted. So it should come as no surprise that this site is for fucking grownups.
Communicating with your Harmony remote
264% Complete
######################################
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |

Why should religion be held immune from criticism, and why should the admission that one is a disbeliever be considered so disturbing? The Bush administration has supported faith-based charities—though their efficacy has not been adequately tested; it has prohibited federal funding for stem cell research; it has denied global warming; and it has imposed abstinence programs instead of promoting condom use to prevent the spread of AIDS. Much of this mischief is religiously inspired. How can we remain mute while Islam and the West are poised for a possible protracted world conflagration in the name of God?
how do you spell "mediocre"? -- a guest [top chef]
i've come to realize that understanding pointers in C is not a skill, it is an aptitude. -- joel spolsky [the guerrilla guide to interviewing]
when the Singularity comes, the first AI to transcend will be a Panasonic toilet seat. No, really ... -- charles stross [conclusion #1 from the Japan trip]
SF is a literature of energy and wary ambition. It will rise wherever people are facing the future with courage. And it fades wherever people lose their nerve and turn away from tomorrow... as has been happening in the USA, ever since this #$@*! century began. -- david brin
I'm not impressed with moments of silence or candlelight vigils or noble rhetoric about this event. If you want to do something to remember that tragedy, the best thing to do is to simply stop living your life in fear. -- p. z. myers [in honor of 9/11]
X-Message-Flag: Microsoft: the company who gave us the botnet zombies. -- anon
To regret that we cannot be done with superstition is no more than to regret that we have a common ancestry with apes and plants and fish. -- christopher hitchens [review of lilla's stillborn god]
being a philosopher means never having to say "oops, i was mistaken". -- oz
too much idealism, and the work never ships -- not enough, and little change is brought to the world. -- scott berkun [the myths of innovation]
lot of people come up here and thank Jesus for this award. I want you to know that no one had less to do with this award than Jesus.
there is a fault in reality. do not adjust your minds.
I've been using Vista on my home laptop since it shipped, and can say with some conviction that nobody should be using it as their primary operating system -- it simply has no redeeming merits to overcome the compatibility headaches it causes. Whenever anyone asks, my advice is to stay with Windows XP (and to purchase new systems with XP preinstalled).
| You Are Incredibly Logical |
Move over Spock - you're the new master of logic |
win first. then cut. -- ohmi sensei
There will be a SlaughterFest of Horror, an Orgy of Bloodletting, Partial Nudity, Flammable Liquids, Unspeakable Misuse of Power Tools and Small Woodland Creatures, and the Plaintive Wailing of the Doomed. It will make Altamont look like Lilith Fair. -- anthony bourdain [about the next episode of top chef, where he is a guest judge, in bourdain's blog]
first you have to be a cook. than you can become a food critic. -- eren yigit [age nine, in response to whether he would become a food critic when he grew up.]
sure enough, once you've got enough food, people will invent etiquette. -- nanny ogg [nanny ogg's cookbook]
If you are a religious apologist invited to debate with Christopher Hitchens, decline. -- richard dawkins [review of god is not great]
sagacious saint of sacrosanct sayings, sardonic sultan of sarcasm and of scrappy satirical sounds swung slowly or savagely scandalizing shallow society softies with soaring scarlet scherzos, so scholarly, so scintillating. -- wynton marsalis [on sydney betchet, jazz a.b.z]
Bwahahahahaha! He's a Dänikenite! This could be fun. -- p. z. myers [pharyngula]
You can't make people believe in the impossible. All you can do is make people feel very guilty that they can't make themselves believe it. -- christopher hitchens [hitchens and donehue on hardball]
I say it as calmly as I can—the Church should have had the elementary decency to let the earth lie lightly on this troubled and miserable lady, and not to invoke her long anguish to recruit the credulous to a blind faith in which she herself had long ceased to believe. -- christopher hitchens [teresa, bright and dark]
People's noses are a difficult subject for research; we don't get to define human crosses, people tend to be a little snippy about telling them who to breed with and taking their genes apart, and humans are awfully slow to breed. -- p. z. myers [phayrngula]
one of my favorite authors is now a regular in CBC's search engine.I've started a new gig as an essayist/columnist for Search Engine, a new show on CBC Radio. They've got me reading adaptations of my Guardian columns, starting with my piece on Digital Lysenkoism. They've done a great job with the editing -- it's nice having other people around to help me sound smart!mp3 file
mozart #29 in A -
even cicadas
know the piece.
summer nightfall -
mozart clarinet
cicada chorus
I wonder if the school teaches that non-Euclidean geometry is the work of the devil or at least of non-Christians.
...
design breadknife. design machine for making breadknives. design an improved wheel bearing, using small balls of, e.g., steel. design shot tower for making steel balls of any size. devise a small hand-cranked machine by which bread of any size and thickness can be smoothly buttered to any depth.
consider designs of milk churns, and improve them. hear that temperature regulation in dairies is vitally important for the manufacture of good cheese; design a device for regulating temperature by means of expanding metal strips, coupled to pulleys.
...
send out for pizza.
let's follow the droppings, shall we, in the manner of amazon. here are the negatively charged words and phrases intended to distort, misinform, and mislead: special interest groups, force, surrender, undue government intervention, inherent risks, threats to economic viability [whoo, this is a big one], threats to peer review, selective bias, budget uncertainties, unwarranted budget increase, competition with private sector, expropriation of investments, undermining copyright protection.Various initiatives and proposals have been put forth by special interest groups and some legislators that would force private sector publishers to surrender to the federal government all peer-reviewed articles that report on research supported by federal research grants.
Such undue government intervention in scholarly publishing poses inherent risks and problems, including:
- Threats to the economic viability of journals and the independent system of peer review
- The potential for introducing selective bias into the scientific record
- Government data repositories being subject to budget uncertainties
- Unwarranted increases in government spending to compete with private sector publishing
- Expropriation of publishers' investments in copyrighted articles
- Undermining the reasonable protections of copyright holders
you have a quality that just draws us in as an audience. absolutely incredible! -- nigel lythgoe [prophetically commenting on sabra johnson's audition]
it's a simple rule. If your possible choices are: 1) a shatteringly momentous event occurred in science, and 2) the journalist doesn't have a clue about what is happening, it is always wise to hold the latter as your working assumption. -- grant canyon [comments for clearly, bloggers need to take over science journalism]
I feel that I have just started to do some decent Iaido practice after more than 50 years of learning. -- iwata norikazu sensei
the way you think affects what you think about and what kinds of thoughts you get. -- jack foster [how to get ideas]
the big ideas are a small part of the process of true innovation. -- scott berkun [the myths of innovation]
You know things are bad when questions about a technical matter like security are answered by a public-relations firm. -- ed felten [e-voting ballots not secret; vendors don’t see problem]
moral of this story is left as an exercise for the reader. -- charles stross [why DRM sucks: redux]
To speak of the compatibility of science and Islam in 2007 is rather like speaking of the compatibility of science and Christianity in the year 1633, just as Galileo was being forced, under threat of death, to recant his understanding of the Earth's motion. -- sam harris [correspondence]
finally, my dream full-frame nikon is here.moku-so -
clearing mind
ankles in pain.
james hunter, people gonna talkthree stooges were more grounded in reality. -- richard roeper [review of rush hour 3]
I'll have you know, though, that I took the test [asperger test] and scored a 24, an "average math contest winner." You need a 32 to suggest Asperger's, and a 15 is the average. So there. I don't have Asperger's, I'm just cruel and insensitive. -- p. z. myers [i'm mostly normal]
i'm an entropy buff. -- george carlin [napalm & silly putty]
i would pay a premium to stick with [windows] xp. -- ron winacott
you ought not to be regarded as the light of the world when even your most eloquent defenders can say only that your record is not quite as bad as that of the greatest monsters or most pernicious ideologies of history. -- keith parsons [atheism: twilight or dawn?]
what really distinguishes dance from other shows -- including idol -- is contestant quality. fortunately for us, dance is a criminally underappreciated art -- being a good dancer is just harder than being an idol-style pop singer. -- alynda wheat [happy feet, EW jul 20]
instead of wanting to innovate, a process demanding hard work and many ideas, most want to have innovated. -- scott berkun [the myths of innovation]
the secret tragedy of innovators is that their desire to improve the world is rarely matched by support from the people they hope to help. -- scott berkun [the myths of innovation]
when one accepts that the natural world is the only world, one can see that it is actually better than any that can be made up.
...
but when you are done, you are done - read your lucretius. - jennifer m. hecht [a conversation, free inquiry]


i keep an eye on up-and-coming titles on atheism; i pre-ordered hitchens (ed) portable atheist. i also noted a new one by anthony flew, once a "leading atheist", now a believer in some form of god apparently not bumper-stickered by existing religions: there is a god: how the world's most notorious atheist changed his mind.
Flew earned his fame by arguing that one should presuppose atheism until evidence of a God surfaces. He now believes that such evidence exists, and There Is a God chronicles his journey from staunch atheism to believer.
[i have no doubt philosophy students can hardly wait for, say, a variant of principle of sufficient reason, therefore god. let's hope it is less turgid than some of his earlier writings and provides sufficient novelty.]
related readings for the philosophically inclined:
Indeed, boredom could be considered one of the driving forces of ingenious invention, not only in science fiction, but in our rambunctious civilization as a whole. -- david brin [singularities and nightmares: extremes of optimism and pessimism about the human future]
i would say that gumbo is more indicative of american cousine than apple pie is, probably. -- alton brown
Here's what you can still do: just sit there and don't make any sudden moves. Pretend you are using Microsoft software instead of GPL'd software. Don't think. Don't modify. Don't share. Don't explore. Don't improve. Don't innovate. Don't distribute. Don't sublicense. Don't do "unauthorized" things. Don't do nuttin' or you might get sued. -- feldegast [on disgraceful microsoft/lispire patent deal]
politics is when you sell your daughter to bandits and your daughter and yourself are then both set free. -- ka'a Orto'o, gnomic utterances, xxxi ii [the tough guide to fantasyland]
please restart any running iceweasels, or you will experience problems. -- debian apt notice
from newfies to yorkies, from weimaraners to water spaniels, from dalmatians to dachshunds, as i incredulously close this book i seem to hear mocking barks and deep, baying howls of derision from 500 breeds of dogs - every one descended from a timber wolf within a time frame so short as to seem, by geological standards, instantaneous. -- richard dawkins [inferior design]
to differ from the "different," make no claims. to photograph is enough. -- david vestal [being different]
DRM is Lysenkoism for the digital age. It's an ideologically correct lie that's been concocted to bilk the entertainment industry out of a fortune. -- cory doctorow [copy killers]
there is something in the way i think that women can relate to. that comes from growing up in a house full of women. it was me, my sister, my mother, my grandmother, and about five of my aunts all in the same house. so any drama that a woman can go through, one of the women in my house went through it, and i was right there to soak it up. i just might have a little more insight than the average guy. -- ne yo [music interview, globe and mail]
the thing is, when it comes to things like flavor, you can't sort of chop it up and be all nice about it; you have to bash it up, you have to make a bit of a noise... -- jamie oliver [jamie at home]

yes! my copy of beautiful code: leading programmers explain how they think just arrived. it includes essays by brian kernighan, karl fogel (subversion), jon bentley, tim bray, elliotte rusty harold, michael feathers, alberto savoia (testivus), charles petzold, douglas crockford, henry s warren jr (hacker's delight), ashish gulhati, lincoln stein, jim kent (parasol), jack dongarra (netlib) and piotr luszczek, adam kolawa, greg kroah-hartman, diomidis spinellis (code reading, code quality), andrew kuchling, travis e oliphant, ronald mak (martian principles), rogerio atem de carvalho (erp5) and rafael monnerat, bryan cantrill (dtrace), jeff dean and sanjay ghemawat (mapreduce), simon peyton jones (haskell), r. kent dybvig (chez scheme), william r. otte and douglas c. schmidt, andrew patzer, andreas zeller, yukihiro matsumoto (ruby), arun mehta, t.v. raman (emacspeak), laura wingerd and christopher seiwald (perforce), brian hayes.the path between darwinism and nazism may not be ineluctable, but it is more ineluctable than the evolutionary path from monkey to man.
Well, then, let’s face it. You’re a porker yourself. And then the liberals sue doctors to keep them from delivering babies! At least that’s an improvement. Liberals used to eat babies. Maybe that’s why they got so fat.
bernhard edmaier, patterns of earth
richard morgan, black man
loise antony (ed), philosophers without gods: meditations on atheism and secular life
jerome groopman, md, how doctors think
natalie angier, the canon: a whirligig tour of the beautiful basics of science
gerd gigerenzer, gut feelings: the intelligence of the unconscious
[for sf readers, black man is very highly recommended, but be warned that it is not a lightweight read.]
the inhabitants of this great wilderness may live and die without ever having contact with humanity. long may it be that way. -- david attenborough [planet earth]
You know what I love about the GPL? Regular lawyers can't understand it. -- groklaw
attention conservation notice: i know nothing about music and have no taste. -- cosma shazili [random notes from the tail end of the montreal jazz festival]
Q: You have run into criticism from certain religious groups who regard you as subversive, with the Catholic Herald describing your work as 'worthy of the bonfire.' Do such emotional responses concern or upset you or does it please you to generate strong reactions?
A: I'm delighted to have brought such excitement into what must be very dull lives. -- philip pullman [about the writing]
precious! precious! oh my precious we loves you. we loves you! -- brent on his new iphone [pvp]
whether or not the jesus phone achieves worldly success, it will succeed in its own way by convincing people that the world can be different. -- ed felten [behind the iphone frenzy]
no man treats a motor car as foolishly as he treats another human being. -- bertrand russell [has religion made useful contributions to civilization?]
release early, release often, repent! -- me
do not eat or open desiccant
do not consume if having certain allergy -- san feng yuan peanut package warning
the frenchwoman has become americanized; she speaks seriously about serious matters, she takes life seriously, she rides on the rigid saddle of modern manners, dresses poorly, tastelessly, and wears corsets of galvanized tin which can resist most powerful pressures. -- jules verne [paris in the twentieth century]
turn off everything. patrol your house to pull the plugs on the tv, the radio, the fax, the e-mail-transmitting computer and its ingrown internet. go sit on your porch with a glass of vodka lemonade, a pad and pencil, and truly think. -- ray bradbury [bradbury speaks]
Type the login and the password -
Found the system even slower
Even slower than the first time
(Just as though some evil spirit
Had reprogrammed all of UNIX
In the language LISP or OCCAM -
Which among the cognosenti
Are not fames for running quickly
Rather for their ponderous slowness
Like a third year CS student
Trying to make out a theorem
Such as that of Church and Rosser).
this year's usenix flame award was given to my friend peter honeyman.Peter's often highly unconventional stewardship of the countless students, researchers, and advisees he has touched is the stuff of graduate student legend. His penetratingly insightful (and potentially hazardous) questions and comments, combined with a paradoxically unflinching loyalty, consistently have led those under his tutelage to the pinnacle of achievement in security, systems, and networking.
Those of us who have come forward with our names and photographs represent countless others who are unable or unwilling to do so because of the threats faced by those considered 'apostates' - punishable by death in countries under Islamic law.
related reading: mercurial book in progress
lisp: no description provided -- freebsd package install
if there is one lesson that i have learned well along the way, it is simply this: the place to live is in the here and now. -- freeman patterson
obscurantism in an academic subject expands to fill the vacuum of its intrinsic simplicity. -- Dawkins’s Law of the Conservation of Difficulty
If I see another compact camera where the down-key on a Direction pad brings up a Focus menu so that you can get to the Close-up focus mode, I think I’ll puke. -- thom hogan [thom's compact challenge]
i like dull. it lasts. -- glod glodsson [soul music]
why program by hand in five days what you can spend five years of your life automating? -- terence parr's motto
we have met our alien overlords, and they are us. -- cosma shalizi
it had a tossed-in-the-air-fruitcake quality ... -- owen gleiberman [on dead man's chest]
Q: So the analogy suggests that IQ scores are...?
A: A proxy for the skills and habits encouraged by a bureaucratic society; skills and habits which can be at once highly heritable (because of strong transmission through family and neighbors) and highly learned (within the scope of what it is biologically possible for humans to learn and internalize). Innate ability needn't enter into it at all. The implications for democracy would be nearly nil.
rolling stone, record industry's decline (part 1)While there are factors outside of the labels' control -- from the rise of the Internet to the popularity of video games and DVDs -- many in the industry see the last seven years as a series of botched opportunities. And among the biggest, they say, was the labels' failure to address online piracy at the beginning by making peace with the first file-sharing service, Napster.
What we can say is that if torture today remains a “scandal,” a “crisis,” it is a crisis in that same peculiar way that crime or AIDS or global warming are crises: that is, they are all things we have learned to live with.
recall that the essence of modernism is to take one cool idea and drive it into the ground.


Simply put: larger sensor, high-quality lens, and user control. Virtually every specification I list basically falls into those three categories, which tells you something about just how miserably the current crop of more than 60 million cameras being sold a year fails. The one thing that isn’t in those categories is a dedicated autofocus system (rather than double-purposing the imaging sensor as almost all current designs do), and this requirement basically points to the other failing of all current compact digital cameras: they aren’t responsive enough.
along the way she mistook a cramped sense of of personal grievance for a coherent philosophy: a common error. -- mark kingwell on ayn rand [nearest thing to heaven]
a reasonable theist is a theist in violation of reason. -- david eller [natural atheism]
sitting in her own backyard in her bathrobe was one of those things that seemed worth the risk. not that she would have tried it unarmed - she wasn't that stupid. --p. j. tracy [monkeewrench]
[ps: this backyard is located in merriam park, st. paul]
I don't want to know what you think. I want you to think what I know. -- tom duff
idealists who begin sentences with, "can't we all just..." should have their guitars smashed and their flowers trampled. i don't want to buy the world a coke and live in perfect harmony; harmony means unanimity, and history shows unanimity is a scary thing. -- jay heinrichs [thank you for arguing]
Excuse my while I mop up the sake that I sputtered all over my keyboard… -- geoff arnold
I never recommend as policy a position that I have been paid, either directly or indirectly, to recommend. -- lawrence lessig [disclosure statement]
- Most exciting ideas are not important,
- Most important ideas are not exciting,
- Not every problem has a good solution, and
- Every solution has side effects.
-- dan geer [1994 usenix conference]
all idioms must be learned; good idioms need to be learned only once. -- alan cooper [about face: the essentials of interaction design]
This book changed my life — and the lives of countless others. It inspired me politically, artistically and socially. Last week, I saw Bruce at his home in Serbia and asked him if he minded my reading this aloud for the next 20 weeks or so. He gave me his blessing — so here it is.
... the new book is based on what comes down to a mathematical argument - a mathematical argument that I've specifically refuted on this blog numerous times. I'm not mentioning that because I expect Behe to read GM/BM and consider it as a serious source for his research; even if I were an expert in the subject (which I'm not), a blog is not a citable source for real research. But I mention it because the error is so simple, so fundamental, and so bleeding obvious that even a non-expert can explain what's wrong with it in a spare five minutes - but Behe, who apparently spent several years writing this book still can't see the problem. (In fact, one of the papers that he cites as support for this ridiculous theory contains the refutation!)
recently i came across some discussion and implementations of luhn's mod 10 checksum algorithm in comp.lang.scheme that puzzled me and piqued my interest. wikipedia has a useful entry including a straight-forward c# implementation based on an informal description, and pointers to other implementations.
alas, this description seems to have encouraged everyone to implement the algorithm more or less the same way, with minor variations: mostly right-to-left scan with a toggle to decide digit processing, but sometimes the string is reversed, or processed from left-to-right with a toggle. [some schemers have done the usual: convert string to a list of digits, reverse it and scan it with a toggle. cool!] wikipedia entry helpfully includes the pre-computed table to eliminate the unnecessary multiply/compare/subtract, but evidently this has gone unnoticed.

here are some rather basic [for me anyway] observations on implementing the algorithm:
here is an implementation that uses the pre-calculated numeric transformation table, and a toggle-free left-to-right scan. [for simplicity, i excluded the isdigit check but assumed string length is not known in advance.]
static int ltab[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
int
luhn(char *str) {
int sum = 0;
if (!str || !*str || !*(str + 1))
return 0; /* less than minimum */
/*
* if the length is odd, add the value of the
* first digit and skip
*/
if (strlen(str) & 1)
sum = *str++ - '0';
while (*str) {
sum += ltab[*str++ - '0'];
sum += *str++ - '0';
}
return (sum % 10) == 0;
}
even with isdigit check implemented as a first pass (during which we can also calculate the length of the string) this runs almost twice as fast as most naive implementations seen around.
suppose we do not know the string length in advance, and maybe it is costly to do multiple scans [assume many long strings or list of digits as some lispers would have it]. we want to see if a given string is (a) all numeric, and (b) passes the luhn checksum, all in a single pass. since we cannot decide if we have to perform the luhn transform for the first digit or not, we do it both ways and calculate two sums:
static int ltab[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
/*
* luhn without prior pass for string length
*/
int
luhn(const char *str) {
int sum[2] = {0,0};
int flip = 0;
char c;
if (!str || !*str || !*(str + 1))
return 0;
/*
* calculate two alternating sums. we do not know
* which one we will end up using until the end
*/
while (c = *str++) {
if (!isdigit(c))
return 0;
int n = c - '0';
sum[flip] += ltab[n];
sum[flip = !flip] += n;
}
return (sum[flip] % 10) == 0;
}
when i first decided to implement the algorithm, i used awk to prototype several of my approaches, including the two above. here is another approach with an extended lookup table that works well with awk and python and possibly with other scripting languages i like less.
# luhn - checks if a string of digits is a valid credit card number
# unlike other right-to-left scanning toggle and calculate
# implementations, this one does less than half the work
# author: ozan s. yigit
# insert bsd copyright here
BEGIN {
# generate all two digit sequences, with appropriate
# luhn translation of the first digit.
for (i = 0; i < 10; i++)
for (n = 0; n < 10; n++) {
t = i * 2;
if (t > 9)
t = t - 9
pairmap[i n] = t + n
}
}
function luhn(digits, sum, n, i)
{
i = 1 # index
sum = 0
n = length(digits)
# if the length is odd, save+skip the first char
if ((n % 2) > 0)
sum = substr(digits, i++, 1)
while (i <= n) {
pair = substr(digits, i, 2)
## print i ": ", pair, "->", pairmap[pair]
sum += pairmap[pair]
i += 2
}
## print sum
return sum % 10 == 0
}
/^[0-9]+$/ {
if (luhn($0))
print $0 ": ok."
else
print $0 ": no."
}
here is basically the same thing in python.
# author: ozan s. yigit
# insert bsd copyright here
pairmap = {
"00": 0, "01": 1, "02": 2, "03": 3, "04": 4, "05": 5, "06": 6, "07": 7,
"08": 8, "09": 9, "10": 2, "11": 3, "12": 4, "13": 5, "14": 6, "15": 7,
"16": 8, "17": 9, "18":10, "19":11, "20": 4, "21": 5, "22": 6, "23": 7,
"24": 8, "25": 9, "26":10, "27":11, "28":12, "29":13, "30": 6, "31": 7,
"32": 8, "33": 9, "34":10, "35":11, "36":12, "37":13, "38":14, "39":15,
"40": 8, "41": 9, "42":10, "43":11, "44":12, "45":13, "46":14, "47":15,
"48":16, "49":17, "50": 1, "51": 2, "52": 3, "53": 4, "54": 5, "55": 6,
"56": 7, "57": 8, "58": 9, "59":10, "60": 3, "61": 4, "62": 5, "63": 6,
"64": 7, "65": 8, "66": 9, "67":10, "68":11, "69":12, "70": 5, "71": 6,
"72": 7, "73": 8, "74": 9, "75":10, "76":11, "77":12, "78":13, "79":14,
"80": 7, "81": 8, "82": 9, "83":10, "84":11, "85":12, "86":13, "87":14,
"88":15, "89":16, "90": 9, "91":10, "92":11, "93":12, "94":13, "95":14,
"96":15, "97":16, "98":17, "99":18
}
def luhncheck(number):
n = len(number)
if n < 2: # less than minimum
return 0
i = 0
sum = 0
if n & 1: # odd length
sum = int(number[i])
i = 1
while i < n:
s = i
i += 2
## print number[s:i], "->", pairmap[number[s:i]]
sum += pairmap[number[s:i]]
return(sum % 10) == 0
## print luhncheck("1111")
## print luhncheck("8763")
## print luhncheck("446667651")
## print luhncheck("471036814")
## print luhncheck("23813103131311229292929228")
this is the fastest version of luhn checksum in C i happen to have. not surprisingly, it uses duff's device.
/*
* luhn check using duff's device
* author: ozan s. yigit
*/
static int ltab[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
int luhn(char *str, int len)
{
int sum = 0;
int loop;
if (len < 2)
return 0;
#define LUHN ltab[*str++ - '0']
#define NORM *str++ - '0'
loop = (len + 8 - 1) >> 3;
switch (len & (8 - 1)) {
case 0:
do {
sum += LUHN;
case 7: sum += NORM;
case 6: sum += LUHN;
case 5: sum += NORM;
case 4: sum += LUHN;
case 3: sum += NORM;
case 2: sum += LUHN;
case 1: sum += NORM;
} while (--loop);
}
return (sum % 10) == 0;
}
[notes: alas, code you see here is copyright. you can do anything you like with it so long as you give proper credit. (creative commons attribution, share alike) i usually leave trivial code of this sort in the public domain, but i am increasingly unhappy seeing public domain code being smothered with GPL that hides the original intent of its authors.what would a non-fundamentalist atheist be? would he be someone who believed only somewhat that there are no supernatural entities in the universe - perhaps that there is only part of a god (a divine foot, say, or buttock)? or that gods exist only some of the time - say, wednesdays and saturdays? -- a. c. grayling [from can an atheist be fundamentalist in against all gods.]
certainly most xml i've seen makes me think i'm dyslexic. it also looks constipated, and two health problems in one standard is just too much. -- charles forsyth [9fans mailing list]
in OSS, eyeballs are very easily distracted. think of typewriting monkeys, but with more bananas and shorter attention span. -- anon [overheard in yet another "given enough eyeballs" theory discussion]
"nice try" is worthless. -- gregory house
"Playing God" is where you do absolutely nothing, take credit for other entities' work, and don't even exist — scientists don't aspire to such a useless status. Besides, creating life is mundane chemistry, no supernatural powers required. -- pz myers
it was music that went down to the feet by way of the pelvis without paying a call on mr brain. -- terry pratchett [soul music]
if there is anything worse than a movie hammered together out of pieces of bad screenplays, it's a movie made from the scraps of good ones. at least with the trash we don't have to suffer through the noble intentions. -- roger ebert [review of instinct]
nimoy can make anything sound plausible. -- philip k. dick ["introduction" to the golden man]
gaze upon my opposable thumbs and fingers -- hugh neutron
two things every Python programmer needs to do in life: 1) Reinvent Lisp 2) Write a web framework -- Jason Huggins
Religious points of view must never be allowed to dictate public policy and limit fundamental freedoms. -- from CFI bulletin on gonzales vs carhart
If you work at IBM Global Services, ask your boss outright if you are on the list to be fired. It puts the boss in a bind, sure, but might lead to a sort of "Alice's Restaurant" effect in which hypocrisy is confronted and exposed. -- cringely [lean and mean]
You cannot, of course, gradually build a self-supporting, free-standing arch by using only the component stones, piling them up, one at a time. But if you have scaffolding – and a pile of rocks will suffice to support the growing structure – you can build the arch one stone at a time until the keystone is in place, and the structure becomes self-supporting. When this occurs, the (now redundant) scaffolding can be removed to leave the irreducibly complex, free-standing structure. -- niall shanks [God, The Devil, and Darwin: A Critique of Intelligent Design Theory]
it seems a few high school students are far smarter than the entire gang of evolution deniers at the Discovery Institute. -- pz myers [pharyngula]
Jini is a service architecture. OSGi is a service architecture. Both have ways of dealing with services written in Java. So why are there two?
This, of course, is a classic example of what I have called the Highlander Fallacy, which briefly stated is the principle that there can be only one. If any two technologies can be described using the same set of words, then there is no need for both of them, and only one will survive. I call this a fallacy because, to use a technical term, it is total crap. -- jim valdo [jini and osgi, yet again]
Our purpose is to allow reviewers to utilize the rigor and tools of literary criticism in order to properly assess genre fiction, while discarding the elevated tone and reliance upon jargon that often mars academic criticism.
...
At Scalpel Magazine, we believe we are continuing a great tradition set into place by the likes of James Blish, Damon Knight, Algis Budrys and more.
1C FC BF 1A 62 B8 28 E1 B3 87 34 0E 4B CD 63 8A
The wisdom of reliance on Wikipedia as an information source has been further questioned.
on a leafless branch
a crow -
autumn dusk.
the first snow
at a hermitage
happily i am.
At least 700,000 people marched against Foreign Minister Abdullah Gul's candidacy in Istanbul yesterday, waving the red national flag and invoking Turkey's long secular tradition. Powerful generals hinted they might step in to resolve the deadlock over Gul in parliament, which elects the president.
You must not use ReiserFS v3 for your recordings. You will get corrupted recordings if you do. -- MythTV howto
my nephew kept saying he didn't want anything to do with fista. what is fista? is it a street gang thing? -- anonymous elderly
I've been using UNIX & Plan 9 for 26 years, and not once have I wanted to chop the tail off a file. -- tom duff (2000)
Many (open source) hackers are proud if they achieve large amounts of code, because they believe the more lines of code they've written, the more progress they have made. The more progress they have made, the more skilled they are. This is simply a delusion. -- suckless.org (about)
meat is food.
vegetables are what food eats.
fruits are vegetables that try to trick you by tasting good.
fish are fast moving vegetables.
mushrooms are what grows on vegetables after food is done with them.
-- source unknown [told by henry]![]()
I asked why no recognized experts on radiometric dating were invited to participate in the conference, given that none of the speakers had any training or experience in experimental geochronology. He was candid enough to admit that they would have liked to included one on the team, but there are no young-earth geochronologists in the world. -- todd feeley [reporting from RATE (Radioisotopes and the Age of the Earth) creationist conference.]
the unfortunate and inevitable concomitant of "bring it on" is "how do you like it now?" -- david mamet [bambi vs godzilla]
an individual relates himself in action to his society through the use of tools that he actively masters, or by which he is passively acted upon. to the degree that he masters his tools, he can invest the world with his meaning; to the degree that he is mastered by his tools, the shape of the tool determines his own self-image. -- ivan d. illich (tools for conviviality)
you are coming to a sad realization. cancel or allowed? -- vista security guy
there is a little immaturity stuck away in the crannies of even the most judicious of us, and we should treasure it. -- roger ebert [review of the mummy]
there is music in everything, if you know how to find it. -- imp [terry pratchett, soul music]
It's always "but why do you want that" and "you don't want that" or "we can already do that" or "we tried that, it didn't work" and back to "but why do you want that". -- ron minnich (plan9 mailing list)
We all want our lenses to be tack sharp, period end period. -- bjørn rørslett
Unspeakable and unpronounceable Norwegian words, often with the odd Finnish phrase inserted, then rip apart the darkness around me. -- bjørn rørslett
I cannot state strongly enough my conviction that the preoccupation with consistency, so valuable for mathematical logic, has been incredibly destructive to those working on models of mind. at the popular level it has produced a weird conception of the potential capabilities of machines in general. at the "logical" level it has blocked efforts to represent ordinary knowledge, by presenting an unreachable image of a corpus of context-free "truths" that can stand almost by themselves. and at the intellect-modelling level it has blocked the fundamental realization that thinking begins first with suggestive but defective plans and images, that are slowly (if ever) refined and replaced by better ones. -- marvin minsky [conclusion to AI memo no. 306, a framework for representing knowledge, june 1974]
i have invented some very powerful ways of wasting time. -- john d. conway
we have no idea what "the center of our being" is, but i hope it is chocolate cream. -- penn gilette [penn & teller bullshit]
brevity is the handmaiden of force. -- jack hart [a writer's coach]
"Intelligent design" is a science stopper. Once something is explained as "designed" by a disembodied invisible "intelligence", we can proceed no further in our inquiry. Intelligent design proponents themselves state that science is not allowed to pursue the identity or motivation of the designer. -- jeffrey shallit
sometimes the truth is arrived at by adding all the little lies together and deducting them from the totality of what is known. -- terry pratchett [going postal]
If you feel exhausted, it's not necessarily because there's something wrong with you. Maybe you're just running fast. -- paul graham [is it worth being wise?]
we don't stop questioning because we grow weak; we grow weak because we stop questioning. -- anon [based on a quote by g. b. shaw]
songs are simple. voices aren't. -- simon cowell
I assume goosebumps are good. -- melinda dolittle
I feel like one big goosebump. -- paula abdul
ruby on rails, up and running: away, for the most part. like spolsky, bruce tate continues to be taken seriously while remaining voluminously underwhelming. this is basically a weak how-to book; there are many authors in computing, like pulp authors of another era, who can produce these mediocre volumes during their coffee breaks. these people do not lack technical skill; they just lack imagination, depth and rigor. i am barely keeping his beyond java not because it is well written (it is not, though hard to tell if you go by the google found reviews) but it is a classic of what i these days call nudge, nudge, wink, wink critique, a mixture of proof by repeated, unsubstantiated assertion and appeal to nodding masses. we all know what we are talking about here, aren't we? heh heh heh. nudge, nudge. let's ask john about it, shall we? ...