Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ES6 Deep Dive
Search
dherman
August 30, 2012
Programming
14
4k
ES6 Deep Dive
A deep dive into three features of ECMAScript Edition 6: symbols, structs, and generators.
dherman
August 30, 2012
Tweet
Share
More Decks by dherman
See All by dherman
Rust + Node = Neon
dherman
1
310
Evolving the World's Most Popular Programming Language
dherman
0
620
Closing iterators
dherman
0
720
A better future for comprehensions
dherman
0
1.9k
Evolution is Awesome
dherman
0
500
Status Report: ES6 Modules
dherman
16
3.9k
Discussion with TC39 about the semantics of symbols
dherman
1
370
September 2013 Modules Status Update
dherman
2
1.1k
Rust: low-level programming without the segfaults
dherman
13
8.9k
Other Decks in Programming
See All in Programming
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
subpath importsで始めるモック生活
10tera
0
300
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
C++でシェーダを書く
fadis
6
4.1k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
520
39k
What's new in Ruby 2.0
geeforr
343
31k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Facilitating Awesome Meetings
lara
50
6.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Happy Clients
brianwarren
98
6.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
GraphQLとの向き合い方2022年版
quramy
43
13k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Adopting Sorbet at Scale
ufuk
73
9.1k
Transcript
Dave Herman ES6 Deep Dive Symbols, Structs, Generators
None
About me • @littlecalculist • http://calculist.org • http://github.com/dherman • Mozilla
Research • TC39 • Also…
In print this December http://effectivejs.com
Symbols
JS property names are strings var obj = { foo:
42 }; obj["foo"]; // 42
The all-powerful _ character function Dict() { this._entries = {};
} Don’t touch me, I’m private!
When you mean business… __proto__ private SO PRIVATE REALLY GUYS
SOOO TOTALLY PRIVATE private!
Conventions are no guarantee function SuperClass() { this._data = "superclass
private data"; } function SubClass() { SuperClass.call(this); this._data = "subclass private data"; // collision! } SubClass.prototype = Object.create(SuperClass.prototype);
Closures for information hiding function SuperClass() { var data =
"private data"; this.method = function() { /* ... */ data /* ... */ }; } no sharing: one method per instance!
Introducing symbols
Introducing symbols var sym = new Symbol("data");
Introducing symbols var sym = new Symbol("data"); function SuperClass() {
this[sym] = "private data"; }
Introducing symbols var sym = new Symbol("data"); function SuperClass() {
this[sym] = "private data"; } SuperClass.prototype.method = function() { /* ... */ this[sym] /* ... */ };
Introducing symbols var obj = new SuperClass(); "data" in obj;
// false "_data" in obj; // false sym in obj; // true
Performance • Engines already do string interning • Convertible to
a fixed offset with inline caches
Proposal: scoped symbols private @sym; function SuperClass() { this.@sym =
"private data"; } SuperClass.prototype.method = function() { /* ... */ this.@sym /* ... */ };
Structured binary data
Typed arrays var a = new Uint32Array(1024); a[17] = 42;
Typed arrays var vertices = new Float32Array([ -1.0, -1.0, 0.0,
// vertex 1 0.0, 1.0, 0.0, // vertex 2 1.0, -1.0, 0.0 // vertex 3 ]); -1.0 -1.0 0.0 0.0 1.0 0.0 1.0 -1.0 0.0 0 4 8 12 16 20 24 28 32
Structs var Point = struct({ x: float32, y: float32, z:
float32 }); var origin = new Point(0.0, 0.0, 0.0); origin.x; // 0.0 origin.y; // 0.0
Arrays of structs var vertices = new Point.array([ { x:
-1.0, y: -1.0, z: 0.0 }, { x: 0.0, y: 1.0, z: 0.0 }, { x: 1.0, y: -1.0, z: 0.0 } ]); -1.0 -1.0 0.0 0.0 1.0 0.0 1.0 -1.0 0.0 0 4 8 12 16 20 24 28 32
JIT compilers — types
Applications of structs • WebGL data • File and network
I/O • Compiling other languages to JS
Generators
Lies, lies, lies “JS doesn’t have concurrency.” “JS is single-threaded
so it can’t have race conditions.” “Event-based programming is easy.”
Download three files load("foo", function(foo) { load("bar", function(bar) { //
why wait? load("baz", function(baz) { use([foo, bar, baz]); }); }); });
Download three files load("foo", function(foo) { load("bar", function(bar) { //
why wait? load("baz", function(baz) { use([foo, bar, baz]); }); }); });
Download three files var files = []; ["foo", "bar", "baz"].forEach(function(url,
i) { load(url, function(file) { files.push(file); // no! if (i === 3) // no! use(files); }); });
Download three files var files = []; ["foo", "bar", "baz"].forEach(function(url,
i) { load(url, function(file) { files[i] = file; if (files.length === 3) // still no! use(files); }); });
Download three files var files = [], count = 0;
["foo", "bar", "baz"].forEach(function(url, i) { load(url, function(file) { files[i] = file; if (++count === 3) use(files); }); });
JavaScript is concurrent Cooperative concurrency: easier, but not easy! Handlers
run sequentially but start concurrently. Shared state 㱺 race conditions 㱺 pain and suffering
task.js: Beautiful concurrency spawn(function*() { var files = yield join(load("foo"),
load("bar"), load("baz")); use(files); }); http://taskjs.org
task.js: Beautiful concurrency spawn(function*() { var files = yield join(load("foo"),
load("bar"), load("baz")); use(files); }); create a task that can be paused pause! http://taskjs.org
Generator functions function* evenNumbers() { for (var next = 0;
true; next += 2) { yield next; } }
Generator functions function* evenNumbers() { for (var next = 0;
true; next += 2) { yield next; } }
Generator functions function* evenNumbers() { for (var next = 0;
true; next += 2) { yield next; } } evenNumbers(); ✗
Generator functions function* evenNumbers() { for (var next = 0;
true; next += 2) { yield next; } } evenNumbers(); ✗
Generators function* f() { }
Generators function* f() { } .next: var g = f();
⋮
Generators function* evenNumbers() { /* ... */ } var g
= evenNumbers(); g.next(); // 0 g.next(); // 2 g.next(); // 4 starts out paused
Lazy iteration Dict.prototype.keys = function*() { for (var key in
this._entries) yield key; };
Iterators work with for-of var dict = new Dict(); //
... for (var key of dict.keys()) { console.log(key + ": " + dict.get(key)); }
Pausing is powerful load("config.json", function(config) { db.lookup(JSON.parse(config).table, username, function(user) {
load(user.id + ".png", function(avatar) { // ... }); }); });
Pausing is powerful load("config.json", function(config) { db.lookup(JSON.parse(config).table, username, function(user) {
load(user.id + ".png", function(avatar) { // ... }); }); }); later later later
Pausing is powerful load("config.json", function(config) { db.lookup(JSON.parse(config).table, username, function(user) {
load(user.id + ".png", function(avatar) { // ... }); }); }); later later later
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Pausing with promises load("config.json") .then(function(config) { return db.lookup(JSON.parse(config).table); }) .then(function(user)
{ return load(user.id + ".png"); }) .then(function(avatar) { /* ... */ });
Tasks yield promises spawn(function*() { var config = JSON.parse(yield load("config.json"));
var user = yield db.lookup(config.table, username); var avatar = yield load(user.id + ".png"); // ... });
Tasks yield promises spawn(function*() { var config = JSON.parse(yield load("config.json"));
var user = yield db.lookup(config.table, username); var avatar = yield load(user.id + ".png"); // ... });
Tasks yield promises spawn(function*() { var config = JSON.parse(yield load("config.json"));
var user = yield db.lookup(config.table, username); var avatar = yield load(user.id + ".png"); // ... }); looks like a synchronous API!
What about errors? load("foo", function(foo) { load("bar", function(bar) { load("baz",
function(baz) { use([foo, bar, baz]); }, function(err) { /* ... */ }); }, function(err) { /* ... */ }); }, function(err) { /* ... */ });
What about errors? load("foo", function(err, foo) { if (err) return
onError(err); load("bar", function(err, bar) { if (err) return onError(err); load("baz", function(err, baz) { if (err) return onError(err); use([foo, bar, baz]); }); }); });
Error handling with promises var p = load("config.json") .then(function(config) {
/* ... */ } .then(function(user) { /* ... */ }) .then(function(avatar) { /* ... */ }); when(p, function(result) { /* ... */ }, function(err) { /* ... */ });
Error handling with tasks spawn(function*() { try { var config
= JSON.parse(yield load("config.json")); var user = yield db.lookup(config.table, username); var avatar = yield load(user.id + ".png"); // ... } catch (e) { /* ... */ } });
Wait for multiple events spawn(function*() { var [foo, bar, baz]
= yield join(load("foo"), load("bar"), load("baz")); // ... });
Purposefully race events spawn(function*() { try { var foo =
yield select(load("foo"), timeout(3000)); // ... } catch (e) { /* timed out */ } });
Generators • Interruptible computations 㱺 custom iterators • Pausing with
yield 㱺 concurrency minus the callbacks
Something completely different
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "[object Object]"
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "[object Object]"
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "[object Object]" true true true
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "[object Object]" 3
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "j"
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "false" "j"
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "false" 3 "j"
({}+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]] "j" "s"
! + { } [ ] ( ) \n ===
JavaScript
Um. So… why?
• No reason. Um. So… why?
• Yosuke Hasegawa: JSF*ck • Patricio Palladino: Hieroglyphy • Me:
pure JS, no browser API’s Not the first deranged weirdo
> String+[] "function String() { [native code] }" "S"
> "".constructor+[] "function String() { [native code] }" "S"
> ""["constructor"]+[] "function String() { [native code] }" "S"
> [].slice.call(""["constructor"]+[]) ["f","u","n","c","t","i","o","n"," ","S","t","r", /* ... */] "S"
> [].slice.call(""["constructor"]+[]) [" ","f","u","n","c","t","i","o","n"," ","S","t","r", /* ... */] "S"
> function nonWhitespace(s) { return !/^\s*$/.test(s) } > [].slice.call(""["constructor"]+[]).filter(nonWhitespace) ["f","u","n","c","t","i","o","n","S","t","r",
/* ... */] "S"
> Number("f") NaN > Number(" ") 0 > isNaN("f") true
> isNaN(" ") false "S"
> [].slice.call(""["constructor"]+[]).filter(isNaN) ["f","u","n","c","t","i","o","n","S","t","r", /* ... */] "S"
> [].slice.call(""["constructor"]+[]) .filter(Function("return isNaN")()) ["f","u","n","c","t","i","o","n","S","t","r", /* ... */] "S"
> [].slice.call(""["constructor"]+[]) .filter(Array.constructor("return isNaN")()) ["f","u","n","c","t","i","o","n","S","t","r", /* ... */] "S"
> [].slice.call(""["constructor"]+[]) .filter([].constructor.constructor("return isNaN")()) ["f","u","n","c","t","i","o","n","S","t","r", /* ... */] "S"
> [].slice.call(""["constructor"]+[]) .filter([].constructor.constructor("return isNaN")())[8] "S" "S"
> (9).toString() "9" > (15).toString(16) "f" > (16).toString(17) "g" "p"
> (25).toString(26) "p" "p"
> (25)["toString"](26) "p" "p"
> escape(" ") "%20" "%"
> Function("return escape")()(" ") "%20" "%"
> Function("return escape")()(" ")[0] "%" "%"
> Function("return unescape")()("%3b") ";" Any ASCII character
> (({}+[])[!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(+(!![]+!![]+!![]+[]+ (+!![])))[(!![]+[])[+![]]+[]+({}+[])[+!![]]+[][(![]+[])[!![]+!![] +!![]]+[]+(![]+[])[!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!! []]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]] [({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(![]+[])[!![] +!![]]+(![]+[])[!![]+!![]]](+[![]]+[]+(!![]+[])[({}+[])[!![]+!![] +!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!! []+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+ ({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+
(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!! []+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!! []]+(!![]+[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+ [])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[]) [+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![] +!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+ [])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]] +(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]] +[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+ [])[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!! []+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][!
[]]+[])[+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]] +[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]])) ())[+(+!![]+[]+(+!![]))]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+ [])[!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[+!![]]+[][(![]+[])[!![] +!![]+!![]]+[]+(![]+[])[!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![] +!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]] [({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(![]+[])[!![] +!![]]+(![]+[])[!![]+!![]]]((!![]+[])[({}+[])[!![]+!![]+!![]+!![] +!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!! []]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!!
[]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[]) [+!![]]]+[])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!! []]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+ (!![]+[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[]) [+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+! []]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![] +!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!! []+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+ [])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[]) [+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[]) [+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!![
]+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][! []]+[])[+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]] +[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]])) ())[+(+!![]+[]+(!![]+!![]+!![]))]](+(!![]+!![]+!![]+[]+(!![]+!! [])))+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+({}+[])[!![]+!![]+!! []+!![]+!![]]+(!![]+[])[+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!! []]+(+(!![]+!![]+[]+(!![]+!![]+!![]+!![]+!![])))[(!![]+[])[+![]]+[] +({}+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![]+!![]]+ ([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![] +!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]
+[]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]](+[![]] +[]+(!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+ ([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+ [])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!! []+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+ ([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+ [])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]]([][({}+[])[!! []+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+ [])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[]) [+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[]) [+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+
[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[]) [+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![] +!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]]((!![]+ [])[+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+ [])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+!![]]+({}+[])[!![]+!![]+!! []+!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![] +[])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+(+!![]))]+(!![]+[])[+! []]+(!![]+[])[+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+([][! []]+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![]+!![]]+ ([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]
+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]] +[]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]((!![]+ [])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+ [])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!! []]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[]) [+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]]+[])[(![]+[])[+![]]+[]+([][! []]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+! []]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]]([][({}+[])[!![]+!! []+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[]) [!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+! []]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!!
[]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[]) [+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+! []]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![] +!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]]((!![]+[]) [+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+[]) [+![]]+(!![]+[])[+!![]]+([][![]]+[])[+!![]]+({}+[])[!![]+!![]+!![] +!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+ [])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+(!![]+!![]+!![]))]](+ (!![]+!![]+!![]+[]+(+![])))+(!![]+[])[+![]]) "javascript"
(({}+[])[!![]+!![]+!![]]+[]+(![]+[])[+!![]]+(+(!![]+!![]+!![]+[]+(+!![])))[(!![]+[])[+![]]+[]+({}+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+ [])[!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!! []]+[]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]](+[![]]+[]+(!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+ [])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[]) [+!![]]+(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+ (!![]+[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!! []]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+ [])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![] +[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][! []]+[])[+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+
(+!![]))]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![] +!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(! []+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]((!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[]) [!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!! []]]+[])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]] ([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[]) [+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][! []]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+ [])[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+!![]]+ ({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+(!![]+!![]+!! []))]](+(!![]+!![]+!![]+[]+(!![]+!![])))+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+!![]]+([][![]]+[]) [!![]+!![]+!![]+!![]+!![]]+(+(!![]+!![]+[]+(!![]+!![]+!![]+!![]+!![])))[(!![]+[])[+![]]+[]+({}+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[]) [!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+ []+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]](+[![]]+[]+(!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[]) [+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!! []]+(!![]+[])[+!![]]])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![] +[])[+!![]]]([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+ ([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[]) [+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+ [])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][! []]+[])[+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+ (+!![]))]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[+!![]]+[][(![]+[])[!![]+!![]+!![]]+[]+(![]+[])[!![] +!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[!![]+!![]+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+(! []+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]((!![]+[])[({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[]) [!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!! []]]+[])[(![]+[])[+![]]+[]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]] ([][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][![]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[]) [+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+[])[+!![]]+(!![]+[])[+!![]]][({}+[])[!![]+!![]+!![]+!![]+!![]]+[]+({}+[])[+!![]]+([][! []]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+![]]+({}+[])[!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+![]]+({}+ [])[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+[]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+![]]+([][![]]+[])[+![]]+(!![]+[])[+!![]]+([][![]]+[])[+!![]]+ ({}+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][![]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+(+[![]]))())[+(+!![]+[]+(!![]+!![]+!! []))]](+(!![]+!![]+!![]+[]+(+![])))+(!![]+[])[+![]])
None