Thursday, August 20, 2009

Matlab + plot2svg -> Inkscape

I like Inkscape. It is wonderful. However, sometimes importing pdfs generated in Matlab into Inkscape can be a pain -- issues with missing fonts, objects being broken up strangely, no transparency support, etc. I just found a function called plot2svg that exports figures directly to svg. Here's an example I generated using the script randomcurves.m:



Works great! Thanks Juerg Schwizer!

Monday, August 17, 2009

how many monkey butlers will there be?

Here is a quote that I learned today, is true, and is relevant to the pointlessness that is this blog:

We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true.
-- Robert Wilensky, 1996

Kyle tells me that it is actually 1,000 monkeys for 1,000 years. Being a math whiz, I retorted that a million monkeys could get done in one year what 1,000 could get done in 1. Now, I have looked up the history of this adage, figuring we needed to get the numbers right.

So apparently the original point of the quote was that the monkeys would not recreate Shakespeare:
Concevons qu'on ait dressé un million de singes à frapper au hasard sur les touches d'une machine à écrire et que, sous la surveillance de contremaîtres illettrés, ces singes dactylographes travaillent avec ardeur dix heures par jour avec un million de machines à écrire de types variés. Les contremaîtres illettrés rassembleraient les feuilles noircies et les relieraient en volumes. Et au bout d'un an, ces volumes se trouveraient renfermer la copie exacte des livres de toute nature et de toutes langues conservés dans les plus riches bibliothèques du monde. Telle est la probabilité pour qu'il se produise pendant un instant très court, dans un espace de quelque étendue, un écart notable de ce que la mécanique statistique considère comme la phénomène le plus probable...
-- Borel, 1913

Now, to prove my wizardry in all subjects (math + French = all, right?), I will attempt to translate for you! This says that it is as likely for a million monkeys at typewriters for 10 hours per day for 1 year to reproduce all books in any library in the world as for us to observe a deviation from that which statistical mechanics predicts to be the most probable phenomenon. So, Borel knew what he was talking about with the monkeys. By the way, this is Borel as in Borel set. Anyways, according to my single source, Parable of the Monkeys, it is this Sir Jeans guy who first started going the wrong way with the monkeys in 1930. He says he heard we needed:
six monkeys, set to strum unintelligently on typewriters for millions of millions of years ... to write all the books in the British Museum.
By the way, the math is worked out on Wikipedia if we assume uniformly distributed, independent events (talk about unrealistic probabilistic assumptions!):
If we set the number of monkeys equal to the number of particles in the observable universe, 1080, typing 1000 keystrokes per second for 100 times the life of the universe (1020 seconds), the probability of the monkeys duplicating even a short book approaches zero.
and
Even if the observable universe were filled with monkeys typing for all time, their total probability to produce a single instance of Hamlet would still be less than one in 10183,800
Also, we apparently would need 10 billion monkeys just to be more likely than not to get the word "banana".

Anyways, I don't know where I'm going with this. I just know I know way too much about monkeys and typewriters now. Also, this is funny, and a great use of 2,000 pounds:

In 2003, lecturers and students from the University of Plymouth MediaLab Arts course used a £2,000 grant from the Arts Council to study the literary output of real monkeys. They left a computer keyboard in the enclosure of six Celebes Crested Macaques in Paignton Zoo in Devon in England for a month, with a radio link to broadcast the results on a website. One researcher, Mike Phillips, defended the expenditure as being cheaper than reality TV and still "very stimulating and fascinating viewing".[28]

Not only did the monkeys produce nothing but five pages[29] consisting largely of the letter S, the lead male began by bashing the keyboard with a stone, and the monkeys continued by urinating and defecating on it. The zoo's scientific officer remarked that the experiment had "little scientific value, except to show that the 'infinite monkey' theory is flawed". Phillips said that the artist-funded project was primarily performance art, and they had learned "an awful lot" from it. He concluded that monkeys "are not random generators. They're more complex than that. … They were quite interested in the screen, and they saw that when they typed a letter, something happened. There was a level of intention there."[28][30]

Yeah, you should just read the article on Wikipedia. I will stop quoting it now.

This reminds me of my idea of the day inspired by The Sheep Market, for coming up with ridiculous projects for Mechanical Turkers to do for a total of $20. I have $20 and am taking suggestions.

i eat chocolate chips like you for breakfast


Just kidding, you are not a chocolate chip. But I have had a bag (well, bags, really, as they mysteriously turn up empty every couple days) of chocolate chips on my desk in front of my computer for the past couple weeks. Organic, Private Selection, Ralph's-brand chocolate chips, mind you (now that's fancy!). Anyways, I've been working a lot, and being too lazy to get up and make myself breakfast, I keep eating chocolate chips from the bag for breakfast. Not even consciously. It just happens. Some kind of autonomic reaction of my hand and mouth to an open bag of chocolate chips. It is sad cuz I miss oatmeal, a more reasonable breakfast. I even ended up having oatmeal for supper last night, I missed it so much. Actually, it was more necessity than yearning -- we have not been to the store in ... a while. In conclusion, I am not good at being an adult :).

Okay, enough about me. Here's a much more entertaining video of a ... prairie dog? ... yelling "Alan!". You're welcome :).


via videosift.com

