SlideShare une entreprise Scribd logo
1  sur  172
ClojureScript
  Anatomy
Targeting JavaScript
Why?
Targeting JavaScript
Primacy
                              of
                          Semantics
I also regard syntactical problems as essentially irrelevant to programming languages at
  their present stage ... the urgent task in programming languages is to explore the field
                                                                  of semantic possibilities.
     — Christopher Strachey - “Fundamental Concepts in Programming Languages”
JavaScript has much in common with
                              Scheme.

                     It is a dynamic language.

             It has a flexible datatype (arrays) that can
                   easily simulate s-expressions.

               And most importantly, functions are
                           lambdas.




http://javascript.crockford.com/little.html
Power Points
• Reach
 • browser, shell, mobile, databases
• First-class functions
• Prototypal inheritance
• Closures
• Literal syntax
Pain Points
Pain Points


• Everything else
JavaScript
JavaScript
    • Safety through convention
JavaScript
    • Safety through convention
    • Rampant mutation
JavaScript
    • Safety through convention
    • Rampant mutation
    • Globals
JavaScript
    • Safety through convention
    • Rampant mutation
    • Globals
    • this
JavaScript
    • Safety through convention
    • Rampant mutation
    • Globals
    • this
    • Truthiness
JavaScript
    • Safety through convention
    • Rampant mutation
    • Globals
    • this
    • Truthiness
    • Objects make poor modules
JavaScript
•   Safety through convention


•   Rampant mutation


•   Globals


•   this


•   Truthiness


•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation


•   Globals


•   this


•   Truthiness


•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals


•   this


•   Truthiness


•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals
                                • Limited data formats
•   this


•   Truthiness


•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals
                                • Limited data formats
•   this
                                • Limited abstractions
•   Truthiness


•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals
                                • Limited data formats
•   this
                                • Limited abstractions
•   Truthiness
                                • ==
•   Objects make poor modules
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals
                                • Limited data formats
•   this
                                • Limited abstractions
•   Truthiness
                                • ==
•   Objects make poor modules
                                • Optional semicolons
JavaScript
•   Safety through convention
                                • Callbacks
•   Rampant mutation
                                • Low Compression
                                 Potential
•   Globals
                                • Limited data formats
•   this
                                • Limited abstractions
•   Truthiness
                                • ==
