SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Clojurescript slides
Clojure ...
Clojure ...
          rocks
Clojure ...
          rocks
JavaScript ...
Clojure ...
          rocks
JavaScript ...
          reaches
ClojureScript
Why ClojureScript?
• JavaScript is the only programming
  technology in key environments
 • e.g. the browser
 • has the greatest reach in mobile
 • but is not very robust
• While demand for sophisticated
  applications increases
Rationale

• Clojure is arguably simpler, more powerful
  and more robust than JS
• JS VMs getting faster
• Clojure on JS empowers developers
Strategy

• Compile (a substantial subset of) Clojure to
  JS source
• Leverage best-of-breed JS approaches
• Look beyond the browser
Non-Objectives

• Complete Clojure
• Portable large applications
• Browser REPL demos etc

• The target is production applications
Tactics

• ClojureScript in Clojure(Script)
• ClojureScript on (Google) Closure
ClojureScript in
      Clojure(Script)
• Compiler written in Clojure
• Macros written in Clojure
• Library written in ClojureScript
 • No JavaScript source files
CinC

• Core abstractions are protocols
• Data structures are deftypes
• Excellent mapping to JS under the hood
REPL

• Written in Clojure
• Hosts embedded Rhino
• Compiles to JS on the fly
 • Rhino evals
Google Closure
• Production Code
• Closure Compiler
 • virtually all of Google’s JS goes through this
• Closure Library
 • Used by Google Gmail, Maps, Docs, Sites,
    Books, Reader, Calendar, Photos, Google+
Why Give Google
     Closure Away?
• Be cool
• Make friends
• See if it sticks
• Not using it anymore
• Sucker community into maintaining
• They want the web to win as an application
  platform
Closure Compiler
• Optimizing Compiler
 • Whitespace only
 • Within-function
 • Whole program (advanced mode)
• Try it:
 • http://closure-compiler.appspot.com/home
Another Minifier, yawn
• No!
• Closure compiler does symbol replacement
 • but also expression rewriting,
    transformation
• Dead code elimination
 • read as: uncalled code elimination
Why Whole Program
Optimization Matters
• Libraries
 • Large libraries
 • Many libraries
• Sum of many minified libs is large again
• What % of each lib do you use in one app?
 • Diminishing returns from delayed loading
    and modularity efforts
Making it work
• Convention, and lots of it
 • Welcome to Javascript!
 • Trickiness abounds - string access to
    properties, exporting, side-effects
• Google’s conventions not widely followed
• What if we had a Javascript-emitting
  language that always emitted advanced-
  mode compatible code?
Closure Library
• Huge!
 • UI, events, DOM, communications, testing,
    algorithms and data structures...
  • Packaging and dependency resolution
• Yet, not
 • Symbiotic with Closure compiler
 • Your app will include only the code it uses
   • require lib != use all of it
Whole-program
Optimization for the Win
 • Google has decided this is the key to
   delivering
   • rich applications
   • over thin wires
   • to memory constrained devices
 • Given away sophisticated tools for making
   that work
ClojureScript on
    (Google) Closure
• Emits advanced-mode compatible code
 • encapsulates conventions
• Participates in dependency system
 • maps Clojure namespaces to Google’s
    optimizable format
• Profit! - whole-program optimization and
  large library support
Find Out More




“The O’Reilly [kloh-zher] book -
 you know, with the bird on the
             front”
What’s There

• Compiler
• REPL
• Primitives
• Arity overloading
• Macros
What’s There

• Seqs, maps, vectors, sets
 • and much of supporting library
• Symbols, keywords
• Destructuring
• Regex
What’s There
• deftypes
 • core datatypes
• protocols
 • all abstractions
 • extend-type, extend-protocol
 • can extend primitives e.g. string, nil, default
• Both defined in terms of primitives
What’s There

• 2500+ lines of core lib
• clojure.string
• clojure.set
• clojure.walk
• clojure.zip
What’s There

• Reader
 • Why, given JSON?
   • Sets, keywords, symbols
   • Metadata
 • Great fit when Clojure on the server
What’s There
• Namespaces
 • integrated with Google Closure provide/
    require
• compile-file, build project, including
 • deps calculation
 • invocation of Google Closure compiler
What’s Not (yet)
• Full collection persistence
• defrecord
• multimethods/hierarchy
• Full numerics
• Testing
• Misc core library
What Won’t Be

