SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
clojure
“revenge of the verbs”
       tim@lossen.de
        2008-12-04
LISP

  dynamic, functional, lazy

  _not_ object-oriented

compiled (to JVM bytecode)

  on-the-fly or ahead-of-time
(def fibs (lazy-cat '(0 1)
       (map + fibs (drop 1 fibs))))
Syntax
Nothing    nil

Booleans    true false

Numbers    10 22.31 2/3
Strings   ”foo”

Characters    a space newline

Regexps      #”[a-z]+”
Comments   ;this is a hack

Symbols foo namespace/foo
java.util.BitSet

Keywords   :foo :bar
Lists   (a b c)

Vectors    [1 2 3]

Maps      {:a 1 :b 2}

Sets    #{:a :b :c}
Semantics
literals evaluate to themselves

vectors and maps are data

symbols are resolved

non-empty lists are calls
calls    (operator operands*)

  special forms      def    if    let   fn

  macros      and    defn     time

  functions     +   =   str      println

        large sequence library
Concurrency
persistent data structures

  “state - you’re doing it wrong”

  lists, vectors, maps, sets ...

  structural sharing
Vars - thread-local

Refs - transactional

Agents - asynchronous
Links
Project   http://clojure.org

Presentations http://clojure.blip.tv

Book “Programming Clojure” (beta)
http://pragprog.com/titles/shcloj

TextMate Bundle http://github.com/
nullstyle/clojure-tmbundle/

Mais conteúdo relacionado

Mais procurados

computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
ecomputernotes
 

Mais procurados (20)

Stack and Queue (brief)
Stack and Queue (brief)Stack and Queue (brief)
Stack and Queue (brief)
 
Functional Programming Concepts for Imperative Programmers
Functional Programming Concepts for Imperative ProgrammersFunctional Programming Concepts for Imperative Programmers
Functional Programming Concepts for Imperative Programmers
 
DCC2014 - Fully Online Grammar Compression in Constant Space
DCC2014 - Fully Online Grammar Compression in Constant SpaceDCC2014 - Fully Online Grammar Compression in Constant Space
DCC2014 - Fully Online Grammar Compression in Constant Space
 
U3.stack queue
U3.stack queueU3.stack queue
U3.stack queue
 
(Ai lisp)
(Ai lisp)(Ai lisp)
(Ai lisp)
 
PyData NYC whatsnew NumPy-SciPy 2019
PyData NYC whatsnew NumPy-SciPy 2019PyData NYC whatsnew NumPy-SciPy 2019
PyData NYC whatsnew NumPy-SciPy 2019
 
Lisp Programming Languge
Lisp Programming LangugeLisp Programming Languge
Lisp Programming Languge
 
Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]
 
Stack & heap
Stack & heap Stack & heap
Stack & heap
 
Lo18
Lo18Lo18
Lo18
 
Memory allocation
Memory allocationMemory allocation
Memory allocation
 
My lecture stack_queue_operation
My lecture stack_queue_operationMy lecture stack_queue_operation
My lecture stack_queue_operation
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
 
Stacks
StacksStacks
Stacks
 
6
66
6
 
Functional Programming for the Rest of Us in Javascript
Functional Programming for the Rest of Us in JavascriptFunctional Programming for the Rest of Us in Javascript
Functional Programming for the Rest of Us in Javascript
 
8
88
8
 
Coding convention
Coding conventionCoding convention
Coding convention
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
 

Semelhante a Clojure - Revenge of the Verbs

Scala overview
Scala overviewScala overview
Scala overview
dogstar
 
Scala overview
Scala overviewScala overview
Scala overview
dogstar
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
Tomasz Wrobel
 

Semelhante a Clojure - Revenge of the Verbs (20)

Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmer
 
Full Stack Clojure
Full Stack ClojureFull Stack Clojure
Full Stack Clojure
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lisp
 
Scala Refactoring for Fun and Profit
Scala Refactoring for Fun and ProfitScala Refactoring for Fun and Profit
Scala Refactoring for Fun and Profit
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of Abstraction
 
Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Data Analysis with R (combined slides)
Data Analysis with R (combined slides)
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
 
Data import-cheatsheet
Data import-cheatsheetData import-cheatsheet
Data import-cheatsheet
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Prgišče Lispa
Prgišče LispaPrgišče Lispa
Prgišče Lispa
 
