The Decline and Fall of The Decline and Fall
(Yes, this post is written just for the title. More details would be received gratefully.)
Over a period of 17 years from 1770 to 1787, Edward Gibbon wrote The History of the Decline and Fall of the Roman Empire. It was, among other things, a mammoth history (6 volumes, 71 chapters) of the last days of Rome, which for Gibbon apparently meant several centuries. (The book covers over thirteen centuries of history; here’s an outline.)
The work received instant praise. Adam Smith’s letter to Gibbon is typical:
“I cannot express to you the pleasure it gives me to find that by the universal consent of every man of taste and learning whom I either know or correspond with, it sets you at the very head of the whole literary tribe at present existing in Europe.”
The Decline and Fall became the model for all historians that followed — including its pessimism (history as “little more than the register of the crimes, follies, and misfortunes of mankind”), its overarching narrative, and its indictment of religion.
It became a literary monument of the 18th century, and one of the works that every educated man was expected to have read, a part of every bookshelf. Churchill (“I devoured Gibbon. [...] I rode triumphantly through it from end to end and enjoyed it all”), Carlyle (“how gorgeously does it swing across the gloomy and tumultuous chasm of these barbarous centuries”), Virginia Woolf (“not merely a master of the pageant and the story; he is also the critic and the historian of the mind [...] We seem as we read him raised above the tumult and the chaos into a clear and rational air”)… everyone read The Decline and Fall and spoke of it in the highest terms. (Gandhi read it in jail, and considered it an inferior version of the Mahabharata.) It was read by doctors, politicians, lawyers, novelists, even Sanskrit professors.
But then times began to change. Education stopped being the reading of “classics“, and became the learning of “subjects”. Today, no one I know has read The Decline And Fall, nor considers it worth the time.
Testing irreducibility using prime numbers
Here’s a simple and nice test for irreducibility in that N told me about a year ago. (I just noticed this lying around while cleaning; I don’t have a year’s buffer like Raymond Chen.) Apologies for the ugly formatting; you’ll have to trust that the result (Theorem 1, or Corollary 8) is more beautiful than it looks. :-)
Actually I’m not sure why I wrote this originally, given that it’s all already well-explained in the originals and even partially on Wikipedia. Perhaps my proofs are different or simpler or I was bored or something.
1. Irreducibility test
In its simplest form, the test can be stated as follows.
Theorem 1 Given a polynomial
with integer coefficients, let
. If there exists an integer
such that
is prime, then
is irreducible.
Conscious consumption
Late-night sleepy ramblings; please do not read :p
I have been taking a break, and it has helped me gain some perspective. Or so I thought.
Like some who might be reading this, I subscribe to a large number of blogs. Google Reader says 106 subscriptions, but a few of them are aggregators which combine the updates from several blogs.
For about three months (since June 10th, I think), I have not been reading them, nor reading the news. I’m not exactly sure why… it started as a day’s break (which was a big deal), then became four days (which was an even bigger deal), then it got easier and easier. Probably, I thought I was taking a break from (parts of) the internet in order to catch up with (parts of) my life. It didn’t work, of course. I merely found other sinks in which to dump my time. (I spent more time on Wikipedia than ever before, read more actual books than I had in the last couple of years, and so on.)
I did, however, discover a couple of things.
One is that Google Reader stops updating the count of unread items at “1000+”. (It also automatically marks items more than 30 days old as read, and, as I have “only” about 1500 items a month, I don’t know if it counts to “2000+”.)
The other is some general observations about what our lives have become.
It seems that the meanings of words like “recreation” have become somewhat quaint. Now “entertainment” is not always something to indulge in because one requires relaxation, or because it is a rewarding pursuit in itself, but simply “because it’s there”.
Read the rest of this entry »
To Be or Not to Be
(Not about the excellent film or the excellent animated short.)
Bit off more than my mind could chew,
Shower or suicide, what do I do?
— Julie Brown, “Will I Make it Through the Eighties?”
If you are of the opinion that the contemplation of suicide is sufficient evidence of a poetic nature, do not forget that actions speak louder than words.
— Fran Lebowitz, “Metropolitan Life”
Razors pain you, Rivers are damp,
Acids stain you, And drugs cause cramp.
Guns aren’t lawful, Nooses give,
Gas smells awful. You might as well live.
–Dorothy Parker (several tentative suicide attempts, died of a heart attack at 73)
No one ever lacks a good reason for suicide.
– Cesare Pavese (who committed suicide, WTF?)
And of course no mention of suicide is complete without Maddox’s How to kill yourself like a man.
Smith? and other names
As I, like many South Indians, don’t have a surname, and have been forced to adopt one for my life in the US, I have some things to say about surnames, and there will be a post about them someday, probably. (There was a draft lying around which had “tyranny” in its title, but nothing much good besides.) In the meantime, someone very bored might be able to amuse themselves with related news I’ve been collecting, such as this latest one from a BBC article on zombies:
In their study, the researchers from the University of Ottawa and Carleton University (also in Ottawa) posed a question: If there was to be a battle between zombies and the living, who would win?
Professor Robert Smith? (the question mark is part of his surname and not a typographical mistake) and colleagues wrote: “We model a zombie attack using biological assumptions based on popular zombie movies. [..]
Some paragraphs later:
Professor Smith? told BBC News:
(Apparently he’s an Australian citizen and got his name changed while living in the US… quite an achievement.)
Flashing the screen on Mac OS X
Here’s one way. There’s a C program to adjust the screen’s brightness written by Nicholas Riley, also available from this blog post by Matt (Danger) West. Get it. The rest is obvious. For instance, here’s a Python script, which should have probably been written in Perl:
import os, re, time
s = os.popen('./brightness -l').read()
ob = re.findall('brightness (\d.\d+)', s)[0]
w = 0.2
for i in range(10):
os.system('./brightness 0'); time.sleep(w)
os.system('./brightness 1'); time.sleep(w)
if(i==4): os.system("say beep")
os.system('./brightness ' + ob)
Tune parameters to avoid epileptic seizures.
Eugene Curtain and Max Washauer
If you came here because you were reading Peter Winkler’s “7 Puzzles You Think You Must Not Have Heard Correctly”, the names are supposed to be Eugene Curtin and Max Warshauer, and the paper is called “The locker puzzle”, published in The Mathematical Intelligencer, Volume 28, Number 1 (March 2006), pages 28–31.
[If not, you should read the amazing "7 Puzzles You Think You Must Not Have Heard Correctly", spend several days trying the first problem, read the brilliant solution, and then come back here if you're interested in learning why no other solution can do better.]
The paper is available here if your institution has access. If not, here’s a sketch of the proof that the strategy cannot be improved upon.
First, let us modify the rules slightly so that each prisoner must continue looking in boxes until he finds the box containing his name. The prisoners win if no prisoner opens more than 50 (i.e., n/2) boxes. This change obviously makes no difference to the outcome. Let’s call this (modified) game Game 1.
A different game involves all the prisoners being in the room at the same time, and is played as follows. The first prisoner opens boxes until he finds his name (i.e., the number “1″). Then, the lowest-numbered prisoner whose name hasn’t been revealed starts opening boxes until he finds his name. Then the next lowest-numbered whose name hasn’t been revealed opens boxes, and so on. The prisoners win if no one opens more than 50 boxes. Call this Game 2.
Let’s say we observe the prisoners as they play Game 2, and record the order in which boxes were revealed. This completely specifies what happened. For example, (with 10 prisoners instead of 100) if we record the list 2,6,1,4,9,7,10,8,3,5, we know that the first prisoner revealed boxes containing 2, 6, 1, then the third (lowest unrevealed) prisoner opened boxes with 4,9,7,10,8,3, then prisoner 5 opened 5, and they lost because the third prisoner opened 6 > 5 boxes.
- Prove: No matter what strategy the prisoners follow, each permutation has the same probability (1/n!) of being the list recorded.
- Prove: “The classical records-to-cycles bijection”. It sends 2,6,1,4,9,7,10,8,3,5 to (2 6 1)(4 9 7 10 8 3)(5), for example.
- So the probability of the prisoners winning Game 2 (no matter what strategy they follow) is exactly the probability that a random permutation has no cycle of length greater than n/2.
- Prove: Any strategy for Game 1 corresponds to a strategy for Game 2 with the same probability. (Trivial: the only change is that you don’t have to open boxes you’ve already seen opened.)
This proves that the pointer-chasing strategy is optimal for Game 1.
Here’s the puzzle as it was originally considered, still open: suppose there are n prisoners and 2n boxes, half of them empty. The prisoners can each examine n lockers. The pointer-chasing strategy doesn’t work as empty boxes point nowhere. Does the probability of winning go to 0 as n→∞?
The procrastinator’s nature
I just started using LeechBlock yesterday, and already I know why “How can I block Google’s cached versions of sites as well?” is in the FAQ.
LeechBlock is wonderful. (Install)
There are no results on Google for “LeechBlock saved my life”, but there are testimonials like “Leech block has changed my life”, “Leechblock just saved my life”, and “This application is saving my thesis, and improving my social life”.
If LeechBlock isn’t working for you, you can try more extreme solutions like (on Mac) Freedom and SelfControl. (Found via this post.) But for me, right now, with my current level of work and self-awareness and other devices being employed, LeechBlock seems to be just about sufficient. (Although I do wish Safari were an even worse browser than it is.)
Semi-unrelatedly, also worth reading is Aaron Swartz’s experiment involving one month offline: Before/After.
Firebug “console is undefined”
If you’re using Firebug and don’t want to bother removing or commenting out all the console.log debug messages for users who aren’t, put this at the top:
if(typeof(console) === "undefined" || typeof(console.log) === "undefined")
var console = { log: function() { } };
This reminds me of the trick I use for C/C++ of putting debugging statements inside a macro:
D(cerr<<"The number is "<<n<<endl;);
where the macro D is defined as
#define D(A) A
when you want the debugging code to run, and
#define D(A)
when you don’t. :-)
(The final semicolon after the D() is for Emacs to indent it reasonably.)
Update: Of course, the above are just hacky hacks to save typing. The “right” way for conditional C code is usually to use #ifdef DEBUG and the like, and the right way around the Firebug problem is to use something more general like this code at metamalcolm.
Frederik Pohl on science fiction
Frederik Pohl is one of the important writers and editors from the “Golden Age” of science fiction. He began writing in 1937, and over the last seventy years has written, edited, agented, and done several other things besides. I read his somewhat-obscure story Shaffery Among the Immortals when I was 12 (my own Golden Age), and I have long considered it the funniest story about a scientist ever written. (Disagreements most welcome.) Of course, at that time, I imagined all scientists to be heroic characters, every one a genius—so the story was indeed all fiction. It seems less funny when I reread it as a struggling graduate student myself. :-) [Despite dropping out of school at the age of 14, Pohl has an excellent knowledge of science, and, even more amazingly, about science: he seems to write with the familiarity of an insider about the life of scientists, how science gets done, what goes on at conferences, the way papers are written... he is a bit cynical occasionally, but that's his job.]
In his introduction to the collection Day Million, Pohl offers the following pleasant description of science fiction. Writing in December 1969, he notes:
I put “science fiction” in quotes because I’m not always sure what that is, either. “Science fiction” is a poor name for a field of writing. It would be an uninspired one even if it were exact, and of course it is far from exact: there is a great deal of “science fiction” that doesn’t contain any science at all. (You will find some specimens herein.) But it is not entirely a misnomer, because just as “science” is a state of mind and a systems approach to inquiry rather than test tubes and facts, so “science fiction” is a way of writing stories. Harlow Shapley, talking of something else, once described this perspective as “the view from a distant star”. It is a look at the human race and all its affairs from outside.
One of the most popular sports at science-fiction gatherings is defining science fiction: it is that kind of story which deals with events that may happen, but as far as we know haven’t happened; it is that kind of story which takes some real event or trend and extrapolates it to its logical conclusions; it is that kind of story which would not exist if it were not for some central supposition which is based on scientific theory. Et cetera. I play this game as little as possible, because I am an inclusivist and try to avoid setting up barriers which might make me refrain from buying a story for a magazine or anthology I may be editing, or refrain from writing a story of my own, because it could be excluded by one of those barriers. But I do have a suggestion toward a definition, which seems to me attractive if only because it employs that favorite writer’s trick of standing a question on its head. It goes like this:
A science fiction story is that story which might really occur anywhere in space and time, except that stories of our own real world are a special and less imaginative kind of science fiction.
In those terms, Hamlet and War and Peace and Little Women are examples only of a subclass within the general framework of sf. For reasons of vanity as a science fiction writer, it gives me some pleasure to think that this is so. But vanity is not the only reason. Our world is but one of a very large number of planets—no one on Earth knows exactly how many there are, but a reasonably good guess puts it at 60 million or so—in our own galaxy, which in turn is but one of some hundreds of billions of galaxies in the universe. The events that Shakespeare and Tolstoi and Louisa May Alcott wrote about pertain to the history and customs of a certain kind of vertebrate, mammalian, carbon-based, two-sexed, air-breathing creature. We know a great deal about this species, and we can see how complex its societal and ecological systems are; but since they are the systems we move in, it is hard for us to see that they are the product of chance. Science fiction gives us the perspective that makes the job a little easier. Not always perfectly, in fact not always even very well, it does give us a look at our churches, politicians, addictions, morals, family relationships, vices and pleasures from the point of view of a frame of reference that takes none of them for granted.
When you think of how many millions of human beings have shot, stabbed, gassed, clubbed and burned other human beings because they thought their way of life was the uniquely best and proper one, it appears that this point of view could have saved us all a lot of heartburn over the centuries. It could save us some right now.
As I write, we are in the last days of the year in which human beings first walked on the surface of another world. It’s only the Moon. It’s really just our own back yard. There’s not much there to want, and little enough of even that worth the cost of hauling back to Earth.
But it’s a doorstep to the universe, and out there are many very wonderful things indeed, and to reach and master them we shall probably need all the wisdom and objectivity and freedom from parochial prejudice we can come by. We need them badly enough here on Earth, heaven knows, and if science fiction can help us attain these goals, it will have done more than a good many Messiahs.
Who said that?
One of my favourite pastimes obsessions is trying to find the correct attribution for quotes, phrases, stories, etc. [For example, “Premature optimization is the root of all evil” was said by Knuth, not Hoare; I haven't been able to track one Asimov quote despite a bit of looking, etc.]
Quite by coincidence, I found in the last hour three great webpages doing an impressive and thorough-looking (but alas, we’ll never know when something is thorough) job of it:
- Alan P. Scott trying to track down “Talking about music is like dancing about architecture”
- Martin Porter trying to track down “All that is necessary for the triumph of evil is that good men do nothing”. (It has so many variations so frequently quoted that A Bit of Fry and Laurie in Series 4 had “For evil to flourish, all that is required is for good men to spout clichés”.)
- Duen Hsi Yen on The Blind Men and the Elephant
There’s also a book by Ralph Keyes called The quote verifier: who said what, where, and when — looks great, must read.
If you have more examples, please let me know.
More examples:
- Jeffrey E.F. Friedl on ‘Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.’ (thanks to Karthik below)
- William J. Rapaport on Buffalo buffalo buffalo buffalo buffalo (it’s his own sentence, so perhaps it shouldn’t count)
Partial ones:
- Rachel Loden on “Prizes are for children” by Charles Ives
Extreme image compression: the Twitter challenge
If a picture is worth a 1000 words, how much of a picture can you fit in 140 characters?
Mario Klingemann (Quasimondo on Flickr) had a fascinating — call it crazy if you like — idea: can you encode an image such that it can be sent as a single Twitter message (“tweet”)? Twitter allows 140 characters, which seems like nothing. It’s pretty much guaranteed that you’ll be able to get nothing meaningful out of so few bits, right?
Well, he came up with this, using a bunch of clever tricks: using the full Unicode range for “characters” (Chinese, etc.) to squeeze a few more bits’ worth, representing colours as blends of just 8 colours (3 bits!), and arriving at a Voronoi triangulation through a genetic algorithm:
The one on the right is the real Mona Lisa, and the left one is what fits in 140 characters, specifically the message: “圑嘌婂搒孵怤實恄幖戰怴搝愩娻屗奊唀唭嚟帧啜徠山峔巰喜圂嗊埯廇嗕患嚵幇墥彫壛嶂壋悟声喿墰廚埽崙嫖嘵奰恛嬂啷婕媸姴嚥娐嗪嫤圣峈嬻尤囮愰啴屽嶍屽嶰寂喿嶐唥帑尸庠啞彐啯廂喪帄嗆怠嗙开唅恰唦慼啥憛幮悐喆悠喚忐嗳惐唔戠啹媊婼捐啸抃岖嗅怲幀嗈拀唹坭嵄彠喺悠單囏庰抂唋岰媮岬夣宐彋媀恦啼彐壔姩宔嬀”
This is pretty impressive, you’d think, for 140 characters. But it gets better. Brian Campbell started a contest on Stack Overflow, and some brilliant approaches turned up.
Boojum wrote a nanocrunch.cpp, based on fractal compression, which can do this (on the left is the original, for comparsion):
Sam Hocevar wrote img2twit, which segments the image into square cells and tries to randomly assign points and colours to them until something is close. It can do this:


img2twit by Sam Hocevar (250 bytes?)
You can watch a movie of the image evolving; it’s pretty cool!
There were also attempts at converting the image to a vector format and encoding that instead. Needless to say, it works well for vector-like images:

(almost perfect!)
but it’s hard to even convert some images to vector form:
by autotrace (before compression!)
Finally, this is how Dennis Lee’s record-holding “optimizing general-purpose losy image codec” DLI does:
Or if you want to be fair and compare at 250 bytes, here’s img2twit and DLI:
Amazing!
For silly amusement, you can read a liberal translation of the original message, or the Reddit thread with ASCII porn.
Disclaimer: I did not participate in any of this, and I know nothing about image compression, so no doubt there are errors in the above. Please point them out. All images are copyright the respective owners, and the quote in the first line is by Brian Campbell on Stack Overflow.
Reading aloud
There’s this poem, which you can read comfortably but trying to read which aloud is torture:
I take it you already know,
Of tough and bough and cough and dough.
Others may stumble, but not you,
On hiccough, thorough, laugh and through.
Well done! And now you wish, perhaps,
To learn of less familiar traps.Beware of heard, a dreadful word,
That looks like beard and sounds like bird.
And dead: it’s said like bed, not bead —
For goodness’ sake, don’t call it ‘deed’!
Watch out for meat and great and threat,
(They rhyme with suite and straight and debt).A moth is not a moth in mother,
Nor both in bother, broth in brother.
And here is not a match for there,
Nor dear and fear for bear and pear.
And then there’s dose and rose and lose –
Just look them up – and goose and choose.
And cork and work and card and ward,
And font and front and word and sword.And do and go and thwart and cart –
Come, come, I’ve hardly made a start!A dreadful language? Why man alive!
I’d mastered it when I was five.
Alternative last verse:
A dreadful language? Why, man alive!
I’d learned to talk it when I was five.
And yet to write it, the more I tried,
I hadn’t learned it at fifty-five.
So this poem is about spelling not corresponding to pronunciation and vice-versa. Wikipedia cites it as “From a letter published in the London Sunday Times in 1965 [...] The author was only listed by T.S.W.”, but it’s at least as old as 1961, possibly much older.
The other poem is called The Chaos, and it’s by the Dutch teacher Gerard Nolst Trenité, illustrating how impossible it is to deduce pronunciation from spelling. It makes you doubt the pronunciation of many words you think you know. :-) He first published it in 1920, with 164 lines, and revised it many times until his death in 1946 (274 lines). It’s quite painful to read, so skim when it gets unbearable and save the rest for another sitting. Prof. David Madore has a version here, with the first few verses in IPA for AmE and BrE. What follows is a random excerpt only!
Dearest creature in creation
Studying English pronunciation,
I will teach you in my verse
Sounds like corpse, corps, horse and worse.
I will keep you, Susy, busy,
Make your head with heat grow dizzy;
Tear in eye, your dress you’ll tear;
Queer, fair seer, hear my prayer.
[...]
Sword and sward, retain and Britain
(Mind the latter how it’s written).
Made has not the sound of bade,
Say—said, pay—paid, laid but plaid.
Now I surely will not plague you
With such words as vague and ague,
But be careful how you speak,
Say: gush, bush, steak, streak, break, bleak,
[...]
Say, expecting fraud and trickery:
Daughter, laughter and Terpsichore,
Branch, ranch, measles, topsails, aisles,
Missiles, similes, reviles.
[...]
Billet does not end like ballet;
Bouquet, wallet, mallet, chalet.
Blood and flood are not like food,
Nor is mould like should and would.
[...]
Liberty, library, heave and heaven,
Rachel, loch, moustache, eleven.
We say hallowed, but allowed,
People, leopard, towed but vowed.
[...]
Stranger does not rhyme with anger,
Neither does devour with clangour.
Pilot, pivot, gaunt, but aunt,
Font, front, wont, want, grand and grant.
[...]
Say inveigh, neigh, but inveigle,
Make the latter rhyme with eagle.
Mind! Meandering but mean,
Valentine and magazine.
[...]
Don’t be down, my own, but rough it,
And distinguish buffet, buffet;
Brood, stood, roof, rook, school, wool, boon,
Worcester, Boleyn, to impugn.
[...]
Nor are proper names included,
Though I often heard, as you did,
Funny rhymes to unicorn,
Yes, you know them, Vaughan and Strachan.
[...]
Please don’t monkey with the geyser,
Don’t peel ‘taters with my razor,
Rather say in accents pure:
Nature, stature and mature.
[...]
Though the difference seems little,
We say actual, but victual,
Seat, sweat, chaste, caste, Leigh, eight, height,
Put, nut, granite, and unite.
[...]
Say aver, but ever, fever,
Neither, leisure, skein, receiver.
Never guess—it is not safe,
We say calves, valves, half, but Ralf.
Starry, granary, canary,
Crevice, but device, and eyrie,
Face, but preface, then grimace,
Phlegm, phlegmatic, ass, glass, bass.
[...]
Mind the O of off and often
Which may be pronounced as orphan,
With the sound of saw and sauce;
Also soft, lost, cloth and cross.
Pudding, puddle, putting. Putting?
Yes: at golf it rhymes with shutting.
Respite, spite, consent, resent.
Liable, but Parliament.
Seven is right, but so is even,
Hyphen, roughen, nephew, Stephen,
Monkey, donkey, clerk and jerk,
Asp, grasp, wasp, demesne, cork, work.
[...]
Pronunciation—think of Psyche!—
Is a paling, stout and spiky.
Won’t it make you lose your wits
Writing groats and saying ‘grits’?
It’s a dark abyss or tunnel
Strewn with stones like rowlock, gunwale,
Islington, and Isle of Wight,
Housewife, verdict and indict.
Don’t you think so, reader, rather,
Saying lather, bather, father?
Finally, which rhymes with enough,
Though, through, bough, cough, hough, sough, tough?
Hiccough has the sound of sup.
My advice is: GIVE IT UP!
There’s another version here. More poems here.
All of which reminds me of the following (true) story about reading aloud. In the 4th century, where apparently it was common practice for everyone to read aloud, St. Augustine encountered a man (Bishop Ambrose) who read silently! He didn’t even move his lips! You couldn’t hear his voice while reading even if you stood very close to him! As Augustine reports (and it’s a matter of debate whether in amazement or in distaste):
When he read, his eyes scanned the page and his heart sought out the meaning, but his voice was silent and his tongue was still.
(Might want to take a look at this chapter from Alberto Manguel’s A History of Reading.)
Finally, if I may rant again about spelling pronunciation: the character ~ is written “tilde”, but I wish people would stop calling it “till-day” or “tilled”! It is pronounced “til-duh”, as in the Australian ballad: “Waltzing Ma~, Waltzing Ma~…” or the name of the actress ~ Swinton (literally?)
TODO: Read about “the very notion of silent, individualized reading is scarcely known prior to the advent of the printing press (Goody and Watt: 42)” That’s Goody, Jack, and Watt, Ian, 1968, “The Consequences of Literacy.” In Literacy in Traditional Societies, edited by Jack Goody, pp. 27-68. Cambridge University Press. This is from Thomas Coburn, “Scripture” in India: Towards a Typology of the Word in Hindu Life, p.437. He goes on:
there has never been a happy marriage between the holy words of India, composed and transmitted orally, and the writing process. Particularly in contrast with, say, China, scribes in India have been of low social standing (Lancaster: 224-25), and the very act of writing was held to be ritually polluting: a late “Vedic text, the Aitareya Aranyaka (5.5.3) states that a pupil should not recite the Veda after he has eaten meat, seen blood or a dead body, had intercourse or engaged in writing” (Staal, 1979:122-23). The profoundly spoken character of India’s holy words is a matter on which we will reflect below, but for the moment it will suffice to note that we should not be misled by the fact that most of these words have eventually found their way onto the written or printed page. This is not their primary home, and Staal is not simply being mischievous in discerning a symbolic significance to the fact that Indian books “still tend to fall apart” (1979:123).
mplayer: changing speed without changing pitch (avoiding the chipmunk effect)
In mplayer, you can change the playback speed with [ or ], but that probably changes the pitch as well (naturally). Can be amusing the first time, but not after you realise that it is actually possible to do something sophisticated to avoid this. (Wikipedia calls it Audio timescale-pitch modification) I’ve heard Windows Media Player(?) can do this automatically (is this true?), here’s how to do it in mplayer.
Short answer:
Start mplayer as mplayer -af scaletempo
That’s it. The catch is that you need to get an mplayer which has the scaletempo filter, and we know how much the mplayer project loves making releases. (It’s not in Ubuntu at the time of writing.)
So, either
Get such an mplayer
e.g the deb from Sourceforge (here),
or
Start mplayer as mplayer -speed 1.5 -af ladspa=tap_pitch:tap_pitch:0:-33:-90:0 foo.avi
Seems even the latter might require installing the ladspa plugins.
For more on all this, see:
- blog comments (with patches) at Pitch-Correct Play Speed with MPlayer
- Change MPlayer Playback Speed
- Mplayer FAQ: “How do i change mplayer speed but keep pitch the same?”
First thoughts on Google Wave
Just saw the demo for Google Wave. It’s impressive and ambitious. It’s hard to describe, but it’s a collaborative real-time thing (think Google Docs for everything) that can work like email, IM, blogs, forums, whatever you want — and can be embedded into, or integrates with, apparently everything: Orkut, Blogger, Google Maps, Google Code (the bug tracker), Twitter, etc. (They’ve already fulfilled the annoying-word requirement, by creating “twave”.)
They say it’s a “product, platform and protocol”.
I can see myself using this. (And thinking of the privacy implications (or the having-your-data-out-there-in-the-cloud-somewhere implications), it’s bloody scary.)
They’ve got pretty amazing sync. Search results and messages get updated in real time character-by-character, and the latter seems to make people cheer as if they’ve never seen good old talk.
Finally someone had the “playback” idea I have been trying to propose for years. (I was calling it the “undo bar” or “edit history bar”, or more recently “Time Machine for Emacs”, but whatever.) You can “play back” the edit history of a document (“wave”), seeing what changes each person made and in what order, and when the “wave” is a chess game, you can play back the chess game. Perfect.
They variously say it will be open-sourced, or that “a lion’s share of the code” will be open-sourced, but let’s hold off believing that until we see it. It’s extensible, so you can add your plugins to it. It’s a protocol, so you can write your own implementations of it. It’s a platform, so you can run it on your own servers. Now someone add a LaTeX compiler to it, and collaborative work with LaTeX will finally be possible.
If you have 80 minutes to spare, here’s the video, or an article at TechCrunch.
Giving credit
V. I. Arnold, On teaching mathematics:
What is a group? Algebraists teach that this is supposedly a set with two operations that satisfy a load of easily-forgettable axioms. This definition provokes a natural protest: why would any sensible person need such pairs of operations? [...]
What is a smooth manifold? In a recent American book I read that Poincaré was not acquainted with this (introduced by himself) notion and that the “modern” definition was only given by Veblen in the late 1920s: a manifold is a topological space which satisfies a long series of axioms.
For what sins must students try and find their way through all these twists and turns? Actually, in Poincaré’s Analysis Situs there is an absolutely clear definition of a smooth manifold which is much more useful than the “abstract” one.
(Interesting talk, do read.)
Meanwhile…
Bill Poser at the Language Log:
Sir William Jones is incorrectly viewed as the discoverer of the Indo-European language family and founder of modern historical linguistics [...]
The second and more important point is that Jones cannot be considered the founder of modern historical linguistics because he did not use the comparative method, the crucial innovation that distinguishes modern historical linguistics from its predecessors.
Sigh. Let’s not forget people who actually caused us to perceive the world differently, and leave it to pedantic types to define who invented what.
Read the rest of this entry »
Music and lyrics
I attended a talk today by Adriano Garsia, which was part of the MIT combinatorics seminar. It was called “A New Recursion in the Theory of Macdonald Polynomials”, and while I didn’t know what Macdonald polynomials were, I went to the talk anyway, because I like polynomials and I like recursion and I like combinatorics (but primarily because it was a way of procrastinating). :-)
Even though I understood almost nothing of the deep mathematics in the talk (and still don’t exactly know what Macdonald polynomials are), it was a very pleasant and refreshing talk, and I felt very good after hearing it. The reason is that it had, of all the talks I’ve attended in recent memory, probably the best “music”. What does that mean? As Prof. Doron Zeilberger invented the term:
Human beings have bodies and souls. Computers have hardware and software, and math talks have lyrics and music. Most math talks have very hard-to-follow lyrics, [...]
But like a good song, and a good opera, you can still enjoy it if the music is good. The “music” in a math talk is the speaker’s enthusiasm, body-language, and off-the-cuff heuristic explanations.
Sometimes you can recognize a familiar word, and relate it to something of your own experience, whether or not the meaning that you attribute to it is what the speaker meant, and this can also enhance your enjoyment.
(read more at Zeilberger’s Opinion 78)
And so it was with this talk. Prof. Garsia clearly loved the subject, and even someone like me who had no idea what’s going on felt compelled to listen, fascinated. He told us how the problem came about (“long relationship with Jim Haglund: he makes brilliant conjectures and I prove them”), of false proofs they had had, of how their current proof was driven by heuristics and unproven conjectures, he even posed a problem and offered a $100 reward for an elementary/combinatorial proof. :-)
Far better than the talks with bad music and bad lyrics. (It also helped that although I couldn’t understand the lyrics, they sounded nice: permutations, Young tableaux, polynomials defined in terms of them…)
Edit: See also the recent research ’showing’ that gestures help students learn mathematics.
Convex and concave
A mnemonic for ‘convex’ and ‘concave’:

