Pi and The Raven

Michael Keith rewrote Edgar Allen Poe’s poem The Raven to turn it into a mnemonic for pi. Keith’s version follows the original quite well considering his severe constraints. The full poem has 18 stanzas. Here I include only the first and last. The full version can be found here.

***

Poe, E.
Near a Raven

Midnights so dreary, tired and weary,
Silently pondering volumes extolling all by-now obsolete lore,
During my rather long nap — the weirdest tap!
An ominous vibrating sound disturbing my chamber’s antedoor.
“This,” I whispered quietly, “I ignore.”

So he sitteth, observing always, perching ominously on these doorways.
Squatting on the stony bust so untroubled, O therefore.
Suffering stark raven’s conversings, I am so condemned, subserving,
To a nightmare cursed, containing miseries galore.
Thus henceforth, I’ll rise (from a darkness, a grave) — nevermore!

***

The number of letters in most words encodes a digit of pi. Words with 10 letters encode a zero. Words with more than 10 letters encode two consecutive digits of pi. The poem encodes the first 740 digits of pi.

Read More

Every exercise in the book

When I did an independent study course with Ted Odell, he told me to get a copy of De Vito’s Functional Analysis and work every exercise. I don’t recall whether I actually worked every problem, though I believe I at least did most of them. I heard of someone who learned algebraic geometry by working every problem in Hartshorne.

Doing all the exercises in a book isn’t a bad way to learn something, though it depends on the book, what you’re trying to accomplish, and on the quality and quantity of the exercises.

Have you ever gone through a book working every exercise? If so, what book? How was your experience?

 

 

Read More

The door was unlocked

From the dedication of C. S. Lewis’ A Preface to Paradise Lost:

Apparently the door of the prison was really unlocked all the time; but it was only you who thought of trying the handle.

In context he was saying that Charles Williams had recovered a clear understanding of Milton that had been obfuscated for over a century.

That line made me think of a quote from Alexander Grothendieck (that I haven’t been able to find this morning) to the effect that progress in mathematics has often waited for someone to be bold enough to ask a simple question or introduce a simple concept.

Update: Thanks to Roland Elliot for providing the quote I was missing. Ronald Brown says that Grothendieck said in a letter to him in 1982:

The introduction of the cipher 0 or the group concept was general nonsense too, and mathematics was more or less stagnating for thousands of years because nobody was around to take such childish steps …

Read More

New theme

I’ve changed the appearance of this blog. If you find anything that’s broken, or if you have suggestions for improvement, please let me know. As far as I can tell, it seems to work OK on multiple platforms.

I’m more likely to implement suggestions that come with specific details. For example, if you say “I don’t like your theme” then there’s not much I can do unless you suggest an alternative. But if you say something like “I’d suggest changing this line of CSS because …” I can at least try it out.

Read More

New trade-offs

Technology is all about trade-offs.

I find it more plausible when someone says a new technology has new trade-offs than when someone says a new technology is “better.” Rarely does one thing improve on another by all criteria, but often one thing is an improvement on another by the criteria you value most.

If you want to persuade me to adopt something new, you’ll gain credibility by being candid about its drawbacks. Explain by what criteria you think the new thing is better, by what criteria it is worse, and why the former should matter more to me in my circumstances.

 

Read More

Haskell / Category theory decoder ring

Haskell uses a lot of ideas from category theory, but the correspondence between Haskell and category theory can be a little hard to see at times.

One difficulty is that although Haskell articles use terms like functor and monad from category theory, they seldom actually talk about categories per se. If we’ve got functors, where are the categories? (This reminds me of Darth Vader asking “If this is a consular ship, where is the ambassador?”)

In Haskell literature, everything implicitly lives Hask, the category of Haskell types, or in some subcategory of Hask. This means that the category itself is not the focus of attention. In category theory, functors often operate between very different classes of objects, such as topological spaces and their fundamental groups, and so it’s more important to state what category something lives in.

Another potential stumbling block is to think of Haskell types as categories and values as objects. That would be reasonable, since in computer science an “object” is an instance of a type. But the right correspondence is to think of Haskell types as categorical objects. Instances of types are below the level of abstraction we’re working at. This is analogous to how category theory treats objects as black boxes with no way to talk about what’s inside.

Finally, Haskell monads look a little different from categorical monads. Haskell’s return corresponds directly to unit, usually written as η, in category theory. But Haskell monads have a bind operator >>= while mathematical monads have a join operator μ. These are not equivalent, though you can implement each in terms of the other:

join :: Monad m => m (m a) -> m a
join x = x >>= id

(>>=) :: Monad m => m a -> (a -> m b) -> m b
x >>= f = join (fmap f x)

To read more along these lines, see the Wikibooks article on Haskell and Category theory.

Update: Stephen Diehl suggested I mention the differences between the idealized category Hask and the implementation of the Haskell language. These are discussed here.

Read More

The secret to planting St. Augustine sod

I’ve put down St. Augustine grass numerous times and it never did well until this year. I’d water it regularly all summer and yet most of it would die.

When I ordered a pallet of grass a few weeks ago, the farmer who grew the grass delivered it. He told me the trick was to water it heavily every day for one week, then water whenever you’d water the rest of your grass. For the first week, you want to water it so much that when you step on it you see muddy water bubble up. This breaks down the sticky clay soil that the grass comes in so that it will put roots down into the soil beneath. So far it looks like his advice worked.

 

St. Augustine grass

Read More

Paper and pixels

This morning a friend came up to me and said “I really liked that article you linked to the other day, though I can’t remember what it was about.”

He said something else that made me think which one he might have meant. “Was it that article that says we don’t remember what we read online as well as what we read on paper?”

“Yeah! That was it!”

 

 

Read More

The most fearless and the most fearful people

While I was in Europe, someone commented to me that Americans are the most fearless and the most fearful people on Earth. We put men on the moon, and we walk around with hand sanitizer. We start bold business ventures and have ridiculously cautious safety regulations. We’re the home of cowboys and helicopter parents.

One response I had was that it’s not necessarily the same people who are being so bold and so timid. There’s a tension between the risk-tolerant and the risk-averse in America. The former are free to be bold in the private sector while the latter outvote them in the public sector.

Another explanation might be that an individual can be fearless and fearful about different things. Someone may be willing to risk millions of dollars but not be willing to risk eating unpasteurized food. There may be some sort of general risk homeostasis, though I imagine people willing to take risks in one area are often more willing to take risks in another area.

Read More

Where else you can find me

In addition to this blog, you can find me on Twitter and Google+. I occasionally blog at Symbolism, though that site is mostly a paste bin for the DailySymbol Twitter account.

I’ll be speaking at the Snow Unix Event in The Netherlands in a couple weeks and I plan to go to Germany in September. I’ve made a couple trips to California this year and it looks like I’ll be flying out there more often. And of course you can always find me in Houston. If you’d like to meet in person, please let me know.

 

Read More

Writing down an unwritten language

In this post I interview Greg Greenlaw, a friend of mine who served as a missionary to the Nakui tribe in Papua New Guinea and developed their writing system. (Nakui is pronounced like “knock we.”)

JC: When you went to PNG to learn Nakui was there any writing system?

GG: No, they had no way of writing words or numbers. They had names for only seven numbers — that was the extent of their counting system — but they could coordinate meetings more than a few days future by tying an equal number of knots in two vines. Each party would take a vine with them and loosen a knot each morning until they counted down to the appointed time — like and advent calendar, but without numbers!

(more…)

Read More