# The Lumber Room

"Consign them to dust and damp by way of preserving them"

## Proverbs from China and India (possibly)

with one comment

(Reposting from G+ for posterity)

I came across this 1907 book by Arthur Guiterman (who was previously encountered here), titled “Betel Nuts: or What They Say in Hindustan”, in which he claims to have collected proverbs and sayings “gleaned in Bengal, in the Punjab, in Rajputana, and even among the mountains of Kashmir and Afghanistan”.

I write “claims”, because the practice was rampant, at the time, to write random things and attribute them to various exotic peoples. Nevertheless, many of these look like genuine proverbs from the region. He writes:

These proverbs, and hundreds like them, are ever in the mouths of the people of Hindustan, giving spice and color to their speech even as the Betel Nut—the chewing-gum of the Orient—spices the breath and reddens the lips of the folks of the bazaars. Many of them are more than proverbs: they are really condensations of shrewd, pithy stories illustrative of native life in its varied phases—stories so well known that the repetition of a couplet containing the point conveys the whole tale to the mind of the hearer. It is literature in shorthand.

This is a good description of the way proverbs and other sayings are used in India. (See Sadāsvāda post on nyāya-s.)

Of the verses in the collection, some are still good sayings (helped by the rhyme), some are recognizable from subhāṣita collections or real Indian proverbs, some are dull in English but evoke the possibility of having been something pithy in the original, and some are interesting only for what they may say about a (possibly fictional) culture that may have had such proverbs.

In a second book, published in 1920 when the first book was out of print, he reproduces these with a few more added (some lightly modified), along with a section titled “Chips of Jade: or What They Say in China”, containing proverbs putatively from China.

Some samples below, from both “Betel Nuts” and “Chips of Jade”. Each verse is independent.

## Betel Nuts, or What They Say in Hindustan

God ripes the mangoes,
The Farmer shakes the tree:
God cures the patient,
The Doctor takes the fee.

Now hear the words the Brahman said:
“The Lion’s Mane, the Miser’s Hoard,
The Serpent’s Fang, the Brave Man’s Sword,
Ye may obtain — when they are dead.”

Three were invited — here come Nine!
Water the porridge; all shall dine.

He laughed derision when his Foes
Against him cast, each man, a Stone:
His Friend in anger flung a Rose —
And all the City heard him groan.

They toil not, but decry their bread.
They fight not, they defame the Dead.

The Goat gave up her life; ’twas not enough.
The Eater grumbles that the meat is tough.

A Day or a Minute? a Year or a Moon?—
Now, which does he mean when he says, “Pretty soon!”

Thou lackest, O Shirker,
Though long thou hast prayed?
Know, God’s a Good Worker,
But loves to have Aid.

Buy not, like a hapless Dunce,
Gauds unworth the Keeping.
“Dear,” O Sahib, weeps but once;
“Cheap” is always weeping.

Liars died in Days of Old;
Now, they never catch a Cold!

The Chiefs that Peasants choose by Lot
They will not be afraid of.
The Idol-carver worships not;
He knows what Gods are made of.

The Goat made friends with the Grass and Wheat;
Now what, oh, what may the poor Goat eat?

Smooth Flatterers have done much wrong
For which the World is paying.
If none had praised the Donkey’s Song
He would not still be braying.

Small Ills are the Fountains
Of most of our Groans.
Men trip not on Mountains,
They stumble on Stones.

“My Beard is burning!” one will cry.
Another lights his Pipe thereby.

“My Wisdom aids the World!”— How sweet
That Secret Thought of Great and Small!
The Sea-gull sleeps with Upturned Feet
To catch the Sky when that shall fall.

I hurled the Missile: With Edge unstained
The Shard returned to its Parent Clay;
The Birds, all clamoring, whirred away;
The Sin of Seeking to Kill remained.

“O Allah, take me!” prayed Ram Chunder.
Above him crashed and rolled the thunder.
“Not now!” he cried in fright and sorrow.
“Not now O Lord! — I meant tomorrow!”

[^”Allah” changed to “Shiva” in second book!]

The Tiger came! She slew him
And dragged him from the House
And down the Drain she threw him; —
And yet, she fears a Mouse!

Avoid Suspicion: When you’re walking through

If You suspect him,
Then Reject him.
If you Select him,
Don’t Suspect him.

A Demon, sick of Single Life,
In Lanka wed a Monkey Wife;
And thence arose, by Heaven’s Grace
(Lal Das declares), the English Race.

“Who cooked this Rice?”
“Not I! — that Worthless Hound!”
“’Tis very nice.”
“Why—yes—I stirred it round!”

Ben Ali, Ram Chunder and Yussuf are tall,
But the Man with the Club is the Lord of them all.

A Queen are you and a Queen am I, —
But who will spread the Clothes to dry?

A Shower of Honey on a Sugar Shed
Is shamed by Speech of Lovers newly wed.

