Bathroom Reading Material

The Eternal War

| Comments

Editor wars have been going on for many, many years. Many, many years before my time. Obviously, it isn’t a war in the traditional sense, but more of a war of words. Attitude and colorful remarks from both sides of the war have kept it raging behind the scenes and will continue to do so for the foreseeable future. Emacs and Vim are two very different text editors with two very different designs and philosophies. At their core, they’re both meant to help users edit text. That is where the similarities end. Vim is a very lightweight editor. It tries to do one thing and do it well — edit text. It does this well and always has. Emacs is a 500 pound gorilla powerhouse that is designed to do anything that anybody could ever possibly want. Its extension language is a Lisp dialect that was created specifically for the editor, and it’s quite capable. I think that Vim is a fantastic editor. That is the goal, right? To be a fantastic editor? It succeeds in what it sets out to do. Nothing wrong here. But Emacs isn’t just an editor. As far as I know, nobody ever claimed that it was a lightweight editor and that it tries to be what Vim is. It absolutely doesn’t. When you experience arguments between Vim and Emacs users, the primary argument from Vim users is that they want a text editor, not an operating system. And this is where I begin to get confused. Why is this objectively a bad thing? Is it a bad thing simply because it isn’t precisely what Vim users want? I understand their desire for minimalism, but that is what they want, and not necessarily what everybody else wants. I don’t see how it can be objectively bad for Emacs to not be limited in functionality. That is not what Emacs is meant to be. Personally, I enjoy being able to play Tetris, edit text, talk on IRC, read email, and run a terminal (and possibly even Vim itself from within that terminal) all within the same application. These are just a few examples of things that Emacs can be extended to do. A long time ago, how lightweight an application was was very important due to hardware and space limitations. Vim is very small, and Emacs is large®. Some people still make this argument. It’s 2011. Please, be serious. 20MB and a bit more RAM wont make very much of a difference. This is perhaps the silliest and most irrelevant argument of the bunch. I don’t have much to say about it. A useful metaphor is the cell phone. Believe it or not, people used to purchase those things in order to make phone calls whilst not near a land-line phone. Shocking, isn’t it? These days, the making calls part of phones are perhaps the most irrelevant part of the phone itself. We are now, quite literally, packing entire operating systems (that are actually extremely capable) and powerful hardware that, just a few decades ago, would have been considered magic, into our phones and distributing them among the people. But they still make phone calls, and a lot of them do it very well. These phones do a lot. They do things that are entirely unrelated to making phone calls. I use my cell phone as a modem and my internet is my phone’s internet. Phones are also wildly popular, and the vast majority of people don’t disregard cell phones, joke about them, or be hostile towards them simply because they offer amazing functionality. Some people, however, just want to make phone calls. People still use home phones. Land-line phones do one thing, and they do it well. We don’t throw them away simply because we have the hottest and most powerful cell phone on the market. This concept applies to Emacs and Vim. I think they coexist well, and I think that arguing about which is best is, at best, silly. They’re different editors designed for very different things. They have wildly different philosophies and whichever of those philosophies appeal to you the most decides which editor you will choose to spend your time with. Most importantly they both do what they do very well. There are some real and serious arguments that impacts one’s choice of editor. Emacs and Vim are very different when it comes to commands. Emacs uses key chords and Vim mostly uses words and letters. To close Emacs, you’d type C-x-C-c or control+x control+c. In Vim, you’d switch to command mode and type “:q”. Preference over one or the other often decides which editor someone will use. I like key chords. I can understand why others may not. In conclusion, I pose a question: why do we continue to ridicule each other? I die a little inside whenever I see arguments where there are jokes like “I don’t use Emacs because I only have 1TB of harddrive space.” and “I want a text editor, not an operating system.”. Wouldn’t we be more productive using whatever editor we please to get real work done rather than arguing about which editor we should use to get said work done? I think so. To people unfamiliar with the big two, I propose a piece of advice: try out both of them. Don’t go off and read arguments, because those arguments will almost certainly fill your mind with misconceptions and silliness that need not be there. Just yourself is all you need to decide which editor you like better. It’s you that will be using it, not them. They don’t have to like it.

My Quest for Decent Cell Service

| Comments

