Skip to content

Instantly share code, notes, and snippets.

@axel22
Forked from lrytz/program.md
Created September 13, 2016 09:34
Show Gist options
  • Save axel22/afa60e41e0fb56681d0714f65ead8b96 to your computer and use it in GitHub Desktop.
Save axel22/afa60e41e0fb56681d0714f65ead8b96 to your computer and use it in GitHub Desktop.

9.00 Day Two Welcome

Auditorium

9.30 Tuesday Keynote

Josh Suereth, Dick Wall, Auditorium

Josh and Dick will take a deep dive into one of Scala's more advanced language constructs: the for expression. In this coding-example-heavy talk we will cover topics like:

  • For, it's not about looping
  • Work on what's inside, ignore what's outside
  • To yield or not to yield, there is no question
  • Don't mix your types
  • Statements in an expression? (and why you might want to)
  • Pattern Matches
  • Guards
  • In-line assignments
  • Fors within fors
  • Using a for with your own types
  • How it all de-sugars

And much more!

This talk aims to have something for everyone. Whether just starting out with Scala or a multi-year Scala veteran, there is likely something you didn't know about for in this talk.

10.30 Break

Exhibition Halls

10.45 Can we make concurrency in Scala safer?

Philipp Haller, Auditorium

Concurrent programming is infamous for its difficulty. Hazards like race conditions manifest themselves as bugs that are often hard to find and fix. This talk presents LaCasa, a minimal Scala extension designed to express concepts such as isolation and access permissions via types. Among others, LaCasa's refinement of Scala's type system enables enforcing the isolation of actors, at compile time. Building on the object capability model, LaCasa also provides strong security properties, enabling applications beyond safe concurrency.

10.45 Free Monads

Paul Szulc, Lecture Theatre

For me, functional programming was never about switching paradigms just to switch. It was always about sanity. Yes, sanity. The ability to finally do real engineering (to some extent). A safe space where you can reason about your code in isolation. Where modularity actually makes sense. Because software engineering is hard - whatever paradigm or approach you are going to choose for your next project, the complexity will not magically disappear. FP allows you to tackle the complexity in a divide-and-conquer manner. I believe that we live in era of "software alchemy" [(c) Martin Thomson], and functional programming is the first real step to bring science and true engineering to our industry.

Free monad is a concept that forges that idea into practical solution. It allows you to reason about your concerns in isolation and combine them together on a higher level. Programs written with Free are very comprehensible and maintainable (once you know how Free works).

11.30 Break

Exhibition Halls

11.45 First-class coroutines for Scala

Aleksandar Prokopec, Auditorium

In today's era of distributed computing, reactivity and asynchronous, event-driven systems, computations must often wait until specific conditions are fulfilled. These conditions range from anything from an arrival of a network request or a keyboard stroke, to an external sensor triggering an event. The ability to suspend computations awaiting such events is more important than ever. Commonly, computations are suspended either by blocking the current execution thread, or by registering callbacks. The former has a negative impact on performance, and is typically shunned upon. The latter, which is an established practice today, comes with its own set of unpleasant syntactic overheads. Previous approaches to reduce these syntactic overheads were too focused at specific use-cases, and were not sufficiently general.

In this talk, I show that it is possible to have the best of both worlds - to write direct-style, seemingly blocking programs, but use callbacks under-the-hood to improve program scalability and throughput. I will present first-class type-safe coroutines implemented in Scala, and show how they are used to implement more specific computation models, such as Async-Await, Erlang-style actors, and Esterel-style pause statements. I continue to show that coroutines are applicable to more easily implementing collection iterators, and allow more concise ScalaCheck-style testing. Finally, I show that Scala coroutines are equivalent to continuations in expressive power.

12.30 Lunch

Exhibition Halls

13.30 (double session) quaich: A “serverless” microframework for event-driven Scala Programming on AWS Lambda

Brendan McAdams, Lecture Theatre