“O Allah,” prays the Cat in hungry Zeal,
“Send Blindness on my Lord, that I may steal!”
“O Allah,” prays the Dog, “endow with Meat
My Lord, who, being filled, shall bid me eat!”

Lal Mir’s Cat is grown too fat
To hunt her Prey and snatch it.
A Mouse she saw and waved her Paw
To bid her Master catch it.

“He has killed a Thousand Men!”
“Ah? he’s Half a Doctor, then.”

The Donkey turns a hungry Eye
Upon the Fields all bare and dry;
Then waxes fat, the Happy Ass,
To think he’s eaten all that Grass!

The Comb was the Bee’s,
But by Man it is eaten.
The Sin was the Flea’s,
But the Bedding is beaten.

I’ve found my Knife, but where are you, O Hound!
When I find you, my Knife can not be found!

[^ Occurs in some Subhashita collection: stone]

The Rains have come! The Rice-blades spring!
The Farmer cares not who is King!

The eager Fish
Repent within the Net.
Young Lovers wish,
And Married Men regret.

Death took him off
But cured his Cough.

My Love departs with Dawning Light,
Mine Eyes are dark with Sorrow.
I pray thee, Lord, make such a Night
That there shall be no Morrow!

The Farmer prays for Rain,
The Washerman for Sun.
If Prayers were not in vain,
The World would be undone.

These Letters Black are Seeds, the which my Pen
In Snow white Furrows diligently sows;
The Harvest shall be reaped by other Men,
But what shall be that Harvest, Heaven knows.

The donkey to the camel said,
The camel to the donkey said,

[^ occurs somewhere: …aho rūpam…]

My lord, when called “My Lord!” will duly come.
‘Tis thus I keep “my lord” beneath my thumb.

At Men of Deeds are jealous slanders thrown,
As Stones are cast at Fruitful Trees alone.

Four things in Stubbornness all else surpass:
A Child, a King, a Woman and an Ass.

By diverse Yearnings torn and tried.
Poor Men grow ever thinner:
The Bridegroom longs to see the Bride,
The Guests to see the Dinner.

“Yes,” says the Man; “Yes,” says the Woman, too;
And what can Judge, or Priest, or Sultan do?

A Man may greet his Friends with honeyed Tongue,
And yet in Trade be hard and cold as Ice.
The Cat has Gentle Teeth to hold her Young,
But very Different Teeth for catching Mice.

They that challenge Danger, bring
On themselves disastrous Force:
Do not stand Before the King,
Do not stand Behind the Horse.

