Haoyi's Programming Blog

Table of Contents

Talks I've Given

Posted 2016-02-14
Strategic Scala Style: Principle of Least PowerStrategic Scala Style: Conciseness & Names

I've given a bunch of talks at meetup groups, industry conferences and academic workshops. Most of them are about my work in the Scala programming language. The actual recordings for these are slightly scattered, over a mix of Youtube videos, Vimeo, and some conference sites.

Here's a consolidated list of their abstracts and videos, most recent first. I'll keep this updated as time goes on.

About the Author: Haoyi is a software engineer, and the author of many open-source Scala tools such as the Ammonite REPL and the Mill Build Tool. If you enjoyed the contents on this blog, you may also enjoy Haoyi's book Hands-on Scala Programming

A Deep Dive into the Mill Scala Build Tool

Mill is a Scala build tool that offers an alternative to the venerable SBT toolchain. This talk will explore how Mill combines the power of functional programming, together with the flexibility of the Scala language, and decades of best practices taken from established build tool ecosystems like SBT and Bazel. We will see how this unique combination results is a Scala build tool that is faster, easier to use, and overall far more intuitive than SBT or any other build tool on the market.

The com.lihaoyi Ecosystem Executable Scala Pseudocode that’s Easy, Boring and Fast!

This talk will cover:

Scala at Scale at Databricks

With hundreds of developers and millions of lines of code, Databricks is one of the larger Scala shops around. This talk will cover everything about Scala at Databricks: from its inception, to usage, style, tooling, and the problems we face. We will cover topics ranging from cloud infrastructure, to bespoke language tooling, to the human processes around managing our large Scala codebase. From this talk, you'll learn about everything big and small that goes into making Scala at Databricks work, a useful case study for anyone supporting the use of Scala in a growing organization.

Getting Work Done in the Scala REPL

The Scala REPL lets you interactively run Scala code snippets and see the results. This talk will explore how far you can stretch the Scala REPL, performing difficult tasks that you may normally associate with larger efforts. Through these exercises, we will see how useful work you accomplish with a tiny amount of Scala code.

Mill: A Build Tool based on Pure Functional Programming

Build systems are often messy programs: full of weird frameworks and unrestricted side effects. This talk will show how the underlying structure of a build actually looks much more like a pure functional program, and how Mill uses this fact to provide a uniquely simple & principled build experience.

Speedy Scala Builds at Databricks

Building Scala code in general can be really slow. To speed this up, Databricks' Developer Tools team has taken on a variety of projects to attack the problem from different angles - from JVM tuning to cloud infrastructure - resulting in build times that are significantly less infuriating. This talk will walk you through the details of each project, and attach concrete numbers to exactly how much of a difference each one made in this year-long effort.

How An Optimizing Compiler Works

Optimizing compilers are a mainstay of modern software: allowing a programmer to write code in a language that makes sense to them, while also running it in a form that makes sense to the underlying hardware to run effectively. Even interpreted languages are no escape, as in all cases the interpreter itself is written in a compiled language with an optimizing compiler.

This talk will walk through two of the core concepts within an optimizing compiler: how a program can be represented, and how facts about a program can be inferred. These two facets should give you a good intuition for how optimizing compilers reason about and understand your programs in order to perform their optimizations.

Four Facets of Good Open-Source Libraries

Creating a popular open-source library such as Ammonite, FastParse, or Scalatags is a lot more than just writing Scala code. This talk will explore both the code and non-code aspects of building such a library: designing the public API, the role of tests/documentation, and how to think about the three tensions of consistency, transparency, and intuitiveness that often pull your API design in different directions. From this talk you will hopefully learn everything about designing a library apart from writing code.

Anatomy of a Full-Stack Scala/Scala.js Web Application

This talk will explore the inner workings of a real-world, moderately-sized "Isomorphic" Scala/Scala.js web app: running Scala on the server and Scala.js in the browser.

