I’m presenting tonight at the Chicago Perl Monger’s meeting. I’m giving a tour of some stuff that might appeal to Perl programmers who want to learn new languages. I’m focusing on Ruby and Python. Here are the notes, they’re also available in my public subversion repository:

Language Hootenanny

Notes for the language hootenanny presentation at February’s Chicago.pm meetings.

Agenda

  1. A little bit about me
  2. Find out what everyone wants to know
  3. Language overview
    1. for each language, a brief discussion about its culture, philosophy, and resources. Then the one thing about it that’s really “cool” and some code samples.

What I like about a language

Object oriented, good testing framework, great documentation, fun community, lots of libraries, web stuff. Also, interactive shells…the total time it takes to learn a language is cut down considerably if you have an interactive shell to play with. They’re pretty standard anymore, so this is usually just a given.

Classifying languages

There’s really two kinds of languages in my book, the kind you can make money from and the kind you learn for fun.

Ruby

Resources

My recommendation to learn Ruby is to buy the pickaxe book, and start playing around with it. why’s guide is also good, but it is _pretty quirky, so be prepared. The pickaxe is better if you’re already familiar with object oriented programming and you want to learn Ruby.

One cool thing

Blocks

Python

Resources

The best way to learn Python is to jump into the Python tutorial on the website, then skip around “Dive Into Python.”

One cool thing

List comprehensions.

Perl 6

Resources

PHP?

I haven’t been keeping up with the PHP community enough to really be able to tell you what’s up. I do know that PHP5 is interesting. Discuss amongst yourselves if anyone is interested in PHP.

Other Stuff I Don’t Know (but would like to learn)

Haskell, Lisp

Stuff that other people want to learn, but I’m not so sure about yet.

Erlang, REBOL

It really doesn’t get any simpler than this: http://xmpp4r-simple.rubyforge.org/.

Let’s go folks, Jabber is the command line of the future.

I’ve checked out a variety of Jabber client libraries over the past couple of months. The idea of writing a Jabber-bot sort of floats up pretty frequently, but I always get bogged down in the interfaces. I admit, it’s because I’m lazy and weak. However, now I finally have a library that meets me in lazy-town and gets me chatting on Jabber. Pretty great.

I just checked in my work from this morning’s TechCoffee. I created a very minimal set of migration scripts for Captains, Ships, Locations, and added a bit to the migration to build 10k locations in a 100 x 100 grid. I started to adapt the user management recipe from Rails Recipes for logins, and then ran out of time. All in all, a productive first TC.

I also came up with a cool idea for building maps in the game. It’s based on the simple ASCII maps from the game Austerlitz. Something like:


**............**
***.........***
**...........p**

Could be parsed up and converted to a series of locations where the asterix’s are land, the dots are sea and the p’s are ports. It might be an easy way to build fancy maps quickly. Something like .[50]. could be parsed as “50 sea locations”.

Not sure if this is a bug or not, I can’t find an existing bug report. I have no idea why this would be this way.

This script:
print "hello"
sleep 5
exit true

run with sudo, breaks. The sleep call never happens.

This script:
print "hello"
sleep 5
Kernel.exit(true)

run with sudo, works like a champ.

Weird, no?

Obie Fernandez posted his slides from his JAOO presentation.

My favorite slide:

“The fascinating thing is that, in my
experience, most well-written Ruby
programs are already a DSL, just by
nature of Ruby’s syntax.”
Jamis Buck, 37signals

Part of my hangup with the DSL “movement” as of late has been, “are we really making DSL’s here, or just nice clean API’s?” Jamis’ quote, in my interpretation, sort of backs that up. I’m probably taking it totally out of context. Regardless, it’s fun to get worked up about DSL’s, it makes you feel like you’re writing a fancy language, instead of yet another interface. Whatever gets you fired up about making clean code is a good thing.

I don’t mean to sound cynical, I’ve been waging a personal war against cynicism. This isn’t a “why bother calling these DSL’s” speech, it’s a “YOU’RE SMARTER THAN YOU THINK” speech. DSL’s aren’t mystical, at least not in the Ruby world. They’re just clean code.

Edited to add: I found Jamis’ entry that the quote was taken from, I didn’t get the context of the quote wrong, as this quote, “A DSL can be thought of as (and many cases, really is) an API for your application.” sort of proves. So…that’s good.

I ended up moving Victim of Time from Dreamhost to Textdrive last week during the “great Dreamhost outage of ought-six.

I’m still a fan of Dreamhost, but for Textdrive is better geared for Django and Rails. I have control of a lighttpd server with my own port that Textdrive proxies behind Textdrive controlled Apache server. It’s a very flexible setup that makes me feel like I have root without actually having root. Textdrive is also setup nicely for growth, with “business” shared hosting plans as well as container hosts.

All in all, a very smooth transition. I’m keeping the majority of my sites on Dreamhost as it’s dirt cheap and super easy to use. I may end up migrating more over time, but don’t see a need right now. Dreamhosts’ $9 a month is hard to argue with.

I just spammed Chicago user groups with a message about this. I’m getting pretty good at that. Kind of a cheap tactic, but I like getting the word out.

WBEZ, Chicago Public Radio, is looking for an open source developer, or team of developers, to build the web front end for their very ambitious Secret Radio Project.

It’s a pretty ambitious project, with a very quick turnaround time. They took out an ad on the 37signals job board that explains things a little better.

My friend Steev is leading the tech effort for the station. He’s a really bright guy, and would be great to work with. We built the original Chicago Improv Network together. Steev is also the force behind Don’t Spit the Water. The guy is a machine.

I’m really excited about this project, and plan on helping in any way I can. I wish I could throw in for the actual contract, but am happily employed. I hope someone from Chicago takes this job…it has a ton of potential.

I’ve been playing around with Hpricot for the past hour or so. It’s very fast, which is cool. I’ve tried Rubyful Soup in the past, and really liked the api, but it’s pretty slow as it’s pure Ruby. Hpricot is a Ruby wrapper around a C library, which has significant speed advantages.

I don’t really have a usage opinion of one over the other just yet, however, both are included in a work app I’m working on. A bunch of pages are stored in a table. Each page object now has a .soup method and a .hpricot method. I haven’t done anything with either, but it’s good to know they’re there. I’ll probably start parsing some of this stuff out next week.

I love _why’s libraries, perfect mix of oddness combined with genuine usefulness. Although I ended up not using it for this project, mouseHole was a big learning experience for me. _why’s code is a great learning tool.

I’m 30!

So, expect a lot more mature blogging now, instead of all this hot open source stuff I’ve been tossing out at you. Now that I’m an old man, I’m pretty sure I’ll be writing Java or C#, kicking back with my enterprise friends, chatting about the power of waterfall.

So long 20′s, I barely knew you.