Upcoming SlideShare
×

# Introduction to Clojure - EDGE Lviv

389

Published on

Presentation covers basics of Clojure, why it emerged, same basics of usage and provides information on next steps where to take information.

Published in: Technology, Design
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
389
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
1
Embeds 0
No embeds

No notes for slide

### Introduction to Clojure - EDGE Lviv

1. 1. Roman Obukhivskyi About Clojure
2. 2. Afterword :)
3. 3. You can do everything ❖ JVM ❖ CLR ❖ Javascript
4. 4. How to start ❖ http://clojure.org/ ❖ http://www.4clojure.com/ ❖ http://leiningen.org/ ❖ http://clojurescriptone.com/
5. 5. http://www.clojure-toolbox.com/
6. 6. Dev environment ❖ Good ❖ ❖ ❖ Emacs IntelliJ Kinda geek ❖ ❖ ❖ Vim Sublime Text Others… (Eclipse, Netbeans…)
7. 7. 3 basic questions ❖ How? ❖ What? ❖ Why?
8. 8. HowTo pattern #1
9. 9. Fun with code (Quick Sort) ❖ APL: qsort ← {1≥⍴⍵:⍵⋄e←⍵[?⍴⍵]⋄ (∇(⍵<e)/⍵) , ((⍵=e)/⍵) , ∇(⍵>e)/⍵} ❖ J: quicksort=: ((\$:@(<#[), (=#[), \$:@(>#[)) ({~ ?@#)) ^: (1<#) ❖ Clojure: (defn qsort [L] (if (empty? L) '() (let [[pivot & L2] L] (lazy-cat (qsort (for [y L2 :when (< y pivot)] y)) (list pivot) (qsort (for [y L2 :when (>= y pivot)] y))))))
10. 10. Some facts ❖ Typing: dynamic, strong ❖ (Almost) no syntax (S-expressions) ❖ Lisp-1 ❖ Persistent data structures ❖ Laziness ❖ Less brackets than in Java :)
11. 11. ❖ (list 1 2 3) ‘(1 2 3) ❖ (vector 1 2 3) [1 2 3] ❖ (hash-map :a 1 :b 2) {:a 1, :b 2} ❖ (hash-set 1 2 3) #{1 2 3}
12. 12. ❖ LISP + JVM foundation ❖ Simplicity - core of the language design ❖ Best parallelism primitives ❖ Modular libraries ❖ Code is data ❖ DSL