Emigre No.70: The Look Back Issue
January 22nd, 2010 • Uncategorized • No comments
Emigre and Gingko Press are proud to announce the publication of Emigre No.70: The Look Back Issue – Celebrating 25 Years in Graphic Design. The 512-page book covers the best of a quarter century of Emigre magazine – one of the most influential design publications ever.
Polar Employees (1966)
January 14th, 2010 • Uncategorized • No comments
I want to redo my home office. I think this’ll do.
ImaginArt: an interactive book concept video
January 13th, 2010 • Uncategorized • No comments
…is an installation that invites you to a new reading of some of the best albums published and illustrated in catalonia (ES). A comprehensive limitless reading, allowing you to know, moreover, the process of creating the book, other versions of the same story, play with literary precedents or invent new ones.
…is a game in two bands: The pace of reading the marks as you turn the page. The sound, images and voice run on us.
Very fascinating–the book as an interface.
Side by side: Python, Common Lisp, Clojure
November 25th, 2009 • Uncategorized • Comments Off
UPDATE: Find the rest of the code at http://bitbucket.org/gavinmcgovern/clj-bayes/.
My holiday project (of the sort that doesn’t involve cooking at least) is porting the Bayesian spam code from Peter Seibel’s great book “Practical Common Lisp” to Clojure. This will be a big part of the next-gen Big In Twitter that’s slowly coming together. Although I’ve been using Bayes, I haven’t really understood what was going on under the hood. I’m finding Peter’s chapter a fantastic walkthrough & approach to understanding it. He presents the basics and then goes on and adds optimizations. Perfect.
It was smooth sailing up until the other day. One little function tripped me up. I’ll show you.
Peter based some of his spam filter Common Lisp on a Python implementation from an article by Gary Robinson. Specifically Peter created a chi square function from this Python:
def chi2P(chi, df):
assert df & 1 == 0
m = chi / 2.0
sum = term = math.exp(-m)
for i in range(1, df//2):
term *= m / i
sum += term
return min(sum, 1.0)
There’s a lot to like there (I removed the comments): concise, minimal noise, short. Even if you didn’t know the math (like me!) you could probably follow along. Would probably be even shorter if you used Python’s list comprehensions.
Here’s what Peter came up with for the Common Lisp version:
(defun inverse-chi-square (value degrees-of-freedom)
(assert (evenp degrees-of-freedom))
(min
(loop with m = (/ value 2)
for i below (/ degrees-of-freedom 2)
for prob = (exp (- m)) then (* prob (/ m i))
summing prob)
1.0))
He uses the oddball loop macro. It’s a DSL for iteration. It’s charming, it’s weird, it doesn’t seem very Lispy. I like how it has synonyms, “summing” for “sum”, “collecting” for “collect”, etc. Verb tense agreement is important!
While there’s a loop in Clojure it isn’t at all related to Common Lisp’s loop. This is where things got a little muddy for me. Spent a lot of time trying various approaches and while I was able to achieve parts of the original function I wasn’t able to get the whole thing. The combination of “term *= m/i ” and the “sum += term” was killing me; so much happening at once.
Taking a breather I started poking around clojure-contrib. There is so much buried in there. A real gold mine. I eventually stumbled upon seq-utils and the “reductions” function. And that was exactly 100% what I needed. After Seq-utils and a little of Clojure’s list comprehensions and 10 minutes of coding I had this:
(defn inverse-chi-square
[chi df]
(assert (even? df))
(let [m (/ chi 2.0)]
(min
(reduce +
(reductions * (Math/exp (- m)) (for [i (range 1 (/ df 2))] (/ m i))))
1.0)))
It’s been many many years since I did any sort of Common Lisp programming but one lasting memory was the vast quantity of high quality code freely available. Lots of motivated people writing excellent Common Lisp. I’m finding the same with the Clojure community. I love just being able to reach into the common libs, pull out a few gems and slap them together. Thanks! (Btw, anything wrong my version?!)
Google’s Chrome OS is pessimistic
November 22nd, 2009 • Uncategorized • Comments Off
Listening to the motivation behind Google’s Chrome OS I was struck by how pessimistic it sounds.
What do you get in an OS designed for tomorrow’s netbooks? You get a lot less. You’ll more than likely run it on a very cheap feeling plastic computer. Keep in mind today’s $300-400 netbook isn’t what Google is targeting, they’re looking at something around $200, your future “second” computer.
So a cheap machine running a free (or heavily subsidized?) OS that’s essentially a glorified web browser. You use the Google-branded apps for all your work and store your files in Google’s data center (oops, I mean the cloud). You might even have some cheap wireless (i.e. slow) data service available so you can access your stuff on the go. If you can get by with just spreadsheets, text docs, calendar & email then this might just work for you.
Man, that’s depressing. Pretty certain I’ll stick with my current second computer, my iPhone.
Bur I don’t believe this is what Google sees as the future. The Chrome OS vision seems at odds with what CEO Schmidt sees. From a talk back in October, Schmidt sees big things for the web in 5 years. A couple of choice quotes:
- Five years is a factor of ten in Moore’s Law, meaning that computers will be capable of far more by that time than they are today.
- Within five years there will be broadband well above 100MB in performance – and distribution distinctions between TV, radio and the web will go away.
But Google wants you to enjoy all this great stuff with a substandard hobbled little machine running Chrome OS? It doesn’t add up.
San Francisco 1958 on Vimeo
October 30th, 2009 • video • Comments Off
San Francisco 1958 from Jeff Altman on Vimeo.
A relaxing way to start Friday. Nice soundtrack too.
Big in Twitter is offline for good
October 27th, 2009 • Uncategorized • Comments Off
Remember that? Big In Twitter was a little hack I threw together earlier this year. Briefly, it collected band names and searched for them on Twitter and tracked the number of mentions and where (geographically speaking) they were being mentioned. However I’m no longer interested in pursuing this particular solution.
As a post-mortem, I’d say you could get a lot of mileage out of not terribly sophisticated Ruby code that you spin up and tear down many times throughout the day. If you need to keep your Ruby running longer then you have to do something sophisticated, think Curb or EventMachine vs net-http/open-uri. TokyoCabinet is a great choice and keeps getting better. Sinatra & Passenger remained a reliable constant. But I don’t think I’ll ever use Haml or Sass again. I started to dread having to touch the Haml so I eventually stopped; that’s never good. Keeping track of spaces was hard! Ultimately, nothing controversial.
Big in Twitter will be back of course. Someday.
Links October 23rd
October 23rd, 2009 • Uncategorized • Comments Off
- Amazon.com: Learn Advanced Mathematics on Your Own – collect enough lists of "good" math books, compare them all, what is referenced the most, obviously the "best".
- GoodDoop: A Cookbook for Hadoop – a collection of links to various math/machine learning/stats/etc papers/urls/articles involving hadoop in some way
- Incanter Cheat Sheet « Data Analysis and Visualization with Clojure –
- SICP in Clojure – yay!
- Products – Karmasphere – a very complete top-to-bottom ide for dealing with hadoop
The Pencil
October 22nd, 2009 • tumblr • Comments Off
Words such as “fantastical,” “enigmatic” and “breathtaking,” often accompany detailed shots of their coveted writing utensils, thus painting a portrait of these collector’s world.
A Time To Get finds some great photography from the pencil collector’s world.
Links October 21st
October 21st, 2009 • Uncategorized • Comments Off
- Ruby Daemons and Angels [Article] « elc technologies –
- The Answer Factory: Fast, Disposable, and Profitable as Hell – the future is mechanical, cheap, shallow
- Russell Quinn > McSweeney's – i like the idea of subscription media iphone apps
- A Tour of Scheme in Gambit – Gambit wiki – whirlwind tour, in a nutshell, a gentle introduction, etc. all wrapped into a single pdf. nice.
- Citerus – From Java to Clojure – simple example, quick read, take a java method to somewhat idiomatic clojure


