The Universe of Discourse


Thu, 11 Jul 2019

The New York City passport office

Earlier this week I reported on a good visit I had had to the Philadelphia offices of the Social Security Administration.

Philadelphia government offices, in my experience, are generally better than those I have visited elsewhere. I've never been to the New York DMV office (do they even have one?) but the Philadelphia ones are way better than the New Jersey ones I used to use. Instead of standing in line for forty-five minutes, you get a number and sit down until your number is called.

The passport office was the biggest surprise. I first went in to deal with some passport thing shortly after I arrived in Philadelphia, maybe 1990 or so. The office was clean and quiet, the line was short, I got my business done quickly. None of those is the case in the New York passport office.

The New York passport office. Wow. Where to begin? I want to say that it defies description. But, I learned later, it has been described by no less a person than Samuel Beckett:

The abode is a flattened cylinder with rubber walls fifty meters in circumference and eighteen meters high. It is constantly illuminated by a dim, yellow light, and the temperature fluctuates between 5°C to 25°C, sometimes in as small an interval as four seconds. This leads to extremely parched skin, and the bodies brush against each other like dry leaves. Kisses make an "indescribable sound" and the rubber makes the footsteps mostly silent. There are 200 inhabitants, or one per square meter. Some are related to each other. Some are even married to each other, but the conditions make recognition difficult.

Here's a story of the New York passport office told to me by a friend many years ago. He stood in the line for forty-five minutes, and when he reached the window, he handed over his forms. The clerk glared at him for a few seconds, then, without a word, pushed them back.

“Is something wrong?” asked my friend.

There was a long pause. The clerk, too disgusted or enraged to reply immediately, finally said “They're not stapled.”

“Oh,” said my friend. “I see you have a stapler on your desk there.”

You're supposed to staple them.”

“May I use your stapler?”

“No, your stapler is on the table at the back of the room.”

At this point my friend realized he was dealing with a monster. “Okay, but I can come right back to the window afterward, right?”

“No, you have to wait, like everyone else.”

At that moment my friend felt a tap on his shoulder. A man a few places behind him in line reached into his suit pocket and handed him a stapler. My friend says that as he stapled his papers and turned them in, the look on the clerk's face was of someone whose whole day had just been ruined.

“Thanks so much,” said my friend to Stapler Man. “Why did you happen to have a stapler in your pocket?”

“Oh,” said Stapler Man. “I do a lot of business at the passport office.”


[Other articles in category /misc] permanent link

Sun, 07 Jul 2019

Calculating π with atan2()

[ I wrote this in 2007 and forgot to publish it. Or maybe I was planning to finish it first. But if so I have no idea what I was originally planning to say, so here we are. ]

In computer programs, it's quite common to need a numerical value for π. Often you see something like:

        #define PI 3.141592654

This has the drawback of not representing π as exactly as possible. But to do that in C probably requires putting in 16 digits after the decimal point, and most people don't have so much memorized. And anyway, you don't really know at compile time what the floating-point precision will be; some platforms support quad-width floats. So you can do better, maybe, by using the math library to calculate π. And people do:

        static double pi = 4*atan2(1,1);

The atan2(yx) function produces the (almost-)unique value θ from the range !![-\pi, \pi]!! such that a ray from the origin, passing through point (x, y), makes angle θ with the x-axis.

Diagram showing
the atan2() function.  A ray from the origin through the point (1,1)
is labeled “atan2(1,1) = π/4”.  A ray through an arbitrary point (x,y)
has the angle θ with the positive x-axis.  And a ray pointing along
the negative x-axis is labeled “atan2(0,-1) = π”.

Note that the arguments have y first and x second. For example, atan2(17, 0) returns !!\frac\pi 2!!, because a line at angle !!\frac\pi 2!! passes through the point (0, 17). Similarly, atan2(-17, 0) returns -!!\frac\pi 2!!.

You can use atan2 to calculate π, by using !!4·{\operatorname{atan}}2(1,1)!!, as I mentioned above. Many people do; Google searching finds hundreds of examples. The manual for the standard Perl module constant.pm mentions this example.

But this is a bit strange. Why is this so well-known? Why calculate 4*atan2(1,1) when $$\pi = {\operatorname{atan}}2(0,-1)$$ produces the same result and is simpler?


(Obligatory IEEE 754 complaining: atan2 should return an always-unique value from !!(-\pi, \pi]!!, but I have to say “almost-unique” because as usual IEEE 754 fucks everything up, this time with its stupid distinction between 0 and -0.)