A convex function

A conCAVE function
Two mnemonics are better than one.
Good Will Hunting: a mathematician’s review
Good Will Hunting, reviewed by Mark E. Saul in the Notices of the American Mathematical Society, April 1998. (The most interesting part is Daniel Kleitman’s box on “My Career in the Movies”; also, please read the book review of The Curious Incident of the Dog in the Night-time if you’ve read the book.)
It feels very good to read the Notices. All its issues since 1995 are available online.
“Every good theorem must have a good counterexample”
Abhyankar[1] attributes the quote to Severi.
[1]: Historical Ramblings in Algebraic Geometry and Related Algebra, Shreeram S. Abhyankar, The American Mathematical Monthly, Vol. 83, No. 6 (Jun. – Jul., 1976), pp. 409-448. Also available here, because it won a Lester R. Ford Award (“articles of expository excellence”) and also a Chauvenet Prize (“the highest award for mathematical expository writing”).
Abhyankar, after distinguishing between the flavours of “high-school algebra” (polynomials, power series), “college algebra” (rings, fields, ideals) and “university algebra” (functors, homological algebra) goes on to present his fundamental thesis (“obviously a partisan claim”):
The method of high-school algebra is powerful, beautiful and accessible. So let us not be overwhelmed by the groups-ring-fields or the functorial arrows of the other two algebras and thereby lose sight of the power of the explicit algorithmic processes given to us by Newton, Tschirnhausen, Kronecker, and Sylvester.
Perhaps for this reason, Dr. Z calls Abhyankar (“one of my great heroes”) “the modern prophet of high-school-algebra”.
Anyway, enough rambling. Back to “Every good theorem must have a good counterexample”. Discuss.
[Edited to add: The statement in its original context was referring to a phenomenon where a pleasing conjecture is found to have counterexamples, until it is resolved by realising that we must, say, count multiplicities the "right" way—the right way turning out to be whatever makes the conjecture true. Thus Bezout's theorem, etc., and the quote just means, as he paraphrases, "don't be deterred if your formula is presently invalid in some cases; it only means that you have not yet completely deciphered god's mind". On the other hand, what I (mis?)remembered was that one must know "counterexamples" to a theorem in the sense that one must know why the conclusion is not true if the hypotheses are weakened: thus one doesn't really understand a theorem till one knows at least one “counterexample” (and at least two proofs).]


![Boojum-dec by Boojum [490 bytes]](http://shreevatsa.files.wordpress.com/2009/05/boojum-dec.png?w=227&h=343)

