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
Clojure
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Samuel Flores
November 29, 2014
Programming
210
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Clojure
Apresentando Clojure hoje no encontro do GuruPI
Samuel Flores
November 29, 2014
More Decks by Samuel Flores
See All by Samuel Flores
Introdução ao MRuby
samflores
1
64
Gulp.js
samflores
1
160
Por que Ruby?
samflores
1
170
Extendendo Ruby com C (& cartoons)
samflores
3
190
Sinatra
samflores
2
230
Other Decks in Programming
See All in Programming
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
170
すこし踏み込む CancellationToken
htkym
2
1.7k
Domain-Driven Transformation
hschwentner
2
2.3k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
340
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
410
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
残高管理から台帳サービスへの進化
artoy
1
200
R8 の設定見直しでアプリサイズ削減
andpad
0
210
phperだってパンチカードでコーディングしたい
o0h
PRO
0
310
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
360
golang-bob.pdf
iwatsukayura
0
130
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
110
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Accessibility Awareness
sabderemane
1
250
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
980
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Site-Speed That Sticks
csswizardry
13
1.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
エンジニアに許された特別な時間の終わり
watany
109
250k
Transcript
(Clojure) @samflores
Lisp
Lots of InSignificant Parenthesis
LISt Processing
(1 2 3) *
Homoiconicidade
(+ 2 3) ; 5
(+ 2 4 6) ; 12
(doc +) clojure.core/+ ([] [x] [x y] [x y &
more]) Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'
Funcional
(odd? 2) ; false
(def par? (fn [n] (even? n))) (par? 2); true
(def par? even?) (par? 2); true
(defn greet [name] (str "Hello, " name)) (greet "John"); Hello,
John
(map :name [{:name "John" :age 15} {:name "Mary" :age 10}])
(reduce + (range 10))
(apply + (repeat 30 8)) ; 240
(def dobra (partial * 2)) (dobra 5) ; 10
Simplicidade
def fn #() if do let quote ‘() var #’()
loop recur throw try formas especiais
alias and BEGIN begin break case class def defined? do
else elsif END end ensure for if in module next not or redo rescue retry return self super then undef unless until when while yield Ruby
assert break class const continue default do double else enum
extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while Java
Pragmatismo
(def b 2r101010) (def n 1337N) (def m 3.14159M) (def
r #"(\d+)") data types
(def l '(1 2 3)) (def v [1 2 3])
(def m {:a 1 :b 2}) (def s #{:x :y :z}) data types
JVM*
(def today (java.Util.Date.)) (.year today) ; today.year() (Integer/parseInt "10") Java
interop
Imutabilidade*
(def l '(1)) (conj l 2) (prn l) ; (1)
& Concorrência Paralelismo
STM atoms agents delays futures promisses refs core.async …
(def l (atom [])) (swap! l conj 1) atoms
(def c (agent 0)) (send c inc) (send c dec)
(await c) agents
(defn long-running-job [n] (Thread/sleep 3000) (+ n 10)) (pmap long-running-job
(range 100)) pmap
(def ch (chan)) (go (print (<! ch))) (put! ch "Hi")
core.async
Environment
(defroute "/" [] (home-handler)) (defroute "/:user” [user] (profile-handler user)) compojure
:dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/core.async "0.1.346.0-17112a-alpha"]] leiningen
$ lein deps $ lein ring server leiningen
(select user (with address) (fields :firstName :lastName :address.state) (where {:email
"
[email protected]
"})) korma
ClojureScript core.typed datomic Clojars jetty http-kit …
Comunidade
clojure.org clojure-doc.org clojuredocs.org grimoire.arrdem.com #clojure FreeNode
(obrigado) @samflores