Slide 1

Slide 1 text

Ian Bishop @ianbishop

Slide 2

Slide 2 text

Studied at UNB (CS/Math) Work at UserEvents Open Source (Official Clojure ZMQ) (Unofficial Clojure LMAX Disruptor)

Slide 3

Slide 3 text

Modern dialect of Lisp Created by Rich Hickey in 2007 General purpose functional language Runs on a number of platforms (JVM, CLR, Javascript)

Slide 4

Slide 4 text

Modern dialect of Lisp Created by Rich Hickey in 2007 General purpose functional language Runs on a number of platforms (JVM, CLR, Javascript)

Slide 5

Slide 5 text

baby

Slide 6

Slide 6 text

Invented in 1958 by John McCarthy Second oldest modern programming language Introduced fundamental ideas of modern programming Tree Data Structures Garbage Collection Dynamic Typing Conditionals Recursion Higher-order functions

Slide 7

Slide 7 text

the greatest single programming language ever designed Alan Kay, creator of Smalltalk & Object Oriented programming

Slide 8

Slide 8 text

the greatest single programming language ever designed Alan Kay, creator of Smalltalk & Object Oriented programming

Slide 9

Slide 9 text

Some may say Ruby is a bad rip- off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people Matz, creator of the Ruby programming language

Slide 10

Slide 10 text

Some may say Ruby is a bad rip- off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people Matz, creator of the Ruby programming language

Slide 11

Slide 11 text

any sufficiently complicated C or Fortran program contains an ad hoc informally- specified bug-ridden slow implementation of half of Common Lisp Philip Greenspun

Slide 12

Slide 12 text

any sufficiently complicated C or Fortran program contains an ad hoc informally- specified bug-ridden slow implementation of half of Common Lisp Philip Greenspun

Slide 13

Slide 13 text

Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. Eric Raymond, Essayist & Open Source demigod

Slide 14

Slide 14 text

Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. Eric Raymond, Essayist & Open Source demigod

Slide 15

Slide 15 text

I suppose I should learn Lisp, but it seems so foreign Paul Graham, Author of “On Lisp” & creator of Y Combinator

Slide 16

Slide 16 text

I suppose I should learn Lisp, but it seems so foreign Paul Graham, Author of “On Lisp” & creator of Y Combinator

Slide 17

Slide 17 text

(f arg0 arg1 arg2)

Slide 18

Slide 18 text

(+ 1 2 3)

Slide 19

Slide 19 text

(+ 1 2 3) => 6

Slide 20

Slide 20 text

(list 1 2 3)

Slide 21

Slide 21 text

(list 1 2 3) => (1 2 3)

Slide 22

Slide 22 text

(if (= 1 1) (list 1 2 "foo") (list 1 2 "bar"))

Slide 23

Slide 23 text

(if (= 1 1) (list 1 2 "foo") (list 1 2 "bar")) => (1 2 "foo")

Slide 24

Slide 24 text

(lambda (x) (+ x 1))

Slide 25

Slide 25 text

((lambda (x) (+ x 1)) 5)

Slide 26

Slide 26 text

((lambda (x) (+ x 1)) 5) => 6

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

(* 2 (+ 3 4))

Slide 29

Slide 29 text

Abstract syntax tree is isomorphic to the textual representation of the language

Slide 30

Slide 30 text

Abstract syntax tree is isomorphic to the textual representation of the language

Slide 31

Slide 31 text

Abstract syntax tree is isomorphic to the textual representation of the language

Slide 32

Slide 32 text

Abstract syntax tree is isomorphic to the textual representation of the language

Slide 33

Slide 33 text

Slide 34

Slide 34 text

code = data

Slide 35

Slide 35 text

code = data data = code

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Reducing incidental complexity is a primary focus of Clojure. For example, mutable state is an incidental complexity. The mechanics of it seem simple, or at least familiar, but the reality is quite complex. So, Clojure makes immutable data the default. Rich Hickey, creator of Clojure

Slide 38

Slide 38 text

Reducing incidental complexity is a primary focus of Clojure. For example, mutable state is an incidental complexity. The mechanics of it seem simple, or at least familiar, but the reality is quite complex. So, Clojure makes immutable data the default. Rich Hickey, creator of Clojure

Slide 39

Slide 39 text

Reducing incidental complexity is a primary focus of Clojure. For example, mutable state is an incidental complexity. The mechanics of it seem simple, or at least familiar, but the reality is quite complex. So, Clojure makes immutable data the default. Rich Hickey, creator of Clojure

Slide 40

Slide 40 text

cat.setName("Felix"); cat.getName(); => "Felix"

Slide 41

Slide 41 text

cat.setName("Felix"); cat.getName(); => "Felix" cat.setName("Mr. Meowsworthy"); cat.getName(); => ??

Slide 42

Slide 42 text

cat.setName("Felix"); cat.getName(); => "Felix" cat.setName("Mr. Meowsworthy"); cat.getName(); => "Mr. Meowsworthy"

Slide 43

Slide 43 text

String s = "Mr. Meowsworthy"; s.replaceAll("Mr", "Mrs"); s => ??

Slide 44

Slide 44 text

String s = "Mr. Meowsworthy"; s.replaceAll("Mr", "Mrs"); s => "Mr. Meowsworthy"

Slide 45

Slide 45 text

Inventing a class with its own interface to hold a piece of information is like inventing a new language to write every short story. This is anti- reuse, and, I think, results in an explosion of code in typical OO applications. Rich Hickey, creator of Clojure

Slide 46

Slide 46 text

Inventing a class with its own interface to hold a piece of information is like inventing a new language to write every short story. This is anti- reuse, and, I think, results in an explosion of code in typical OO applications. Rich Hickey, creator of Clojure

Slide 47

Slide 47 text

Inventing a class with its own interface to hold a piece of information is like inventing a new language to write every short story. This is anti- reuse, and, I think, results in an explosion of code in typical OO applications. Rich Hickey, creator of Clojure

Slide 48

Slide 48 text

com.sun.java.swing.plat.nimbus InternalFrameInternalFrameTitlePaneInternalFrameTitle PaneMaximizeButtonWindowNotFocusedState

Slide 49

Slide 49 text

InternalFrame InternalFrame Title Pane, InternalFrame Title Pane. Maximize Button Window, Not Focused State.

Slide 50

Slide 50 text

As you've noted, existing languages change slowly, if at all. Are we getting better languages? Many of the hot 'new' languages like Haskell and Erlang are in fact pretty old. Clojure builds on Lisp, which is really old. What is new is the willingness to utilize these languages in mainstream production environments. And that is a great thing, as we have largely maxed out the expressive capabilities of the C++/Java/C# languages, as evidenced by the prominence of XML and IDEs. Rich Hickey, creator of Clojure

Slide 51

Slide 51 text

As you've noted, existing languages change slowly, if at all. Are we getting better languages? Many of the hot 'new' languages like Haskell and Erlang are in fact pretty old. Clojure builds on Lisp, which is really old. What is new is the willingness to utilize these languages in mainstream production environments. And that is a great thing, as we have largely maxed out the expressive capabilities of the C++/Java/C# languages, as evidenced by the prominence of XML and IDEs. Rich Hickey, creator of Clojure