~/talk

Lumen - Bringing the BEAM to WebAssembly and Beyond

Talkat Code Mesh LDN 2019 · 2019-11-07..11-08· [elixir-and-erlang, webassembly]
slides:none on file

A new ahead-of-time compiler and runtime to run Erlang/Elixir on WebAssembly and x86_64 produces native objects via Rust + LLVM + wasm-bindgen, removes hot code loading so it can do dead-code elimination, and implements a continuation-based scheduler to preserve tail calls and cooperative scheduling inside wasm’s restrictions. A browser interpreter is already runnable for testing, the codegen backend is nearly finished, and the pipeline uses a Thorin-based IR with LLVM backend to generate wasm or native executables.

AI-written summary · about

  1. 0:00Intro
  2. 1:01A new compiler/runtime for Erlang/Elixir Brings these languages to WebAssembly, with support for other targets as well Provides a path for building things in these languages that are not necessarily well supported by the BEAM
  3. 3:10Client-side ecosystem is in constant flux Why split investment and expertise across two ecosystems when one will do?
  4. 5:44Better cross-pollination Take advantage of the powerful tools provided by Erlang/OTP on both server and client Actors are an excellent pattern for building Uls
  5. 9:25An instruction set + binary and textual formats Designed for a stack-based virtual machine Portable, embeddable Memory-safe, sandboxed
  6. 11:18Harvard Architecture (separate code/data) Structured control flow vs arbitrary CFG Only permits passing integers to/from JS
  7. 13:19Code Size Load Time Concurrency Model
  8. 16:30Code Size Performance
  9. 19:04Shipping BEAM bytecode is expensive Weak dead-code elimination
  10. 21:46Impose some restrictions Ahead-of-Time vs VM Take advantage of existing tools
  11. 23:00Only pay for what you use No interpretation overhead Enables a wide variety of optimizations Including target specific optimizations
  12. 26:36Non-local returns/exceptions Green threads/preemptive scheduling WebAssembly-specific limitations
  13. 29:09Abstract machine is stack-based Requires structured control flow No direct access to the stack
  14. 31:17BEST SOLUTION? CONTINUATIONS!
  15. 31:33All continuations are in tail position Continuations never return Can represent all control flow constructs
  16. 39:32There is an interpreter that can be used for experimentation Codegen backend is basically complete Next release is waiting on a few PRs
  17. 40:48Better type information Auto-generated JS/DOM bindings In-browser debugging Support for a wider array of targets
~/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.