• Thread-related things
• eval and runtime compilation
• structs, proxy, Java type-stuff
• Runtime reification of
 • Vars, namespaces, protocols etc
It’s Alpha!

• Bugs
• Missing bits
• Rough edges
• Work to do
Who Did This?
• Clojure/core and friends:
  Aaron Bedra, Alan Dipert, Alex Redington
  Bobby Calderwood, Brenton Ashworth
  Chris Houser, Devin Walters, Eric Thorsen
  Frank Failla, Michael Fogus, Jess Martin
  Luke VanderHart, Chris Redinger, Jonathan Claggett
  Stuart Halloway, Stuart Sierra, Tom Hickey
Participating
• This is a Clojure/dev project
 • all with Clojure CAs welcome to participate
• Plenty to do
 • Libraries
 • Environment
 • Tooling
Face Time
• The Conj!
 • Nov. 10-12 Raleigh, NC
 • With training: Nov. 7 -12
 • http://clojure-conj.org/
 • Early registration ends soon
• Core Fridays
Demo

• REPL
• Compilation
• Web app
• CLI app
Summary
• ClojureScript is
 • Clojure's client story
 • Clojure's mobile story
 • Clojure's CLI scripting story
• The power of Clojure
 • The reach of JavaScript

Mais conteúdo relacionado

Mais procurados

A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure ClojureDane Schneider
 
Put Your Thinking CAP On
Put Your Thinking CAP OnPut Your Thinking CAP On
Put Your Thinking CAP OnTomer Gabel
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeRadosław Scheibinger
 
Modern javascript
Modern javascriptModern javascript
Modern javascriptKevin Ball
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails DeveloperJohn McCaffrey
 
Freelancing and side-projects on Rails
Freelancing and side-projects on RailsFreelancing and side-projects on Rails
Freelancing and side-projects on RailsJohn McCaffrey
 
Bringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationBringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationAcquia
 
GitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by ScalaGitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by Scalatakezoe
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReadersRakuten Group, Inc.
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldFlexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldKevin Ball
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUGPaul Withers
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsFabian Jakobs
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemFITC
 
Tampering with JavaScript
Tampering with JavaScriptTampering with JavaScript
Tampering with JavaScriptBoy Baukema
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databasesChris Skardon
 

Mais procurados (20)

A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure Clojure
 
Put Your Thinking CAP On
Put Your Thinking CAP OnPut Your Thinking CAP On
Put Your Thinking CAP On
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
 
Day 4 - Models
Day 4 - ModelsDay 4 - Models
Day 4 - Models
 
Modern javascript
Modern javascriptModern javascript
Modern javascript
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
Freelancing and side-projects on Rails
Freelancing and side-projects on RailsFreelancing and side-projects on Rails
Freelancing and side-projects on Rails
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Bringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationBringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js Integration
 
Irb Tips and Tricks
Irb Tips and TricksIrb Tips and Tricks
Irb Tips and Tricks
 
CQ5 and Sling overview
CQ5 and Sling overviewCQ5 and Sling overview
CQ5 and Sling overview
 
GitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by ScalaGitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by Scala
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldFlexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework World
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUG
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
 
Tampering with JavaScript
Tampering with JavaScriptTampering with JavaScript
Tampering with JavaScript
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
 

Destaque

Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
CLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.jsCLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.jsKarolis Labrencis
 
Getting started with ClojureScript
Getting started with ClojureScriptGetting started with ClojureScript
Getting started with ClojureScriptSiva Jagadeesan
 
PostgreSQL: O melhor banco de dados Universo
PostgreSQL: O melhor banco de dados UniversoPostgreSQL: O melhor banco de dados Universo
PostgreSQL: O melhor banco de dados Universoelliando dias
 
Making design decisions in React-based ClojureScript web applications
Making design decisions in React-based ClojureScript web applicationsMaking design decisions in React-based ClojureScript web applications
Making design decisions in React-based ClojureScript web applicationsFalko Riemenschneider
 
Learn basics of Clojure/script and Reagent
Learn basics of Clojure/script and ReagentLearn basics of Clojure/script and Reagent
Learn basics of Clojure/script and ReagentMaty Fedak
 
ClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserFalko Riemenschneider
 
An Adventure in Serverless ClojureScript
An Adventure in Serverless ClojureScriptAn Adventure in Serverless ClojureScript
An Adventure in Serverless ClojureScriptNorman Richards
 
