-
Not Synced
I'm Steve.
-
Not Synced
That's me. That's my twitter handle.
-
Not Synced
I sometimes wear cowboy shirts,
-
Not Synced
I'm blonde, I'm from Canada.
-
Not Synced
I'm from a tiny little village in the middle of seriously nowhere.
-
Not Synced
That's a picture of-- actually, it's right beside the pond I used to play in as a kid.
-
Not Synced
I'm looking back at my town, so there's nothing there [laughter].
-
Not Synced
[coughs] There are cowboys.
-
Not Synced
So this is a website that some friends in Canada sent me this week, which I think is amazing -
-
Not Synced
farmersonly.com - this is actually the town that I went to university.
-
Not Synced
These are people looking to marry farmers, or farmers looking to marry farm girls [laughter].
-
Not Synced
It's pretty sweet. Uh, I'm not a cowboy - I'm a Smug Lisp Weenie.
-
Not Synced
I'm not a particularly good Smug Lisp Weenie, so uh...
-
Not Synced
I don't really know what this is.
-
Not Synced
I did a Google image search for 'Smug Lisp Weenie' and it gave me a cute bunny,
-
Not Synced
[laughter] and I know you're supposed to include one cute animal slide, so there it is.
-
Not Synced
I've worked these places.
-
Not Synced
So I worked at ADX Studio, ThoughtWorks, and DRW Trading - which is in Chicago.
-
Not Synced
DRW is where I've done all my Clojure so far.
-
Not Synced
Introducing Clojure into an environment is kind of difficult.
-
Not Synced
We started with just a t-logger.
-
Not Synced
It was listening to a really terrible messaging framework called LBM -
-
Not Synced
which is some UDP, drop all your packets, head loss piece of junk.
-
Not Synced
So we just had an old application that was written in JRuby
-
Not Synced
which would connect to this thing, and dump all the messages out to a file.
-
Not Synced
So we figured, that thing is like 50 lines of Ruby, we'll rewrite it in Clojure.
-
Not Synced
So we got then 12 lines of Clojure. That was a start.
-
Not Synced
Then we moved on to market data republisher, which is also boring.
-
Not Synced
So it basically gets a data-stream from an exchange,
-
Not Synced
and broadcasts it out to the rest of the companies,
-
Not Synced
so that not everyone needs to connect to the exchange all at once.
-
Not Synced
It was a little bit more interesting, because we had to deal with Java Interop and things like that.
-
Not Synced
It was 300 lines of Clojure.
-
Not Synced
And then the last thing that I wrote before I left was a web application and service,
-
Not Synced
so it was basically your standard RESTful web service,
-
Not Synced
in behind what would normally be kind of a Rails app.
-
Not Synced
So we were using Compojure and stuff for that.
-
Not Synced
That was about 2000 lines of Clojure.
-
Not Synced
It was actually kind of cumbersome, because it was also speaking LBM in addition to HTTP.
-
Not Synced
Okay, people are tweeting at me, so I'm just going to...
-
Not Synced
Nokia phones - they're amazing.
-
Not Synced
So the last thing that was written just as I was leaving,
-
Not Synced
was our trade capture and positions management system.
-
Not Synced
So this was an application that we'd taken from
-
Not Synced
60,000 lines of C#, down to about 5,000 lines of Ruby.
-
Not Synced
The code samples that people were sending me after I left and joined C42
-
Not Synced
made it look like it would probably go down to about 3,000 lines of Clojure, which is pretty cool.
-
Not Synced
So now I work at C42.
-
Not Synced
I'm their token white guy.
-
Not Synced
They can only have one until they hire 100 more employees,
-
Not Synced
according to Indian 'import white people from Canada' laws.
-
Not Synced
I work on RubyMonk, so I've inherited
-
Not Synced
a pretty sweet code-base from
-
Not Synced
from Josum and kitty and clojuremonk is definately coming. Its not there yet but i will build it, i promise. So this what we are going to do. So, we basically got this broken up into 2 chunks. 1 through 4 is going to go really fast so I can kind of do the Zedshaw thing and maybe ask everybody not to be that guy, we can leave questions for the end but this is a pretty tight talk so we might not have time for questions. I am totally happy to stop by like the coding room and hack with you on clojure if you actually want to try something out after the talk this afternoon or tomorrow.
So we are just going to do the baseline stuff, give you a quick introduction to Clojure, talk about lisp history.
I think the curiousity is joy, thats the whole reason i am a programmer. Quick introduction to functional programming as it pertains to Ruby, atleast one of the colonels, I think, for me and feeling good because that also why i am a programmer, for writing codes makes me feel good. Little bit of metaprogramming and then little bit of concurrency just finishing stuff.
So Baseline..
Really Quickly!
How many people have read about Clojure? Anything at all?
Okay. So, a lot of people.
How many people have tried Clojure? Dowload, lining in, get it rapid running?
Okay, So, about like 20% or something.
Allright!
How many of you have read some lisp literature? sicp, lisp in small pieces, anything?
That's about half..
Alltight!!
Do you beleive this? Clojures equals Objects?
Hands up..
This is a serious one..
Wow!! Nobody!!
Allright, I am screwed!!
Okayyy. So, we will do a quick introduction to Clojure but maybe i need more material than this.
What is this?
Just shout it out.
Okay, what sort of expression is it?
S expression. Okay, thats technically a correct answer. Thats function call, assuming the stretch is in the macro or a built in special form.
What is this, for anybody who has actually played with Clojure, you should know this one?
Sorry??
Conditional special form. Special form is a good guess. Its actually a macro call which is totally awesome. Check it out.
This is the mactro that defines "when not" which is basically Ruby's on list. So you have a language element defined as a macro in one freaking line. RAD..
Okay, so this is bastardisation of a Rich Hickie code. Basically he says, if you want a new for loop, you can should be able to ready it yourself. You shouldn't have to wait for the compiler or the interpretor/implementer to come up with Java 1.8 to do something fancy for each.
What's this?
Ya, okay, a string.
What's this?
Keyword..
Right on.. some people..
What's this?
Symbol. Right on..
So, basically, in Clojure, like one of the things that's gonna screw you up is keyword and symbol are more or less reverse, not exactly but it helps to think of them that way. 6.21