Things to in Clojure
Jiri Knesl
Things I already like
• static typing makes me write types everywhere (inference
helps but only a little)
• schema allows me to type only in pla...
• https://github.com/prismatic/schema
• Install:
• [prismatic/schema “0.2.1”]
• Require:
• (:require [schema.core :as s])
Parallelism for free
• Simple as (future (do something))
• Or Atoms/Agents…
• Or core.async
One day
• One day I improved performance of my
application by 100 %
• With only a few characters
• Without need to think
•...
More
parallel/concurrent/async
goodness
• Software Transactional Memory
• Futures, Promises
• Actors
• Core.async
• Actors...
Great presentation on topic
“The Future is Parallel, and the
Future of Parallel is Declarative”
Simon Peyton Jones
Leiningen everywhere
• lein deps (Clojure is just another dependency)
• lein kibit & lein eastwood (lint)
• lein uberjar
•...
Hiccup
• Turing-complete templates
• Compile-time checking
• Adding own helpers & logic became natural
• And templates are...
Hiccup looks like…
Things I believe I will like
Double-check
https://github.com/cemerick/do
uble-check
now you can test on thousands
of inputs
and then get the minimal in...
ZMQ-Async
https://github.com/lynaghk/zmq-async
http://www.avout.io
distributed atom & ref
Pulsar
http://docs.paralleluniverse.co/pulsar/
Erlang-like Actors
Next step
• Install Clojure & try your first project
• Luminus framework & RouteOne & Hiccup &
Midje
• Follow @jiriknesl
•...
Thing to love in Clojure
Upcoming SlideShare
Loading in …5
×

Thing to love in Clojure

1,096 views

Published on

From presentation "Things to love in Clojure", Barcelona Clojure/Lambda Meetup Group. I collected some libraries I really like to use or are libraries which are interesting and I am looking forward to use them in situations I will need them.

Published in: Software
  • Be the first to comment

Thing to love in Clojure

  1. 1. Things to in Clojure Jiri Knesl
  2. 2. Things I already like
  3. 3. • static typing makes me write types everywhere (inference helps but only a little) • schema allows me to type only in places I like • types are data (you can create them, modify them, merge them) • you can add validators to types (only even size of vector?) • optional keys & Maybe • Disadvantage: magic happens in runtime :(
  4. 4. • https://github.com/prismatic/schema • Install: • [prismatic/schema “0.2.1”] • Require: • (:require [schema.core :as s])
  5. 5. Parallelism for free • Simple as (future (do something)) • Or Atoms/Agents… • Or core.async
  6. 6. One day • One day I improved performance of my application by 100 % • With only a few characters • Without need to think • I put my model queries to (future) and @deref’d them in template
  7. 7. More parallel/concurrent/async goodness • Software Transactional Memory • Futures, Promises • Actors • Core.async • Actors (more on this later) • Homoiconicity for the great good
  8. 8. Great presentation on topic “The Future is Parallel, and the Future of Parallel is Declarative” Simon Peyton Jones
  9. 9. Leiningen everywhere • lein deps (Clojure is just another dependency) • lein kibit & lein eastwood (lint) • lein uberjar • lein midje • …
  10. 10. Hiccup • Turing-complete templates • Compile-time checking • Adding own helpers & logic became natural • And templates are shorter • With RouteOne
  11. 11. Hiccup looks like…
  12. 12. Things I believe I will like
  13. 13. Double-check https://github.com/cemerick/do uble-check now you can test on thousands of inputs and then get the minimal input
  14. 14. ZMQ-Async https://github.com/lynaghk/zmq-async
  15. 15. http://www.avout.io distributed atom & ref
  16. 16. Pulsar http://docs.paralleluniverse.co/pulsar/ Erlang-like Actors
  17. 17. Next step • Install Clojure & try your first project • Luminus framework & RouteOne & Hiccup & Midje • Follow @jiriknesl • E-mail me to jiri@sprintmasters.cz (I would be happy to help you with transition to functional programming)

×