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
Design Foundational Data Engineering Observability
sucitw
3
190
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
430
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
3.8k
print("Hello, World")
eddie
2
530
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.7k
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
480
testingを眺める
matumoto
1
140
アセットのコンパイルについて
ojun9
0
120
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
500
🔨 小さなビルドシステムを作る
momeemt
4
670
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
How GitHub (no longer) Works
holman
315
140k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
RailsConf 2023
tenderlove
30
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
What's in a price? How to price your products and services
michaelherold
246
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
Fireside Chat
paigeccino
39
3.6k
For a Future-Friendly Web
brad_frost
180
9.9k
A designer walks into a library…
pauljervisheath
207
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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