Skip to content

Instantly share code, notes, and snippets.

@sjrd
Created January 22, 2016 14:53
Show Gist options
  • Save sjrd/3dc768374e10e7a0d30b to your computer and use it in GitHub Desktop.
Save sjrd/3dc768374e10e7a0d30b to your computer and use it in GitHub Desktop.
ScalaDays 2016 Proposals

Have you ever dreamed of understanding how Scala.js works under the covers? Knowing your way around its codebase? This is your chance! This advanced talk will take you to the deepest parts of Scala.js: its compiler, its Intermediate Representation, its linker and its optimizer.

Through live coding within the Scala.js codebase, we will explain how the Scala.js compilation pipeline works, and how you can modify it. After this talk, you will understand the Scala.js IR and be able to manipulate it. And you'll be ready to write your custom Linker Plugins!

Attendees are expected to be proficient in Scala and have some compiler background (e.g., knowing what an AST is is vital).

One of the strengths of Scala.js is its run-time performance. Compiled Scala.js programs typically run on par with equivalent, hand-written JavaScript code. To achieve this, Scala.js features an advanced optimizer.

In this talk, we will explore some typical Scala.js code snippets, and see what the optimizer makes of them. In the process, we will give insights about the code patterns that it can optimize away, as well as things it cannot (yet) eliminate. Attendees will take away keys to write efficient Scala.js code. In particular, we will see that idiomatic Scala code is not to be feared (e.g., for loops, or maps/filters).

Attendees are expected to be familiar with Scala (not necessarily Scala.js) and to be able to read JavaScript. No compiler knowledge is required; we will stay at the source code level, showing what the optimizer does without explaining how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment