kevin lynagh - keming labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another...
TRANSCRIPT
![Page 1: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/1.jpg)
ClojureScriptJavaScript
Kevin LynaghKeming Labs
![Page 2: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/2.jpg)
1.
Clojure
SimplerJavaScript
than
is
![Page 3: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/3.jpg)
2.JavaScript
MOARFun!
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
![Page 4: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/4.jpg)
Safe!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
![Page 5: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/5.jpg)
Extendable!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
![Page 6: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/6.jpg)
3..jsThe trip from
.cljsAdventure!
to
is an
(you might get hurt)
![Page 7: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/7.jpg)
0.story
![Page 8: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/8.jpg)
Imperial
Metric::
![Page 9: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/9.jpg)
JavaScript
Clojure::
![Page 10: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/10.jpg)
JavaScript
Clojure::
![Page 11: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/11.jpg)
JavaScript
Clojure::
![Page 12: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/12.jpg)
JSLetstalkabout
![Page 13: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/13.jpg)
JS has a lot of
BrendanEich (creator of
JavaScript)
—
News at 11.stupid in it
![Page 14: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/14.jpg)
x = 12;var
Attack Globalsof thekiller
![Page 15: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/15.jpg)
x = 12;
Attack Globalsof thekiller
![Page 16: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/16.jpg)
ClojureSolution
![Page 17: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/17.jpg)
ClojureSolution
Things
![Page 18: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/18.jpg)
ClojureSolution
Thingsdon’t
![Page 19: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/19.jpg)
ClojureSolution
Thingsdon’t
change
![Page 20: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/20.jpg)
JavaScriptNamespaces
![Page 21: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/21.jpg)
(function(){ })();
JavaScriptNamespaces
![Page 22: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/22.jpg)
(function( $ ){
var methods = { init: function( options ) {}, show: function( ) {}, hide: function( ) {}, update: function( content ) {} };
$.fn.tooltip = function( method ) { if ( methods[method] ) { return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $.error( 'Method ' + method + ' does not exist!' ); } };
})( jQuery );
![Page 23: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/23.jpg)
This is
Crazy
![Page 24: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/24.jpg)
( )
![Page 25: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/25.jpg)
CoffeeScriptwill not
save you( )
![Page 26: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/26.jpg)
ClojureSolution
![Page 27: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/27.jpg)
ClojureSolution
Use
![Page 28: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/28.jpg)
ClojureSolution
UseName-
![Page 29: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/29.jpg)
ClojureSolution
UseName-spaces
![Page 30: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/30.jpg)
;;src/clj/my_stuff.clj(ns my-stuff)
(defn thing [x] )(defn another [x y] )
ClojureNamespaces
![Page 31: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/31.jpg)
;;src/clj/elsewhere.clj(ns elsewhere)
ClojureNamespaces
![Page 32: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/32.jpg)
(ns elsewhere (:use [my-stuff :only [thing]]))
;;src/clj/elsewhere.clj
ClojureNamespaces
![Page 33: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/33.jpg)
(ns elsewhere (:use [my-stuff :only [thing] :rename {thing other-thing}]))
;;src/clj/elsewhere.clj
ClojureNamespaces
![Page 34: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/34.jpg)
![Page 35: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/35.jpg)
1.
Clojure
SimplerJavaScript
than
isReca
p
![Page 36: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/36.jpg)
Only
Geniusesuse
functional languages
![Page 37: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/37.jpg)
Only
Geniusesuse
functional languages
Myth
![Page 38: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/38.jpg)
2.JavaScriptUsing
from
ClojureScript
![Page 39: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/39.jpg)
(. js/console log "hello")
InteropReview
![Page 40: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/40.jpg)
(. js/console log "hello")js/
InteropReview
![Page 41: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/41.jpg)
(. js/console log "hello")
(.log js/console "hello")
InteropReview
![Page 42: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/42.jpg)
(.aMethod js/anObject)
ADifference
![Page 43: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/43.jpg)
(.aMethod js/anObject)
(. js/anObject (aMethod))
ADifference
![Page 44: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/44.jpg)
Types
![Page 45: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/45.jpg)
TypesScalars
![Page 46: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/46.jpg)
TypesNativeScalars
![Page 47: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/47.jpg)
TypesNativeScalars
Collections
![Page 48: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/48.jpg)
TypesNativeScalars
CollectionsForeign ( lazy in Clojure)
![Page 49: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/49.jpg)
(array 1 2 3) ;;=> [1,2,3];(apply array [1 2 3]) ;;=> [1,2,3];
(cljs.core.Vector/fromArray js/x) ;;=> [1 2 3]
JS array <=> Cljs vector
![Page 50: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/50.jpg)
(let [o (js-obj)] (aset o "x" 1) (set! (.y o) 2) o) ;;=> {"x":1,"y":2};
JS Objects
![Page 51: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/51.jpg)
#js[1 2 3]
#js{"key1" "val1", "key2" "val2"}
Reader Literals
?
![Page 52: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/52.jpg)
Extendable!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
![Page 53: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/53.jpg)
jQuery.select("#main") .append("<span>") .text("hello");
![Page 54: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/54.jpg)
jQuery.select("#main") .append("<span>") .text("hello");
(-> js/jQuery (.select "#main")
(.text "hello")) (.append "<span>")
![Page 55: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/55.jpg)
jQuery.select("#main") .append("<span>") .text("hello");
(-> js/jQuery (.select "#main")
(.text "hello")) (my-append "<span>")
![Page 56: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/56.jpg)
CompareJavaScript
![Page 57: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/57.jpg)
var $main = jQuery.select("#main");my_appender($main, "<span>");$main.text("hello");
CompareJavaScript
![Page 58: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/58.jpg)
var $main = jQuery.select("#main");my_appender($main, "<span>");$main.text("hello");
jQuery.fn.my_appender = function(x){};
CompareJavaScript
![Page 59: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/59.jpg)
Build façades
![Page 60: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/60.jpg)
(defn append [sel node-type] (.append sel node-type))
(defn select [sel selector] (.select sel selector))
(-> js/jQuery (select "#main") (append "svg"))
Build façades
![Page 61: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/61.jpg)
façades
decoupleintent implementation
![Page 62: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/62.jpg)
![Page 63: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/63.jpg)
2.JavaScriptUsing
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 64: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/64.jpg)
2.JavaScript
MOARFun!
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 65: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/65.jpg)
Safe!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 66: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/66.jpg)
Extendable!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 67: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/67.jpg)
3..jsThe trip from
.cljsAdventure!
to
is an
(you might get hurt)
![Page 68: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/68.jpg)
3.ClojureScript
until
we thought we knew
showed us
otherwise
What
![Page 69: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/69.jpg)
Lets talk about
this
![Page 70: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/70.jpg)
var f = function(){ return this; };
this this this this
![Page 71: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/71.jpg)
var f = function(){ return this; };f(); //=> DOMWindow
this this this this
![Page 72: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/72.jpg)
var dog = {};dog.name = "Rex";dog.bark = function(){ return "My name is " + this.name;};
var f = function(){ return this; };f(); //=> DOMWindow
this this this this
![Page 73: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/73.jpg)
var dog = {};dog.name = "Rex";dog.bark = function(){ return "My name is " + this.name;};
var f = function(){ return this; };
dog.bark(); // => "My name is Rex"
f(); //=> DOMWindow
this this this this
![Page 74: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/74.jpg)
Bewareapply
![Page 75: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/75.jpg)
(apply (. js/dog bark) 1 2 3)
Bewareapply
![Page 76: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/76.jpg)
(apply (. js/dog bark) 1 2 3)
cljs.core.apply.call( null, dog.bark, cljs.core.Vector.fromArray([1,2,3]));
Bewareapply
![Page 77: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/77.jpg)
YOU WANT IT TO BE ONE WAY. BUT IT’S THE OTHER WAY.
EFERENTIAL TRANSPARENCR Y
![Page 78: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/78.jpg)
1.
Clojure
SimplerJavaScript
than
isReca
p
![Page 79: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/79.jpg)
2.JavaScript
MOARFun!
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 80: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/80.jpg)
Safe!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 81: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/81.jpg)
Extendable!
2.JavaScript
MOAR
Using
from
ClojureScript
than using JavaScript from JavaScript.
is
Reca
p
![Page 82: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/82.jpg)
3..jsThe trip from
.cljsAdventure!
to
is an
(you might get hurt)
Recap
![Page 83: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/83.jpg)
4.A free pieceunsolicited
Advice:of
![Page 84: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/84.jpg)
Tools don’t
makeartistth
e
![Page 85: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/85.jpg)
![Page 86: Kevin Lynagh - Keming Labs · ;;src/clj/my_stuff.clj (ns my-stuff) (defn thing [x] ) (defn another [x y] ) ClojureNamespaces](https://reader035.vdocuments.site/reader035/viewer/2022081408/6057fe3776be12246c4d585a/html5/thumbnails/86.jpg)
Kevin LynaghKeming Labs keminglabs.com/talks
slides, notes, &c.