Chalet management system (e cha m)
Chalet management system (e cha m)Chalet management system (e cha m)
Chalet management system (e cha m)HoneySah
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Writing Your Own JSR-Compliant, Domain-Specific Scripting Language
Writing Your Own JSR-Compliant, Domain-Specific Scripting LanguageWriting Your Own JSR-Compliant, Domain-Specific Scripting Language
Writing Your Own JSR-Compliant, Domain-Specific Scripting Languageelliando dias
 
JCR Content Management
JCR Content ManagementJCR Content Management
JCR Content Managementelliando dias
 
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...Bibliografía primaria y topológica de las ediciones de los libros de Santiago...
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...Marta Domínguez-Senra
 
Implementing S-Expressions Based Extented Languages in LISP
Implementing S-Expressions Based Extented Languages in LISPImplementing S-Expressions Based Extented Languages in LISP
Implementing S-Expressions Based Extented Languages in LISPelliando dias
 
Solos que não devem ser usados em olarias a frio
Solos que não devem ser usados em olarias a frioSolos que não devem ser usados em olarias a frio
Solos que não devem ser usados em olarias a frioelliando dias
 
SharePoint Governance and Lifecycle Management with Project Server 2010
SharePoint Governance and Lifecycle Management with Project Server 2010SharePoint Governance and Lifecycle Management with Project Server 2010
SharePoint Governance and Lifecycle Management with Project Server 2010Alexander Burton
 

Destaque (20)

Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
CLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.jsCLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.js
 
Getting started with ClojureScript
Getting started with ClojureScriptGetting started with ClojureScript
Getting started with ClojureScript
 
Some basic FP concepts
Some basic FP conceptsSome basic FP concepts
Some basic FP concepts
 
ClojureScript Introduction
ClojureScript IntroductionClojureScript Introduction
ClojureScript Introduction
 
Clojure+ClojureScript Webapps
Clojure+ClojureScript WebappsClojure+ClojureScript Webapps
Clojure+ClojureScript Webapps
 
Clojure - Why does it matter?
Clojure - Why does it matter?Clojure - Why does it matter?
Clojure - Why does it matter?
 
PostgreSQL: O melhor banco de dados Universo
PostgreSQL: O melhor banco de dados UniversoPostgreSQL: O melhor banco de dados Universo
PostgreSQL: O melhor banco de dados Universo
 
Making design decisions in React-based ClojureScript web applications
Making design decisions in React-based ClojureScript web applicationsMaking design decisions in React-based ClojureScript web applications
Making design decisions in React-based ClojureScript web applications
 
Learn basics of Clojure/script and Reagent
Learn basics of Clojure/script and ReagentLearn basics of Clojure/script and Reagent
Learn basics of Clojure/script and Reagent
 
ClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browser
 
An Adventure in Serverless ClojureScript
An Adventure in Serverless ClojureScriptAn Adventure in Serverless ClojureScript
An Adventure in Serverless ClojureScript
 
Chalet management system (e cha m)
Chalet management system (e cha m)Chalet management system (e cha m)
Chalet management system (e cha m)
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Writing Your Own JSR-Compliant, Domain-Specific Scripting Language
Writing Your Own JSR-Compliant, Domain-Specific Scripting LanguageWriting Your Own JSR-Compliant, Domain-Specific Scripting Language
Writing Your Own JSR-Compliant, Domain-Specific Scripting Language
 
JCR Content Management
JCR Content ManagementJCR Content Management
JCR Content Management
 
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...Bibliografía primaria y topológica de las ediciones de los libros de Santiago...
Bibliografía primaria y topológica de las ediciones de los libros de Santiago...
 
Implementing S-Expressions Based Extented Languages in LISP
Implementing S-Expressions Based Extented Languages in LISPImplementing S-Expressions Based Extented Languages in LISP
Implementing S-Expressions Based Extented Languages in LISP
 
Solos que não devem ser usados em olarias a frio
Solos que não devem ser usados em olarias a frioSolos que não devem ser usados em olarias a frio
Solos que não devem ser usados em olarias a frio
 
SharePoint Governance and Lifecycle Management with Project Server 2010
SharePoint Governance and Lifecycle Management with Project Server 2010SharePoint Governance and Lifecycle Management with Project Server 2010
SharePoint Governance and Lifecycle Management with Project Server 2010
 

