I was trying to read this paper. I downloaded the pdf, but the
top inch is cut off. The postscript looks fine in a postscript
viewer like gv, but I prefer pdf viewers. Running ps2pdf on
the postscript gave the same result as the pdf download on
the webpage. Turns out the format is a4, so you need to run
ps2pdf -sPAPERSIZE=a4 paper.ps
This solved the problem.
Thursday, September 18, 2008
Friday, September 05, 2008
Big Brother?
I wonder if Mitt Romney has ever read 1984. In fact, I
wonder if he reads the newspaper. During his RNC speech he
said something about how the GOP is the party of big ideas,
while the democratic party is that of "Big Brother". While
it's true that the government in 1984 was big, that doesn't
seem to be the defining quality. Among other things, it was
the loss of privacy, basic human rights, and continual
warfare. Iraq, Bush's warrant-less wire tapping and the
administration's odd justifications for the use of torture
seem much more in the spirit of the government of Oceania.
Also interesting is the fact that the derivative of
government spending is much steeper during Republican
administrations. So the interpretation of democratic
administrations being "big government" seems mistaken as
well. I wish the standards of rhetoric were higher in such
important political events. I don't imagine Jefferson or
Madison spouting the banalities I heard repeatedly. Of
course, they would have read 1984 before quoting it.
wonder if he reads the newspaper. During his RNC speech he
said something about how the GOP is the party of big ideas,
while the democratic party is that of "Big Brother". While
it's true that the government in 1984 was big, that doesn't
seem to be the defining quality. Among other things, it was
the loss of privacy, basic human rights, and continual
warfare. Iraq, Bush's warrant-less wire tapping and the
administration's odd justifications for the use of torture
seem much more in the spirit of the government of Oceania.
Also interesting is the fact that the derivative of
government spending is much steeper during Republican
administrations. So the interpretation of democratic
administrations being "big government" seems mistaken as
well. I wish the standards of rhetoric were higher in such
important political events. I don't imagine Jefferson or
Madison spouting the banalities I heard repeatedly. Of
course, they would have read 1984 before quoting it.
Bach Cantatas
Bach wrote well over 200 cantatas. They run from about 15 minutes
to 45 minutes. I first started listening to them after hearing them live
(weekly) at Boston's excellent Emmanuel Episcopal Church. I sang a
number of them with the Bach Cantata Chor in Pittsburgh before the
music director retired in 2007. It's nice to always know there's
a pile of great music you've never heard, just waiting to be remembered.
There are so many though, it's difficult to remember which ones you like. I started
a list so I could remember. Please let me know your favorites that I'm leaving out.
I'm listening to BWV206 a lot lately.
to 45 minutes. I first started listening to them after hearing them live
(weekly) at Boston's excellent Emmanuel Episcopal Church. I sang a
number of them with the Bach Cantata Chor in Pittsburgh before the
music director retired in 2007. It's nice to always know there's
a pile of great music you've never heard, just waiting to be remembered.
There are so many though, it's difficult to remember which ones you like. I started
a list so I could remember. Please let me know your favorites that I'm leaving out.
I'm listening to BWV206 a lot lately.
Sunday, August 10, 2008
Fact: svn server version
Fact: It is not possible for a client to get the server version number in Subversion.
It took me awhile to find the answer to this because googling for
"subversion version server" is not terribly helpful, considering subversion
is version control software.
It took me awhile to find the answer to this because googling for
"subversion version server" is not terribly helpful, considering subversion
is version control software.
Saturday, August 09, 2008
Mathematica Undo
Mathematica is generally a good program. The programming language may be primitive, but the symbolic and graphics functionality are excellent. However, I just can't believe that it only has one level of undo. I just lost 20 minutes of work because of this. If you must use Mathematica notebooks as opposed to text edited files, save often!
Thursday, August 07, 2008
*nix command of the day: texdoc
texdoc looks up tex documentation, e.g.
texdoc amsthdoc
opens a pdf of the documentation for the AMS theomem package.
texdoc amsthdoc
opens a pdf of the documentation for the AMS theomem package.
Wednesday, August 06, 2008
Quote
“Every kid is always talking about what his parents have been through, and no kid has any clue what he’s talking about.” - Charles Rangel
1984
I'm reading George Orwell's novel "1984". It occurred to me
yesterday that, while it adds critically to his message, and mirrors
both the Soviet and Chinese postwar situations, the emphasis on the
scarcity of goods is almost counterproductive to his aims. It seems
to me that the message would be more poignant if there was plentiful
food and goods. For it is to an authoritarian plenty, rather than the
poverty of 1984, where countries like China are heading in the era
of globalization. It is this model that will compete with liberal
democracy in the coming years. Nicholas Kristof's "China Wakes"
describes some of 1984's horrors in modern China.
Update:
Now that I've read further, it seems the story wouldn't work
if there were plentiful goods. I'm finding it hard to take this book
seriously. Animal Farm is a much better satire.
yesterday that, while it adds critically to his message, and mirrors
both the Soviet and Chinese postwar situations, the emphasis on the
scarcity of goods is almost counterproductive to his aims. It seems
to me that the message would be more poignant if there was plentiful
food and goods. For it is to an authoritarian plenty, rather than the
poverty of 1984, where countries like China are heading in the era
of globalization. It is this model that will compete with liberal
democracy in the coming years. Nicholas Kristof's "China Wakes"
describes some of 1984's horrors in modern China.
Update:
Now that I've read further, it seems the story wouldn't work
if there were plentiful goods. I'm finding it hard to take this book
seriously. Animal Farm is a much better satire.
Thursday, July 31, 2008
Total solar eclipse
The exploratorium in San Francisco, my favorite museum as a child, is
webcasting the total solar eclipse from China tomorrow. Check it out! More info at Wikipedia:
It's happening from 8-12 UTC. Here in PA we're at UTC-5, but because of daylight savings it's UTC-4, so PA folks can watch from
4-8 AM.
Tuesday, July 22, 2008
Knitro
I've been using a nice nonlinear optimizer called Knitro. It's not free, but has
a free student license. This note regards installing Knitro. You first fill out a form
and get a license. You are suppose to put the license in a file so that the
executable can see that you have permission. I followed all the instructions, but
I kept getting the following error:
### Could not find a valid license.
Your machine ID is 93-04-3c-a2-d3.
Please contact info@ziena.com to obtain a license.
Go to http://ziena.com/trial.html for a KNITRO student version license.
Failed to find a Ziena license.
If you get this, make sure you have no spaces after the license key. Once
I removed the spaces it worked.
a free student license. This note regards installing Knitro. You first fill out a form
and get a license. You are suppose to put the license in a file so that the
executable can see that you have permission. I followed all the instructions, but
I kept getting the following error:
### Could not find a valid license.
Your machine ID is 93-04-3c-a2-d3.
Please contact info@ziena.com to obtain a license.
Go to http://ziena.com/trial.html for a KNITRO student version license.
Failed to find a Ziena license.
If you get this, make sure you have no spaces after the license key. Once
I removed the spaces it worked.
Monday, July 21, 2008
Random fact: flammible flour
From wikipedia:
Flour dust suspended in air is explosive, as is any mixture of a finely powdered flammable substance with air,[1] see Lycopodium. In medieval flour mills, candles, lamps, or other sources of fire were forbidden. Some devastating and fatal explosions have occurred at flour mills, including an explosion in 1878 at the Washburn "A" Mill in Minneapolis, the largest flour mill in the United States at the time.[2]
Flour dust suspended in air is explosive, as is any mixture of a finely powdered flammable substance with air,[1] see Lycopodium. In medieval flour mills, candles, lamps, or other sources of fire were forbidden. Some devastating and fatal explosions have occurred at flour mills, including an explosion in 1878 at the Washburn "A" Mill in Minneapolis, the largest flour mill in the United States at the time.[2]
Random fact: flammible flour
From wikipedia:
Flour dust suspended in air is explosive, as is any mixture of a finely powdered flammable substance with air,[1] see Lycopodium. In medieval flour mills, candles, lamps, or other sources of fire were forbidden. Some devastating and fatal explosions have occurred at flour mills, including an explosion in 1878 at the Washburn "A" Mill in Minneapolis, the largest flour mill in the United States at the time.[2]
Flour dust suspended in air is explosive, as is any mixture of a finely powdered flammable substance with air,[1] see Lycopodium. In medieval flour mills, candles, lamps, or other sources of fire were forbidden. Some devastating and fatal explosions have occurred at flour mills, including an explosion in 1878 at the Washburn "A" Mill in Minneapolis, the largest flour mill in the United States at the time.[2]
Wednesday, July 09, 2008
Fireflys in Pittsburgh
The best place to see fireflys in Pittsburgh is in Frick
Park at 9:15 PM. They are only very active for about
30 minutes, but if you catch it it's an incredible thing
to see. The best place is in one of the canopies that
are very dark at 9:15 because of the tree cover.
Park at 9:15 PM. They are only very active for about
30 minutes, but if you catch it it's an incredible thing
to see. The best place is in one of the canopies that
are very dark at 9:15 because of the tree cover.
Sunday, July 06, 2008
poison ivy
tear a leaf off a tree or bush and tear it up slowly while I'm walking.
I don't like that I do it, because it seems rather destructive. I just
don't think about it much.
In CA, we have poison oak. In the summer it looks like this:
I'm very careful not to touch it, as I'm quite allergic. I had it
bad once in 7th grade, and I've been very careful since.
In Pittsburgh, they don't have poison oak. They have poison ivy. I didn't know
what it looks like until this week, when I started getting rashes
on my wrists, neck and back. For those of you who are moving from CA to the east, this is what poison ivy looks like:
It's really not a good idea to pick these leaves and tear them
to little pieces. Take it from me.
It's actually fascinating how it works. The oil from the leaves somehow modifies the proteins of the skin cells into which it comes in contact. The proteins it modifies are responsible for notifying your immune system that the cell is indeed part of your body, and
is not a foreign object. Once the oil manipulates the protein, your body can no longer tell
that your own skin is part of your body, and starts attacking it. Miracles of evolution abound.
PS: If you've never read them, Steven Jay Gould and Loren Eisley's books are filled with such facts and anecdotes.
Saturday, July 05, 2008
Shell award

