Reading Clojure
Ricardo J. Méndez
[email protected]
@ArgesRic
https://mastodon.social/@ricardojmendez
Slide 2
Slide 2 text
@ArgesRic
This is about the thought
process when evaluating things.
Slide 3
Slide 3 text
@ArgesRic
“What in the name of Cthulhu’s
green tentacles did I commit to?”
Slide 4
Slide 4 text
@ArgesRic
Show of hands
• Who here isn't programming in Clojure yet?
• Who is kind of familiar with the language but still finding their
footing?
• Who considers themselves to be fully comfortable in it?
Slide 5
Slide 5 text
@ArgesRic
This one’s for the first two.
Slide 6
Slide 6 text
@ArgesRic
Learning stages
• First we learn by reading;
• Then we learn by imitating;
• And finally, we learn by creating.
Slide 7
Slide 7 text
@ArgesRic
I bollocksed up the first two.
Slide 8
Slide 8 text
@ArgesRic
Clojure can be hard to read
because of how simple it is.
Slide 9
Slide 9 text
@ArgesRic
Syntax is that part of the
language that’s set in stone.
Slide 10
Slide 10 text
@ArgesRic
Slide 11
Slide 11 text
@ArgesRic
Let’s describe how we see this.
Slide 12
Slide 12 text
@ArgesRic
Slide 13
Slide 13 text
@ArgesRic
Slide 14
Slide 14 text
@ArgesRic
Tokens are the wrong way of
thinking about Clojure.
Slide 15
Slide 15 text
@ArgesRic
Slide 16
Slide 16 text
@ArgesRic
So let’s dissect things a bit.
Slide 17
Slide 17 text
@ArgesRic
(1 2 3)
[1 2 3]
(+ 1 2 3)
[+ 1 2 3]
Slide 18
Slide 18 text
@ArgesRic
Evaluation semantics
Slide 19
Slide 19 text
@ArgesRic
(+ 1 2 3)
(1 2 3)
Slide 20
Slide 20 text
@ArgesRic
Trick question!
Slide 21
Slide 21 text
@ArgesRic
(+ 1 2 3)
(1 2 3)
Slide 22
Slide 22 text
@ArgesRic
We can always quote a list.
Slide 23
Slide 23 text
@ArgesRic
If you’re joining us from
Java… Or C#…
Or not-a-LISP...