SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
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/

Contenu connexe

Tendances

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

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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?
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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/