Semelhante a Clojurescript slides

Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumTechday7
 
Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?C4Media
 
Edy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Metosin Oy
 
Modern ClojureScript
Modern ClojureScriptModern ClojureScript
Modern ClojureScriptWen Chun Lin
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievPivorak MeetUp
 
Go: What's Different ?
Go: What's Different ?Go: What's Different ?
Go: What's Different ?Tarun Vashisth
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneTroy Miles
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development LetsConnect
 
Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & ClojureMetosin Oy
 
Full stack development using javascript what and why - ajay chandravadiya
Full stack development using javascript   what and why - ajay chandravadiyaFull stack development using javascript   what and why - ajay chandravadiya
Full stack development using javascript what and why - ajay chandravadiyaajayrcgmail
 
GoLang - Why It Matters
GoLang -  Why It MattersGoLang -  Why It Matters
GoLang - Why It Mattersrahul
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and AbstractionsMetosin Oy
 
Greenfields tech decisions
Greenfields tech decisionsGreenfields tech decisions
Greenfields tech decisionsTrent Hornibrook
 
Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL DatabasesEmanuel Calvo
 
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...Jon Peck
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoPaul Withers
 

Semelhante a Clojurescript slides (20)

Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?Go - A Key Language in Enterprise Application Development?
Go - A Key Language in Enterprise Application Development?
 
Edy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev Conf
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
 
Modern ClojureScript
Modern ClojureScriptModern ClojureScript
Modern ClojureScript
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey Vasiliev
 
Go: What's Different ?
Go: What's Different ?Go: What's Different ?
Go: What's Different ?
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development
 
Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & Clojure
 
Full stack development using javascript what and why - ajay chandravadiya
Full stack development using javascript   what and why - ajay chandravadiyaFull stack development using javascript   what and why - ajay chandravadiya
Full stack development using javascript what and why - ajay chandravadiya
 
GoLang - Why It Matters
GoLang -  Why It MattersGoLang -  Why It Matters
GoLang - Why It Matters
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
Greenfields tech decisions
Greenfields tech decisionsGreenfields tech decisions
Greenfields tech decisions
 
Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL Databases
 
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
The Great Consolidation - Entertainment Weekly Migration Case Study - SANDcam...
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
 

Mais de elliando dias

How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 
From Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn IntroductionFrom Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn Introductionelliando dias
 
FleetDB A Schema-Free Database in Clojure
FleetDB A Schema-Free Database in ClojureFleetDB A Schema-Free Database in Clojure
FleetDB A Schema-Free Database in Clojureelliando dias
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypseelliando dias
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lispelliando dias
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmerselliando dias
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmerselliando dias
 
Clojure and Modularity
Clojure and ModularityClojure and Modularity
Clojure and Modularityelliando dias
 

Mais de elliando dias (20)

Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 
From Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn IntroductionFrom Lisp to Clojure/Incanter and RAn Introduction
From Lisp to Clojure/Incanter and RAn Introduction
 
FleetDB A Schema-Free Database in Clojure
FleetDB A Schema-Free Database in ClojureFleetDB A Schema-Free Database in Clojure
FleetDB A Schema-Free Database in Clojure
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lisp
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmers
 
Clojure and Modularity
Clojure and ModularityClojure and Modularity
Clojure and Modularity
 

Último

The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechProduct School
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 

Último (20)

The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 

