SlideShare a Scribd company logo
Clojure
Simple Made Easy
Adam Hill @adamhill
Senior Developer
Improving Enterprises
History
Invented by Rich Hickey around 2007. He wanted
a modern LISP that could leverage the JVM and
the Java library ecosystem
Cognitect - Commercial face of Clojure. Employs
many key developers. Sells support and a
database (Datomic) written in Clojure
Open Source with Contributor License Agreement
Clojure…
Is a LISP
Runs on / Interops with the JVM and CLR …and
now in Javascript with CLJS
Has a Read-Eval-Print-Loop (REPL) workflow
Clojure…
Has a simple syntax
Has simple data structures
Has immutable and persistent data structures by
default
Has higher order functions
Is homoiconic
Syntax
There is none! …reallly …well not quite :-) (see Stuart’s video)
EDN data
Like Json, but richer constructs (+ Maps, Sets Vectors)
Everything is an expression (S-expressions)
(operations argument)
You have symbols bound to values
Data is the code - No text based syntax
Things that we think of as syntax (control structures, declarations,
function calls) are just lists with operators and args
Simple Syntax
Operators can be special operations, macros or
functions
Special ops - def fn if-
fn is a special op to define a function
Functions are first class (Higher Order)
(def five 5)
(def add-1 (fn[x] ( + x 1))))
(add-1 five) => 6
Macros are like C & C++ but can use higher order functions
Simple Data Structures
Lists - (1 2 3 4 5)
Map - [:foo “bar” 4 2]
Vectors - [ a b c]
Sets - #{4 5}
Immutable by Default
Immutable values over time
Software Transactional Memory - Change binding in a
controlled and in an atomic fashion
Don’t change bound values, you get a new copy
Core library has no side effects
Key to Clojure’s ability to be concurrency safe
No locks in user code
More About Data Structs
Immutable
But…
Collections keep their performance guarantees
So the changed versions are not 100% ‘new’
Clever internals to keep copying to a minimum
Something called structural sharing + various clever
internal data structures (ex. HAMT)
Dev Environments
Command Line
REPL, nREPL
Build / project tools -
Leiningen, boot
Vim
Fireplace
IntelliJ
Cursive, LaClojure
Emacs
CIDER, Emacs-live
Eclipse
Counterclockwise
LightTable
Visual Studio - CLR
VSClojure
The Cool Bit
“Homoiconicity”
Big word that simply means:
“Code is data / Data is code”
Macro facilities to add capabilities (SOP in LISPs)
Core.async
Transducers -> Composable, algorithmic transformations
Core.logic -> Logic programing ala PROLOG
Want something cool? ADD IT!
Example of Coolosity
(dissoc
(assoc
{:name “John” :password “secret”}
:nickname “Jon”)
:password)
hard to read for humans
have to read it inside out
Thread First Macro (->)
(-> {:name “John” :password “secret”}
(assoc :nickname “Jon”)
(dissoc :password))
Macro’s to the rescue!
After all - code <==> data
Community Resources
clojure.org
Videos (ClojureTv on YouTube)
Any Rich Hickey video - ‘Simple Made Easy’ & ‘Hammock Driven
Development’
Stewart Halloway - ‘Introduction to Clojure’
Clojure Koans http://clojurekoans.com
Metablog http://planet.clojure.in/
Community Docs http://clojuredocs.org/
Grimoire - Cookbook / Examples http://grimoire.arrdem.com/
Web problems (a la Project Euler) http://www.4clojure.com/
Online REPL http://www.tryclj.com
Questions?
Adam Hill @adamhill
Senior Developer

More Related Content

Similar to Clojure Intro - Dallas Functional

Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
Istvan Rath
 
Silicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you RESTSilicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you REST
Manish Pandit
 
Mail Merge Documents With Aspnet
Mail Merge Documents With AspnetMail Merge Documents With Aspnet
Mail Merge Documents With Aspnet
James Johnson
 
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part OneThe AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
Lucas Jellema
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
Nordic APIs
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Animesh Singh
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
ESUG
 
Getting Started with Sql Server Compact Edition
Getting Started with Sql Server Compact EditionGetting Started with Sql Server Compact Edition
Getting Started with Sql Server Compact Edition
DonRobins
 
Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51
Mark Ginnebaugh
 
Os Owens
Os OwensOs Owens
Os Owens
oscon2007
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
guest4faf46
 
A Taste of Clojure
A Taste of ClojureA Taste of Clojure
A Taste of Clojure
David Leung
 
Charlton Barreto - The OGF | Open Cloud Computing Interface
Charlton Barreto - The OGF | Open Cloud Computing InterfaceCharlton Barreto - The OGF | Open Cloud Computing Interface
Charlton Barreto - The OGF | Open Cloud Computing Interface
Symposia Media
 
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
mfrancis
 
