An Exhausting Week: Google Code, Winesburg, Haskell.

This entry was posted by on Friday, 6 March, 2009 at

What a long week!

I was in San Francisco all week visiting Google teammates, cooking up our latest exciting plans for Project Hosting on Google Code. Our whole team is eagerly awaiting the upcoming Google I/O developer conference in May (for programmers who want to use Google technologies in their own works). Still, it’s really exhausting to sit in conference rooms all day with co-workers while working out designs and strategies.

At the end of that trip, I stopped in Kansas City for a day on the way home to Chicago, to check in on the latest re-mounting of our musical Winesburg, Ohio going up at KC Repertory. (This is a huge production, and you can even hear a sample of a song on the theater’s website.) Andre and I got to rehearse the 5-piece pit orchestra, and listen to an unbelievable cast sing the show. The cast is made up of local folks, Chicago folks, and a bunch of famous Broadway pros. I’ve truly never heard the musical sound better… it just gave me goosebumps hearing the vocal harmonies stack on each other in various climax sections!

Now I’m finally home, and I can try to remind my kids who I am again.

On the plane, though, I finally finished my mini “learning Haskell” project. Because, you know, I wasn’t feeling like enough of an oppressed minority — I had to start teaching myself an elitist functional programming language just for kicks. 🙂 I’m having a blast re-wiring brain to solve problems functionally. I wrote a cute little program to compute a Julia Set on the complex plane. Here’s a sample session with the Haskell interpreter:

*Main> :load complex.hs
[1 of 1] Compiling Main ( complex.hs, interpreted )
Ok, modules loaded: Main.

*Main> let win = ComplexWindow (ComplexNum (-2) 2) (ComplexNum 2 (-2))
0.1 100 100

*Main> juliaWindow (ComplexNum 0.1 0.2) win
[[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2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2,2,2,2,2,2,2,2,2,2]]

In all seriousness: if you’re a programmer, it’s important to always be learning new things and new ways of thinking. It keeps your brain in good shape!

4 Comments to An Exhausting Week: Google Code, Winesburg, Haskell.

  1. Jack Repenning says:

    March 9th, 2009 at 11:40 am

    Cool! But to judge from this experience, you might want your next brain stretching side project to be something about usability….

  2. Greg Stein says:

    March 11th, 2009 at 8:12 am

    I see you’re still capitalizing the project hosting feature 😉

    Regarding Haskell: that’s all well and fine, but how does Haskell do with actually writing a useful tool? You know… some I/O processing on an input file.

  3. Ben Collins-Sussman says:

    March 11th, 2009 at 9:01 am

    I should write a separate blog post about Haskell, but…

    Really, it’s Bryan O’Sullivan’s free, on-line Real World Haskell book that got me excited. I’ve always found functional languages to be really beautiful and “cool” from the geeky intellectual point of view, but totally useless for real-world stuff. I tried Lisp, I tried Scheme — the communities are mostly academics talking about proving theorems and doing AI experiments. Totally impractical when it comes to writing “real world” software.

    Haskell is the first functional language I’ve ever seen which seems usable. Like, anything I’d whip out a python script for, I could see myself whipping out Haskell for just as easily. It has a huge set of practical libraries, an interpreter, and compiles to crazy-fast native code in seconds. I never imagined a functional language could actually be everyday useful until now. (Python still wins in general, because the barrier to entry is *so* much lower. Haskell requires a giant up-front investment to learn.)

    For an example of a haskell program that just does basic I/O processing on an input file, take a look at chapter 3 of the book.

  4. Dan Goldstein says:

    March 30th, 2009 at 6:48 pm

    Go Pluess & Sussman!