Clojurescript slides

  • 3. Clojure ... rocks
  • 4. Clojure ... rocks JavaScript ...
  • 5. Clojure ... rocks JavaScript ... reaches
  • 7. Why ClojureScript? • JavaScript is the only programming technology in key environments • e.g. the browser • has the greatest reach in mobile • but is not very robust • While demand for sophisticated applications increases
  • 8. Rationale • Clojure is arguably simpler, more powerful and more robust than JS • JS VMs getting faster • Clojure on JS empowers developers
  • 9. Strategy • Compile (a substantial subset of) Clojure to JS source • Leverage best-of-breed JS approaches • Look beyond the browser
  • 10. Non-Objectives • Complete Clojure • Portable large applications • Browser REPL demos etc • The target is production applications
  • 11. Tactics • ClojureScript in Clojure(Script) • ClojureScript on (Google) Closure
  • 12. ClojureScript in Clojure(Script) • Compiler written in Clojure • Macros written in Clojure • Library written in ClojureScript • No JavaScript source files
  • 13. CinC • Core abstractions are protocols • Data structures are deftypes • Excellent mapping to JS under the hood
  • 14. REPL • Written in Clojure • Hosts embedded Rhino • Compiles to JS on the fly • Rhino evals
  • 15. Google Closure • Production Code • Closure Compiler • virtually all of Google’s JS goes through this • Closure Library • Used by Google Gmail, Maps, Docs, Sites, Books, Reader, Calendar, Photos, Google+
  • 16. Why Give Google Closure Away? • Be cool • Make friends • See if it sticks • Not using it anymore • Sucker community into maintaining • They want the web to win as an application platform
  • 17. Closure Compiler • Optimizing Compiler • Whitespace only • Within-function • Whole program (advanced mode) • Try it: • http://closure-compiler.appspot.com/home
  • 18. Another Minifier, yawn • No! • Closure compiler does symbol replacement • but also expression rewriting, transformation • Dead code elimination • read as: uncalled code elimination
  • 19. Why Whole Program Optimization Matters • Libraries • Large libraries • Many libraries • Sum of many minified libs is large again • What % of each lib do you use in one app? • Diminishing returns from delayed loading and modularity efforts
  • 20. Making it work • Convention, and lots of it • Welcome to Javascript! • Trickiness abounds - string access to properties, exporting, side-effects • Google’s conventions not widely followed • What if we had a Javascript-emitting language that always emitted advanced- mode compatible code?
  • 21. Closure Library • Huge! • UI, events, DOM, communications, testing, algorithms and data structures... • Packaging and dependency resolution • Yet, not • Symbiotic with Closure compiler • Your app will include only the code it uses • require lib != use all of it
  • 22. Whole-program Optimization for the Win • Google has decided this is the key to delivering • rich applications • over thin wires • to memory constrained devices • Given away sophisticated tools for making that work
  • 23. ClojureScript on (Google) Closure • Emits advanced-mode compatible code • encapsulates conventions • Participates in dependency system • maps Clojure namespaces to Google’s optimizable format • Profit! - whole-program optimization and large library support
  • 24. Find Out More “The O’Reilly [kloh-zher] book - you know, with the bird on the front”
  • 25. What’s There • Compiler • REPL • Primitives • Arity overloading • Macros
  • 26. What’s There • Seqs, maps, vectors, sets • and much of supporting library • Symbols, keywords • Destructuring • Regex
  • 27. What’s There • deftypes • core datatypes • protocols • all abstractions • extend-type, extend-protocol • can extend primitives e.g. string, nil, default • Both defined in terms of primitives
  • 28. What’s There • 2500+ lines of core lib • clojure.string • clojure.set • clojure.walk • clojure.zip
  • 29. What’s There • Reader • Why, given JSON? • Sets, keywords, symbols • Metadata • Great fit when Clojure on the server
  • 30. What’s There • Namespaces • integrated with Google Closure provide/ require • compile-file, build project, including • deps calculation • invocation of Google Closure compiler
  • 31. What’s Not (yet) • Full collection persistence • defrecord • multimethods/hierarchy • Full numerics • Testing • Misc core library
  • 32. What Won’t Be • Thread-related things • eval and runtime compilation • structs, proxy, Java type-stuff • Runtime reification of • Vars, namespaces, protocols etc
  • 33. It’s Alpha! • Bugs • Missing bits • Rough edges • Work to do
  • 34. Who Did This? • Clojure/core and friends: Aaron Bedra, Alan Dipert, Alex Redington Bobby Calderwood, Brenton Ashworth Chris Houser, Devin Walters, Eric Thorsen Frank Failla, Michael Fogus, Jess Martin Luke VanderHart, Chris Redinger, Jonathan Claggett Stuart Halloway, Stuart Sierra, Tom Hickey
  • 35. Participating • This is a Clojure/dev project • all with Clojure CAs welcome to participate • Plenty to do • Libraries • Environment • Tooling
  • 36. Face Time • The Conj! • Nov. 10-12 Raleigh, NC • With training: Nov. 7 -12 • http://clojure-conj.org/ • Early registration ends soon • Core Fridays
  • 37. Demo • REPL • Compilation • Web app • CLI app
  • 38. Summary • ClojureScript is • Clojure's client story • Clojure's mobile story • Clojure's CLI scripting story • The power of Clojure • The reach of JavaScript