PS More sharing! Here are other things on my desk that a non-slovenly adult should not have on her desk. A box of Thrifty-brand sugar cones, two spoons that are caked in ice cream and were used to make ice cream cones the last two nights, then left on the desk, a withered yellow flower that I had put in K's hair when we went for a walk around Caltech, a pot holder, and an empty plastic container of gummi [sic] strawberries.

Thursday, August 13, 2009

a little class




I just scrolled through this thread recommended by this list of "The Most Epic Threads on the Interwebs" (ps "epic" can only be used ironically now, in case you were wondering). I was inspired to class-up my blog with some sparkles. Above are some sparkly animations from this thread. You can also check out my myspace page, which I have chosen to use to display animated gifs of dancing jesus (among other superstars). You can make your own sparkly images at Blingee.com and find sparkle clip art at SprinkleSparkle.co.uk.

I made this one on Blingee.com. I am pretty sure it is awesome:

go america!

Some tasteful selections from SprinkleSparkle.co.uk:


Tuesday, August 4, 2009

i don't like the washington post today


I apparently don't like the Washington Post today. My favorite schaudenfreude stories of the day were all anti-Post. Also, Slate is owned by the Post, and I seem to hate Slate with some amount of passion these days. Of course, there was the whole Froomkin issue which is probably a bigger deal than the issues of today, but I don't know much about it, having never been a Post reader, and thus having never read Froomkin's blog. But, the internet people whose opinions I trust seem to be pro-Froomkin and anti-Post on this issue. (It is getting annoying to put Post in italics. Let's see how long I keep that up.)

Anyways, so here is one good, funnier story about how the Washington Post sucks: The Time Gawker Put the Washington Post Out of Business. I read the Post story after (a) reading the Hater story which led me to (b) read the Gawker story, which in turn (c) led me to read the Post story. Here is the Gawker's summary of the controversy:
[R]eporter Ian Shapira profiled Anne Loehr, a consultant who gets companies to pay her to explain the mysteries of Gen Y. Our own Hamilton Nolan wrote an item about it in which he reprinted four of Loehr's most laughable quotes and ridiculed them. After initially being pleased that his metro profile got some play on a widely read blog, Shapira changed his mind when he got an email from his editor: "They stole your story. Where's your outrage, man?" This led Shapira, in a piece for the Post's Outlook section, to conclude that his job is doomed.
The difference between the Gawker & Hater versions and the Post story is the credulous, mostly laudatory tone of the Post piece. The generational consultant said inane things inanely to inane customers, yet the original story did not point out how ridiculous the things she said were. The Gawker and Hater provide amusing, biting wit, to make us feel a little better about the fact that this woman is able to make a living of some kind doing such worthless things. My reaction to the Post story was that the author must be a retard to think that this woman was worth profiling in his paper, unless purely for the purposes of derision. Stupid Washington Post.

Okay, second stupid Post news of the day. So Dana Milbank, trying to save face after sparring with Nico Pitney on CNN, has begun a series of unfunny videos called "Mouthpiece Theater" generally seen as a sign of bad things to come for the mainstream media (see The Daily Dish and The Gawker and Glenn Greenwald's blog). Here is an excellent parody of these videos:


Washington Post's New Editorial Team - [Two Dudes and a WebCam]

Update: So Milbank and friend apparently still haven't gotten the message, and have put up another video. You can read about it on the Huffington Post: "
Milbank And Cillizza Record Unfunny "Response Video" To Outrage Over Last Unfunny Video" (via Ta-Nehisi Coates: " Let it go boys. A HuffPo commenter nailed it--'The trick is to stop digging.'").

Update Aug. 5: Mouthpiece Theater has been put of its misery. From the guy who was not Milbank:
What did I learn from doing Mouthpiece? That I am not funny on camera (this will not be a revelation to many of you), that name-calling is never the stuff of good comedy, and that the sort of straight, inside dope reporting I pride myself on made for a somewhat discordant marriage with the sort of satire Mouthpiece aimed to create.

Sunday, August 2, 2009

read this: war dances

I just read "War Dances" on the New Yorker website. It blew my mind. It was funny and poignant and creative. I wish it was longer, which is not the standard reaction to a 10-page article on the web. I am going to buy a book by Sherman Alexie now. Also, I'm listening to "Landmines" by St. Vincent right now, and she just said "smoke signals" while I was thinking about whether I would mention that Alexie wrote the screenplay for "Smoke Signals", which was a critically-acclaimed movie you might have seen (also, it had Nobody in it), so I figured that was a signal from, I don't know, my computer (who is in charge of both my play- and reading lists) to in fact mention it.

Saturday, August 1, 2009

coolest scientologist


Bendin' in the Wind by *spacecoyote on deviantART

I proclaim Beck to be the coolest Scientologist. You have to be pretty cool to get a pass for being a Scientologist, and Beck is really that cool. Further proof: if you google "coolest scientologist", you only get links about Beck. Here's a link to his latest album Modern Guilt on imeem.

"Got You Pegged" on This American Life


Image by Robot Hunter, This American Life Episode 362

This American Life this week has a rerun of the "Got You Pegged" with "stories about the pitfalls of making snap judgments about others". Particularly Act 1: "The Fat Blue Line" seems relevant in the wake of the Gates arrest scandal. This is a story by Richard Price (of The Wire, Lush Life, Clockers) about an absurd (possibly exaggerated) incident of racial profiling by New York police.