I recently spent a couple of weeks doing hardcore research into the various cell service providers in the USA. Ultimately, I decided on Sprint and the HTC Evo 4g. I’m satisfied. Here is the story. I live in an extremely small town in Alabama called Eldridge. There is no DSL here, and there is no Wi-Fi. If you want even remotely fast internet here, your options are satellite and mobile internet. For a very long time, I’ve lived with dialup internet. Yes, there are still places on this planet where dialup is the best option at any given point of time. I pray to whatever God may exist that this changes and changes soon. Nobody should have to live with it. The worst part is that I am a programmer. A programmer on dialup? Seriously? Imagine me having to tell people “I can’t watch that video because it’ll take three days to load.”. Explaining it is the worst part. You eventually get sick of people going “wut? how?” and eventually stop bothering to mention it unless you don’t have a choice. Thus, I’m not sure many people actually know that I’ve been on a dialup connection. Even when I wasn’t on a dialup connection, I was on a mobile connection that was almost on par with the dialup connection, making it quite redundant. Anyways, let’s talk about internet. Satellite is an okay option. The problem is that the major providers (Wildblue and HughesNet) cost a small fortune in one way or another. There is no optimal place to put a satellite dish on my roof, thus standard installation wouldn’t be an option. Pole installations can be in the range of $300-$600 dollars, and that just isn’t something I can live with. Beyond that, satellite is limited in that the latency is horrible. On top of all that, the major providers place caps on your head that limit your usage of your high speed. I’m a firm believer in “what the fuck is the point of having speed if I can’t even use it?”. This applies. Mobile internet is a great option. With these modern phones, you don’t even really need a special modem. Android phones are really great about providing ways for you to tether. And it isn’t really all that pricey from any of the carriers. I pay for cell service anyway, so it isn’t a really huge deal. The problem is that carriers do not appreciate it when you rape their networks and suck up their bandwidth. Thus, a lot of them impose caps. Verizon is supposedly uncapped, but try googling “verizon cap”. One person will tell you there are no caps, another will tell you something else. Apparently they change their ToS like an ice cube changes state when thrown into the sun. I’m not into that. Verizon also has an add-on plan for tethering Android phones via wifi. $20 a month with a 2GB cap. Goodbye. T-Mobile, for a long time, allowed tethering galore. They pretended it didn’t happen, and silently allowed. Recently, they decided to jump on the opportunity to snatch some more cash and started imposing a $15 tethering and wi-fi sharing plan on users. I don’t believe there is a hard cap, but they have some awful scary wording in their ToS about excessive usage. Besides that, T-Mobile has notoriously horrible service and my area is certainly no exception. They have internet here, but it is a measly 1kB better than the dialup. Fail. AT&T is… well.. AT&T. I hear nothing but horror stories about AT&T. In any case, they also have low caps. Sprint is great. It’s said that sprint has horrible customer service, but I haven’t really experienced this. I ended up deciding on Sprint. I went to their store and the staff was excellent. They got us all set up in around 4 hours and I was on my way. I had some hiccups because my phone number prefix (the three digits after the area code) was Birmingham, AL, which isn’t local. I called customer support and talked to a somewhat incompetent woman that changed my area code instead of my prefix, and then I got cut off and my phone stopped working. My next call to support got it all fixed up. Most importantly, each person I talked to was American. They all spoke proper English. I’m not racist and I certainly understand that foreign people need jobs too, but if you’re doing support for American people and you can’t speak understandable English, you’re in the wrong line of work. Sprint’s coverage map says that I’m in a 3G area. At my home, I get around 15kBps with spikes to 16-20. I know that this isn’t real 3G speed, but it is *so* much better than dialup. With dialup, you’re pulling down 2-3kBps. Unreasonable! I’m obviously still not a speed demon, but I can stream Pandora radio and a large selection of grooveshark songs on the lower quality side. I’m very satisfied. This is better, and better is okay with me. Nonetheless, I can’t blame it for not getting perfect reception. I live on the dark side of fucking nowhere. Furthermore, Sprint does not, at this point in time, have any caps. At all. They offer a $30 wifi tethering add-on that allows you to turn your phone into a wifi hotspot. However, USB tethering is free in Android 2.2. While I mostly just use the USB tethering (the phone needs to be plugged in anyway because it’ll run out of battery life rather quickly while tethering), I went ahead and got the wifi hotspot plan anyway. I think that, for uncapped and excellent service like this, $30 bucks a month is totally reasonable. So, I’m canceling my old dialup service (that I actually haven’t used in a long time since I was tethering with my T-Mobile phone). Insofar, I’m pleased with Sprint all around and I think I’m going to stay awhile. Not that I have a choice, given the 2 year contract, but I do have around 20 days to take everything back and jump ship. I don’t see this happening though. I don’t see myself being any happier with Verizon and friends. I have okay service with Sprint, internet, and holy shit, I can even make phone calls! What I’ve learned from this is that all providers suck in one way or another. If you try to find the perfect cell phone provider, you’re in for a huge disappointment. Do what I did: find the provider that fulfills *your* needs. They’re always going to suck somehow. Find the one that sucks the least in the ways that matter to you. The same probably applies to internet service providers and other, similar things. As a side note, I was really surprised to see that Ubuntu 10.04 automatically detects and connects when you plug your phone into the computer’s USB port and switch on USB tethering. I nearly shit myself. Fantastic. For the record, the phone I have is an Evo.

