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
Владимир Дашукевич (Квартирник)
Search
FrontFest
November 21, 2017
Programming
0
840
Владимир Дашукевич (Квартирник)
FrontFest
November 21, 2017
Tweet
Share
More Decks by FrontFest
See All by FrontFest
Тим Чаптыков
frontfest
0
1.2k
Егор Банщиков
frontfest
0
880
Jose M. Perez
frontfest
0
750
Алексей Иванов
frontfest
0
1.4k
Екатерина Пригара
frontfest
0
670
Léonie Watson
frontfest
0
750
Кирилл Чернышев
frontfest
0
760
Виктор Грищенко
frontfest
0
650
Игорь Алексеенко
frontfest
0
490
Other Decks in Programming
See All in Programming
はじめてのMaterial3 Expressive
ym223
2
740
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
Navigating Dependency Injection with Metro
zacsweers
3
960
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
440
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
470
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
120
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
チームのテスト力を鍛える
goyoki
2
130
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.3k
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
160
Featured
See All Featured
The Language of Interfaces
destraynor
161
25k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Being A Developer After 40
akosma
90
590k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
YesSQL, Process and Tooling at Scale
rocio
173
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
For a Future-Friendly Web
brad_frost
180
9.9k
Transcript
None
Вопросы на сегодня: 1. Будет ли Javascript заменен другим языком?
2. Строгая типизация в JavaScript? 3. Что нового ожидается в JavaScript? 4. Чего не хватает в JavaScript? 1
Disclaimer 2
WebAssembly 3
Что такое WebAssembly: WebAssembly or wasm is a new portable,
size- and load-time-efficient format suitable for compilation to the web. webassembly.org “ 4
5
6
7
8
9
fetch("fun.wasm").then(response => response.arrayBuffer() ).then(bytes => WebAssembly.compile(bytes) ).then(module => WebAssembly.instantiate(module, importObject)
).then(instance => instance.exports.exported_func(); ) 01. 02. 03. 04. 05. 06. 07. 08. 09. 10
Составные части: 1. Независиный модуль (Module) 2. Память (Memory) 3.
Таблица (Table) 4. Экземпляр (Instance) 11
Для чего можно его использовать: 1. Трудоемкие задачи 2. Алгоритмы
обработки изображений 3. Алгоритмы обработки видео 4. Алгоритмы криптографии 12
Примеры 13
web-dsp 14
15
asm-dom 16
17
GCCX 18
19
Bullet 20
21
Apache MXNet 22
TurboScript 23
export class Vector3D { x:float32; y:float32; z:float32; constructor(x:float32, y:float32, z:float32){
this.x = x; this.y = y; this.z = z; } } 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 24
DotNetAnywhere 25
Blazor 26
27
LLVM 28
29
OCaml Run Wasm 30
Wasm Lua 31
Будущее WebAssembly 32
33
Список проектов WebAssembly 34
Будет ли JavaScript заменен другим языком? 35
Типизация 36
Языки программирования: 1. Dart 2. TypeScript 3. Kotlin 4. Elm
5. PureScript 6. Reason 7. Haxe 8. Nim 9. и другие 37
Dart 38
class Point { final double x, y; const Point(this.x, this.y);
bool get isInsideUnitCircle => x * x + y * y <= 1; } 01. 02. 03. 04. 05. 39
TypeScript 40
class Person { private name: string; private age: number; constructor(name:
string, age: number) { this.name = name; this.age = age; } toString(): string { return `${this.name} (${this.age})`; } 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 41
Kotlin 42
package html fun main(args: Array<String>) { val result = html
{ head { title { +"XML encoding with Kotlin" } } ul { for (arg in args) li { +arg } }} println(result) } 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 43
Haxe 44
45
Elm 46
47
PureScript 48
49
Reason 50
51
Nim 52
53
Python 54
PEP 484 и PEP 526 55
56
Нужна ли нам типизация? 57
Что нового ожидается в JavaScript (2017-2018)? 58
Disclaimer 59
SIMD 60
Atomics 61
SharedBufferArray 62
Atomics 1. add 2. and 3. compareExchange 4. exchange 5.
load 6. or 7. store 8. sub 9. xor 63
Atomics 1. wait 2. wake 3. isLockFree 64
var sab = new SharedArrayBuffer(1024); var int32 = new Int32Array(sab);
// первый Worker Atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 // второй Worker console.log(int32[0]); // 0; Atomics.store(int32, 0, 123); Atomics.wake(int32, 0, 1); 01. 02. 03. 04. 05. 06. 07. 08. 09. 65
JS Lock 66
let i32 = new Int32Array(sab) ... lock.lock() i32[1] = i32[2]
+ i32[3]; i32[0] += 1 lock.unlock() 01. 02. 03. 04. 05. 06. 67
Napa JS 68
var napa = require('napajs'); var zone1 = napa.zone.create('zone1', { workers:
4 }); zone1.broadcast('console.log("hello world");'); zone1.execute((text) => text, ['hello napa']) .then((result) => { console.log(result.value); }); 01. 02. 03. 04. 05. 06. 07. 08. 69
Нужна ли многопоточность в JS? 70
Stage 3 71
Dynamic Import 72
import(`./section-modules/${link.dataset.entryModule}.js`) .then(module => { module.loadPageInto(main); }) .catch(err => { main.textContent
= err.message; }); 01. 02. 03. 04. 05. 06. 07. 73
Object Rest/Spread 74
// Rest let { x, y, ...z } = {
x: 1, y: 2, a: 3, b: 4 }; x; // 1 y; // 2 z; // { a: 3, b: 4 } // Spread let n = { x, y, ...z }; n; // { x: 1, y: 2, a: 3, b: 4 } 01. 02. 03. 04. 05. 06. 07. 08. 75
Async Iteration 76
for await (const line of readLines(filePath)) { console.log(line); } 01.
02. 03. 77
async function* readLines(path) { let file = await fileOpen(path); try
{ while (!file.EOF) { yield await file.readLine(); } } finally { await file.close(); } } 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 78
Promise Finally 79
promise.finally(func) promise.then(func, func) 80
Private methods 81
82
Class field declarations 83
84
Optional Catch Binding 85
try { ... } catch { ... } 01. 02.
03. 04. 05. 86
Stage 2 87
Decorators 88
89
Throw Expressions 90
function save(filename = throw new TypeError("error")) { } 01. 02.
91
function getEncoder(encoding) { const encoder = encoding === "utf8" ?
new UTF8Encoder() : encoding === "utf16le" ? new UTF16Encoder(false) : encoding === "utf16be" ? new UTF16Encoder(true) : throw new Error("Unsupported encoding"); } 01. 02. 03. 04. 05. 06. 92
flatMap 93
[0, 1, 2, 3, 4, 5].flatMap(x => [x, x +
1]); // [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6] 01. 02. 94
Stage 1 95
Observable 96
interface Observable { constructor(subscriber : SubscriberFunction); subscribe(observer : Observer) :
Subscription; subscribe(onNext : Function, onError? : Function, onComplete? : Function) : Subscription; } 01. 02. 03. 04. 05. 06. 07. 97
Optional Chaining 98
// old style var street = user.address && user.address.street; //
new style var street = user.address?.street || "Some street"; var input = myForm.querySelector('input[name=foo]')?.value 01. 02. 03. 04. 05. 99
First Class Protocols 100
interface Iterable { [Symbol.iterator]() : Iterator; } interface Iterator {
next() : IteratorResult; } interface IteratorResult { value: any; done: boolean; } 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 101
102
Stage 0 1. Pattern matching 2. Cancellation 3. Additional Meta
Properties 4. Zones 5. Shorthand Improvements 6. Structured Clone 103
Чего не хватает в JavaScript? 104
Twitter Евгений: @bunopus Twitter Владимир: @life__777