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
From JS To CLJS
Search
Kent OHASHI
May 12, 2017
Programming
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
From JS To CLJS
JavaScriptからClojureScriptへ
ClojureをJavaScriptの世界でも利用しよう!
Kent OHASHI
May 12, 2017
More Decks by Kent OHASHI
See All by Kent OHASHI
速習FP in Scala with Flix: Flix言語で親しむ純粋関数型のコード設計
lagenorhynque
0
41
"Simple Made Easy" Made Easier: Clojureに学ぶsimplicity
lagenorhynque
0
56
Property-Based Testing with test.check and clojure.spec
lagenorhynque
0
77
🐬の推し本紹介2025: 『コーディングを支える技術 ――成り立ちから学ぶプログラミング作法』
lagenorhynque
0
140
KotlinでミニマルなResult実装による関数型エラーハンドリング
lagenorhynque
0
86
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
1
500
関数型言語テイスティング: Haskell, Scala, Clojure, Elixirを比べて味わう関数型プログラミングの旨さ
lagenorhynque
1
320
純LISPから考える関数型言語のプリミティブ: Clojure, Elixir, Haskell, Scala
lagenorhynque
1
340
From Scala/Clojure to Kotlin
lagenorhynque
0
140
Other Decks in Programming
See All in Programming
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
580
Agents on Rails - Rails at Scale 2026
irinanazarova
0
290
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
460
App Intentsのビルドプロセスを支える技術
kntkymt
0
480
FreeBSDでZabbixを動かす
kenkino
0
340
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
570
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
130
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
240
setup-vp GitLab対応の裏側
naokihaba
0
140
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
速習iPhone Duo対応
yuukiw00w
2
910
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Unsuck your backbone
ammeep
672
58k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The SEO Collaboration Effect
kristinabergwall1
1
580
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Technical Leadership for Architectural Decision Making
baasie
3
580
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Thoughts on Productivity
jonyablonski
76
5.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Transcript
From JS To CLJS - Adieu JavaScript -
Self-introduction /laʒenɔʁɛ̃k/ カマイルカ lagénorhynque (defprofile lagénorhynque :name "Kent OHASHI" :account
@lagenorhynque :company "Opt, Inc." :languages [Clojure Haskell Python Scala English français Deutsch русский] :interests [programming language-learning mathematics] :contributing [github.com/japan-clojurians/clojure-site-ja])
Contents 1. What is ClojureScript? 2. Why does ClojureScript matter?
3. Language 4. Libraries 5. Tools
What is ClojureScript?
によると ClojureScript公式サイト ClojureScript is a compiler for Clojure that targets
JavaScript. It emits JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler.
ClojureScript (CLJS) JavaScriptをターゲットとしたClojureのコンパイラ cf. : Java/JVMがターゲット の 互換のJSコードを⽣成 Clojure Google
Closure Compiler advanced compilation mode
compilation process from ClojureScript: Up and Running
Why does ClojureScript matter?
JavaScriptの世界でもClojureのメリットを REPL駆動のインタラクティブな開発 関数型プログラミング 並⾏プログラミング 現代的なLisp → Webフロントエンド, , , etc.
Electron React Native
フロントエンド・サーバサイド間のスムーズな連携 コードの共有 .cljc & データの共有 , (cf. JSON, ) →
フロントエンドもサーバサイドもClojure reader conditionals EDN Transit MessagePack
Language
syntax cf. ※ CLJSのWeb REPL(e.g. )で試そう ClojureScript Synonyms ClojureScript -
Differences from Clojure Macros Replumb REPL
Clojure, ClojureScriptなどプラットフォーム間での 差異を吸収するための仕組み 拡張⼦ .cljc のファイル内で利⽤ と reader conditionals #?
#?@ (defn str->int [s] #?(:clj (java.lang.Integer/parseInt s) :cljs (js/parseInt s)))
Libraries
library references The Clojure Toolbox CrossClj razum2um/awesome-clojure
example: のReagent実装 cf. 採⽤例: Reagent A minimalistic ClojureScript interface to
React.js Reactチュートリアル lagenorhynque/react-tutorial Om circleci/frontend
Tools
build /ˈlainɪŋən/ Clojure, ClojureScript共通のビルドツール プラグインやプロジェクトテンプレートが豊富 設定ファイル project.clj (e.g. ) cf.
Leiningen react-tutorial Boot
hot loading Leiningenプラグイン ClojureScriptのオートビルド ブラウザのオートリロード etc. lein-figwheel
optimization CLJSのコンパイラオプション :optimizations level effect :none 最適化なし(デフォルト) :whitespace コメント/空⽩など削除 :simple
ローカル変数/関数引数リネーム :advanced グローバル変数/関数名/プロパ ティリネーム,デッドコード削 除,etc. Google Closure Compiler
Further Reading サイト : 公式サイト cf. : GitHub 書籍 翻訳:
ClojureScript Clojure clojure/clojurescript ClojureScript: Up and Running 『⼊⾨ ClojureScript』 ClojureScript Unraveled
スライド 英語版: ⼊⾨ClojureScript ClojureScriptという選択肢 ここ最近のClojureScript JavaからClojureへ From Java To Clojure