Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Clojure

Intro to Clojure

Slides of my Lecture in the Academic Computer Science week - UFF 2015

Raphael Amorim

November 26, 2015
Tweet

More Decks by Raphael Amorim

Other Decks in Programming

Transcript

  1. WHAT’S CLOJURE? Clojure is a dynamic programming language that targets

    the Java Virtual Machine (and the CLR, and JavaScript).
  2. WHO’S USING CLOJURE? Akamai, Appvise, Citigroup, Amazon, eBay, Heroku, Groupon,

    Netflix, Nubank, Salesforce, Walmart Labs, Zendesk […] http://clojure.org/Companies
  3. - Started in 2007 - Created by Rich Hickey -

    Under Eclipse Public License TAKING NOTES.
  4. “ Clojure is a dialect of Lisp, and shares with

    Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language ” TAKING NOTES.
  5. Lisp - 1958 Introduced a programming language able to deal

    with mathematical notation Back to the Past.
  6. Lisp - 1958 Introduced a programming language able to deal

    with mathematical notation * IPL (Information Processing Language) is sometimes cited as the first computer-based functional programming language. First appeared in 1956. Back to the Past.
  7. “Can Programming Be Liberated from the von Neumann Style?” -

    1978 John Backus (FORTRAN creator) criticizes hardware architecture based on von Neuman model. Back to the Past.
  8. The Boom- 1980 Innovative techniques have been proposed, such as:

    Lazy Evaluation Emergence of other languages such as: Lazy ML, Orwell, Alfl, Id, Clean, Ponder e Daisy Back to the Past.
  9. - Numbers ( 1, 3, 5, 85 ) - Character

    ( \h, \r, \a ) - String ( “barbante” ) - Boolean ( true, false ) - Symbol ( ‘a, ‘b, ‘c )
  10. Collections (all of them are immutable) - Lists ( '(1

    2 3 4) ) - sequential and counted, not associative - first and rest - Vector ( [ 1 2 101 85 ] ) - sequential, counted and associative - access by key
  11. Collections (all of them are immutable) - Maps ( {

    “raphael” 20, “richard" 25, “chuck” 99 } ) - counted and associative, not sequential - access by key - Sets ( #{“hugo” “raphael” “vianna”} ) - counted, not sequential, not associative - lookup for containment
  12. • Clojure:Functional Concurrency for the JVM - Howard M. Lewis

    Ship • Clojure: A dynamic programming language for the JVM - Rich Hickey • Intro to Clojure by Balint Erdi ( https://speakerdeck.com/balint/intro- to-clojure ) • Clojure Intro ( http://www.slideshare.net/thnetos/clojure-intro ) • Introduction to Clojure by Renzo Borgatti ( http://pt.slideshare.net/ reborg/introduction-to-clojure-13679039 ) References