In this talk, you will see how the Scala.js developer experience changes as an application grows, how a non-trivial Scala/Scala.js application can be structured, and how the "Isomorphic" property of the Scala/Scala.js stack affects how you write code in reality. By the end you should have seen enough to form an impression of how a real-world Scala/Scala.js application ends up looking in-the-wild, compared to what a more traditional Javascript-based web app may look like.

Taming the Java Virtual Machine

This talk will explore the hidden dynamics of the Java Virtual Machine. We will explore the world of memory layouts, garbage collection, JIT compilation, walking through the behavior of many real-world code examples. By the end of this talk, you should be much more familiar with the inner workings of the JVM that many of us take for granted, and hopefully will be better prepared to respond next time your Java application goes bump in the night.

Intro to Scala.js

A short introduction to the Scala.js Scala to Javascript compiler.

Scala Scripting

This talk will demonstrate a new script-file format for writing your Scala code.

Unlike traditional Scala projects, which are built with SBT or Maven or Ant and edited inside your IDE, Scala Scripts do not need a "project" or "build tool" in order to run. You simply write your code in a single file, and run it. Need code in another script? Simply import it. Need a third-party library? You can import it too.

This greatly reduces the barrier to entry of getting started writing Scala code, and allows Scala to be used for common housekeeping work at the command-line, much like Python or Ruby is used today. I will demonstrate this Scala Scripting file format, explain how it works, and what place it could find in the Scala ecosystem today.

Client-side web dev without Javascript, with Scala.js

ForwardJS Summit 10 Feb 2016

Functional programming is all the rage now: promising concise, simple code with fewer bugs. Isomorphic web development, on the other hand, has a different set of promises: letting you share logic between client and server without duplication of code, ensurign that they will always stay in sync.

Scala.js is a new take on these ideas: rather than bringing your front-end code to the server, we bring your back-end code to the browser! In this talk, I'll demonstrate how to get started with Scala.js to build client-side web applications. We'll see how Scala.js gives you functional programming and isomorphic web development almost for free, and brings with it additional bonuses like tooling and safety far beyond anything available in Javascript land.

Shell-scripting in a Typed, OO Language

New Object Oriented Languages, SPLASH 28 Oct 2015

Talk given 27 October 2015 at the Zeroth Workshop for New Object Oriented Languages.

What if instead of Bash, you could use a real, modern programming language to use as your systems shell? I'll spend 30 minutes talking about why people use Bash over other contemporary languages, how the Ammonite Scala REPL plays catch-up, and highlight various ways in which the experience benefits from using a statically-typed, object-oriented language running on the JVM.

Fast, Modern, OO Parser Combinators

Parsing@SLE, SPLASH 24 Oct 2015

A quick, 30 minute overview of the features and usage of the FastParse parser combinator library lihaoyi.github.io/fastparse, allowing you to quickly write high-performance, debuggable, fail-friendly parsers

FastParse: Fast, Modern Parser Combinators

SF Scala Meetup 13 Oct 2015

Parsing text is typically difficult. As a programmer you have tools ranging from String#split (convenient and fast but inflexible) to Lex/Yacc/Antlr (fast and flexible but inconvenient) and parser combinators (convenient, flexible but very slow!)

This talk introduces FastParse, a parser-combinator library for the Scala programming language, that aims to find a middle ground between all these alternatives. Convenient, flexible and fast, I'll show how code using FastParse looks almost the same as code using the in-built parser-combinators, but comes with an 85x (8500%!) speedup at run-time. I'll talk about how FastParse provides unprecedentedly good, structured error reporting for you to use to debug your parser (or help your users debug their input) and finish off with some demo live-coding of a language of the audience's choice.

Beyond Bash

Scala by the Bay 12 Aug 2015

The Scala REPL has been often touted as an advantage for the language: an interactive, exploratory experience very different from the static, often-IDE-based experience that for many is the bulk of their experience using Scala. Nevertheless, in comparison, the Scala REPL really sucks: buggy & unfriendly, it is not a place you want to spend most of your time.

