clojure&clojure script

Download Clojure&clojure script

Post on 18-Nov-2014

382 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

  • 1. Rich HickeyLispJava VM Rich Lisp->C++ Clojure Rich 1.6
  • 2. JVMJava (STM) Lisp
  • 3. http://www.infoq.com/jp/articles/the-joy-of-clojure From The Joy of ClojureChris Houser : Clojure CoffeeScriptHaskell http://www.infoq.com/jp/news/2013/04/Language-Expressiveness Clojure8KLines
  • 4. Scala: Adorned Overflowing Magnificent Clojure: Clean Structured Focused
  • 5. map Java Lisp
  • 6. public class StringUtils { public static boolean isBlank(String str) { int strLen; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; i++) { if ((Character.isWhitespace(str.charAt(i)) == false)) { return false; } } return true; } } (defn blank? [str] (every? #(Character/isWhitespace %) str)) Java Clojure Java1/10 Programming Clojure(Stuart Halloway,Aaron Bedra)
  • 7. CEP(Complex Event Processing) twitter StormClojure 100 Databasedatomicclojure cascalogincanterclojuratica Akamaiciti bank http://dev.clojure.org/display/community/Clojure+Success+S tories (Xcoo,Inc) / clojure https://chrov.is/
  • 8. $ lein repl nREPL server started on port 42412 on host 127.0.0.1 REPL-y 0.3.0 Clojure 1.5.1 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> (+ 1 2 3) 6 user=> (println "Hello World") Hello World nil user=> (javax.swing.JOptionPane/showMessageDialog nil "Hello World") nil user=> Bye for now!
  • 9. JavaScriptclojure Google closure CoffeeScriptTypeScript Lisp ClojureScriptGoogle closure ClojureScriptJavaScript nodejs
  • 10. ClojureScript REPL Browser REPL client Effect Browser REPL server JVM browser JS ClojureScript JavaScript JavaScript ClojureScript Google closure Java VM
  • 11. Chris GingerKickStarter LightTableClojureScript Live Evaluation ClojureScript+Facebook ReactJSDevid NolenomClojureScriptHot ReactJSVirtual DomClojureimmutable JavaScript
  • 12. $ lein trampoline cljsbuild repl-rhino Running Rhino-based ClojureScript REPL. To quit, type: :cljs/quit ClojureScript:cljs.user> (+ 1 2 3) 6 ClojureScript:cljs.user> (println "Hello World") Hello World nil ClojureScript:cljs.user>