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
830
Владимир Дашукевич (Квартирник)
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
640
Léonie Watson
frontfest
0
750
Кирилл Чернышев
frontfest
0
740
Виктор Грищенко
frontfest
0
640
Игорь Алексеенко
frontfest
0
490
Other Decks in Programming
See All in Programming
Rubyと自由とAIと
yotii23
6
1.9k
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
520
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
130
TCAを用いたAmebaのリアーキテクチャ
dazy
0
250
iOSでQRコード生成奮闘記
ktcryomm
2
150
はじめての Go * WASM * OCR
sgash708
1
130
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
200
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
160
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
160
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
290
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
280
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
150
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Unsuck your backbone
ammeep
669
57k
GraphQLとの向き合い方2022年版
quramy
44
14k
Rails Girls Zürich Keynote
gr2m
94
13k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Visualization
eitanlees
146
15k
Writing Fast Ruby
sferik
628
61k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Fireside Chat
paigeccino
36
3.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Optimizing for Happiness
mojombo
377
70k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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