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
870
Jose M. Perez
frontfest
0
750
Алексей Иванов
frontfest
0
1.4k
Екатерина Пригара
frontfest
0
660
Léonie Watson
frontfest
0
750
Кирилл Чернышев
frontfest
0
750
Виктор Грищенко
frontfest
0
650
Игорь Алексеенко
frontfest
0
490
Other Decks in Programming
See All in Programming
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
560
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
800
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
960
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
120
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
VS Code Update for GitHub Copilot
74th
1
170
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
770
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
400
エンジニア向け採用ピッチ資料
inusan
0
150
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
330
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
300
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
39
1.9k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Agile that works and the tools we love
rasmusluckow
329
21k
Optimizing for Happiness
mojombo
379
70k
Why Our Code Smells
bkeepers
PRO
337
57k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
920
GitHub's CSS Performance
jonrohan
1031
460k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
For a Future-Friendly Web
brad_frost
179
9.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Embracing the Ebb and Flow
colly
86
4.7k
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