Signs of Triviality

Opinions, mostly my own, on the importance of being and other things.
[homepage] [index] [jschauma@netmeister.org] [@jschauma] [RSS]

Go Lisp!

After about half an afternoon of investigation -- which currently is about the maximum amount of time I can spend on anything -- I've decided that the next programming languages I'd like to learn shall be Go and Common Lisp. The decision process was about as thorough as you'd expect and was based nearly entirely on their respective logos/mascots.

Go gopherLambda The first one seems obvious -- a mascot reminiscient (not very surprisingly) of Glenda, the Plan 9 Bunny. That's just too adorable to pass up. Certainly beats a tapir. As for the second one: I have the great hope that using something associated with the letter lambda will make me feel smart. I think it's working already.

Having made this choice, let's try to justify it by finding other reasons to pick these languages over any other contenders. I had initially singled out a few of the more popular "newer" languages I'm not familiar with: Go, Clojure, Scala, and Ruby. I was leaning towards Scala and Clojure, as those seemed to be getting a lot more attention recently, so I went and looked how I might go about learning these languages and what kind of wonderful features they might have.

Now both of these happen to be running inside the Java Virtual Machine, which I first thought would be a great chance for me to get over my aversion thereof. Let's give Scala a chance. Hmm, let's see, where do we start? Let's try this link here. Too many links, too many choices. I want simplicity. Let's just download and install this thing and then see where it takes me.

Ok, scala comes with a manual page (goodie!) and invokes a REPL (these things seem to be all the rage these days - I'm fine with that). So far so good. Let's do the "Hello World" example:

$ cat >/tmp/HelloWorld.scala <<EOF
> object HelloWorld {
>    def main(args: Array[String]) {
>      println("Hello, world!")
>    }
>  }
> EOF
$ time scalac /tmp/HelloWorld.scala
   23.87s real     6.48s user     0.62s system
$ ls H*
HelloWorld$.class       HelloWorld.class        HelloWorld.scala
$ scala HelloWorld
Hello, world!
$ 

Whaa? 24 seconds to compile "Hello World"? Pffft. Anyway, looking for a decent tutorial here, gets me this page, which wants me to use some Eclipse IDE, create "projects" and the like - a non starter, I lost interest (for the time being) and move on to Clojure.

Clojure has the obvious benefit of having a logo that might make me feel smart, and it's seems intriguingly different:

Getting Started
Clojure is unlike most languages in that you don't generally install Clojure itself; it's just a library that's loaded into the JVM. You don't interact with it directly, you use a build tool and editor/IDE integration instead.

I did think that I wanted to get a bit out of my comfort zone and try out a different programming language, so I went ahead and followed the instructions outlined here. Alrighty, so I once again get a REPL, which is neat. Now what? Looking for a decent Clojure tutorial was disappointing. (My definition of "disappointing" here is "didn't seem to yield exactly what I was looking for in less than 5 minutes of poking the interwebs".) Getting Started provided links to various tools that I might need to install, including pointers to this, which scared the timid little explorer in me mightily, and so, with my rather short attention span immediately interrupted and distracted, I put Clojure on the shelf as well (let's say "for the time being, anyway" here, too).

John McCarthyBut Clojure reminds me that there's this other programming language that I never really spent much time on: Lisp. I don't know what exactly it is, but I'm somehow drawn to Lisp based on what I perceive to be an academic consensus that it's simply a "better" programming language (see above re a logo that makes me feel smart). With Lisp came back memories of Scheme (now called "Racket"). There seem to be a couple of useful documents available on http://docs.racket-lang.org/, including a simple tutorial showing how to write a web server.

Back in school, I wrote a bit of Scheme code that ultimately caused me to have recursive dreams, but I don't feel too traumatized by that experience. However, perhaps in an attempt to deal with that past, I felt that I might as well go to the bottom of this and just figure out Common Lisp. With, admittedly, perhaps a bit more patience and advanced intertube-poking-skills, I find and bookmark the following links:

So that's my first pick. Seemed like a good choice, what with it going back to the basics and doing things entirely different (from what I'm used to, anyway). And perhaps I'll even stick with exploring Clojure alongside Lisp, who knows. (Writing this entry yielded a few more useful links: Clojure - Functional Programming for the JVM and a simple (and unfortunately too short) online tutorial.)

The
Practice of ProgrammingFeeling all good about this decision, I went ahead and said to myself "Eh, what the heck, check out this Go language, too.". Besides the adorable mascot, the language also has the notable advantage of having been written by one Rob Pike, of having a prominent "Tutorial" link on its homepage, of using a compiler/linker and not making me even consider using some gigantic IDE and in general seems like it will provide me with a cozy feeling of being entirely familiar. That ought to balance any recursive lisp-induced nightmares.

And thus "Go" and "Lisp" it shall be. Of course I have no idea for how long this enthusiasm will last. In the process of writing this entry I also found some neat looking Scala resources (O'Reilly's "Programming Scala" book is available online, as is Twitter's Scala School), so who knows, maybe I will end up giving that a shot after all. Or maybe I will go with OCaml. Who knows.

September 29, 2011


[Learning Programming Languages for Fun and Profit] [index] [Marbles in my Underpants]