~/talk

Scala.js and WebAssembly, a tale of the dangers of the sea

Talkat Scala Days Lausanne 2019 · 2019-06-11..06-13· [webassembly, scala]
slides:none on file

Scala.js IR can be mechanically mapped to WebAssembly (examples: factorial, tail recursion, labeled blocks), and much of the existing toolchain can reuse Scala compiler and SJ IR files — only the final backend must be rewritten to emit wasm. Interop and GC are the blockers: reference types let WebAssembly hold JS objects and Firefox already implements them but GC proposal is early stage, so with reference types code is correct but cannot collect cross-heap cycles and currently none of this fully works yet.

AI-written summary · about

  1. 0:00Intro
  2. 1:32What is WebAssembly
  3. 2:35Why is WebAssembly a language
  4. 4:02JavaScript Interop
  5. 6:25WebAssembly overview
  6. 8:01Linear memory model
  7. 8:32JavaScript functions
  8. 10:28The fun part
  9. 10:39All of ecology
  10. 12:09Scala IR
  11. 13:20Scala WebAssembly
  12. 15:56Tail recursive factorial
  13. 17:06Local variables
  14. 19:38Control flow
  15. 20:13Linear Memory
  16. 21:21Virtual Dispatch
  17. 21:45Interpreter Interoperability
  18. 24:19Are we stuck
  19. 26:17Reference types
  20. 26:29Reference types proposal
  21. 28:04hello methods
  22. 28:23decompose
  23. 30:40lambda
  24. 31:46any ref
  25. 32:41call function
  26. 33:13schematic
  27. 35:04cycles
  28. 36:02another proposal
  29. 36:20new types
  30. 37:05class points
  31. 39:41captures
  32. 40:30when
  33. 41:44Questions
  34. 42:02Another path
  35. 44:20Is it worth the change
  36. 45:03Performance
  37. 47:43GBM in WebAssembly
  38. 49:01Effects in Scala
  39. 49:49Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.