I just won 92K British pounds from the "Shell
Petroleum Company of England"! I'm even more excited, because
when they write the number in decimal, it was 92,000,000.00
so I think they really mean I won 92 *million* pounds. I just
need to contact the "fiduciary agent" with my email address, bank
account and credit card numbers to claim my prize. They're
throwing in a beautiful Russian mail-order bride as well. So long
grad school...
Friday, July 04, 2008
Typing SML values
I recently spent a few weeks learning the basics of Haskell.
One of the many strengths is the ability to give the types
of functions in a structure. This seems like a necessary
feature, but it is lacking in SML and O'Caml. For instance,
in Haskell I can write
incr :: Int -> Int
incr x = x + 1
In ML I'd either write
fun incr x = x + 1
and hope I can do the static typing in my head, or else
the horrible
fun incr (x : int) : int = x + 1
Note that it is possible to give incr a type in a
signature, but if I don't want to expose incr (it's
just used in the implementation), I'm out of luck.
While this example may not be entirely convincing, when
functions take many arguments, and are nested, it becomes
increasingly difficult to do mental type checking.
A hack to do this in SML is
fun incr x = x + 1
val incr : int -> int = incr
in O'Caml
let incr x = x + 1
let incr : int -> int = incr
Granted, this is not nearly as nice, but ML will catch
type errors this way.
One of the many strengths is the ability to give the types
of functions in a structure. This seems like a necessary
feature, but it is lacking in SML and O'Caml. For instance,
in Haskell I can write
incr :: Int -> Int
incr x = x + 1
In ML I'd either write
fun incr x = x + 1
and hope I can do the static typing in my head, or else
the horrible
fun incr (x : int) : int = x + 1
Note that it is possible to give incr a type in a
signature, but if I don't want to expose incr (it's
just used in the implementation), I'm out of luck.
While this example may not be entirely convincing, when
functions take many arguments, and are nested, it becomes
increasingly difficult to do mental type checking.
A hack to do this in SML is
fun incr x = x + 1
val incr : int -> int = incr
in O'Caml
let incr x = x + 1
let incr : int -> int = incr
Granted, this is not nearly as nice, but ML will catch
type errors this way.
Monday, May 26, 2008
repeating history
"We have learned, a little late no doubt, that for states as for
individuals real wealth consists not in acquiring or invading the
domains of others, but in developing one's own. We have learned that
all extensions of territory, all usurpations, by force or by fraud,
which have long been connected by prejudice with the idea of 'rank,'
of 'hegemony,' of 'political stability,' of 'superiority' in the order
of the Powers, are only the cruel jests of political lunacy, false
estimates of power, and that their real effect is to increase the
difficulty of administration and to diminish the happiness and
security of the governed for the passing interest or for the vanity of
those who govern..." Talleyrand 1754-1838
individuals real wealth consists not in acquiring or invading the
domains of others, but in developing one's own. We have learned that
all extensions of territory, all usurpations, by force or by fraud,
which have long been connected by prejudice with the idea of 'rank,'
of 'hegemony,' of 'political stability,' of 'superiority' in the order
of the Powers, are only the cruel jests of political lunacy, false
estimates of power, and that their real effect is to increase the
difficulty of administration and to diminish the happiness and
security of the governed for the passing interest or for the vanity of
those who govern..." Talleyrand 1754-1838
Saturday, May 17, 2008
Parsing first order logic
I'm translating some of John Harrison's textbook code
to Haskell. I thought I'd try Happy, Haskell's "yacc",
for parsing instead of Harrison's combinator parsers.
Since both formulas and terms can be parenthesized,
I ran into trouble with the following:
(P) meaning "the propositional variable P"
(c) meaning "the term constant c"
Then I have a reduce reduce conflict, eg. in the following cases
(P) /\ Q
(c) = 5 /\ Q
It occurred to me that even something as simple as the
following dumbed-down grammar is not LR(1) as far as I can tell:
T is "terms" and F is "Formulas"
T ::= var | ( T )
F ::= var | ( F ) | T = T
I can't think of a way to make this LR(1). In fact, it seems it's
not even LR(k), as (c) could just as easily be (f(1,2,3,...,n) = 5).
Thus I think my 'happy' experiment is a failure. Of course, with a backtracking
combinator parser this is easily remedied.
to Haskell. I thought I'd try Happy, Haskell's "yacc",
for parsing instead of Harrison's combinator parsers.
Since both formulas and terms can be parenthesized,
I ran into trouble with the following:
(P) meaning "the propositional variable P"
(c) meaning "the term constant c"
Then I have a reduce reduce conflict, eg. in the following cases
(P) /\ Q
(c) = 5 /\ Q
It occurred to me that even something as simple as the
following dumbed-down grammar is not LR(1) as far as I can tell:
T is "terms" and F is "Formulas"
T ::= var | ( T )
F ::= var | ( F ) | T = T
I can't think of a way to make this LR(1). In fact, it seems it's
not even LR(k), as (c) could just as easily be (f(1,2,3,...,n) = 5).
Thus I think my 'happy' experiment is a failure. Of course, with a backtracking
combinator parser this is easily remedied.
Tuesday, May 13, 2008
Nouns and Adjectives
Florian and Fulya were playing an interesting game today: name all
the words you can(excluding colors and homonyms) that are both adjectives and nouns. They got 10 in 30 minutes. It took me longer. Maybe being a native
speaker is a disadvantage...
Update: Emily thought of 8 in about 5 minutes. Maybe it's just me
who's bad at this game. Or maybe it's native speaking *men*...
the words you can(excluding colors and homonyms) that are both adjectives and nouns. They got 10 in 30 minutes. It took me longer. Maybe being a native
speaker is a disadvantage...
Update: Emily thought of 8 in about 5 minutes. Maybe it's just me
who's bad at this game. Or maybe it's native speaking *men*...
Sunday, March 23, 2008
Little, Big
I just finished the novel Little, Big by John Crowley.
I originally heard of it while reading the Wikipedia article
on Harold Bloom. It's a beautiful book, with language
as rich as anything I've read. I tend to mark particularly
good passages in books with those little postit flags, a practice
I highly recommend, as it doesn't damage the book. I was so surprised at much
of the prose that I have about 40 within the
first 200 pages. I noticed with delight that Crowley himself has
a similar practice.
I originally heard of it while reading the Wikipedia article
on Harold Bloom. It's a beautiful book, with language
as rich as anything I've read. I tend to mark particularly
good passages in books with those little postit flags, a practice
I highly recommend, as it doesn't damage the book. I was so surprised at much
of the prose that I have about 40 within the
first 200 pages. I noticed with delight that Crowley himself has
a similar practice.
Subscribe to:
Posts (Atom)