•   Objects make poor modules
                                • Optional semicolons
                                • Missing `new`
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 function init(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 function init(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 function init(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 function init(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 var init = function(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 var init = function(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 var init = function(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
my = my || {};
my.awesome = my.awesome || {};
my.awesome.lib = my.awesome.lib ||
{};

my.awesome.lib = (function(){
 var that = {};

 var init = function(){
    /* do something */
 };

 that.foo = true;
 that.init = init;

  return that;
}());

my.awesome.lib.frob = (function($){
 function privateFun(){
   /* do something */
 }

 return function() {
    /* do something with $ */
 };
Google Closure

• Standard library
• Dependency system
• Compiler/minifier (GClosure)
• Templating language
• 1 kajillion man-hours of effort
Google Closure

• Standard library
• Dependency system
• Compiler/minifier (GClosure)
• Templating language
• 1 beellion man-hours of effort
convention




    convention


  convention

 convention
convention
Primacy
                      of
                    Syntax
     one could say that all semantics is being represented as syntax
... semantics has vanished entirely to be replaced with pure syntax.
                                    — John Shutt - “Primacy of Syntax”
CoffeeScript
the web be
Namespaces
ECMAScript.Next
JSModule

                             nodules


       modules.js            curl.js
Namespaces


fogus.my.lib.frobnicate();
Namespaces
fogus = fogus || {};

fogus.my = fogus.my || {};

fogus.my.lib = fogus.my.lib || {};
Namespaces
(ns fogus.my.lib)

(defn frobnicate [] :frobbed!)

    goog.provide(‘fogus.my.lib)
    ;

    fogus.my.lib = function() {
       return “□ :frobbed!”
    };
Compression
 Potential
Take your pick
(ns fogus.my.lib)


goog.provide(‘fogus.my.lib’);


fogus = fogus || {};

fogus.my = fogus.my || {};

fogus.my.lib = fogus.my.lib || {};
Take your pick
(ns fogus.my.lib)


goog.provide(‘fogus.my.lib’);


fogus = fogus || {};

fogus.my = fogus.my || {};

fogus.my.lib = fogus.my.lib || {};
Abstracti ns
Abstractions
• Protocols at the bottom
 • ISeq, IMap, ILookup, IDeref, etc.
• Realizing powerful immutable types
 • Map, List, Vector, etc.
• Extended to JavaScript
 • strings, null, arrays, etc.
JavaScript
    the
   Parts
Functional Inheritance
       Pattern

• Private data
• Access to super methods
• Missing new safe
Functional Inheritance
                    Pattern
var person = function(spec) {
  var that = {};

     that.getName = function() {                  var me = person({'name' : 'Fogus'});
        return spec.name;                         me.getName()
     };                                           //=> 'Fogus'
     return that;
};

var man = function(spec) {
  var that = person(spec);
  var super_getName = that.superior('getName');
                                                  var me = man({'name' : 'Fogus'});
     that.getName = function() {                  me.getName()
        return "Mr. " + super_getName();          //=> 'Mr. Fogus'
     };
     return that;
};
Functional Inheritance
  Pattern Dangers
• Harder to minify
• Larger memory footprint
• Cannot update instances
• Eliminates instanceof
• Mucks with Function.prototype and
  Object.prototype in an unsafe way
Pseudo-classical
               Inheritance Pattern
Person = function(name) {
   this._name = name;
};
                                             var me = new Person('Fogus');
Person.prototype.getName = function() {      me.getName()
   return this._name;                        //=> 'Fogus'
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);                       var me = new Man('Fogus');
                                             me.getName()
Man.prototype.getName = function() {         //=> 'Mr. Fogus'
   return "Mr. "
          + Man._super.getName.call(this);
};
Pseudo-classical
   Inheritance Pattern
• Harder Easier to minify
• Larger Smaller memory footprint
• Cannot Can update instances
• Eliminates instanceof
• Mucks with Clean
  Function.prototype and
  Object.prototype
Safe Extension


String.prototype.cljs$core$first = ...

Object.prototype.my$lib$first = ...
me._name
//=> ‘Fogus’
Minification


• Inlining
• Renaming
• Dead-code elimination
Inlining
Functional Inheritance
               Inlining
var person = function(spec) {      var myName = me.getName();
  var that = {};                   var sig = signature({‘name’ : myName});
                                   sig.toString();
     that.getName = function() {   //=> ‘Sent from teh Fogus iPhone’
        return spec.name;
     };
     return that;
};
Functional Inheritance
               Inlining
var person = function(spec) {          var myName = me.getName();
  var that = {};                       var sig = signature({‘name’ : myName});
                                       sig.toString();
     that.getName = function() {       //=> ‘Sent from teh Fogus iPhone’
        return spec.name;
     };
     return that;
};




                                   ?
Functional Inheritance
               Inlining
var person = function(spec) {              var myName = me.getName();
  var that = {};                           var sig = signature({‘name’ : myName});
                                           sig.toString();
     that.getName = function() {           //=> ‘Sent from teh Fogus iPhone’
        return spec.name;
     };
     return that;
};




                    var sig = signature({‘name’ : me.getName()});
                    sig.toString();
                    //=> ‘Sent from teh Fogus iPhone’
Inlining
Pseudo-classical Inlining
Person = function(name) {
   this._name = name;
                                              var myName = me.getName();
};
                                              var sig = new Signature(myName);
                                              sig.toString();
Person.prototype.getName = function() {
                                              //=> ‘Sent from teh Fogus iPhone’
   return this._name;
};




                                          ?
Pseudo-classical Inlining
Person = function(name) {
   this._name = name;
                                            var myName = me.getName();
};
                                            var sig = new Signature(myName);
                                            sig.toString();
Person.prototype.getName = function() {
                                            //=> ‘Sent from teh Fogus iPhone’
   return this._name;
};




                       var sig = new Signature(me._name);
                       sig.toString();
                       //=> ‘Sent from teh Fogus iPhone’
Renaming
Functional Inheritance
      Renaming
   var person = function(spec) {
     var that = {};

        that.getName = function() {
           return spec.name;
        };
        return that;
   };

   var man = function(spec) {
     var that = person(spec);
     var super_getName = that.superior(‘getName’);

        that.getName = function() {
           return "Mr. " + super_getName();
        };
        return that;
   };
Functional Inheritance
      Renaming
   var person = function(spec) {
     var that = {};

        that.getName = function() {
           return spec.name;
        };
        return that;
   };

   var man = function(spec) {
     var that = person(spec);
     var super_getName = that.superior(‘getName’);

        that.getName = function() {
           return "Mr. " + super_getName();
        };
        return that;
   };
Renaming
Pseudo-classical
   Renaming
Person = function(name) {
   this._name = name;
};

Person.prototype.getName = function() {
   return this._name;
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);

Man.prototype.getName = function() {
   return "Mr. "
          + Man._super.getName.call(this);
};
Pseudo-classical
   Renaming
Person = function(name) {
   this._name = name;
};

Person.prototype.o = function() {
   return this._name;
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);

Man.prototype.getName = function() {
   return "Mr. "
          + Man._super.o.call(this);
};
Dead Code
Dead-code Elimination
       Intro
(let [a 1
      b 2
      a b]
  a)

;=> 2
Dead-code Elimination
       Intro
               (function (){
(let [a 1        var a__847 = 1;
      b 2        var b__848 = 2;
      a b]       var a__849 = b__848;
  a)
                 return a__849;
;=> 2          })();
Dead-code Elimination
       Intro
                 (function (){
(let [a 1          var a__847 = 1;
      b 2          var b__848 = 2;
      a b]         var a__849 = b__848;
  a)
                   return a__849;
;=> 2            })();




             ?
Dead-code Elimination
       Intro
                 (function (){
(let [a 1          var a__847 = 1;
      b 2          var b__848 = 2;
      a b]         var a__849 = b__848;
  a)
                   return a__849;
;=> 2            })();




             2
Dead-code Elimination
       Intro
               (function (){
(let [a 1        var a__847 = 1;
      b 2        var b__848 = 2;
      a b]       var a__849 = b__848;
  a)
                 return a__849;
;=> 2          })();
Functional Inheritance
     Dead-code
   var person = function(spec) {
     var that = {};
     var hasBeard = false;

        that.getName = function() {
           return spec.name;
        };
        return that;
   };

   var man = function(spec) {
     var that = person(spec);
     var super_getName = that.superior(‘getName’);

        that.getName = function() {
           return "Mr. " + super_getName();
        };
        return that;
   };
Functional Inheritance
     Dead-code
   var person = function(spec) {
     var that = {};
     var hasBeard = false;

        that.getName = function() {
           return spec.name;
        };
        return that;
   };

   var man = function(spec) {
     var that = person(spec);
                                                     All good
     var super_getName = that.superior(‘getName’);
                                                      Right?
        that.getName = function() {
           return "Mr. " + super_getName();
        };
        return that;
   };
Functional Inheritance
     Dead-code
   var person = function(spec) {
     var that = {};
     var hasBeard = false;

        that.getName = function() {            Cursed
           return spec.name;
        };
        return that;
                                              Closures!
   };

   var man = function(spec) {
     var that = person(spec);
     var super_getName = that.superior(‘getName’);

        that.getName = function() {
           return "Mr. " + super_getName();
        };
        return that;
   };
Dead Code
Pseudo-classical
  Dead-code
Person = function(name) {
   this._name = name;
   this._hasBeard = false;
};

Person.prototype.getName = function() {
   return this._name;
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);

Man.prototype.getName = function() {
   return "Mr. "
          + Man._super.getName.call(this);
};
Pseudo-classical
  Dead-code
Person = function(name) {
   this._name = name;
   this._hasBeard = false;
};

Person.prototype.getName = function() {
   return this._name;
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);

Man.prototype.getName = function() {
   return "Mr. "
          + Man._super.getName.call(this);
};
Pseudo-classical
  Dead-code
Person = function(name) {
  this._name = name;

};
                              kthxbai
Person.prototype.getName = function() {
   return this._name;
};


Man = function(name) {
   Person.call(this, name);
};

inherits(Man, Person);

Man.prototype.getName = function() {
   return "Mr. "
          + Man._super.getName.call(this);
};
There’s more
 to life than
     this
Memory Footprint

• Crockford
 • Closure per-method, per-type
 • Leaky (holds a reference to all variables)
• Pseudo-classical
 • No closures needed
Live
Instance Updating


• Problem
 • How to update every instance in the
    system with new behavior?
Functional Inheritance
       Updating
         var person = function(spec) {
           var that = {};

              that.getName = function() {
                 return spec.name;
              };
              return that;
         };

         var me = person({'name' : 'Fogus'});
         var you = person({'name' : 'Cersei'});



How can we add hasBeard to every instance
           now and in the future?
Functional Inheritance
       Updating
         var person = function(spec) {
           var that = {};

              that.getName = function() {
                 return spec.name;
              };
              return that;
         };

         var me = person({'name' : 'Fogus'});
         var you = person({'name' : 'Cersei'});



How can we add hasBeard to every instance
           now and in the future?
  One at a time... every single time
ClojureScript
   Cares.
ClojureScript
            Extending
                 (defprotocol Catable
                   (cat [this other]))

                 (def sound1 "Meow")
                 (def sound2 "Mao")

                 (cat sound1 sound2)
                 ; ASPLODE!




How can we allow cat to work with every instance
              now and in the future?
ClojureScript
  Extending
       (extend-type string
         Catable
         (cat [this other]
           (str this other)))

       (cat sound1 sound2)
       ;=> “MeowMao”

       (cat sound1 "ZZZZZ")
       ;=> "MeowZZZZZ"




Pseudo-classical underpinnings
            FTW
Pseudo-classical
         Updating
         Person = function(name) {
            this._name = name;
         };

         Person.prototype.getName = function() {
            return this._name;
         };

         var me = new Person(‘Fogus’);
         var you = new Person(‘Cercei’);



How can we add hasBeard to every instance
           now and in the future?
Pseudo-classical
               Updating
               Person = function(name) {
                  this._name = name;
               };

               Person.prototype.getName = function() {
                  return this._name;
               };

               var me = new Person(‘Fogus’);
               var you = new Person(‘Cercei’);



    How can we add hasBeard to every instance
               now and in the future?
Person.prototype.hasBeard = function() { return false };
apply
function
Var Args

 JavaScript          ClojureScript


arguments             & stuff
Var Args

     JavaScript          ClojureScript


   arguments              & stuff




An object that holds
    arguments                a seq
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (add-first-two 1 2 3)
                                   ;=> 3
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (apply add-first-two [1 2 3])
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (apply add-first-two [1 2 3])
ClojureScript apply
    (defn apply
      [f arg-seq]
      (.apply f (to-array arg-seq)))
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (apply add-first-two [1 2 3])
                                   ;=> 3
ClojureScript apply
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (apply add-first-two (iterate inc 1))
                                   ;=> ?
ClojureScript apply




                                   ∞
                                   (defn add-first-two
                                     [& args]
                                     (+ (first args)
                                        (second args)))




function addFirstTwo() {
  var args = // that slice thing
  return cljs.first(args) +
         cljs.second(args);
}




                                   (apply add-first-two (iterate inc 1))
                                   ;=> ?
ClojureScript apply
    (defn apply
      [f arg-seq]
      (.apply f (to-array arg-seq)))
ClojureScript
           applyTo
• A function stored on ClojureScript functions
 • Only if they have var args
• Compiled to only deal with the args seq at
  the maximum fixed arity
 • This ensures that an infinite seq is not
   realized
ClojureScript apply
    (defn apply
      [f arg-seq]
      (if (.applyTo f)
       (if (<= bounded-count fixed-arity)
         (.apply f (to-array arg-seq))
         (.applyTo f args))
        (.apply f (to-array arg-seq)))
ClojureScript apply
    (defn apply
      [f arg-seq]
      (if (.applyTo f)
       (if (<= bounded-count fixed-arity)
         (.apply f (to-array arg-seq))
         (.applyTo f args))
        (.apply f (to-array arg-seq)))
ClojureScript apply
    (defn apply
      [f arg-seq]
      (if (.applyTo f)
       (if (<= bounded-count fixed-arity)
         (.apply f (to-array arg-seq))
         (.applyTo f args))
        (.apply f (to-array arg-seq)))
ClojureScript apply
    (defn apply
      [f arg-seq]
      (if (.applyTo f)
       (if (<= bounded-count fixed-arity)
         (.apply f (to-array arg-seq))
         (.applyTo f args))
        (.apply f (to-array arg-seq)))
Compiler
Anatomy
Cl
  oju
        re
           D   at
                    a




                        AS
                          T
Analysis
Emission
C6
     4




         JA
           VA
              SC
                 RIP
                       T
Thank
                           You

http://joyofclojure.com
         @fogus
Learn More


•   http://bit.ly/cljs-intro

•   http://boss-level.com/?p=102

•   http://blog.fogus.me/tag/clojurescript

•   http://github.com/clojure/clojurescript
Crockford Hates
 instanceof
Functional Inheritance
   instanceof

    var me   = person({'name' : 'Fogus'});

    me instanceof person;
    //=> false
ClojureScript Loves
  instanceof
Pseudo-classical
instanceof

 var me   = new Person('Fogus');

 me instanceof Person;
 //=> true
ClojureScript
satisfies?
 (defprotocol Catable
   (cat [this other]))

 (deftype Cons [H T]
   Catable
   (cat [_ new-tail] nil))

 (satisfies? Catable (Cons. 1 2))
 ;=> true
tread
Don’t Tread on Me
 Function.prototype.method = function(name, f) {
    this.prototype[name] = f;
    return this;
 };

 Object.method('superior', function(name) {
   var that = function;
   var method = that[name];

   return function() {
      return method.apply(that, arguments);
   };
 });
ClojureScript Gently
       Caresses
Object & Function
  as One Might Caress
 the finest Fabergé Egg
Look with your eyes,
not with your hands
  var inherits = function(child, parent) {
    function tmp() {};
    tmp.prototype = parent.prototype;

       child._super = parent.prototype;
       child.prototype = new tmp();
       child.prototype.constructor = child;
  };
Var Args



       JavaScript               ClojureScript
function stuffToArray() {       (defn stuff->seq
  // create an array of stuff     [& stuff]
}                                 stuff)

stuffToArray(1,2,3,4);          (stuff->seq 1 2 3 4)
//=> [1,2,3,4]                  ;=> (1 2 3 4)
Var Args



       JavaScript               ClojureScript
function stuffToArray() {       (defn stuff->seq
  // create an array of stuff     [& stuff]
}                                 stuff)

stuffToArray(1,2,3,4);          (stuff->seq 1 2 3 4)
//=> [1,2,3,4]                  ;=> (1 2 3 4)
Var Args



               JavaScript                         ClojureScript
function stuffToArray() {                         (defn stuff->seq
  return Array.prototype.slice.call(arguments);     [& stuff]
}                                                   stuff)

stuffToArray(1,2,3,4);                            (stuff->seq 1 2 3 4)
//=> [1,2,3,4]                                    ;=> (1 2 3 4)
Compiler Macros
• Operate in the compiler only
 • Analysis phase
• Written in Clojure
• Allows shadowing of fns
 • Operates according to a fix point

Contenu connexe

Tendances

Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not JavaChris Adamson
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediZeroTurnaround
 
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
 
JRuby 9000 - Optimizing Above the JVM
JRuby 9000 - Optimizing Above the JVMJRuby 9000 - Optimizing Above the JVM
JRuby 9000 - Optimizing Above the JVMCharles Nutter
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018Charles Nutter
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015Charles Nutter
 
Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Sunghyouk Bae
 
From Ruby to Scala
From Ruby to ScalaFrom Ruby to Scala
From Ruby to Scalatod esking
 
JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015Charles Nutter
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your CacheAlex Miller
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/HibernateSunghyouk Bae
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at TwitterAlex Payne
 
Async and Non-blocking IO w/ JRuby
Async and Non-blocking IO w/ JRubyAsync and Non-blocking IO w/ JRuby
Async and Non-blocking IO w/ JRubyJoe Kutner
 
JUnit5 and TestContainers
JUnit5 and TestContainersJUnit5 and TestContainers
JUnit5 and TestContainersSunghyouk Bae
 
Java Serialization Facts and Fallacies
Java Serialization Facts and FallaciesJava Serialization Facts and Fallacies
Java Serialization Facts and FallaciesRoman Elizarov
 
Concurrency in Scala - the Akka way
Concurrency in Scala - the Akka wayConcurrency in Scala - the Akka way
Concurrency in Scala - the Akka wayYardena Meymann
 
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!scalaconfjp
 
The Enterprise Strikes Back
The Enterprise Strikes BackThe Enterprise Strikes Back
The Enterprise Strikes BackBurke Libbey
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringJoe Kutner
 

Tendances (20)

Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not Java
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila Szegedi
 
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
 
Spring data requery
Spring data requerySpring data requery
Spring data requery
 
JRuby 9000 - Optimizing Above the JVM
JRuby 9000 - Optimizing Above the JVMJRuby 9000 - Optimizing Above the JVM
JRuby 9000 - Optimizing Above the JVM
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015
 
Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017Kotlin @ Coupang Backend 2017
Kotlin @ Coupang Backend 2017
 
From Ruby to Scala
From Ruby to ScalaFrom Ruby to Scala
From Ruby to Scala
 
JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your Cache
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/Hibernate
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Async and Non-blocking IO w/ JRuby
Async and Non-blocking IO w/ JRubyAsync and Non-blocking IO w/ JRuby
Async and Non-blocking IO w/ JRuby
 
JUnit5 and TestContainers
JUnit5 and TestContainersJUnit5 and TestContainers
JUnit5 and TestContainers
 
Java Serialization Facts and Fallacies
Java Serialization Facts and FallaciesJava Serialization Facts and Fallacies
Java Serialization Facts and Fallacies
 
Concurrency in Scala - the Akka way
Concurrency in Scala - the Akka wayConcurrency in Scala - the Akka way
Concurrency in Scala - the Akka way
 
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!
What's a macro?: Learning by Examples / Scalaのマクロに実用例から触れてみよう!
 
The Enterprise Strikes Back
The Enterprise Strikes BackThe Enterprise Strikes Back
The Enterprise Strikes Back
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
 

En vedette

The Macronomicon
The MacronomiconThe Macronomicon
The MacronomiconMike Fogus
 
The Shape of Functional Programming
The Shape of Functional ProgrammingThe Shape of Functional Programming
The Shape of Functional ProgrammingMike Fogus
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.Mike Fogus
 
Introduction to Zeder - a production rules toolkit for Clojure
Introduction to Zeder - a production rules toolkit for ClojureIntroduction to Zeder - a production rules toolkit for Clojure
Introduction to Zeder - a production rules toolkit for ClojureMike Fogus
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureMike Fogus
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. ExperienceMike Fogus
 
ClojureScript for the web
ClojureScript for the webClojureScript for the web
ClojureScript for the webMichiel Borkent
 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockfordrajivmordani
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in actionCiro Rizzo
 
Regresión lineal en spss para ciencias agrarias y forestales
Regresión lineal en spss para ciencias agrarias y forestalesRegresión lineal en spss para ciencias agrarias y forestales
Regresión lineal en spss para ciencias agrarias y forestalesMarcelo Rodriguez Gallardo
 

En vedette (11)

The Macronomicon
The MacronomiconThe Macronomicon
The Macronomicon
 
The Shape of Functional Programming
The Shape of Functional ProgrammingThe Shape of Functional Programming
The Shape of Functional Programming
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.
 
Introduction to Zeder - a production rules toolkit for Clojure
Introduction to Zeder - a production rules toolkit for ClojureIntroduction to Zeder - a production rules toolkit for Clojure
Introduction to Zeder - a production rules toolkit for Clojure
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of Clojure
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
 
ClojureScript for the web
ClojureScript for the webClojureScript for the web
ClojureScript for the web
 
Confo
ConfoConfo
Confo
 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockford
 
Kotlin in action
Kotlin in actionKotlin in action
Kotlin in action
 
Regresión lineal en spss para ciencias agrarias y forestales
Regresión lineal en spss para ciencias agrarias y forestalesRegresión lineal en spss para ciencias agrarias y forestales
Regresión lineal en spss para ciencias agrarias y forestales
 

Similaire à ClojureScript Anatomy Targets JavaScript Pain Points/TITLE

Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
Erjang - A journey into Erlang-land
Erjang - A journey into Erlang-landErjang - A journey into Erlang-land
Erjang - A journey into Erlang-landKresten Krab Thorup
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsAjax Experience 2009
 
Ruby Xml Mapping
Ruby Xml MappingRuby Xml Mapping
Ruby Xml MappingMarc Seeger
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJamshid Hashimi
 
Node.js for PHP developers
Node.js for PHP developersNode.js for PHP developers
Node.js for PHP developersAndrew Eddie
 
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almostAwesomeness of JavaScript…almost
Awesomeness of JavaScript…almostQuinton Sheppard
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuerycolinbdclark
 
The JavaScript Programming Primer
The JavaScript  Programming PrimerThe JavaScript  Programming Primer
The JavaScript Programming PrimerMike Wilcox
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyajuckel
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)jaxLondonConference
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: ServersidenessWebExpo
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languagesStarTech Conference
 

Similaire à ClojureScript Anatomy Targets JavaScript Pain Points/TITLE (20)

Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Week3
Week3Week3
Week3
 
Erjang - A journey into Erlang-land
Erjang - A journey into Erlang-landErjang - A journey into Erlang-land
Erjang - A journey into Erlang-land
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
 
JavaScript Good Practices
JavaScript Good PracticesJavaScript Good Practices
JavaScript Good Practices
 
Ruby Xml Mapping
Ruby Xml MappingRuby Xml Mapping
Ruby Xml Mapping
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQuery
 
Node.js for PHP developers
Node.js for PHP developersNode.js for PHP developers
Node.js for PHP developers
 
Ajaxworld07
Ajaxworld07Ajaxworld07
Ajaxworld07
 
Ajaxworld07
Ajaxworld07Ajaxworld07
Ajaxworld07
 
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almostAwesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuery
 
The JavaScript Programming Primer
The JavaScript  Programming PrimerThe JavaScript  Programming Primer
The JavaScript Programming Primer
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
 

Dernier

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Dernier (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

ClojureScript Anatomy Targets JavaScript Pain Points/TITLE

  • 2.
  • 3.
  • 4.
  • 5.
  • 8. Primacy of Semantics I also regard syntactical problems as essentially irrelevant to programming languages at their present stage ... the urgent task in programming languages is to explore the field of semantic possibilities. — Christopher Strachey - “Fundamental Concepts in Programming Languages”
  • 9. JavaScript has much in common with Scheme. It is a dynamic language. It has a flexible datatype (arrays) that can easily simulate s-expressions. And most importantly, functions are lambdas. http://javascript.crockford.com/little.html
  • 10. Power Points • Reach • browser, shell, mobile, databases • First-class functions • Prototypal inheritance • Closures • Literal syntax
  • 11.
  • 14.
  • 15.
  • 16.
  • 18. JavaScript • Safety through convention
  • 19. JavaScript • Safety through convention • Rampant mutation
  • 20. JavaScript • Safety through convention • Rampant mutation • Globals
  • 21. JavaScript • Safety through convention • Rampant mutation • Globals • this
  • 22. JavaScript • Safety through convention • Rampant mutation • Globals • this • Truthiness
  • 23. JavaScript • Safety through convention • Rampant mutation • Globals • this • Truthiness • Objects make poor modules
  • 24. JavaScript • Safety through convention • Rampant mutation • Globals • this • Truthiness • Objects make poor modules
  • 25. JavaScript • Safety through convention • Callbacks • Rampant mutation • Globals • this • Truthiness • Objects make poor modules
  • 26. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • this • Truthiness • Objects make poor modules
  • 27. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • Limited data formats • this • Truthiness • Objects make poor modules
  • 28. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • Limited data formats • this • Limited abstractions • Truthiness • Objects make poor modules
  • 29. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • Limited data formats • this • Limited abstractions • Truthiness • == • Objects make poor modules
  • 30. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • Limited data formats • this • Limited abstractions • Truthiness • == • Objects make poor modules • Optional semicolons
  • 31. JavaScript • Safety through convention • Callbacks • Rampant mutation • Low Compression Potential • Globals • Limited data formats • this • Limited abstractions • Truthiness • == • Objects make poor modules • Optional semicolons • Missing `new`
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; function init(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 38. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; function init(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 39. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; function init(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 40. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; function init(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 41. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; var init = function(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 42. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; var init = function(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 43. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; var init = function(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 44. my = my || {}; my.awesome = my.awesome || {}; my.awesome.lib = my.awesome.lib || {}; my.awesome.lib = (function(){ var that = {}; var init = function(){ /* do something */ }; that.foo = true; that.init = init; return that; }()); my.awesome.lib.frob = (function($){ function privateFun(){ /* do something */ } return function() { /* do something with $ */ };
  • 45.
  • 46.
  • 47. Google Closure • Standard library • Dependency system • Compiler/minifier (GClosure) • Templating language • 1 kajillion man-hours of effort
  • 48. Google Closure • Standard library • Dependency system • Compiler/minifier (GClosure) • Templating language • 1 beellion man-hours of effort
  • 49.
  • 50.
  • 51.
  • 52. convention convention convention convention convention
  • 53. Primacy of Syntax one could say that all semantics is being represented as syntax ... semantics has vanished entirely to be replaced with pure syntax. — John Shutt - “Primacy of Syntax”
  • 56.
  • 58. ECMAScript.Next JSModule nodules modules.js curl.js
  • 60. Namespaces fogus = fogus || {}; fogus.my = fogus.my || {}; fogus.my.lib = fogus.my.lib || {};
  • 61. Namespaces (ns fogus.my.lib) (defn frobnicate [] :frobbed!) goog.provide(‘fogus.my.lib) ; fogus.my.lib = function() { return “□ :frobbed!” };
  • 63. Take your pick (ns fogus.my.lib) goog.provide(‘fogus.my.lib’); fogus = fogus || {}; fogus.my = fogus.my || {}; fogus.my.lib = fogus.my.lib || {};
  • 64. Take your pick (ns fogus.my.lib) goog.provide(‘fogus.my.lib’); fogus = fogus || {}; fogus.my = fogus.my || {}; fogus.my.lib = fogus.my.lib || {};
  • 66. Abstractions • Protocols at the bottom • ISeq, IMap, ILookup, IDeref, etc. • Realizing powerful immutable types • Map, List, Vector, etc. • Extended to JavaScript • strings, null, arrays, etc.
  • 67. JavaScript the Parts
  • 68. Functional Inheritance Pattern • Private data • Access to super methods • Missing new safe
  • 69. Functional Inheritance Pattern var person = function(spec) { var that = {}; that.getName = function() { var me = person({'name' : 'Fogus'}); return spec.name; me.getName() }; //=> 'Fogus' return that; }; var man = function(spec) { var that = person(spec); var super_getName = that.superior('getName'); var me = man({'name' : 'Fogus'}); that.getName = function() { me.getName() return "Mr. " + super_getName(); //=> 'Mr. Fogus' }; return that; };
  • 70. Functional Inheritance Pattern Dangers • Harder to minify • Larger memory footprint • Cannot update instances • Eliminates instanceof • Mucks with Function.prototype and Object.prototype in an unsafe way
  • 71. Pseudo-classical Inheritance Pattern Person = function(name) { this._name = name; }; var me = new Person('Fogus'); Person.prototype.getName = function() { me.getName() return this._name; //=> 'Fogus' }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); var me = new Man('Fogus'); me.getName() Man.prototype.getName = function() { //=> 'Mr. Fogus' return "Mr. " + Man._super.getName.call(this); };
  • 72. Pseudo-classical Inheritance Pattern • Harder Easier to minify • Larger Smaller memory footprint • Cannot Can update instances • Eliminates instanceof • Mucks with Clean Function.prototype and Object.prototype
  • 73. Safe Extension String.prototype.cljs$core$first = ... Object.prototype.my$lib$first = ...
  • 77. Functional Inheritance Inlining var person = function(spec) { var myName = me.getName(); var that = {}; var sig = signature({‘name’ : myName}); sig.toString(); that.getName = function() { //=> ‘Sent from teh Fogus iPhone’ return spec.name; }; return that; };
  • 78. Functional Inheritance Inlining var person = function(spec) { var myName = me.getName(); var that = {}; var sig = signature({‘name’ : myName}); sig.toString(); that.getName = function() { //=> ‘Sent from teh Fogus iPhone’ return spec.name; }; return that; }; ?
  • 79. Functional Inheritance Inlining var person = function(spec) { var myName = me.getName(); var that = {}; var sig = signature({‘name’ : myName}); sig.toString(); that.getName = function() { //=> ‘Sent from teh Fogus iPhone’ return spec.name; }; return that; }; var sig = signature({‘name’ : me.getName()}); sig.toString(); //=> ‘Sent from teh Fogus iPhone’
  • 81. Pseudo-classical Inlining Person = function(name) { this._name = name; var myName = me.getName(); }; var sig = new Signature(myName); sig.toString(); Person.prototype.getName = function() { //=> ‘Sent from teh Fogus iPhone’ return this._name; }; ?
  • 82. Pseudo-classical Inlining Person = function(name) { this._name = name; var myName = me.getName(); }; var sig = new Signature(myName); sig.toString(); Person.prototype.getName = function() { //=> ‘Sent from teh Fogus iPhone’ return this._name; }; var sig = new Signature(me._name); sig.toString(); //=> ‘Sent from teh Fogus iPhone’
  • 84. Functional Inheritance Renaming var person = function(spec) { var that = {}; that.getName = function() { return spec.name; }; return that; }; var man = function(spec) { var that = person(spec); var super_getName = that.superior(‘getName’); that.getName = function() { return "Mr. " + super_getName(); }; return that; };
  • 85. Functional Inheritance Renaming var person = function(spec) { var that = {}; that.getName = function() { return spec.name; }; return that; }; var man = function(spec) { var that = person(spec); var super_getName = that.superior(‘getName’); that.getName = function() { return "Mr. " + super_getName(); }; return that; };
  • 87. Pseudo-classical Renaming Person = function(name) { this._name = name; }; Person.prototype.getName = function() { return this._name; }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); Man.prototype.getName = function() { return "Mr. " + Man._super.getName.call(this); };
  • 88. Pseudo-classical Renaming Person = function(name) { this._name = name; }; Person.prototype.o = function() { return this._name; }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); Man.prototype.getName = function() { return "Mr. " + Man._super.o.call(this); };
  • 90. Dead-code Elimination Intro (let [a 1 b 2 a b] a) ;=> 2
  • 91. Dead-code Elimination Intro (function (){ (let [a 1 var a__847 = 1; b 2 var b__848 = 2; a b] var a__849 = b__848; a) return a__849; ;=> 2 })();
  • 92. Dead-code Elimination Intro (function (){ (let [a 1 var a__847 = 1; b 2 var b__848 = 2; a b] var a__849 = b__848; a) return a__849; ;=> 2 })(); ?
  • 93. Dead-code Elimination Intro (function (){ (let [a 1 var a__847 = 1; b 2 var b__848 = 2; a b] var a__849 = b__848; a) return a__849; ;=> 2 })(); 2
  • 94. Dead-code Elimination Intro (function (){ (let [a 1 var a__847 = 1; b 2 var b__848 = 2; a b] var a__849 = b__848; a) return a__849; ;=> 2 })();
  • 95. Functional Inheritance Dead-code var person = function(spec) { var that = {}; var hasBeard = false; that.getName = function() { return spec.name; }; return that; }; var man = function(spec) { var that = person(spec); var super_getName = that.superior(‘getName’); that.getName = function() { return "Mr. " + super_getName(); }; return that; };
  • 96. Functional Inheritance Dead-code var person = function(spec) { var that = {}; var hasBeard = false; that.getName = function() { return spec.name; }; return that; }; var man = function(spec) { var that = person(spec); All good var super_getName = that.superior(‘getName’); Right? that.getName = function() { return "Mr. " + super_getName(); }; return that; };
  • 97. Functional Inheritance Dead-code var person = function(spec) { var that = {}; var hasBeard = false; that.getName = function() { Cursed return spec.name; }; return that; Closures! }; var man = function(spec) { var that = person(spec); var super_getName = that.superior(‘getName’); that.getName = function() { return "Mr. " + super_getName(); }; return that; };
  • 99. Pseudo-classical Dead-code Person = function(name) { this._name = name; this._hasBeard = false; }; Person.prototype.getName = function() { return this._name; }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); Man.prototype.getName = function() { return "Mr. " + Man._super.getName.call(this); };
  • 100. Pseudo-classical Dead-code Person = function(name) { this._name = name; this._hasBeard = false; }; Person.prototype.getName = function() { return this._name; }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); Man.prototype.getName = function() { return "Mr. " + Man._super.getName.call(this); };
  • 101. Pseudo-classical Dead-code Person = function(name) { this._name = name; }; kthxbai Person.prototype.getName = function() { return this._name; }; Man = function(name) { Person.call(this, name); }; inherits(Man, Person); Man.prototype.getName = function() { return "Mr. " + Man._super.getName.call(this); };
  • 102. There’s more to life than this
  • 103. Memory Footprint • Crockford • Closure per-method, per-type • Leaky (holds a reference to all variables) • Pseudo-classical • No closures needed
  • 104. Live
  • 105. Instance Updating • Problem • How to update every instance in the system with new behavior?
  • 106. Functional Inheritance Updating var person = function(spec) { var that = {}; that.getName = function() { return spec.name; }; return that; }; var me = person({'name' : 'Fogus'}); var you = person({'name' : 'Cersei'}); How can we add hasBeard to every instance now and in the future?
  • 107. Functional Inheritance Updating var person = function(spec) { var that = {}; that.getName = function() { return spec.name; }; return that; }; var me = person({'name' : 'Fogus'}); var you = person({'name' : 'Cersei'}); How can we add hasBeard to every instance now and in the future? One at a time... every single time
  • 108. ClojureScript Cares.
  • 109. ClojureScript Extending (defprotocol Catable (cat [this other])) (def sound1 "Meow") (def sound2 "Mao") (cat sound1 sound2) ; ASPLODE! How can we allow cat to work with every instance now and in the future?
  • 110. ClojureScript Extending (extend-type string Catable (cat [this other] (str this other))) (cat sound1 sound2) ;=> “MeowMao” (cat sound1 "ZZZZZ") ;=> "MeowZZZZZ" Pseudo-classical underpinnings FTW
  • 111. Pseudo-classical Updating Person = function(name) { this._name = name; }; Person.prototype.getName = function() { return this._name; }; var me = new Person(‘Fogus’); var you = new Person(‘Cercei’); How can we add hasBeard to every instance now and in the future?
  • 112. Pseudo-classical Updating Person = function(name) { this._name = name; }; Person.prototype.getName = function() { return this._name; }; var me = new Person(‘Fogus’); var you = new Person(‘Cercei’); How can we add hasBeard to every instance now and in the future? Person.prototype.hasBeard = function() { return false };
  • 113.
  • 114. apply
  • 116. Var Args JavaScript ClojureScript arguments & stuff
  • 117. Var Args JavaScript ClojureScript arguments & stuff An object that holds arguments a seq
  • 118. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); }
  • 119. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (add-first-two 1 2 3) ;=> 3
  • 120. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (apply add-first-two [1 2 3])
  • 121. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (apply add-first-two [1 2 3])
  • 122. ClojureScript apply (defn apply [f arg-seq] (.apply f (to-array arg-seq)))
  • 123. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (apply add-first-two [1 2 3]) ;=> 3
  • 124. ClojureScript apply (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (apply add-first-two (iterate inc 1)) ;=> ?
  • 125. ClojureScript apply ∞ (defn add-first-two [& args] (+ (first args) (second args))) function addFirstTwo() { var args = // that slice thing return cljs.first(args) + cljs.second(args); } (apply add-first-two (iterate inc 1)) ;=> ?
  • 126. ClojureScript apply (defn apply [f arg-seq] (.apply f (to-array arg-seq)))
  • 127.
  • 128. ClojureScript applyTo • A function stored on ClojureScript functions • Only if they have var args • Compiled to only deal with the args seq at the maximum fixed arity • This ensures that an infinite seq is not realized
  • 129. ClojureScript apply (defn apply [f arg-seq] (if (.applyTo f) (if (<= bounded-count fixed-arity) (.apply f (to-array arg-seq)) (.applyTo f args)) (.apply f (to-array arg-seq)))
  • 130. ClojureScript apply (defn apply [f arg-seq] (if (.applyTo f) (if (<= bounded-count fixed-arity) (.apply f (to-array arg-seq)) (.applyTo f args)) (.apply f (to-array arg-seq)))
  • 131. ClojureScript apply (defn apply [f arg-seq] (if (.applyTo f) (if (<= bounded-count fixed-arity) (.apply f (to-array arg-seq)) (.applyTo f args)) (.apply f (to-array arg-seq)))
  • 132. ClojureScript apply (defn apply [f arg-seq] (if (.applyTo f) (if (<= bounded-count fixed-arity) (.apply f (to-array arg-seq)) (.applyTo f args)) (.apply f (to-array arg-seq)))
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139. Cl oju re D at a AS T
  • 140.
  • 141.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 149.
  • 150.
  • 151.
  • 152.
  • 153. C6 4 JA VA SC RIP T
  • 154.
  • 155.
  • 156.
  • 157. Thank You http://joyofclojure.com @fogus
  • 158. Learn More • http://bit.ly/cljs-intro • http://boss-level.com/?p=102 • http://blog.fogus.me/tag/clojurescript • http://github.com/clojure/clojurescript
  • 159.
  • 161. Functional Inheritance instanceof var me = person({'name' : 'Fogus'}); me instanceof person; //=> false
  • 162. ClojureScript Loves instanceof
  • 163. Pseudo-classical instanceof var me = new Person('Fogus'); me instanceof Person; //=> true
  • 164. ClojureScript satisfies? (defprotocol Catable (cat [this other])) (deftype Cons [H T] Catable (cat [_ new-tail] nil)) (satisfies? Catable (Cons. 1 2)) ;=> true
  • 165. tread
  • 166. Don’t Tread on Me Function.prototype.method = function(name, f) { this.prototype[name] = f; return this; }; Object.method('superior', function(name) { var that = function; var method = that[name]; return function() { return method.apply(that, arguments); }; });
  • 167. ClojureScript Gently Caresses Object & Function as One Might Caress the finest Fabergé Egg
  • 168. Look with your eyes, not with your hands var inherits = function(child, parent) { function tmp() {}; tmp.prototype = parent.prototype; child._super = parent.prototype; child.prototype = new tmp(); child.prototype.constructor = child; };
  • 169. Var Args JavaScript ClojureScript function stuffToArray() { (defn stuff->seq // create an array of stuff [& stuff] } stuff) stuffToArray(1,2,3,4); (stuff->seq 1 2 3 4) //=> [1,2,3,4] ;=> (1 2 3 4)
  • 170. Var Args JavaScript ClojureScript function stuffToArray() { (defn stuff->seq // create an array of stuff [& stuff] } stuff) stuffToArray(1,2,3,4); (stuff->seq 1 2 3 4) //=> [1,2,3,4] ;=> (1 2 3 4)
  • 171. Var Args JavaScript ClojureScript function stuffToArray() { (defn stuff->seq return Array.prototype.slice.call(arguments); [& stuff] } stuff) stuffToArray(1,2,3,4); (stuff->seq 1 2 3 4) //=> [1,2,3,4] ;=> (1 2 3 4)
  • 172. Compiler Macros • Operate in the compiler only • Analysis phase • Written in Clojure • Allows shadowing of fns • Operates according to a fix point

Notes de l'éditeur

  1. \n
  2. * One of the great stories in the history of hacking\n* Right up there with that guy who used autoconfig properly\n
  3. \n
  4. * If JavaScript is so cool, then why target it? Why not use it?\n
  5. * The meaning is king. \n* Anything that can be done in CLJS can be done with JS\n * This is the root of all Turing completeness arguments\n\n
  6. * For the purposes of writing Little Schemer only\n
  7. Everyone implements classes. :-(\n
  8. * first-class functions\n* prototypal\n* closures\n* literals\n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. * Really this is the only snarky language joke I&amp;#x2019;ll say all day. \n
  27. * This is Douglass Crockford\n* Seems like a nice guy\n* Wrote a book about using only the nice parts of JS\n
  28. * But there is something sinister about this advice!\n
  29. * How is JavaScript like a Russian novel?\n
  30. \n
  31. * Semicolons\n
  32. * Namespacing\n
  33. * Closure pattern\n
  34. * LET pattern\n
  35. * VAR\n
  36. * privates\n
  37. * publics\n
  38. * And after all of that... you can add some functionality.\n
  39. * You need to introduce thousands of characters before anything happens.\n
  40. \n
  41. \n
  42. Anyone have experience with GClosure? It&amp;#x2019;s tough to follow the conventions. I wrote every function/form in js *before* I wrote the cljs impl.\n
  43. \n
  44. \n
  45. \n
  46. * conventions conventions conventions\n* It&amp;#x2019;s too much to think about sometimes, but people will get used to *anything*\n* But you&amp;#x2019;ve still not yet solved the problem at hand.\n* JS with a rabid adherence to conventions is 84% as safe as Haskell!\n
  47. * All useful semantics become syntax.\n* In JS, its syntax betrays its semantics because intent is buried in idiom, verbosity, and safety checks.\n* CLJS (and LISP) leave syntax as an open set in order to allow one to build the syntax to match the semantics.\n\n| Isn&apos;t the semantics more important the syntax?\n\ngenerally speaking, if this were true, we would not see the syntax-fixation\nthat the whole industry is built on. syntax _distinguishes_ programming\nlanguages from each other; the semantics is only a question of how much of\nthe syntax you need to implement it. e.g., if CFRONT can produce C code\nfrom C++, so can a human. syntax can help automate the expression of the\nsemantics in very important ways, or serve to frustrate the same process.\nhowever, certain operations are possible (that is, sufficiently easy) on\ncertain syntaxes, which leads me to the more specific interpretation.\n
  48. * Let&amp;#x2019;s talk a moment to talk about CoffeeScript\n* Enjoyed my time\n* JS the good parts -- eliminates much of the ceremony, many edge cases (while introducing some of its own)\n* But maybe we need something more...\n
  49. Asynchronous - DOM - Constant serialization - Limited resources and slow pipes - Hostile environment\n
  50. \n
  51. \n
  52. * Because you can!\n* Although there are many flavors, they tend to a common pattern...\n
  53. * This is a namespaced JS function.\n* Nested objects\n
  54. \n
  55. * This leads me into a nice discussion about compression potential...\n
  56. * What do I mean?\n* Not golfing!\n
  57. * You can get fairly compressed in the second example, but this is indicative only of this problem, and not in the language itself.\n* CoffeeScript doesn&amp;#x2019;t fix this. It shaves characters, but that&amp;#x2019;s all.\n
  58. \n
  59. * Why so many class systems? \n* Because you can!\n* Many suffer from a lack of safety or composability\n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. * Clojure ensures safety by...\n
  67. * To Crockford&amp;#x2019;s credit, his is better encapsulated.\n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. * functions cause complication\n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. * Simple as CLJ\n
  130. * Compiler Macros\n
  131. * AST\n
  132. * AST\n
  133. \n
  134. * Well, this is what I&amp;#x2019;ve already talked about\n
  135. \n
  136. * People are already using the analyzer\n* typing, Marg, etc.\n
  137. \n
  138. \n
  139. \n
  140. * AWESOME Syntax Tree!!!\n
  141. \n
  142. \n
  143. \n
  144. * Get rid of everything but the emitter\n* Remember it takes an AST\n
  145. * Parser generates an AST in CLJS format\n
  146. * Parser generates an AST in CLJS format\n
  147. Rock On!\n
  148. Make something amazing\n
  149. Possibilities are Limitless\n
  150. \n
  151. \n
  152. \n
  153. \n
  154. \n
  155. \n
  156. \n
  157. \n
  158. \n
  159. \n
  160. \n
  161. \n
  162. \n
  163. \n
  164. \n
  165. * TODO: More talking points here --- example?\n