AWS Lambda is an interesting emerging platform for “serverless” programming. Entirely event driven, it provides an easy model to handle both ‘built-in’ Amazon events – such as DynamoDB & S3 Bucket changes, and HTTP calls through services such as Amazon's API Gateway... as well as custom events. Being “serverless”, Lambda allows us to drop in simple JVM code via assembly JAR that responds through an event loop, minimizing execution costs and eliminating the need to setup and maintain dedicated server instances.

quaich (pronounced ‘quake’) is a Scala microframework, inspired by the Python based chalice released by Amazon recently. The concept is simple, single file applications that can receive and handle the JSON events pushed by the Lambda system. Through clever tricks with macros, etc. we provide an easy model for defining your routes files and even parsing custom variables.

13.30 Tales from Compiling to the JVM

Lukas Rytz, Auditorium

Scala 2.12 is around the corner! The main theme in 2.12 is requiring Java 8 and taking advantage of its new features, in particualar new bytecodes.

Changing bytecode generation in the Scala compiler rarely goes without surprises:

  • sometimes the JVM offers almost exactly what we need, but working around the corner cases requires a major effort
  • sometimes we misunderstand the JVM spec (which can go unnoticed for years)
  • sometimes a new bytecode encoding introduces a performance regression
  • finally, a new bytecode encoding can cause unexpected interactions with other language features

In this talk we will look at some of the challenges we faced while working on Scala 2.12, in particular with using default methods for compiling traits and invokedynamic for lambdas. By looking at various low-level details of the JVM bytecode and the classfile format, the talk will give you a good understanding of what changes under the hoods in Scala 2.12.

14.15 Staged Parser Combinators

Manohar Jonnalagedda, Auditorium

In this talk I present parsequery. It uses staging to remove composition overhead at compile time to produce efficient, fast parsers. Its interface is almost similar to Scala's parser combinators.

The main goal of parsequery is to systematically eliminate all intermediate data structures that are creating when running a traditional parser combinator program. Typically, parser combinators interleave static composition of parsers with the dynamic act of parsing itself, at runtime. The key insight is that we can fully decouple the static parts from the dynamic one.

The presentation will go over the theory behind it, and how to leverage Scala macros and quasiquotes to implement this optimisation as a library.

15.00 Break

Exhibition Halls

15.15 (double session) Essential vs. Accidental Complexity in Scala & Dotty: Towards a Puzzler-free Future?

Andrew Phillips, Lecture Theatre

(How) can we construct a programming language that is elegant without being elementary; expressive without becoming exasperating? Scala offers a wide range of features and ideas that can be as puzzling as they are powerful.

We will take a look at these ideas and features and, through the lens of a "cluster analysis" of puzzlers, will try to identify parts of the language that are especially prone to head-scratching behaviour. We will examine which of the clusters are intrinsic and perhaps inevitable given Scala's design goals, and which are accidental and could possibly be avoided in future.

We'll look forward to Dotty and the types of puzzling behaviour it will eliminate, and close with the story of a particularly pernicious "sleeping puzzler giant" that the Dotty team has slain.

15.15 The Story of a Parallel Scala Library

Vlad Ureche, Auditorium

Few people know that miniboxing comes with its own Scala library which has miniboxed arrays, numeric, ordered, tuple and, more interestingly, functions. Without mentioning much, the miniboxing plugin swaps in its optimized library, getting better performance out of your code.

In this talk I'm going to share some insights on this little secret, explaining why we have a parallel library and how it's implemented. You'll learn about Scala arrays, their invariants, program transformations and many interesting insights into diagnosing performance slowdowns. And you'll see an example of miniboxing in action, improving the performance of a complex Scala class hierarchy.

16.00 Managing Your Resources

Denys Shabalin, Auditorium

This talk is going to briefly overview quite a few existing techniques of managing heavyweight resources (e.g. files, network connections etc) in various high-level programming languages such as C++, Rust, Python, Go and even Scala.

All things considered, our experience in Scala Native has shown that resource management in Scala is way harder than it should be. The minimalistic solution to the problem is actually lying right there, in plain sight, and that's what we are going to discuss.

16.45 Break

Exhibition Halls

17.00 Closing panel

Auditorium

18.00 Close

18.30 Bus from Rheged Centre to Penrith

Rheged Centre Car Park

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