Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
React & ClojureScript in production at Attendify
Search
Roman Liutikov
February 18, 2017
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React & ClojureScript in production at Attendify
React Kyiv, Feb 17, 2017
Roman Liutikov
February 18, 2017
More Decks by Roman Liutikov
See All by Roman Liutikov
ClojureScript × Type Inference
roman01la
0
49
React Kyiv – Dec 19, 2017
roman01la
1
230
Web Apps performance & JavaScript compilers
roman01la
3
140
Introduction to React.js
roman01la
0
97
React Native: Native Mobile Development in JavaScript @ LvivJS 2016
roman01la
0
170
React Native: Are we there yet? (Pokémon edition) @ VinnytsiaJS '16
roman01la
0
430
React Native: Native mobile development with JavaScript
roman01la
0
210
ClojureScript, что ты такое?
roman01la
1
230
ClojureScript: what are you?
roman01la
2
140
Other Decks in Programming
See All in Programming
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
290
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
460
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
The Rails Doctrine Decade
koic
2
440
setup-vp GitLab対応の裏側
naokihaba
0
140
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
520
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
5.6k
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Claude Code のすすめ
schroneko
67
230k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
560
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Facilitating Awesome Meetings
lara
57
7.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
React & ClojureScript
How everyone see LISP devs
(defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector
(:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x)))
(defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector
(:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x))) What I see
(defn row-bindings [f ocrs] (concat (:bindings f) (->> (map vector
(:ps f) ocrs) (filter (fn [[p ocr]] (named-wildcard-pattern? p))) (map (fn [[p ocr]] [(:sym p) (leaf-bind-expr ocr)]))))) (defn existential-pattern? [x] (instance? IExistentialPattern x)) (defn wildcard-or-existential? [x] (or (wildcard-pattern? x) (existential-pattern? x))) What the non-Lisper sees
How we got there?
2013 Backbone & CoffeeScript
2014 React & CoffeeScript
2014 Q3 React & ClojureScript
2017 ~50,000 LOC of ClojureScript in production
None
None
None
• simple, almost no syntax • functional programming • pragmatic
• everything is immutable • guest language БЕЗ МОНАД ВСЕ ОЧЕНЬ ПРОСТО
LISP LISt Processing КАК ЭТО ЧИТАТЬ?!
A list of 3 items (1 "two" 3.0)
Nested lists (1 (2 3))
Symbolic expression s-expression (+ 1 2) 3
Nested s-expressions (+ 1 (+ 2 3 2)) 1 7
8
ЧТО ЭТО ВООБЩЕ БЫЛО?
REACT
(defc Counter [num] [:div [:button {:on-click increment-counter} "-"] [:span num]
[:button {:on-click decrement-counter} "+"]]) const Counter = (num) => ( <div> <button onClick={incrementCounter}>-</button> <span>{num}</span> <button onClick={decrementCounter}>+</button> </div> );
[:div (case num -1 (Negative) 0 (Empty) 1 (Positive))] <div>{
switch (num) { ... } }</div>
(js/setTimeout #(console.log "HELLO!") 100) setTimeout(() => console.log("HELLO!"), 100)
ES2015 | Babel | JavaScript CLJS | CLJS Compiler |
JavaScript
React + ReactDOM Raw Gzip Webpack 2 139KB 42KB Closure
Compiler 90KB 32KB Optimization
ТЕПЕРЬ О ПЛОХОМ
NOPE ['foo', 'react-kyiv', 'org'].join('.')
Clojure Hacking Day
None