SlideShare a Scribd company logo
The What, Why and How of
ClojureScript
Ivan Bokii
Full-stack developer in
B2M Solutions
@ivanbokii
bokiyis@gmail.com
What
What
What
What
David NolenRich Hickey
What
Cisco
Prismatic
CircleCI
eBay
What
(println “Hello World”)
What
(defn foo [a b]
(* a b))
What
(defn foo [a b]
(* a b))
What
(defn foo [a b]
(* a b))
What
(defn foo [a b]
(* a b))
What
(defn get-name [{:keys [first last]}]
(str first " " last)))
(get-name {:first "Ivan" :last "Bokii" :something 42})
function getName(obj) {
var first = obj.first;
var last = obj.last;
return first + " " + last;
}
getName({first: "Ivan", last: "Bokii", something: 42});
What
(defn build-items [coll fun & params]
(for [index-value (to-indexed coll)]
(apply fun index-value params)))
What
Figwheel
core.async
Reagent
Om
cljs.test
Datascript
re-frame
Figwheel Demo
What
• FP language
• Dynamically typed
• LISP
• Compiles down to JS
• Has a rich ecosystem
• Subset of clojure
WHY
WHY
REPL-driven
development
WHY
Communicating sequential
processes
(CSP)
core.async
WHY
WHY
function getFromServer() {
return $.getJson(“URL”);
}
async function syncExample() {
console.log(“First”);
console.log(await getFromServer());
console.log(“Second”);
}
ES7/Babel.js
WHY
(defn get-from-server []
(GET “URL” {:handler #(put! channel %)})
channel))
(defn sync-example []
(go
(println "First")
(println (<! (get-from-server)))
(println "Second")))
WHY
Features
WHY
Immutability
WHY
WHY
function foo (arg) {
first(arg)
second(arg)
third(arg)
}
function first (arg) {
arg.message = “why so serious?”
}
WHY
(defn foo [arg]
(first arg)
(second arg)
(third arg))
(defn first [arg]
(assoc arg :message “why so serious?”))
WHY
Immutability is great because
• Understanding
• Testability
• Equality
WHY
Persistent data structures
[0 1 2 3 4 5 6]
[0 1 2 3 4 5 6 7 8 9]
The pink coloured nodes are shared
between the vectors, whereas the
brown and blue are separate.
WHY
The pink coloured nodes
are shared between the
vectors, whereas the brown
and blue are separate.
Persistent data structures
WHY
Lazy sequences
WHY
Lazy sequences
Function that produces values wrapped
into a sequence interface
(take 10 (fibonacci-producer))
Infinite collection (or very big one)
WHY
Lazy sequences
var hugeCollection = [1, 2, 3, … 10^9];
function getTransformer(collection) {
return _(collection).map(function(v) { return v * 2; }
}
var transformed = getTransformer(hugeCollection);
transformed.take(10).value();
WHY
Lazy sequences
var hugeCollection = [1, 2, 3, … 10^9];
function getTransformer(collection) {
return _(collection).map(function(v) { return v * 2; }
}
var transformed = getTransformer(hugeCollection);
transformed.take(10).value(); //1,000,000,000
WHY
Lazy sequences
(def huge-collection [1 2 3 … 10^9])
(defn get-transformer [collection]
(map #(* 2 %) collection))
(let [transformed (get-transformer huge-collection)]
(take 10 transformed))
WHY
Lazy sequences
(def huge-collection [1 2 3 … 10^9])
(defn get-transformer [collection]
(map #(* 2 %) collection)
(let [transformed (get-transformer huge-collection)]
(take 10 transformed)) //10
WHY
Macros
WHY
Macros
Lisp code is DATA
(take 10 collection)
0 1 2
WHY Times of Clojure
read
macro-expansion
compile
WHY
(template
<div>
<h1>HELLO WORLD, {{message}}</h1>
</div>
{:message "Pixel"})
WHY
(reverse
(nltnirp "dlrow olleH"))
WHY
• CSP
• Nice features
• REPL-driven development
• immutable data structures
• lazy sequences
• macros
HOW
HOW
Editors
&
Resources to start
HOW
Editors
It’s important to pick the right one
HOW
Emacs
HOW
HOW
HOW
Clojure Cursive
HOW
HOW
LightTable
HOW
HOW
Plugins for
SublimeText & Atom
HOW
Resources to start
Learn Clojure, get ClojureScript for free
HOW
Web
HOW
http://www.braveclojure.com
HOW
http://clojurekoans.com
http://clojurescriptkoans.com
HOW http://www.parens-of-the-dead.com
HOW
Books
HOW
THANK YOU
@ivanbokii
bokiyis@gmail.com

More Related Content

PDF
Herding types with Scala macros
PDF
GPars For Beginners
PDF
Typelevel summit
PPT
NS2: Binding C++ and OTcl variables
PDF
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
PDF
The Ring programming language version 1.10 book - Part 78 of 212
PDF
The Ring programming language version 1.5.1 book - Part 32 of 180
PDF
Groovy ネタ NGK 忘年会2009 ライトニングトーク
Herding types with Scala macros
GPars For Beginners
Typelevel summit
NS2: Binding C++ and OTcl variables
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
The Ring programming language version 1.10 book - Part 78 of 212
The Ring programming language version 1.5.1 book - Part 32 of 180
Groovy ネタ NGK 忘年会2009 ライトニングトーク

What's hot (20)

PDF
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
PDF
Introduction kot iin
PDF
Groovy and Grails talk
PPT
iOS Development with Blocks
PDF
Functional Programming and Ruby
PPTX
20170714 concurrency in julia
PDF
The Ring programming language version 1.5.2 book - Part 11 of 181
PDF
Go serving: Building server app with go
PDF
Js interpreter interpreted
ODP
EcmaScript 6
PDF
Javascript development done right
PDF
Modern JavaScript - Modern ES6+ Features
PDF
GeeCON Prague 2014 - Metaprogramming with Groovy
PDF
Functions - complex first class citizen
PDF
The Ring programming language version 1.5.2 book - Part 34 of 181
PDF
Miracle of std lib
PDF
The Big Three
PDF
ECMAScript 6
PDF
Google App Engine Developer - Day3
PDF
Data structure programs in c++
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
Introduction kot iin
Groovy and Grails talk
iOS Development with Blocks
Functional Programming and Ruby
20170714 concurrency in julia
The Ring programming language version 1.5.2 book - Part 11 of 181
Go serving: Building server app with go
Js interpreter interpreted
EcmaScript 6
Javascript development done right
Modern JavaScript - Modern ES6+ Features
GeeCON Prague 2014 - Metaprogramming with Groovy
Functions - complex first class citizen
The Ring programming language version 1.5.2 book - Part 34 of 181
Miracle of std lib
The Big Three
ECMAScript 6
Google App Engine Developer - Day3
Data structure programs in c++
Ad

Similar to The What, Why And How of ClojureScript (20)

PDF
Functional web with clojure
PDF
Thinking Functionally with Clojure
PDF
Thinking Functionally - John Stevenson - Codemotion Rome 2017
PDF
Fun with Functional Programming in Clojure - John Stevenson - Codemotion Amst...
PDF
Get into Functional Programming with Clojure
PDF
Javascript: The Important Bits
PDF
Fun with Functional Programming in Clojure
KEY
LISP: How I Learned To Stop Worrying And Love Parantheses
PDF
ClojureScript for the web
PDF
Introductory Clojure Presentation
PDF
Introduction to clojure
PDF
The Ideas of Clojure - Things I learn from Clojure
PDF
Full Stack Clojure
PDF
Clojure Programming Cookbook Makoto Hashimoto Nicolas Modrzyk
PDF
Clojure intro
PDF
Get Functional Programming with Clojure
PPTX
Clojure through the eyes of a Java Nut | [Mixed Nuts] at Pramati Technologies
PDF
Introduction to Clojure
PDF
Clojurescript slides
PDF
A Taste of Clojure
Functional web with clojure
Thinking Functionally with Clojure
Thinking Functionally - John Stevenson - Codemotion Rome 2017
Fun with Functional Programming in Clojure - John Stevenson - Codemotion Amst...
Get into Functional Programming with Clojure
Javascript: The Important Bits
Fun with Functional Programming in Clojure
LISP: How I Learned To Stop Worrying And Love Parantheses
ClojureScript for the web
Introductory Clojure Presentation
Introduction to clojure
The Ideas of Clojure - Things I learn from Clojure
Full Stack Clojure
Clojure Programming Cookbook Makoto Hashimoto Nicolas Modrzyk
Clojure intro
Get Functional Programming with Clojure
Clojure through the eyes of a Java Nut | [Mixed Nuts] at Pramati Technologies
Introduction to Clojure
Clojurescript slides
A Taste of Clojure
Ad

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Introduction to Artificial Intelligence
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
AI in Product Development-omnex systems
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
top salesforce developer skills in 2025.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Reimagine Home Health with the Power of Agentic AI​
Odoo POS Development Services by CandidRoot Solutions
L1 - Introduction to python Backend.pptx
Introduction to Artificial Intelligence
Odoo Companies in India – Driving Business Transformation.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Operating system designcfffgfgggggggvggggggggg
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
AI in Product Development-omnex systems
2025 Textile ERP Trends: SAP, Odoo & Oracle
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Digital Strategies for Manufacturing Companies
Which alternative to Crystal Reports is best for small or large businesses.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms I-SECS-1021-03

The What, Why And How of ClojureScript