What if the Scala REPL had the same autocomplete as you'd get in Eclipse or IntelliJ? What if it had syntax-highlighting for everything? What if you could load libraries like Shapeless or Akka-HTTP to try out, without needing to muck with SBT? What if your Scala REPL was as versatile, usable and configurable as Bash or Zsh, and could be used as your home on the command line?

Why (You might like) Scala.js

Scaladays SF 17 Mar 2015

Scala.js compiles Scala to Javascript. Why should you, as an individual, care? This talk discusses the things you can get out of Scala.js, starting from three main archetypes: Scala web developer, Scala non-web developer, and compiler-writer.

Scala.js - Safety & Sanity in the wild west of the web

PhillyETE 8 Mar 2015

Developing for the web platform has historically been a slow, painful, fragile experience. You write code in multiple different languages, work with undocumented APIs, and are forced to implement things twice to have them work on both client and server. Lastly, you had better be the meticulous sort, because a single typo will bring down your site: at runtime, in production!

Scala.js is an attempt to fix this problem. Like other compile-to-JS languages, it provides a concise, expressive language to do your work. Unlike others, it also promises seamless interop with Javascript, a ready-to-go ecosystem, tool support, and a smooth development experience. Above all, Scala.js provides Safety: an extreme level of safety that goes far beyond any competitor. Not only is your Scala.js code checked, but any use of Javascript APIs is also checked, and so are your Ajax calls between client and server!

Bootstrapping the Scala.js Ecosystem

Scala Exchange 7 Dec 2014

What does it take to go from a working compiler to a workable, productive platform? This presentation explores the range of libraries that needed to be built in order to turn Scala.js from a prototype to a product

Hands-On Scala.js

Pacific-North-West Scala 14 Nov 2014

A talk I gave at pnwscala.org/2014. This is a hands-on tutorial that goes through what it's like getting started with Scala.js, introducing the project and walking through the experience of how to do common things on the Scala.js platform.

Cross-platform development with Scala.js

Scala by the Bay 9 Aug 2014

This talk will explore the developer experience of using ScalaJS, from the boring-but-important cross-JVM/JS libraries, to pure-Scala client-server web applications, to whiz-bang ScalaJS games and animations. As the person who has written more ScalaJS code than anyone on the planet (!) I will go through the ups and downs of ScalaJS development, and demonstrate why you may want to try it out for your next round of web development.

Fun Functional-Reactive Programming with Scala.Rx

Scaladays 17 Jun 2014

Scala.Rx is a change propagation library for Scala, that provides reactive values that save you the hassle of having to keep mutable variables in sync manually. This goes into the motivation behind the library, shows off some cool demos, and hopefully persuades you that Scala.Rx is a useful tool in managing messy, stateful applications.

Live-Coding Scala.js

SF Scala Meetup 28 Feb 2014

Scala like you've never seen it before! Live reloading, in the browser, on the canvas, with the DOM.

Metascala: a tiny DIY JVM

Scala Exchange 2 Dec 2013

Metascala is a tiny metacircular Java Virtual Machine (JVM) written in the Scala programming language. Metascala is barely 3000 lines of Scala, and is complete enough that it is able to interpret itself metacircularly. Being written in Scala and compiled to Java bytecode, the Metascala JVM requires a host JVM in order to run.

The goal of Metascala is to create a platform to experiment with the JVM: a 3000 line JVM written in Scala is probably much more approachable than the 1,000,000 lines of C/C++ which make up HotSpot, the standard implementation, and more amenable to implementing fun features like continuations, isolates or value classes. The 3000 lines of code gives you:

About the Author: Haoyi is a software engineer, and the author of many open-source Scala tools such as the Ammonite REPL and the Mill Build Tool. If you enjoyed the contents on this blog, you may also enjoy Haoyi's book Hands-on Scala Programming

Strategic Scala Style: Principle of Least PowerStrategic Scala Style: Conciseness & Names

Updated 2024-02-19 2017-04-29 2017-04-29 2017-03-29 2017-03-29 2016-12-09 2016-03-04 2016-02-14 2016-02-14 2016-02-14