June 22, 2014

Getting Started with Clojure - Part 1

Basic introduction to clojure and some pointers on how to install Clojure and Leinigen.

Sourcehttps://www.codeschool.com/code_tv/getting-started-with-clojure-part-1
  • Contents : 
    • Part I
      • 1. About Clojure
      • 2. Installing Clojure
      • 3. The Clojure REPL
    • Part II
      • 4. Literal Data Types
      • 5. Evaluation
      • 6. Naming Things
    • Part III
      • 7. Beyond the REPL - Leinigen
      • 8. Learning More
  • 1. About Clojure
    • What is Clojure? (http://clojure.org/features
      • A member of the Lisp family of languages -> 
        • Functional - functions are first class, you can call functions, pass functions around, functions return functions ..  
        • Dynamic - at runtime, the running program itself can be modified, flexibility to change the definition of existing functions ..etc
        • Hosted - runs on top of some other runtime (Clojure - JVM and CLR, ClojureScript - compiles to Javascript and runs where JS runs) 
      • 2 major dialects -> Clojure, ClojureScript
    • Why Clojure?
      • Good at working with data - rich literal syntax, expressive & well-factored libraries
      • Good at expressing algorithms - functional, expressive set of rich libraries 
      • Great at the above in the face of concurrency - immutable data structures, innovative approach to state (STM) 
    • Sample sytax
      • (+ 2 3) - start and end with brackets. start bracket followed by function. ; for comments. 
  • 2. Installing Clojure
  • 3. Clojure REPL
    • read-eval-print-loop
    • interactive, dynamic, exploratory tool 
    • start one with "lein repl"



No comments:

Post a Comment