Slide 1

Slide 1 text

Bridging the tooling gap with Scala.js

Slide 2

Slide 2 text

me, hi!

Slide 3

Slide 3 text

stuff I do

Slide 4

Slide 4 text

Let's talk about JavaScript

Slide 5

Slide 5 text

'' == false // true [''] == '' // true [[]] == 0 // true typeof document.all // undefined document.all === undefined // false document.all === null // false document.all == null // true Number.MIN_VALUE > 0 // true ['1','2','3'].map(parseInt) // [1, NaN, NaN]

Slide 6

Slide 6 text

Built with JS desktop apps

Slide 7

Slide 7 text

Built with JS mobile apps

Slide 8

Slide 8 text

Built with JS backends

Slide 9

Slide 9 text

Oh, right, and the

Slide 10

Slide 10 text

It matters (like it or not)

Slide 11

Slide 11 text

A story

Slide 12

Slide 12 text

Mythical Trees and where to find them

Slide 13

Slide 13 text

AST Explorer

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

First idea +-------------------------+ +------------------------+ | | | | | | | | | | | | | | source | | | +---------------------------------------> | | | | | | | | | | | | | | | AST EXPLORER | | JVM SERVER | | | | | | | AST | (SCALAMETA) | | | <---------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------------------+ +------------------------+

Slide 16

Slide 16 text

downsides 4 loading time 4 extra infra

Slide 17

Slide 17 text

Write a parser from scratch

Slide 18

Slide 18 text

Scala.js?

Slide 19

Slide 19 text

Scala.js!

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Benefits 4 ! fast 4 ☁ no extra infra demo

Slide 22

Slide 22 text

Fast forward a few weeks

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

First idea +-------------------------+ +------------------------+ | | | | | | | | | | | | | | source | | | +---------------------------------------> | | | | | | | | | | | | | | | VSCODE | | SCALAFMT CLI | | | | | | | formatted source | (JVM) | | | <---------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------------------+ +------------------------+

Slide 25

Slide 25 text

Downsides 4 ! slow (for a single file) 4 " not self-contained

Slide 26

Slide 26 text

Scala.js?

Slide 27

Slide 27 text

Yep

Slide 28

Slide 28 text

Upsides 4 ! fast 4 " self-contained Downsides 4 ! config -> cross-platform HOCON is still meh

Slide 29

Slide 29 text

Free ideas, grab them! 4 scalafmt on astexplorer.net 4 (alternatively) standalone playground on scalafmt.org 4 browser extension that formats code comments 4 scalafmt on scala native 4 GitHub app for scalafmt checks (talk to @laughedelic)

Slide 30

Slide 30 text

Thanks