The Lumber Room

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

Archive for the ‘Uncategorized’ Category


with one comment

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

Steel & White paper How to Print Floating-Point Numbers Accurately:

Their retrospective:

Burger & Dybvig:

Florian Loitsch:

Russ Cox:

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

Written by S

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

Posted in Uncategorized

Plastic wire baskets

with 3 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


with 5 comments

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 12 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

iPad, etc.

leave a comment »

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

Aaron S: “Is Apple Evil?”
Mark Pilgrim: “Tinkerer’s Sunset”
The iPad is the iPrius: Your Computer Consumerized
Geomblog: Could the IPad make computer science obsolete ?

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


Get every new post delivered to your Inbox.

Join 134 other followers