Generic Functional Programming with Type Classes
Generic Functional Programming with Type ClassesGeneric Functional Programming with Type Classes
Generic Functional Programming with Type Classes
 
Speaking Scala: Refactoring for Fun and Profit (Workshop)
Speaking Scala: Refactoring for Fun and Profit (Workshop)Speaking Scala: Refactoring for Fun and Profit (Workshop)
Speaking Scala: Refactoring for Fun and Profit (Workshop)
 
Scala overview
Scala overviewScala overview
Scala overview
 
Scala overview
Scala overviewScala overview
Scala overview
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To Lisp
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 
MatlabIntro.ppt
MatlabIntro.pptMatlabIntro.ppt
MatlabIntro.ppt
 

Mais de Tim Lossen

Redis to the Rescue?
Redis to the Rescue?Redis to the Rescue?
Redis to the Rescue?
Tim Lossen
 
Announcing Euruko 2011
Announcing Euruko 2011Announcing Euruko 2011
Announcing Euruko 2011
Tim Lossen
 
Memory: The New Disk
Memory: The New DiskMemory: The New Disk
Memory: The New Disk
Tim Lossen
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
Tim Lossen
 

Mais de Tim Lossen (20)

Apocalypse Later
Apocalypse LaterApocalypse Later
Apocalypse Later
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing Failure
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing Failure
 
Enemy of the State?
Enemy of the State?Enemy of the State?
Enemy of the State?
 
Beyond Devops
Beyond DevopsBeyond Devops
Beyond Devops
 
All Your Core Are Belong To Us
All Your Core Are Belong To UsAll Your Core Are Belong To Us
All Your Core Are Belong To Us
 
Podularity FTW!
Podularity FTW!Podularity FTW!
Podularity FTW!
 
Cubic Foot Gardening
Cubic Foot GardeningCubic Foot Gardening
Cubic Foot Gardening
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard Mania
 
Event-Stream Processing with Kafka
Event-Stream Processing with KafkaEvent-Stream Processing with Kafka
Event-Stream Processing with Kafka
 
Into the Void
Into the VoidInto the Void
Into the Void
 
Treasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRubyTreasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRuby
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard Mania
 
JRuby vs. Rubinius
JRuby vs. RubiniusJRuby vs. Rubinius
JRuby vs. Rubinius
 
Redis to the Rescue?
Redis to the Rescue?Redis to the Rescue?
Redis to the Rescue?
 
Redis to the Rescue?
Redis to the Rescue?Redis to the Rescue?
Redis to the Rescue?
 
The Smallest Cluster in the World
The Smallest Cluster in the WorldThe Smallest Cluster in the World
The Smallest Cluster in the World
 
Announcing Euruko 2011
Announcing Euruko 2011Announcing Euruko 2011
Announcing Euruko 2011
 
Memory: The New Disk
Memory: The New DiskMemory: The New Disk
Memory: The New Disk
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Clojure - Revenge of the Verbs

  • 1. clojure “revenge of the verbs” tim@lossen.de 2008-12-04
  • 2. LISP dynamic, functional, lazy _not_ object-oriented compiled (to JVM bytecode) on-the-fly or ahead-of-time
  • 3. (def fibs (lazy-cat '(0 1) (map + fibs (drop 1 fibs))))
  • 5. Nothing nil Booleans true false Numbers 10 22.31 2/3
  • 6. Strings ”foo” Characters a space newline Regexps #”[a-z]+”
  • 7. Comments ;this is a hack Symbols foo namespace/foo java.util.BitSet Keywords :foo :bar
  • 8. Lists (a b c) Vectors [1 2 3] Maps {:a 1 :b 2} Sets #{:a :b :c}
  • 10. literals evaluate to themselves vectors and maps are data symbols are resolved non-empty lists are calls
  • 11. calls (operator operands*) special forms def if let fn macros and defn time functions + = str println large sequence library
  • 13. persistent data structures “state - you’re doing it wrong” lists, vectors, maps, sets ... structural sharing
  • 14. Vars - thread-local Refs - transactional Agents - asynchronous
  • 15. Links
  • 16. Project http://clojure.org Presentations http://clojure.blip.tv Book “Programming Clojure” (beta) http://pragprog.com/titles/shcloj TextMate Bundle http://github.com/ nullstyle/clojure-tmbundle/