Explaining Meet Clojure

| Comments

It isn’t much of a secret that I’m writing a book on Clojure, tentatively titled ‘Meet Clojure’. I’ve talked about it on twitter and IRC. People have been asking me about my focuses and such for the book as well as other important details, so instead of repeating myself for each question, I’ll explain the book, the purpose of the book and all of that noise here.

Niche

Freeness. There aren’t many free online resources for new Clojure developers. This book’s electronic version will be licensed under a Creative Commons license and be made freely available. In addition the source of the book will be available on Github at some point in time.

Focus

Beginners to Clojure. I want my book to be the logical step backwards from The Joy of Clojure. It’s a whirlwind tour of Clojure designed to teach Clojure to a beginner and get them up and running with their own project, a build tool, and other important things. It isn’t designed to teach the nooks and crannies of Clojure or to go really in-depth about things. The Joy of Clojure does this well, so I don’t need to. My book will be a comprehensive introduction and tutorial to the language. By the end of the book, readers should be writing their own code and be thirsty for Clojure. Also important is the tone of the book. I’m writing the book in a spirit very similar to Learn You a Haskell. My book is meant to be very lighthearted and easy to read. It’s amusing and humorous, but not weird to the extent of _why’s Poignant Guide to Ruby.

Audience

Everybody.

Title

The working title ‘Meet Clojure’ may change. People seem to like it, as unclever as it is. I’d like for the book to have an amusing or clever name, and somebody recommended ‘sexpbook’ which seems to qualify. I’m leaning towards the final title being “Meet Clojure: The Sexpbook”, but nothing is set in stoned and I’m still taking suggestions.

Process

I’m writing the book in pandoc’s extended version of markdown. I’m letting pandoc compile the markdown source to latex and then letting xelatex compile the latex to a PDF. I’m writing the book in Emacs using markdown-mode. When the book is finished, I’m going to conspire with a friend to get a good looking HTML version of the book (which pandoc can handle the hardest part of doing) up and running. The book will be open source, so formats that people want that I don’t provide can happen. I have no release date. I’ve got a lot of the book already written, but there is plenty more to do. I expect it finished in less than 3 months. No promises, because life throws curve balls.

Review

A lot of people I know have been given access to my drafts and a lot of people, including Clojurians, have their eyes all over this book and thus are helping me with technical portions of the book. One friend has pointed out that he isn’t opposed to copy-editing the book for me, so I’m doing okay in the review department.

Publishing

I don’t know whether this book will ever be published. This book was a random idea that grew into something big. I had already written 50 pages before publishing ever even came to mind. I don’t know whether or not this book will get published or if I’ll even try to get it published. I may send it to some publishers upon completion, and I may just self-publish it. I may do nothing at all and just provide online copies with a humble little donate button beside them. I’d like to make a little money off of this book, and God knows I could use it, but the world of publishing is very new to me, so I have no idea how any of this will work out. Update: I’m currently talking with No Starch about possibly publishing this thing. Fingers crosses.

Conclusion

I’m not stingy with my book. It’s going to be open source and free anyway, so I don’t mind giving drafts to people who ask and are interested. If you’re a Clojurian interested in reviewing the book or similar, you can contact me via email or twitter. My email address is i@this website’s base domain. You can reach me on twitter @IORayne. I hope that, when this book is done, everybody has as much fun reading it as I did writing it. -Anthony

Introduction to Sexpbot

| Comments

Introduction

Sexpbot is an IRC bot written in Clojure. He was my first serious Clojure project, and my largest project to date.

commit 583717820d07c899250bb58a69721feac33cba00
Author: Rayne
Date:   Sun Mar 14 09:43:59 2010 -0500
First commit.

Since that first commit, sexpbot has undergone 10 zillion partial rewrites, redesigns, and rethinks. In the beginning, sexpbot was an IRC bot built on the Pircbot IRC framework written in Java. Eventually, when I learned more about the IRC protocol itself, I wrote Irclj to replace pircbot in sexpbot. That project is still active, and I’ve got a contributor working with me. Sexpbot is an extremely extensible IRC bot. It has a full on plugin framework, including a DSL for writing plugins. It can handle web serving with compojure and jetty along with commands and a hooking mechanism that can be used to make the bot do pretty much anything imaginable. There are quite a few plugins included with sexpbot, including plugins for searching with Google, evaluating Clojure code, evaluating Haskell code, and other things you’d expect from any IRC bot such as maximum user tracking and checking to see when a user was last seen by the bot. Recently, I’ve been working on generalizing sexpbot to allow for multiple protocol support. I’ve already added twitter support, and I plan to add things such as email and XMPP support in the future.

How does it work?

