The Lumber Room

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

Archive for the ‘Uncategorized’ Category

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
Your Neighbor’s Melon-patch, don’t tie your Shoe.

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,
“How dainty are your feet!”
The camel to the donkey said,
“Your voice is very sweet!”

[^ 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.

[^ gośatādapi gokṣīraṃ prasthaṃ dhānyaśatādapi / prāsādepi ca khaṭvārdhaṃ śeṣāḥ paravibhūtayaḥ // https://groups.google.com/forum/#!topic/sadaswada/yBw3u03Fqvw%5D

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

with 2 comments

Written by S

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

Posted in Uncategorized

Printing floating-point numbers

leave a comment »

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

But what about printing them?

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):
http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/

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:
http://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf

Florian Loitsch:
http://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf

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

http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
https://labix.org/python-nicefloat
http://people.csail.mit.edu/jaffer/III/EZFPRW

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

Plastic wire baskets

with 4 comments

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

Poorani Ammal, Copyright R Revathi / Mylapore Times

Written by S

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

Posted in Uncategorized

Kashmir

with 5 comments

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

with 11 comments

(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

Examples of bad design

with 15 comments

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:

Buttons with adjacent descriptions

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