ClojureScriptwhat are you?
Roman Liutikov
http://www.lisperati.com/casting_spels.pdf
((((()))))
John McCarthy
• AI • LISP • Garbage collection
(ns app.core (:require [cljsjs.react-dom :refer [render]]))
(def app-component ;; code )
(render app-component (js/document.getElementById "app"))
Too many parens? not really ;)
(double 5) double(5)
Clojure JavaScript
Companies using ClojureScript
CircleCI Atlassian
Cisco eBay
ModnaKasta ! …
Because Clojure rocks, and JavaScript reaches.
— Rich Hickey
ClojureScript Release - Rich Hickeyhttps://www.youtube.com/watch?v=tVooR-dF_Ag
Why ClojureScript?• Functional programming
• Immutable data (mori in JS)
• Great standard library + Google Closure Libraries
• Interactive development
• Robust libraries
• Great optimizing compiler (dead code elimination, tree-shaking and more)
But it should be slow
http://swannodette.github.io/2013/06/10/porting-notchs-minecraft-demo-to-clojurescript/
http://thi.ng/
Learn once, use anywhere
• Server-side: JVM, Node.js
• Client-side: ClojureScript + React.js
• Desktop: ClojureScript + Electron
• Mobile: ClojureScript + React Native
Tools Code
• Atom, LightTable, Vim, Emacs, whatever…
• Parinfer
Tools Build
Tools Build
• Leiningen (dependencies + Grunt in JS)
• Boot (dependencies + Gulp in JS)
• Figwheel (Webpack’s HMR in JS)
• Devcards (visual interactive development)
Tools Debugging
• Source maps
• Dirac (Chrome DevTools with extra features for CLJS development)
Tools Testing
• cljs.test
• doo (multi env test runner, supports Karma)
SPA libraries
• Reagent + re-frame
• Om
• Rum
Libraries
• clojars.org (NPM in JS)
• cljsjs.github.io (for JS deps)
• clojurewerkz.org
• www.clojure-toolbox.com
How to try ClojureScript?
• jsbin.com
• cljsfiddle.com (Reagent)
• clojurescript.net (Web REPL)
• planck-repl.org (OSX REPL)
• Replete (iOS REPL)
ClojureScript for Skeptics - Derek Slagerhttps://www.youtube.com/watch?v=gsffg5xxFQI
Where to learn more?• clojurescriptkoans.com
• kanaka.github.io/clojurescript/web/synonym.html
• cljs.info/cheatsheet
• clojuredocs.org
• github.com/clojure/clojurescript/wiki
• gitter.im/dev-ua/clojure
• clojurians.net
(questions?)
Thanks!
@roman01la
Top Related