At it’s core, sexpbot is only concerned with receiving messages from a source, and sending messages to a source. Those are the only things that really matters as far as communication with a protocol goes. When sexpbot starts up, it connects to whatever it is supposed to connect to. It constructs a callback map of functions that will be called when certain events happen. The most important and general is the on-message callback, but there can be protocol specific callbacks as well. For sexpbot to recognize a plugin, a plugin has to be on the classpath, have a namespace starting with sexpbot.plugins, and include a call to defplugin. Sexpbot requires all of the plugins that it has been asked to require, and loads the ones that it has been asked to load. There are two distinct steps where sexpbot requires a plugin namespace, and then loads the plugin by calling a function that has been defined in the namespace by the defplugin macro. When the loading function for a plugin is called, it adds relevant information to the ‘bot’ ref. This is a ref containing a map that contains all information relating to the bot, including the configuration, plugin, and command information. This ref, along with a communication or ‘com’ map is passed around to all commands, hooks, and everything else that needs it. When a callback is triggered, all associated hooks are called. A hook is a function that is called with all of the information pertaining to the callback (in the case of on-message, stuff like who sent the message, where the message came from, the message itself, etc), along with the com and bot refs. Without any plugins loaded, there will only be a single hook, and this is an on-message hook. This default hook calls an internal function called try-handle that forms the basis of the bot. The try-handle function basically just splits up the message into pieces, and checks to see if it is a command. A normal command is any message sent to sexpbot that starts with a configured prefix. There can be as many as you like. In the live sexpbot (in #clojure), the prefixes are $ and sexpbot:. When try-handle decides that a message is a proper command issuance, the command is looked up in the bot ref. If the command is there, it is called with the map containing all of the information that was passed to try-handle, and then it is up to the command to do it’s work and talk to a protocol. And then we have hooks that plugins can add themselves. When a plugin defines a hook function, it is added to the callback list. This allows for a plugin to have the flexibility to do absolutely anything, like get and respond to non-commands. Whenever a callback is triggered, all hooks attached to that callback are called.

Example

Here is a simple example plugin (taken from google.clj): [code lang=“clj”] (ns sexpbot.plugins.google (:use [sexpbot registry] [clojure-http.client :only [add-query-params]] [clojure.contrib.json :only [read-json]]) (:require [clojure-http.resourcefully :as res]) (:import org.apache.commons.lang.StringEscapeUtils)) (defn google [term] (–> (res/get (add-query-params “http://ajax.googleapis.com/ajax/services/search/web” {“v” “1.0” “q” term})) :body-seq first read-json)) (defn cull [result-set] [(:estimatedResultCount (:cursor (:responseData result-set))) (first (:results (:responseData result-set)))]) (defn handle-search [{:keys [args] :as com-m}] (if-not (seq (.trim (apply str (interpose “ ” args)))) (send-message com-m (str “No search term!”)) (let [[res-count res-map] (–> (apply str (interpose “ ” args)) google cull) title (:titleNoFormatting res-map) url (:url res-map)] (send-message com-m (StringEscapeUtils/unescapeHtml (str “First out of ” res-count “ results is: ” title))) (send-message com-m url)))) (defplugin (:cmd “Searches google for whatever you ask it to, and displays the first result and the estimated number of results found.” #{“google”} #‘handle-search) (:cmd “Searches wikipedia via google.” #{“wiki”} (fn [args] (handle-search (assoc args :args (conj (:args args) “site:en.wikipedia.org”))))) (:cmd “Searches encyclopediadramtica via google.” #{“ed”} (fn [args] (handle-search (assoc args :args (conj (:args args) “site:encyclopediadramatica.com”)))))) [/code]

Where is it?

Sexpbot runs in several channels on the Freenode IRC network, including #clojure, #cake.clj, #clojureql, #(), and various others. It provides services such as Clojure and Haskell code evaluation, most importantly. You can find the source code and documentation on Github I’m starting an IRC channel on freenode. #sexpbot. sexpbot will be there, and I’ll start collecting users and contributors into the channel as well. If you need support, this is the place to go.

What is sexpbot not?

Sexpbot is not clojurebot.

Goals

The long term goal of this project has always been to provide an excellent IRC bot for non-coder end users. It hasn’t reached that goal yet, and might still be quite a ways off yet. I’ve heard of a few Clojurians using sexpbot themselves, but it isn’t fit for non-developers yet. Going forward, documentation is going to be a big goal. We also need to start versioning properly and actually pumping out distributions. Configuration needs to be totally documented, so that users know how to configure their bot. There is plenty to do, and plenty of time to do it!

Contributors

First and foremost, the primary contributors to this project are myself and Alan Malloy (amalloy). There have been several contributors here and there in the past. Here are a list of them (if I forgot you, let me know and I’ll add you): – Michael D. Ivey (ivey) – Erik Price (boredomist) – Pepijn de Vos (fliebel) – Justin Balthrop (ninjudd) – Curtis McEnroe (programble)

Here is to many more in the future!

An Indirect Guide to Getting Started With Clojure

| Comments

This isn’t a step by step guide or tutorial to getting started with Clojure. This post is merely to help you get on the right track, avoiding some of the more common painpoints associated with the JVM. I want you to have the best beginner experience that you possibly can with Clojure. If you aren’t familiar with the Java ecosystem (not necessarily through Java), coming into Clojure can be bizarre and admittedly painful. You’re going to need to do things that you aren’t used to and don’t necessarily see the need for or understand. I assure you that it will all become clearer with time. The biggest mistake you can make is to have assumptions about how things work when you come into Clojure. You’re going to expect to go to clojure.org and be greeted with installers and detailed spoonfeeding instructions for getting set up. You aren’t going to find this. Not that Clojure doesn’t have some official beginner material. But it isn’t extremely abundant at this point. This post is meant to complement that material with a “Hey, this isn’t totally insane, and we’re not trying to screw with you on purpose.” One of the primary things that freak new people out is the lack of installers, as I mentioned above. They’re used to finding a new language, going to the website, installing it, and using it from a single place within their system. It’s dead simple to install a C++ compiler, Ruby, Python, etc. That sort of thing isn’t really what you do in Clojure. Instead, you’d probably use a build tool. The reason this is so is because the Java ecosystem is centered around ‘jars’. jars are just zip files with a clever extension that is used to package code (libraries and applications) along with some metadata that Java can use to do things like execute code within the jar and other fun stuff. In order for the code inside of jars (or anywhere, really) to be available to your code, that code (inside of jars or directories or whatever) has to be on the Java classpath. Now, the classpath is a necessary evil that if you’re forced to manage directly as a beginner, is going to drive you insane. The Java classpath is usually set when you call the ‘java’ application on the command-line. You can set it with the -cp option. Now, if you’re a special kind of fellow, you might find the whole classpath thing simple and easy to manage. I didn’t, and most people won’t. It gets even more complicated when it comes down to projects, managing the jars that those projects depend on (versions, o versions), and packaging your own code in jars and distributing your code (and jars) to the world. This is where build tooling comes in. Cljr http://github.com/liebke/cljr I’m going to start with cljr because it is probably the one that is going to make the most sense to you as a beginner. This is the one thing that I’m going to talk about that isn’t a build tool. Cljr aims to be an easy way to launch an REPL and a package/dependency manager for that REPL. Installing cljr is the closest thing you’re going to get to ‘installing Clojure’. When you install cljr, you’ll get a neat little command line tool that you can use to start an REPL and set up dependencies (“packages”) for that REPL. Cljr is absolutely excellent for when you want a quick and easy REPL. It’s easy to install and it shouldn’t eat your laundry at all. I’d recommend cljr as the first thing for a beginner to install to try out Clojure with, but when it comes time for your first real ‘project’ and you need to move beyond the REPL and into build tooling land, cljr will not really suffice. So, lets move on. Cake http://github.com/ninjudd/cake Cake is an honest-to-God build tool. It’s almost totally written in Clojure, but there is a small piece of it that is written in Ruby. The reason for this is so that the JVMs can be persistent. When cake starts up a JVM, it keeps the JVM running for as long as possible (there are times when it needs to be restarted because certain things have changed in your project, such as the classpath) in order to eliminate JVM startup time, which tends to be rather significant. It uses Ruby as a way to bootstrap itself and control the processes it creates. It uses Ruby where Leiningen (we’ll talk about this soon) would use bash. I doubt you’re interested in this at the moment though, so lets move on. Cake is also very easy to install. If you’re familiar with Ruby, you’ll be very excited to find that you can install it as a gem! There are two other ways to install it as well. Check out the README on the github page for more information. So, what will cake give you? Everything you’ll need as a hardcore Clojure developer. Besides offering a lot of the same “REPL and package manager for that REPL” in a box features that cljr provides (via the global project, described in the README), albeit not quite as intuitively at the moment, it also provides you with the ability to easily create and manage Clojure projects, manage their dependencies, build them, distribute them, work with them, and anything in between. Cake offers a dependency based task model (much like the Rake build tool) and can be extended via tasks and plugins to do anything you could ever imagine or want. Cake tasks are usually defined with the ‘deftask’ macro, in which dependencies on other tasks can be specified. Plugins are just collections of tasks that can be made available to cake. Cake uses Maven (soon Ivy, with Maven as an option) as it’s backend for dependency management. All of the jars that you depend on are copied over to the lib/ directory in your project and put on the classpath for you when you start the repl, a swank server, a rally for sanity, etc. If you’re ready to write your first project, or would rather go with a real build tool rather than cljr, cake is for you. Leiningen http://github.com/technomancy/leiningen Leiningen fills mostly the same space as cake does. It’s another Clojure build tool. It’s older than cake and currently more popular, so if I was being appropriate, it probably should have come first. I’m a huge cake fan and am totally biased, so sue me. ;) Most people were using ant and maven or *gasp* no build tooling at all until Leiningen came along and saved the day. It innovated the Clojure build tooling scene, making it easy to manage Clojure projects and their dependencies. One owes Leiningen much respect every time they create an executable jar using the ‘lein uberjar’ or ‘cake uberjar’^1^ commands. Leiningen too can be extended with plugins. However, the task system that Leiningen provides is not dependency based. To create a new task that can be executed with “lein foo”, one defines a function called foo in the namespace leiningen.foo. All of the built-in leiningen tasks are ordinary Clojure functions too and can be called from the plugin. The return value is the exit code, and the docstring is displayed in “lein help”. Leiningen also has a hooking mechanism called robert-hooke (ol’ Phil sure is a sucker for queer names), which lets you modify and extend the behaviour of the built-in tasks. Whether a dependency based system or plain ol’ functions is the best solution depends on who you’re talking to and one’s own personal opinion. Leiningen also uses maven as it’s backend for dependency management. It works in mostly the same way as cake at this point. While Leiningen does have a command for starting an REPL outside of a project (a la cake, cljr), it does not currently have a way for you to manage dependencies for that “outside-of-a-project REPL” like cljr and cake does. If you want something like that, you’ll have to look elsewhere for now (or, add it to Leiningen! Might be a fun first project for you)2^. The project.clj build file format that Leiningen, Cake, and Polyglot Maven all use was invented by Leiningen. One of the greatest things about all of these build tools is the fact that you don’t have to write your build files in XML like you would be forced to do with straight maven or ant. In any case, Leiningen is most definitely a great choice for a build tool/dependency management system. Leiningen, just like cake, makes it very easy to manage your projects. There are, of course, other build tools and dependency managers (maven/polyglot maven, ivy, ant, gradle, etc) from Javaland that can be used with Clojure. I’ve given you the rundown of the entirely Clojure-based ones. It isn’t difficult at all to ‘install’ Clojure. You just have to reconsider what you mean by ‘install’. There will soon be a ‘clj’ launcher script included with Clojure releases, and this will make it easier for people to get their REPL running for the first time and immediately get to playing with Clojure. The biggest problem that people have with starting with Clojure is that they simply don’t understand the ecosystem and how it works, but that isn’t necessarily unexpected. The Java/Clojure ecosystem can definitely seem bizarre to outsiders who haven’t experienced it. Clojure is still very young, and these sort of kinks will work themselves out in time. Things will become more standardized and simple. I hope this post can help you get started without serious pain and blood, and that you’ll have a high regard of Clojure when it’s all said in done. Such an amazing language should not be overshadowed by difficulty getting started. ~1:\ Okay,\ so\ this\ was\ actually\ a\ maven\ invention.\ Nonetheless…~ ~2:\ I’ve\ been\ told\ that\ there\ is\ talk\ about\ implementing\ this\ sort\ of\ thing\ in\ Leiningen\ already.\ Look\ for\ it\ in\ the\ future,\ and\ get\ it\ faster\ by\ helping\ out!~ Feedback is welcome. If there is anything that you think I should add, mention, or correct, please let me know. Also, thanks to raek from #clojure for helping me out with the Leiningen section. He helped me me be less totally wrong and biased. :D!

TryClojure - a Call to Action

| Comments

Introduction

For those of you who do not know what tryclojure is, it’s a website that hosts a Clojure REPL, and is designed with newbies in mind. The idea behind tryclojure is to provide a no-barrier-to-entry point for people to give Clojure a try. It should have a tutorial to introduce people to the language and give them something to do with their pretty REPL.

The Problem

Tryclojure was my very (very) first web development project in any language. I did not know HTML, CSS, JavaScript, or anything else that would have qualified me to write it. Even now, I’m definitely not the person to be asking questions about web development. I do very, very little of it. Tryclojure gets very little love. The only reason that I had the audacity to try to author such a big and important project was because I was almost certain that the community would jump on the chance to contribute to it the moment that they laid eyes on it. This has not happened. Tryclojure has been sitting idle for months now. Tryclojure has problems that need worked out. I have a brief list of things along with some other stuff here: https://github.com/Raynes/tryclojure/wiki/What-Needs-To-Be-Done if you’re interested in this project, it’s important that you read that. There are things that tryclojure needs that I don’t yet have the skill to provide. I’m not ashamed to say that I need help.

Motivation

Tryclojure is a very important project. A site like that is sometimes the difference between a new, excited user, and a disappointed, bored user. Lots of people were very excited when tryclojure first emerged from the abyss. This is your chance to be a part of it. If you desire an open source project to contribute to, this could very well be it. Even if you only write pieces of the tutorial, you’ve done tryclojure a huge service. Tryclojure has the potential to stand proud with the crowd of try sites, but right now, it isn’t on that level. I’d hate for tryclojure in its current state to become symbolic of Clojure. Clojure isn’t a half-assed language, so tryclojure shouldn’t be a half-assed website. Tryclojure can become an important part of Clojure, but I can’t do it alone.

Contributing

So, you’ve drunk the kool-aid, and now you’re interested in doing some work. I’ll try to help you out a bit. The official repository is here: https://github.com/Raynes/tryclojure What needs to be done, among other things is here: https://github.com/Raynes/tryclojure/wiki/What-Needs-To-Be-Done You can run tryclojure by running a REPL in the project, bringing in tryclojure.core and calling the tryclj function. Tryclojure is currently compatible with both Leiningen and cake. It uses nothing specific to either. I, personally, use cake. If anything, I’d like to keep it compatible with both build tools, but if we need to use something specific to either, please use cake. I don’t particularly care how you contribute. If you want to do it Clojure style and submit patches on issues, that’s great. Pull requests are fine too. An important thing is that we keep things public. If you’re fixing something, adding something, changing something, etc, please make an issue for it beforehand. Also, you might want to discuss your changes on the tryclojure mailing list. Even if only for the purpose of keeping things public. So, that’s my call to action. Clojurian JavaScripters and Web Developers come! Hear my call! Together, we can conquer them all!

Recovery

| Comments

I planned to make this post immediately after returning home. However, I became rather ill, so it got a little delayed. The first ever Clojure Conj is over, and now is the time for recovery. We’re back to our normal every day lives, but things will never be exactly the same for any of us. We’ve learned new things, met new people, discussed ideas with our teammates face to face, and had the time of our lives. I for one enjoyed every second of the conference. Every talk taught me something I didn’t know. I met people who I never imagined I would get to meet. I was greeted by an overwhelming number of friendly faces. I felt at home. The Conj brought a lot of firsts for me. My first plane ride. The whole process was generally smooth. I nearly missed my connection in Atlanta, but it all worked out in the end. No more than 4 hours of travel time in total to get there. About the same on the way back. The whole trip there and back came with excellent weather. The conditions on the east coast were everything one could ask for for a conference. The Hilton was awesome as well. Amazing staff, excellent rooms, a right-at-home feel that made being stuck in single building for the majority of two days not bother me at all. Choosing the Hilton for the conference venue is one of the smartest choices made for the Conj in my opinion. When I walked into the Hilton for the first time, the first person I saw was Chas Emerick (quite appropriately). I didn’t recognize him at first, but he recognized me. Just moments after I arrived, even more appropriately, Lance and Justin walked through the doors. Of course, I didn’t recognize either of them, but they recognized me. When we walked up to the counter to check in, the woman said “It’s about time! Everybody coming in here today has been asking if you’ve arrived yet.” A little later, Justin, Lance, and myself walked to Mez, a Mexican restaurant within reasonable walking distance of the Hilton. There we met Devin Walters, Alexy, and a whole group of people who I didn’t recognize but whom recognized me. The conference days were stunning, but exhausting. When the first conference day ended, it was pretty late. We spent some time at Tir Na Nog, and ultimately, I didn’t get to sleep until nearly 1AM. I woke up at 6AM the next morning to prepare. When I woke up, I could already tell I was beginning to get sick. My sinuses were a little achy. Luckily, the cold/sinus infection didn’t really set in until that night after the conference. It certainly made the trip home a serious bitch though. Aaron Bedra’s talk was on the second day. At one point during his talk, he had me stand up, handed me the mic, and asked me to explain to the conj-goers the circumstances leading to my being able to attend. Mind you, he didn’t tell me he was going to do that beforehand, so it’s sufficient to say that it took all of my willpower to not shit myself and keep myself steady. My legs were vibrating so hard, I’m surprised I didn’t knock over the table in front of me. However, several people have told me that they couldn’t tell I was nervous and that I did great, and I appreciate the lies. :) In the end of it all, I met almost everybody I could have hoped to meet. There were only around 4 speakers that I never got around to meeting face to face, including David Liebke and Phil Hagelburg. Maybe next year! I even met Mister Hickey himself on the first night at Tir Na Nog. Luckily, the light was dim and being in close proximity to his hair didn’t make my head explode. That would have been embarrassing. Everything that went into the trip was well worth it. Thanks again to everybody who donated, and to Relevance for waiving the admission fee, paying for my stay at the Hilton, and making me feel like family. I’d do it all over again 10 thousand times if I could. I loved every minute of it, and I can only hope that I can find a way to attend next year’s conference. I’m already addicted.

Anticipation

| Comments

The clock continues to tick towards Friday as we slowly enter our Conj state of mind. These are some of the most exciting moments in Clojure’s short history, and I think I speak for the entire Clojure community when I say that I am absolutely pumped. This is our opportunity to look each other in the eye, hear each other’s voice, and for some of us, meet the people that we work with in the Clojure community on a daily basis. This is our gathering — our celebration of everything that makes Clojure awesome. Most of us are arriving Thursday, and everybody is doing their own thing. The speakers are getting together, and some people plan to have themselves some Clojury fun before the conference as well. The conference itself starts on Friday. It begins with breakfast and registration, and then a whole day of talks with a couple of breaks. On Friday night after the talks, we’re off to celebrate Clojure’s third birthday at Tir Na Nog, an Irish pub in Raleigh. It’s going to be an exhausting day, and I know I’ll be hitting the bed with force the moment I get back to the hotel, resting up for the next day. Saturday is the second and final day of the conference. This day follows the same pattern as the first, and is filled with talks. At some point, people will have the opportunity to volunteer to give lightning talks. It’ll be interesting to see what people can come up with to talk about for 5 minute intervals. After the talks are over (ended by a 50 minute talk by Stuart Halloway), some of us (me included) are going to the Halloway residence for a Conj after party. This trip means a lot to me. Not just because this trip is full of first times for me: my first time on a plane, out of Alabama, staying in a nice hotel, attending a conference, and being a part of something this historic and important. This trip means everything to me mostly because it was provided to me by the Clojure community itself, and that is something I’ll never forget. I never asked for it, but with the help of Chas Emerick, the awesome guys at Relevance, and the amazing Clojure community, my entire trip and stay has been funded, and the conference admission waived. We actually got a few more donations than we asked for! Everyone was so eager to donate that Chas didn’t have a chance to get the donate button down until we had already surpassed our $1,000 goal. I do not intend to squander the extra cash that I’ll have left over, as there are some things I need (such as a printer and a bed) that this will really help with. Thank you. You are allowing me to live beyond my means, and I don’t take your generosity for granted. It seems as if even Expedia and Delta want me to be happy. Over the weekend, we had a bit of trouble when I realized that the name that I had Chas use when he bought my plane ticket wasn’t actually the right one. I’ve always lived with my mother and her family, so for generally unofficial things, I go by the last name ‘Simpson’. However, legally, I have my father’s last name, which is ‘Grimes’. Chas, Expedia, and Delta sorted this out with a bit of paperwork, a picture of my driver’s license, and no fees. A last minute itinerary change without any fees? What more could one ask for. I’m going to try to blog about my trip while I’m gone, but I probably wont have time. Justin (ninjudd, of cake fame) is going to give a loner laptop while we’re at the Conj. If I find the time, I’ll blog (or at least tweet) every now and again while I’m there. If not, I’ll certainly be spewing information to anybody in earshot when I return. The two months leading up to this have been a whirlwind and a blast. The excitement continues to build, and I can only hope that I do not simply explode the moment my eyes meet Rich Hickey’s hair. I can’t wait to see everybody. I hope you’re all as excited as I am. Go Conj!

Thank You for Sending Me to the Conj!

| Comments

Today, Chas Emerick held a fund raiser trying to raise 1 thousand dollars to fund a trip from Alabama to Durham NC for the first ever Clojure Conj conference. In the space of 72 minutes, we reached (and slightly exceeded) our goal of $1,000 dollars. I can’t even begin to describe how I feel right now. I feel like I am a member of the most awesome community for any programming language. I owe the Clojure community more than I could ever repay. I cannot thank you guys enough for this. This means more to me than any gift I’ve ever received. I’d like to thank Relevance for so willingly agreeing to waive the admission fee to the conference itself, and for agreeing to pay for a relative and I’s stay at the hotel. Without their support, this trip would not be possible. I’d also like to thank Chas Emerick (cemerick), because he is the person who made all of this happen. He took an interest in a random small-town teenager when he didn’t have any obligation to. He’s the one who spoke to the guys at Relevance, and the one who came up with the idea of a fund raiser and made all of this happen. I might have to start calling you dad. Most of all, I’d like to thank the Clojure community and everybody who donated. Some people who don’t even use Clojure donated totally out of the kindness of their hearts, and for that, I thank you. I think it says a lot of the Clojure community that, in the space of 72 minutes, they can manage to raise 1 thousand dollars for somebody they don’t even know. You’ve all given me a gift that extends far beyond trip itself. You’ve let me know that you guys are there for me, and that you do value me as a member of the community. I will never be able to thank you enough. -Anthony Simpson