[^I’ve heard “ಅರಸನ ಮುಂದಿರಬೇಡ, ಕತ್ತೆಯ ಹಿಂದಿರಬೇಡ” but https://kn.wikipedia.org/wiki/ಗಾದೆ / https://kn.wikiquote.org/wiki/ಗಾದೆಗಳು have “ಅರಮನೆಯ ಮುಂದಿರಬೇಡ, ಕುದರೆಯ ಹಿಂದಿರಬೇಡ”.]

The Bitter Gourd I planted where Sago Heaps had lain,
With Treacle-drops and Honey I drenched the Little Hill;
I trained the Leafy Tendrils on rods of Sugar Cane;
But when the Fruit had ripened, alas! ’twas Bitter still!

What Culprit fails to urge the Plea
That there are Others Worse than He?

## Chips of Jade, or What They Say in China

Eight Sailors; Seven want to steer.
That Junk won’t come to Port, I fear.

Within the Home where fewer Servants dwell,
With greater Speed the Daily Work is done:
One Man will bring Two Buckets from the Well;
Two Men, between them both, will carry One.

The Starveling Cat maintains the Firm Belief
That every Well-fed Cat must be a Thief.

It somewhat soothes the Bankrupt’s woe
To talk of Debts that Others owe.

Two Friends have I — True Friends, I know;
But which a Deeper Love discloses?
This, brings me Coals in Winter’s Snow,
While That, in Summer, brings me Roses.

Though the Doctor is sure
As his Charges are high.
He whom Medicines cure
Was not Fated to Die.

If Right, though Right without a Flaw
Is _All_ you have, don’t go to Law.

Fear not lest Men say Evil Things of you.
But fear to do the Ill they say you do.

This One Makes a Net,
That One stands and wishes;
Would you like to bet
Which One gets the Fishes?

Words are Wind in Empty Space;
Writing leaves a Lasting Trace.

Defame a Man of Energy, and soon
The Mob will echo, mingling Truth and Lie.
Let one lone Mangy Mongrel bay the Moon,
And all the Village Curs will swell the Cry.

Still leagues on leagues the Great Wall stretches on,
But where has Shi Hwang-ti, who built it, gone?

Search thrice thy Heart and thrice thy Soul again;
Thus shalt thou know the Minds of Other Men.

In Talk he’s a Wonder,
But Small are his Gains.
How loud is the thunder!
How little it Rains!

The Petty Rascal’s Fetters clank;
The Wholesale Robber starts a Bank.

Shall I, grasping, gather Wealth and breed it —
For my Children jealously conserve it?
Should my Sons surpass me, they won’t need it;
Should they not, why then, they won’t deserve it.

The Boy may plan to fly his Kite,
The Man to cut his Hay;
But Old North Wind comes up at night
And blows their Plans away.

Recorded Words are Fetters;
When Angry, don’t write Letters.

You “Nearly Did it”? That’s your loss.
I’ll pay you just the Fare
Due him that rowed me half across
The Stream — and left me there!

The Heron sought to sup his fill
Upon the Clam, who caught his bill
And held him fast, till, nothing loath,
The Hungry Fisher bagged them Both.

Untrained is he that hath not seen
The World’s Rough Face in Sun and Shower,
That hath not shared the Fat and Lean,
That hath not tasted Sweet and Sour,
And known the Foul, but loved the Clean,
And felt the Thorn, yet plucked the Flower.

Fame is the Dew on the Jasmine Stalk,
Fame is the Scream of a passing Hawk,
Fame is the Foam of the Vessel’s Keel,
Fame is a dying Thunder Peal,
Fame is the Scent on the Mountain Moss
Left when the Musk Deer bounds across.

The Arrow’s on the String,
The supple Bow is bent;
My Hand must do that Thing
For which my Life was lent.

When, wrapped in Flame, your Home’s a blackened Shell,
‘Tis growing rather late to Dig a Well.

[^ I think this is in a subhashita collection too]

Your Acres teem with Rice; — but still
A Pint a Day is all you eat.
Your House is wide; the Space you fill
Therein is hardly Seven Feet.

Her Fragrance proved by every Breeze that blows,
What need is there of Words to praise the Rose?

Fish see the Bait alone; and is it stranger
That Men should see the Profit, not the Danger?

Up, Farmer! Toil
While Dawn is hazy!
The Good Brown Soil
Is never lazy.

One Kind Word keeps the Heart aglow
Through Three Long Months of Ice and Snow.

When Drinking Water, bless the Parent Rill;
When Eating, thank the Plow that broke the Clod;
When Donning Garments, praise the Weaver’s Skill;
With every Breath He gives, remember God.

The Monkey jeers; such odd Mistakes
In Weaving Sticks, the Pigeon makes!
But while the Monkey has his Jest,
The Pigeon learns to Build a Nest.

A Word has stolen in and bred a Doubt;
Ten Thousand Oxen cannot drag it out.

Ride within or carry the Sedan,
What’s the difference? — Are you not a Man?

The Monastery near
The Nunnery is set;
There’s nothing wrong or queer
In that, of course — and yet —

Written by S

Wed, 2016-12-28 at 14:48:57

Posted in Uncategorized

## Science

Written by S

Sun, 2015-08-23 at 15:54:35

Posted in Uncategorized

## Printing floating-point numbers

Everyone knows that floating-point numbers, being discrete, cannot possibly exactly represent every real number. In particular, the usual binary (IEEE 754) floating point numbers cannot even exactly store all numbers exactly representable in decimal (e.g. 0.3 or 0.1, which are not dyadic rationals).

Just because the number stored internally is not 0.1 but the closest approximation to it (say as 0.100000001490116119384765625) doesn’t mean it should be printed as a long string, when “0.1” means exactly the same number.

This is a solved problem since 1990.

TODO: Write rest of this post.

Bryan O’Sullivan (of Real World Haskell fame):

Steel & White paper How to Print Floating-Point Numbers Accurately: https://lists.nongnu.org/archive/html/gcl-devel/2012-10/pdfkieTlklRzN.pdf

Their retrospective: http://grouper.ieee.org/groups/754/email/pdfq3pavhBfih.pdf

Burger & Dybvig:

Click to access FP-Printing-PLDI96.pdf

Florian Loitsch:

Click to access printf.pdf

Russ Cox: http://research.swtch.com/ftoa

Edit (Thanks Soma!): Printing Floating-Point Numbers: A Faster, Always Correct Method from POPL’16. Revised to Printing Floating-Point Numbers: An Always Correct Method (see github).

Edit: An example in a programming language. Even though this is a problem solved since 1990 (albeit with developments until this year 2016), even Python until 2.6 had suboptimal printing of floating-point numbers, e.g. it would print float(‘2.2’) as ‘2.2000000000000002’. It was fixed only in Python 2.7. See https://docs.python.org/2/whatsnew/2.7.html#python-3-1-features and https://docs.python.org/3/whatsnew/2.7.html#other-language-changes (specifically https://bugs.python.org/issue7117 and discussion at https://mail.python.org/pipermail/python-dev/2009-October/092958.html).

Written by S

Wed, 2015-04-01 at 16:50:47

Posted in Uncategorized

These used to be ubiquitous a while ago (IIRC, I used to carry one of these daily to school as my lunch basket at some point; we still have one such basket at home), but photos seem hard to find on the internet (or I’m just missing the right keywords). So, photos:

Poorani Ammal, Copyright R Revathi / Mylapore Times

Written by S

Sun, 2013-04-07 at 00:14:29

Posted in Uncategorized

## Kashmir

Anandavardhana.
Abhinavagupta.
Bhatta Nayaka, Jayanta Bhatta, Sriharsha, Kshemendra, Somadeva, Mammata, Kuntaka, Rudrata, Ruyyaka, Bilhana, Kshemaraja, Kalhana, Jonaraja, Kallata, Kayyata, Mahima Bhatta, Vasugupta, Amaru(?), Damodaragupta, Vamana, Udbhata, Utpala, …
[Many more names to fill here.]

Some have even sought to assign Kalidasa to Kashmir, on no grounds stronger than that he was good at what he did!

Not for nothing is शारदा देवी called काश्मीर-पुरवासिनी.

Written by S

Wed, 2012-03-21 at 22:27:45

Posted in Uncategorized

## People, Pens, Paper, and Computers

(A post from November 2008 that had been marked private for some reason.)

Attended a talk today that was part of the HCI (Human-Computer Interaction) Seminar Series at MIT CSAIL. Some very exciting stuff.

For several decades now (say, since the Xerox Star was introduced in 1981) there have been dreams and hype of the “paperless office”. This dream has not been realised, because paper has many great qualities that suggest that it is not going to go anywhere. In many ways, technologies that have been touted to replace paper have proved rather cumbersome. Somewhat like writing like this:

Pencil encumbered with brick

Some recent technologies that keep the dream alive are the Tablet PC and (new to me) the Anoto (etc.) digital pens that work in conjunction with digital paper (just normal paper printed with a pattern, not “electronic paper”). I played for a few seconds with Livescribe‘s “Pulse Smartpen”, but it was after the talk so I didn’t have much time. Here is a video of all that it can do.

People prefer paper. There have been two lines of work — trying to produce paper-like technology and trying to improve integration between paper and the PC.

I guess both the tablet PC and Livescribe-like technologies fall into the former category. For the Tablet PC, he described a model of interaction that (with a pen) is more natural than the point-and-click model: crossing. The idea is that instead of actions being performed when a target on the screen is clicked upon, actions are performed when targets are crossed across. It is claimed that crossing-based interface is at least as fast as point-and-click, and is faster when you require only “approximate” crossing, and it is possible to change all your applications to work with crossing instead by simply changing a system DLL. He showed a crossing-based drawing application called CrossY; see the video.

Then he showed another work called PapierCraft, which fits into the other line of work. The insight is that although people prefer to read and annotate on paper, they usually get them in digital form. The common example is that academics download an article, then print it out, and work with the printed copy, making annotations etc. The idea is to keep in a database an image of what the printed copy looks like, and then consider people to be working on the digital copy with the printed copy as a proxy for it — when they perform annotations, cut-copy-paste etc., link those operations to the digital copy. See video.

He also showed some two-display e-book readers that can emulate flipping pages, working with different documents, etc; see video.

The speaker was François Guimbretière; see his page for more details. All very cool stuff.

Written by S

Fri, 2011-01-14 at 01:44:21

Posted in Uncategorized

Design is hard. Don Norman, author of the wonderful book The Design of Everyday Things (written in 1988 and still a classic!) asked a question in the first five minutes of a recent talk:

Imagine you’re on the first slide of your powerpoint presentation and want to move to the next slide. Your remote control has two buttons. They are unmarked, but one button points up and one button points down.

Which button do you press?

It turns out that half the people would press up, half the people would press down, and everybody thinks their choice is obvious.

Even in cases where most of us get it right (like elevators), some are still confused. So it is easy to make mistakes, especially when designing the interface to a complex system. But it takes a special genius to take something simple and make it confusing:

Do the arrows describe the buttons beside them?

(from Stack Overflow.)

Written by S

Tue, 2010-06-29 at 01:03:27

Posted in Uncategorized

Bunch of people making the same point (of course we knew it already and didn’t need to wait for the iPad, but the iPad is the harbinger of the coming gloom):

Of course, we always knew this was going to happen, and I have seen people before my time talk about PEEK and POKE on their Commodore 64s, but still…

Written by S

Tue, 2010-02-09 at 22:03:44

Posted in Uncategorized

## Mastermind

Surely the most brilliant sketch ever, if not the funniest:

It’s from the BBC show The Two Ronnies, by Ronnie Barker and Ronnie Corbett. It’s probably their most famous sketch after Four Candles.
Read the rest of this entry »

Written by S

Sun, 2010-02-07 at 18:51:26

Posted in entertainment, Uncategorized

Tagged with , ,

## Portrait of the “lazy” student

[I had some thoughts, but I didn’t write anything here and this turned into one of those drafts lost in time. At least it’s a dump of two links for now.]

Found today Doron Zeilberger’s What About “Quarter Einsteins”?, written in 1967 (emphasis mine):

There is yet another kind of talented students, whose natural curiosity lead them, already from a young age, to read and look at more advanced material, in order to satisfy their natural curiosity.

When such a student enters high school (and in fact, already in the higher grades of elementary school) he sees that the material that he has already studied on his own presented in a different way. The learning is induced through severe disciple (all the system of examinations and grades), and the material is taught the same way as in animal training. The fascinating science of Chemistry turns into a boring list of dry formulas, that he has to learn by heart, and the threats and the incentives practiced in school badly offend him. As though out of spite, he does not listen to the commands of his teachers, but instead studies on his own material that is not included in the curriculum. Obviously, even the most talented student can not learn from just sitting in class, (and even during class he often studies other material), and so starts the “tragedy” described in your article.

[…]

[Einstein] managed somehow to find his way in life (but it wasn’t easy, even for him). But besides him there are “half and quarter Einsteins”, and just plain talented students that had the potential to contribute to society, but […] flunked out of high school and their “genius” did not help them find their proper place in modern society […].

Mark Tarver wrote a post in 2006 called the The Bipolar Lisp Programmer, which many readers found to be a frighteningly accurate description. (Reproduced below.) Again, please ignore the remarks about “outstanding brilliance” etc. That is not the point; the point is the tragedy of talented (even if only very moderately so) students failing to cope with the system.

The Bipolar Lisp Programmer

Any lecturer who serves his time will probably graduate hundreds, if not thousands of students. Mostly they merge into a blur; like those paintings of crowd scenes where the leading faces are clearly picked out and the rest just have iconic representations. This anonymity can be embarrassing when some past student hails you by name and you really haven’t got the foggiest idea of who he or she is. It both nice to be remembered and also toe curlingly embarrassing to admit that you cannot recognise who you are talking to.

But some faces you do remember; students who did a project under you. Also two other categories – the very good and the very bad. Brilliance and abject failure both stick in the mind. And one of the oddest things, and really why I’m writing this short essay, is that there are some students who actually fall into both camps. Here’s another confession. I’ve always liked these students and had a strong sympathy for them.

Now abject failure is nothing new in life. Quite often I’ve had students who have failed miserably for no other reason than they had very little ability. This is nothing new. What is new is that in the UK, we now graduate a lot of students like that. But, hey, that’s a different story and I’m not going down that route.

No I want to look at the brilliant failures. Because brilliance amd failure are so often mixed together and our initial reaction is it shouldn’t be. But it happens and it happens a lot. Why?

Well, to understand that, we have to go back before university. Lets go back to high school and look at a brilliant failure in the making. Those of you who have seen the film “Donnie Darko” will know exactly the kind of student I’m talking about. But if you haven’t, don’t worry, because you’ll soon recognise the kind of person I’m talking about. Almost every high school has one every other year or so.

Generally what we’re talking about here is a student of outstanding brilliance. Someone who is used to acing most of his assignments; of doing things at the last minute but still doing pretty well at them. At some level he doesn’t take the whole shebang all that seriously; because, when you get down to it, a lot of the rules at school are pretty damned stupid. In fact a lot of the things in our world don’t make a lot of sense, if you really look at them with a fresh mind. And generally our man does have a fresh mind and a very sharp one.

So we have two aspects to this guy; intellectual acuteness and not taking things seriously. The not taking things seriously goes with finding it all pretty easy and a bit dull. But also it goes with realising that a lot of human activity is really pretty pointless, and when you realise that and internalise it then you become cynical and also a bit sad – because you yourself are caught up in this machine and you have to play along if you want to get on. Teenagers are really good at spotting this kind of phony nonsense. Its also the seed of an illness; a melancholia that can deepen in later life into full blown depression.

Another feature about this guy is his low threshold of boredom. He’ll pick up on a task and work frantically at it, accomplishing wonders in a short time and then get bored and drop it before its properly finished. He’ll do nothing but strum his guitar and lie around in bed for several days after. Thats also part of the pattern too; periods of frenetic activity followed by periods of melancholia, withdrawal and inactivity. This is a bipolar personality.

Alright so far? OK, well lets graduate this guy and see him go to university. What happens to him then?

Here we have two stories; a light story and a dark one.

The light story is that he’s really turned on by what he chooses and he goes on to graduate summa cum laude, vindicating his natural brilliance.

But that’s not the story I want to look at. I want to look at the dark story. The one where brilliance and failure get mixed together.

This is where this student begins by recognising that university, like school, is also fairly phony in many ways. What saves university is generally the beauty of the subject as built by great minds. But if you just look at the professors and don’t see past their narrow obsession with their pointless and largely unread (and unreadable) publications to the great invisible university of the mind, you will probably conclude its as phony as anything else. Which it is.

But lets stick to this guy’s story.

Now the big difference between school and university for the fresher is FREEDOM. Freedom from mom and dad, freedom to do your own thing. Freedom in fact to screw up in a major way. So our hero begins a new life and finds he can do all he wants. Get drunk, stumble in at 3.00 AM. So he goes to town and he relies on his natural brilliance to carry him through because, hey, it worked at school. And it does work for a time.

But brilliance is not enough. You need application too, because the material is harder at university. So pretty soon our man is getting B+, then Bs and then Cs for his assignments. He experiences alternating feelings of failure cutting through his usual self assurance. He can still stay up to 5.00AM and hand in his assignment before the 9.00AM deadline, but what he hands in is not so great. Or perhaps he doesn’t get into beer, but into some mental digression from his official studies that takes him too far away from the main syllabus.

This sort of student used to pass my way every now and then, Riding on the bottom of the class. One of them had Bored> as his UNIX prompt. If I spotted one I used to connect well with them. (In fact I rescued one and now he’s a professor and miserable because he’s surrounded by phonies – but hey, what can you do?). Generally he would come alive in the final year project when he could do his own thing and hand in something really really good. Something that would show (shock, horror) originality. And a lot of professors wouldn’t give it a fair mark for that very reason – and because the student was known to be scraping along the bottom.

Often this kind of student never makes it to the end. He flunks himself by dropping out. He ends on a soda fountain or doing yard work, but all the time reading and studying because a good mind is always hungry.

(Rest of essay follows, with the Lisp parts gratuitously excised, but you can read the original post.)

[…] the peculiar strengths and weaknesses of the brilliant bipolar mind (BBM).

[…] He can see far; further than in fact his strength allows him to travel. He conceives of brilliant ambitious projects requiring great resources, and he embarks on them only to run out of steam. Its not that he’s lazy; its just that his resources are insufficient.

[…] not just the strengths but also the weaknesses of the BBM.

One of these is the inability to finish things off properly. The phrase ‘throw-away design’ is absolutely made for the BBM […]

[…] And he is, unlike the rank and file, unprepared to compromise. And this leads to many things.

[…]

And this brings me to the last feature of the BBM. The flip side of all that energy and intelligence – the sadness, melancholia and loss of self during a down phase. The intelligence is directed inwards in mournful contemplation of the inadequacies […]. The problems are soluble […], but when you’re down everything seems insoluble. […]

[…]

So what’s the problem with Lisp? Basically, there is no problem with Lisp, because Lisp is, like life, what you make of it.

Written by S

Wed, 2010-02-03 at 10:19:50

Posted in Uncategorized

Tagged with

## Groundhog Day and Buddhism/Tantra

[If you haven’t seen Groundhog Day, you may want to stop reading.]

A hilarious comment from the brilliant Everyone Is Jesus In Purgatory page (well, brilliant idea, anyway) on TVTropes (statutory warning: TVTropes will ruin your life):

Bill Murray’s Groundhog Day stands as Hollywood’s sole Buddhist message movie. As Phil (short for “philosopher”, obviously, a common name for the Buddha), Murray eventually realizes what takes many lifetimes to understand; namely, that every cycle of birth-death-rebirth (every “day”) is always the same, over and over, depressing, painful, and bound by karma (i.e.- how you’ve treated others in the past), until you awaken and make a conscious choice to change that destiny. It’s interesting that Phil takes the Tantric path, initially using the opportunity of being “reborn” every morning to simply fulfill all desires, and therefore, to ultimately purge himself of them. Still, over who knows how many “days” — how many lifetimes of days — he eventually comes to see the connectedness of all things, the sacredness of all life, and the joy to be found in knowledge, wisdom, and simply making a difference in the lives of others. By his own effort, and even against his own initial nature, over many lifetimes he achieves Enlightenment, and is able “move on.” Plus, that scene where he lets the groundhog drive the truck is freakin’ hilarious…

But searching the internet further, the connection seems to have been made more than merely at TVTropes:

Paul E. Schindler’s notes from a screening of the film, sponsored by San Francisco Zen Center

A Buddhist Interpretation of Groundhog Day By Sanja Blackburn

The Groundhog Day Buddhism Sutra by Perry Garfinkel at the Huffington Post
Longer one in the Shambala Sun

And other religions too:
Groundhog Almighty by Alex Kuczynski in the NYT. (Also available here here.)

[I was going to summarize them, but as of 2010-05-12, decided to just dump the draft I had.]

(Of course, the idea of the endless cycle/samsara/whatever is not a Buddhist idea but a pre-Buddhist Hindu one, but it occupies a more central role in Buddhism, and because of the greater popularity of the ideas of Buddhism in the west, it comes to be associated with Buddhism.)

Written by S

Mon, 2009-12-14 at 22:12:56

Posted in Uncategorized

## Is it important to “understand” first?

The Oxford University Press has been publishing a book series known as “Very Short Introductions”. These slim volumes are an excellent idea, and cover over 200 topics already. The volume Mathematics: A Very Short Introduction is written by Timothy Gowers.

Gowers is one of the leading mathematicians today, and a winner of the Fields Medal (in 1998). In addition to his research work, he has also done an amazing amount of service to mathematics in other ways. He edited the 1000-page Princeton Companion to Mathematics, getting the best experts to write, and writing many articles himself. He also started the Polymath project and the Tricki, the “tricks wiki”. You can watch his talk on The Importance of Mathematics (with slides) (transcript), and read his illuminating mathematical discusssions, and his blog. His great article The Two Cultures of Mathematics is on the “theory builders and problem solvers” theme, and is a paper every mathematician should read.

Needless to say, “Mathematics: A Very Short Introduction” is a very good read. Unlike many books aimed at non-mathematicians, Gowers is quite clear that he does “presuppose some interest on the part of the reader rather than trying to drum it up myself. For this reason I have done without anecdotes, cartoons, exclamation marks, jokey chapter titles, or pictures of the Mandelbrot set. I have also avoided topics such as chaos theory and Godel’s theorem, which have a hold on the public imagination out of proportion to their impact on current mathematical research”. What follows is a great book that particularly excels at describing what it is that mathematicians do. Some parts of the book, being Gowers’s personal views on the philosophy of mathematics, might not work very well when directed at laypersons, not because they require advanced knowledge, but assume a culture of mathematics. Doron Zeilberger thinks that this book “should be recommended reading to everyone and required reading to mathematicians”.

Its last chapter, “Some frequently asked questions”, carries Gowers’s thoughts on some interesting questions. With whole-hearted apologies for inserting my own misleading “summaries” of the answers in brackets, they are the following: “1.Is it true that mathematicians are past it by the time they are 30?” (no), “2. Why are there so few women mathematicians?” (puzzling and regrettable), “3. Do mathematics and music go together?” (not really), “4. Why do so many people positively dislike mathematics?” (more on this below), “5. Do mathematicians use computers in their work?” (not yet), “6. How is research in mathematics possible?” (if you have read this book you won’t ask), “7. Are famous mathematical problems ever solved by amateurs?” (not really), “8. Why do mathematicians refer to some theorems and proofs as beautiful?” (already discussed. Also, “One difference is that […] a mathematician is more anonymous than an artist. […] it is, in the end, the mathematics itself that delights us”.) As I said, you should read the book itself, not my summaries.

The interesting one is (4).

4. Why do so many people positively dislike mathematics?

One does not often hear people saying that they have never liked biology, or English literature. To be sure, not everybody is excited by these subjects, but those who are not tend to understand perfectly well that others are. By contrast, mathematics, and subjects with a high mathematical content such as physics, seem to provoke not just indifference but actual antipathy. What is it that causes many people to give mathematical subjects up as soon as they possibly can and remember them with dread for the rest of their lives?

Probably it is not so much mathematics itself that people find unappealing as the experience of mathematics lessons, and this is easier to understand. Because mathematics continually builds on itself, it is important to keep up when learning it. For example, if you are not reasonably adept at multiplying two-digit numbers together,then you probably won’t have a good intuitive feel for the distributive law (discussed in Chapter 2). Without this, you are unlikely to be comfortable with multiplying out the brackets in an expression such as $(x+2)(x+3)$, and then you will not be able to understand quadratic equations properly. And if you do not understand quadratic equations, then you will not understand why the golden ratio is $\frac{1+\sqrt{5}}{2}$.

There are many chains of this kind, but there is more to keeping up with mathematics than just maintaining technical fluency. Every so often, a new idea is introduced which is very important and markedly more sophisticated than those that have come before, and each one provides an opportunity to fall behind. An obvious example is the use of letters to stand for numbers, which many find confusing but which is fundamental to all mathematics above a certain level. Other examples are negative numbers, complex numbers, trigonometry, raising to powers, logarithms, and the beginnings of calculus. Those who are not ready to make the necessary conceptual leap when they meet one of these ideas will feel insecure about all the mathematics that builds on it. Gradually they will get used to only half understanding what their mathematics teachers say, and after a few more missed leaps they will find that even half is an overestimate. Meanwhile, they will see others in their class who are keeping up with no difficulty at all. It is no wonder that mathematics lessons become, for many people, something of an ordeal.

This seems to be exactly the right reason. No one would enjoy being put through drudgery that they were not competent at, and without the beauty at the end of the pursuit being apparent. (I hated my drawing classes in school, too.) See also Lockhart’s Lament, another article that everyone — even, or especially, non-mathematicians — should read.

As noted earlier, Gowers has some things to say about the philosophy of mathematics. As is evident from his talk “Does mathematics need a philosophy?” (also typeset as essay 10 of 18 Unconventional Essays on the Nature of Mathematics), he has rejected the Platonic philosophy (≈ mathematical truths exist, and we’re discovering them) in favour of a formalist one (≈ it’s all just manipulating expressions and symbols, just stuff we do). The argument is interesting and convincing, but I find myself unwilling to change my attitude. Yuri Manin says in a recent interview that “I am an emotional Platonist (not a rational one: there are no rational arguments in favor of Platonism)”, so it’s perhaps just as well.

Anyway, the anti-Platonist / formalist idea of Gowers is evident throughout the book, and of course it has its great side: “a mathematical object is what it does” is his slogan, and most of us can agree that “one should learn to think abstractly, because by doing so many philosophical difficulties disappear” , etc. The only controversial suggestion, perhaps, follows the excerpt quoted above (of “Why do so many people positively dislike mathematics?”):

Is this a necessary state of affairs? Are some people just doomed to dislike mathematics at school? Or might it be possible to teach the subject differently in such a way that far fewer people are excluded from it? I am convinced that any child who is given one-to-one tuition in mathematics from an early age by a good and enthusiastic teacher will grow up liking it. This, of course, does not immediately suggest a feasible educational policy, but it does at least indicate that there might be room for improvement in how mathematics is taught.

One recommendation follows from the ideas I have emphasized in this book. Above, I implicitly drew a contrast between being technically fluent and understanding difficult concepts, but it seems that almost everybody who is good at one is good at the other. And indeed, if understanding a mathematical object is largely a question of learning the rules it obeys rather than grasping its essence, then this is exactly what one would expect — the distinction between technical fluency and mathematical understanding is less clear-cut than one might imagine.

How should this observation influence classroom practice? I do not advocate any revolutionary change — mathematics has suffered from too many of them already — but a small change in emphasis could pay dividends. For example, suppose that a pupil makes the common mistake of thinking that xa+b = xa + xb. A teacher who has emphasized the intrinsic meaning of expressions such as xa will point out that xa+b means a+b xs all multiplied together, which is clearly the same as a of them multiplied together multiplied by b of them multiplied together. Unfortunately, many children find this argument too complicated to take in, and anyhow it ceases to be valid if a and b are not positive integers.

Such children might benefit from a more abstract approach. As I pointed out in Chapter 2, everything one needs to know about powers can be deduced from a few very simple rules, of which the most important is xa+b = xa xb. If this rule has been emphasized, then not only is the above mistake less likely in the first place, but it is also easier to correct: those who make the mistake can simply be told that they have forgotten to apply the right rule. Of course, it is important to be familiar with basic facts such as that x3 means x times x times x, but these can be presented as consequences of the rules rather than as justifications for them.

I do not wish to suggest that one should try to explain to children what the abstract approach is, but merely that teachers should be aware of its implications. The main one is that it is quite possible to learn to use mathematical concepts correctly without being able to say exactly what they mean. This might sound a bad idea, but the use is often easier to teach, and a deeper understanding of the meaning, if there is any meaning over and above the use, often follows of its own accord.

Of course, there is an instinctive reason to immediately reject such a proposal — as the MAA review by Fernando Q. Gouvêa observes, ‘I suspect, however, that there is far too much “that’s the rule” teaching, and far too little explaining of reasons in elementary mathematics teaching. Such a focus on rules can easily lead to students having to remember a huge list of unrelated rules. I fear Gowers’ suggestion here may in fact be counterproductive.’ Nevertheless, the idea that technical fluency may precede and lead to mathematical understanding is worth pondering.

(Unfortunately, even though true, it may not actually help with teaching: in practice, drilling-in “mere” technical fluency can be as unsuccessful as imparting understanding.)

Written by S

Tue, 2009-12-01 at 03:38:31

## 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. His major complaint seems to be that Facebook won’t let him use his name.)

Written by S

Wed, 2009-08-19 at 15:45:00

Posted in Uncategorized

Tagged with ,

## 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. [Update 2010-01-06: Oliver Nash has a post about the puzzle, explaining both the original solution and the proof of optimality, here. Just the original solution is also worked out by David MacKay here.]

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→∞?

Written by S

Mon, 2009-08-10 at 23:45:25

## 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.

Written by S

Fri, 2009-08-07 at 23:51:05

## 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:

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:

Partial ones:

Generic related:

Written by S

Tue, 2009-06-23 at 21:53:37

Posted in Uncategorized

## 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:

“Mona Tweeta” © Quasimondo:Flickr/CC-BY-NC (210 bytes?)

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):

by Boojum (490 bytes)

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:

Comparison: JPEG at 536 bytes, img2twit at 534 bytes, DLI at 534 bytes

Or if you want to be fair and compare at 250 bytes, here’s img2twit and DLI:

img2twit at ~250 bytes, DLI at 243 bytes

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.

Written by S

Sun, 2009-05-31 at 13:37:44

## 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.

Written by S

Fri, 2009-05-29 at 21:35:55

Posted in Uncategorized

Tagged with ,

## Giving credit

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.

Meanwhile…

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.

Written by S

Sun, 2009-03-22 at 23:05:50

## 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.

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.

Written by S

Fri, 2009-03-20 at 23:54:46

Posted in mathematics, Uncategorized

Tagged with ,