[ Addendum: Leah Neukirchen suggests that the atan2(1,1) is a translation from earlier systems that provide a single-argument atan function but no atan2. In those systems, there is no workable analogue of atan2(0, -1) because the transformation !!{\operatorname{atan}}2(y, x)\Rightarrow {\operatorname{atan}}\left(\frac yx\right)!! gives !!{\operatorname{atan}}(0)!!, which doesn't work for this application as it yields !!0!! instead of the desired !!\pi!!. And similarly in languages with atan but not atan2 there is no analogue of !!\pi = 2·{\operatorname{atan}}2(1, 0)!!. So the simplest thing you can do is pi = 4 * atan(1), and after the transformation above one gets !!\pi = 4·{\operatorname{atan}}2(1,1)!!. ]


[Other articles in category /prog] permanent link

Tue, 02 Jul 2019

Philadelphia Slaughterhouse Hotel

More information about the mysterious slaughterhouse hotel has come to light, thanks to Chas. Owens, Pete Krawczyk, and this useful blog post by D.S. Rosenstein.

Most important, the perplexing “hotel” is not intended for humans. “Hotel” is apparently stockyard jargon for a place where livestock are quartered temporarily just prior to slaughter. I am so glad to have this cleared up.

Also, M. Rosenstein has a photograph of the fancy abattoir with the spires:

An isometric drawing of
the  abbatoir, which  is a handsome and
ornate building, featuring four blue spires at each corner. A grayscale photograph of
the abattoir depicted at left.  The Schuylkill river is in the
foreground.  The spires are clearly visible.  To left and right are
low storage buildings.  The abattoir has one very high lower story of
dark brick, surmounted by a lighter-colored cupola with tall windows
and an arched roof with a skylight.

They don't make industrial buildings like they used to. Check out the ornamental pattern in the bricks on the lower floor and the baluster along the riverside façade.

More details here.

[ Addendum: Josh Bevan of Hidden City Philadelphia on When Cattle Men Reigned In The West (of Philadelphia). ]


[Other articles in category /history] permanent link

Philadelphia Slaughterhouse Hotel

Yesterday on my other blog I posted about the most hilariously mislocated hotel I've ever heard of. It's the hotel that in 1910 was located in the Philadelphia stockyards, just the other side of the railroad tracks from the hog pens, between the slaughter house and the abbatoir:

A portion of a map, with buildings
marked in yellow and pink.  Several large yellow buildings, surrounded
and cut through with rail lines, are labeled CATTLE PENS.  Pink
buildings on the left and right are SLAUGHTER HOUSE and ABBATOIR.  In
between is a smaller pink building labeled HOTEL.  Just north of the
hotel are the HOG PENS.

I thought that would be the end of it, but Chas. Owens did a little digging around and found a picture of the hotel, provided by the Greater Philadelphia GeoHistory Network. It's from R. Hexamer's insurance survey of 1877. At that time, the building was partly a hotel and partly the offices of the Philadelphia Stock Yard Company.

An isometric drawing of the site of
the office and hotel building, with “Stable and Hay Loft” to its
right, “Abbatoir” in the foreground, and “Pump House” in the
background.  These buildings, being brick, are colored pink; others
made of wood are colored yellow.  The abbatoir is a handsome and
ornate building, featuring four blue spires at each corner.

The survey includes a map of the site and a description of the facilities. Here's the detailed plan of the hotel:

Plan of the buildings,
including descriptions (Offices, 2 story, 43 feet by 78; hotel, 3
story, 43 feet by 100; both brick
with tin roof) and other details.

The full image is 105 MB:

An isometric drawing of the site of
the office and hotel building, with “Stable and Hay Loft” to its
right, “Abbatoir” in the foreground, and “Pump House” in the
background.  These buildings, being brick, are colored pink; others
made of wood are colored yellow.  The abbatoir is a handsome and
ornate building, featuring four blue spires at each corner.

None of these buildings is still standing. (As I mentioned yesterday, the site is now occupied by the Cira Centre.) But the neighborhood's history as the center of Philadelphia's meatpacking district is not completely lost. According to this marvelous article from Hidden City Philadelphia, in 1906 the D.B. Martin company built a new combination office building and slaughterhouse only two blocks away at 3000 Market Street. Here's my favorite detail from the article:

Five hundred head of cattle at a time would be held on the rooftop cow pens, right above the heads of the company’s executives,

That building still stands, although I believe it's no longer used as a slaughterhouse.

[ Addendum 20190702: The “hotel” is explained: it is a temporary residence for livestock, not for humans. ]


[Other articles in category /history] permanent link