Report From Oracle Open World 2008 AMIS 2 October2008
Report From Oracle Open World 2008 AMIS 2 October2008Report From Oracle Open World 2008 AMIS 2 October2008
Report From Oracle Open World 2008 AMIS 2 October2008
Lucas Jellema
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
Dave Stokes
 
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
Dave Stokes
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
Jodok Batlogg
 
Hadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real WorldHadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real World
voberoi
 

Similar to Clojure Intro - Dallas Functional (20)

Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
 
Silicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you RESTSilicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp 2011: Play! as you REST
 
Mail Merge Documents With Aspnet
Mail Merge Documents With AspnetMail Merge Documents With Aspnet
Mail Merge Documents With Aspnet
 
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part OneThe AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
 
Getting Started with Sql Server Compact Edition
Getting Started with Sql Server Compact EditionGetting Started with Sql Server Compact Edition
Getting Started with Sql Server Compact Edition
 
Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51
 
Os Owens
Os OwensOs Owens
Os Owens
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
A Taste of Clojure
A Taste of ClojureA Taste of Clojure
A Taste of Clojure
 
Charlton Barreto - The OGF | Open Cloud Computing Interface
Charlton Barreto - The OGF | Open Cloud Computing InterfaceCharlton Barreto - The OGF | Open Cloud Computing Interface
Charlton Barreto - The OGF | Open Cloud Computing Interface
 
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
We Can Do Better - IBM's Vision for the Next Generation of Java Runtimes - Jo...
 
Report From Oracle Open World 2008 AMIS 2 October2008
Report From Oracle Open World 2008 AMIS 2 October2008Report From Oracle Open World 2008 AMIS 2 October2008
Report From Oracle Open World 2008 AMIS 2 October2008
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
 
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
 
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...PHP,  The X DevAPI,  and the  MySQL Document Store Presented January 23rd, 20...
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
 
Hadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real WorldHadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real World
 

More from Adam Hill

PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
Adam Hill
 
The Rendering Equation
The Rendering EquationThe Rendering Equation
The Rendering Equation
Adam Hill
 
Dallas Functional - Homoiconcity
Dallas Functional - HomoiconcityDallas Functional - Homoiconcity
Dallas Functional - Homoiconcity
Adam Hill
 
Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !
Adam Hill
 
Visual studio + Xamarin == Love
Visual studio + Xamarin == LoveVisual studio + Xamarin == Love
Visual studio + Xamarin == Love
Adam Hill
 
Library, Library Lets Use THAT Library – DFW Mobile
Library, Library Lets Use THAT Library  – DFW MobileLibrary, Library Lets Use THAT Library  – DFW Mobile
Library, Library Lets Use THAT Library – DFW Mobile
Adam Hill
 
10 Minute UX Talk Designing Data Visualization
10 Minute UX Talk   Designing Data Visualization10 Minute UX Talk   Designing Data Visualization
10 Minute UX Talk Designing Data Visualization
Adam Hill
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
Adam Hill
 
Are You Live Coding at Me?!!
Are You Live Coding at Me?!!Are You Live Coding at Me?!!
Are You Live Coding at Me?!!
Adam Hill
 
Looking For Xaml In All The Wrong Places
Looking For Xaml In All The Wrong PlacesLooking For Xaml In All The Wrong Places
Looking For Xaml In All The Wrong Places
Adam Hill
 
Deploy All The Games
Deploy All The GamesDeploy All The Games
Deploy All The Games
Adam Hill
 
Whats New in Visual Studio 2015
Whats New in Visual Studio 2015Whats New in Visual Studio 2015
Whats New in Visual Studio 2015
Adam Hill
 
Visual studio + Xamarin equals love
Visual studio + Xamarin equals loveVisual studio + Xamarin equals love
Visual studio + Xamarin equals love
Adam Hill
 
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
Adam Hill
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas Functional
Adam Hill
 
Monotouch iPhone Development – IGDA Orlando - 2007
Monotouch iPhone Development –  IGDA Orlando - 2007 Monotouch iPhone Development –  IGDA Orlando - 2007
Monotouch iPhone Development – IGDA Orlando - 2007
Adam Hill
 

More from Adam Hill (16)

PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
 
The Rendering Equation
The Rendering EquationThe Rendering Equation
The Rendering Equation
 
Dallas Functional - Homoiconcity
Dallas Functional - HomoiconcityDallas Functional - Homoiconcity
Dallas Functional - Homoiconcity
 
Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !Micro Talk - Test Your S#!? !
Micro Talk - Test Your S#!? !
 
Visual studio + Xamarin == Love
Visual studio + Xamarin == LoveVisual studio + Xamarin == Love
Visual studio + Xamarin == Love
 
Library, Library Lets Use THAT Library – DFW Mobile
Library, Library Lets Use THAT Library  – DFW MobileLibrary, Library Lets Use THAT Library  – DFW Mobile
Library, Library Lets Use THAT Library – DFW Mobile
 
10 Minute UX Talk Designing Data Visualization
10 Minute UX Talk   Designing Data Visualization10 Minute UX Talk   Designing Data Visualization
10 Minute UX Talk Designing Data Visualization
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
 
Are You Live Coding at Me?!!
Are You Live Coding at Me?!!Are You Live Coding at Me?!!
Are You Live Coding at Me?!!
 
Looking For Xaml In All The Wrong Places
Looking For Xaml In All The Wrong PlacesLooking For Xaml In All The Wrong Places
Looking For Xaml In All The Wrong Places
 
Deploy All The Games
Deploy All The GamesDeploy All The Games
Deploy All The Games
 
Whats New in Visual Studio 2015
Whats New in Visual Studio 2015Whats New in Visual Studio 2015
Whats New in Visual Studio 2015
 
Visual studio + Xamarin equals love
Visual studio + Xamarin equals loveVisual studio + Xamarin equals love
Visual studio + Xamarin equals love
 
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
Oops Youve Got A Mobile Enterprise App – DevFestWeekend 2018
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas Functional
 
Monotouch iPhone Development – IGDA Orlando - 2007
Monotouch iPhone Development –  IGDA Orlando - 2007 Monotouch iPhone Development –  IGDA Orlando - 2007
Monotouch iPhone Development – IGDA Orlando - 2007
 

Recently uploaded

原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Requirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional SafetyRequirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional Safety
Ayan Halder
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Requirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional SafetyRequirement Traceability in Xen Functional Safety
Requirement Traceability in Xen Functional Safety
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 

Clojure Intro - Dallas Functional

  • 1. Clojure Simple Made Easy Adam Hill @adamhill Senior Developer Improving Enterprises
  • 2. History Invented by Rich Hickey around 2007. He wanted a modern LISP that could leverage the JVM and the Java library ecosystem Cognitect - Commercial face of Clojure. Employs many key developers. Sells support and a database (Datomic) written in Clojure Open Source with Contributor License Agreement
  • 3. Clojure… Is a LISP Runs on / Interops with the JVM and CLR …and now in Javascript with CLJS Has a Read-Eval-Print-Loop (REPL) workflow
  • 4. Clojure… Has a simple syntax Has simple data structures Has immutable and persistent data structures by default Has higher order functions Is homoiconic
  • 5. Syntax There is none! …reallly …well not quite :-) (see Stuart’s video) EDN data Like Json, but richer constructs (+ Maps, Sets Vectors) Everything is an expression (S-expressions) (operations argument) You have symbols bound to values Data is the code - No text based syntax Things that we think of as syntax (control structures, declarations, function calls) are just lists with operators and args
  • 6. Simple Syntax Operators can be special operations, macros or functions Special ops - def fn if- fn is a special op to define a function Functions are first class (Higher Order) (def five 5) (def add-1 (fn[x] ( + x 1)))) (add-1 five) => 6 Macros are like C & C++ but can use higher order functions
  • 7. Simple Data Structures Lists - (1 2 3 4 5) Map - [:foo “bar” 4 2] Vectors - [ a b c] Sets - #{4 5}
  • 8. Immutable by Default Immutable values over time Software Transactional Memory - Change binding in a controlled and in an atomic fashion Don’t change bound values, you get a new copy Core library has no side effects Key to Clojure’s ability to be concurrency safe No locks in user code
  • 9. More About Data Structs Immutable But… Collections keep their performance guarantees So the changed versions are not 100% ‘new’ Clever internals to keep copying to a minimum Something called structural sharing + various clever internal data structures (ex. HAMT)
  • 10. Dev Environments Command Line REPL, nREPL Build / project tools - Leiningen, boot Vim Fireplace IntelliJ Cursive, LaClojure Emacs CIDER, Emacs-live Eclipse Counterclockwise LightTable Visual Studio - CLR VSClojure
  • 11. The Cool Bit “Homoiconicity” Big word that simply means: “Code is data / Data is code” Macro facilities to add capabilities (SOP in LISPs) Core.async Transducers -> Composable, algorithmic transformations Core.logic -> Logic programing ala PROLOG Want something cool? ADD IT!
  • 12. Example of Coolosity (dissoc (assoc {:name “John” :password “secret”} :nickname “Jon”) :password) hard to read for humans have to read it inside out
  • 13. Thread First Macro (->) (-> {:name “John” :password “secret”} (assoc :nickname “Jon”) (dissoc :password)) Macro’s to the rescue! After all - code <==> data
  • 14. Community Resources clojure.org Videos (ClojureTv on YouTube) Any Rich Hickey video - ‘Simple Made Easy’ & ‘Hammock Driven Development’ Stewart Halloway - ‘Introduction to Clojure’ Clojure Koans http://clojurekoans.com Metablog http://planet.clojure.in/ Community Docs http://clojuredocs.org/ Grimoire - Cookbook / Examples http://grimoire.arrdem.com/ Web problems (a la Project Euler) http://www.4clojure.com/ Online REPL http://www.tryclj.com