This year's symposium features talks from members of the Scala community. Below is a list of this years talk proposals.
One of the most advanced programming languages of today has surely outgrown the gotchas, puzzlers and head-scratchers of the past. Really? Prepare to be surprised, entertained and...well, puzzled! We'll present a selection of seemingly simple examples which demonstrate that there's plenty of head-scratching left in Scala! Let your mind be challenged by unexpected and unintuitive behaviour and results and learn something about your favourite language in the process. And unlike in a real magic show, we'll even be giving away the solutions ;-) Co-presented with Nermin Serifovic
Scala's type system enforces code hygiene in Scala code. But the most common Scala build tools (SBT and Maven) do not enforce dependency hygiene during builds. Loose package hygiene in the build process results in unintended dependency cycles and slower, more error-prone builds. This talk will present a new build tool called pants (part of the twitter-commons library), which is our primary build system at Foursquare. Pants requires explicit declaration of inter-module dependencies, and uses a bottom-up build process to enforce those dependencies without sacrificing compilation speed.
As Scala developers we all know that the major performance wins come from choosing appropriate algorithms, taking advantage of parallelism, and using laziness to avoid doing more work than necessary. But sometimes it takes a bit more than that. This talk deals with the dark side of optimizing Scala code. Arrays. Specialization successes (and failures). Boxing and GC pressure. Hotspot voodoo. Inlining limitations. Reading Java Bytecode. Profiling and benchmarking.
Ever wanted to start using SBT, but couldn't get past the initial simple build? Not sure whether to use build.sbt or build.scala? Why won't my plugins resolve? This talk covers the best practices of using SBT, from multiple projects to remaining the console and providing your own interactive tasks. Examples are taken from many real world build files.
The actor model has been established as an important tool for dealing with concurrency, parallelism and distribution, but it has one feature which seems at odds with Scala’s statically typed setting: the fundamental communication mechanism is dynamically typed. This talk presents typed channels implemented as an Akka extension. The main focus will be on how types, macros and runtime compilation have been applied to sort actor messages into type-safe channels.
shapeless makes extensive use of Scala's implicit resolution mechanisms to compute types at compile time which guide runtime behaviour and statically witness properties of values and types. This works out very well for the most part, but it sometimes results in explosions in compile times: it's a marvel that implicit resolution can be repurposed as a form of theorem proving, and hardly surprising if it doesn't do it particularly efficiently. In this talk I will show how implicit macros can short-circuit type-level computation and make the techniques used by shapeless even more attractive.
With Higher Order Functions, Enriched Classes, Parser Combinators, and more, see how to turn a downright awful Java API into something dramatically more powerful, safe, expressive and downright fun to use. This talk shows off the Scala 2.10 version of a Minecraft server plugin API. It will be accessible to Java programmers interested in Scala, yet substantial enough for Scala veterans.
Every now and then you come across a technique that is so general that it becomes a hammer for which every problem looks like a nail. In Scala, Free Monads are such a hammer. We talk about what Free Monads are, why they matter, and how nearly any programming problem can be tailored to fit this solution. The reason is that Free Monads allow us to embed in Scala simple programming languages of our own design. In this talk, we embed a stack-based language as a Free Monad in Scala. And we demonstrate the usefulness of duality by writing the language's interpreter as a Cofree Comonad.
The standard request/response architecture is so 2008. Lets write code for our current needs. The concept of Concurrency and Asynchronous events allows you to improve request times, by removing the standard "blocking" actions that are performed on DB resources and execution threads. Using Scala and the Play! Framework( v2), we can architect a system that can perform massive computations, very fast, with less blocking of resources. I will review these concepts in code, and see how much improvement can be achieved.
GeoTrellis is a library for analyzing geographic data (https://github.com/azavea/geotrellis) that was written in Scala and relies on Akka. Part of this talk will be a crash course in geographic data analysis and how you can use GeoTrellis to produce beautiful, informative web maps and applications. The other part will be a brief case study, exploring why Scala's object-functional approach so well suited for this domain and some of the patterns we use for creating DSL-y APIs.
It's nice to split projects into libraries. It's less nice to have to do a local publish just to test changes to those libraries in a larger project. I present a simple sbt plugin that lets you split your project into separately maintained libraries, while keeping the convenience of developing in a single sbt process.
sbt's incremental compilation component forms the basis for the zinc frontend and has been integrated into Gradle and the Maven plugin. It tries to minimize the sources recompiled without sacrificing too much accuracy. This talk presents difficulties of doing so, a brief history of approached tried, and an explanation of the current approach. Although there are fundamental limits to working at the source file level and outside of the compiler, there is still room for improvement. Along the way, some tips on working within the limitations of this scheme will be presented.
Oh... the dream... One language for the whole web stack. Node.js got there by allowing you to write your backend code in Javascript. Others have too by using niche languages. But we can do better. Much better. We can write our front-end code in Scala. And get great performance and full-featured libraries while we are at it.
The Cake Pattern is often explained as a way of doing dependency injection in Scala in a statically typed framework. This is analogous to describing functional programming as a tool for manipulating List-like data structures. The pattern is capable of so much more. This talk will explore the Cake Pattern, from the very basics to its deepest recesses. We will look at the theoretical foundations of this pattern in type theory, the numerous and flaming pitfalls it imposes, as well as some best practices and day-to-day useful tips.
In this talk, John A. De Goes, CTO of Precog, presents the high-level architecture of PrecogDB, a data science platform written in 100% Scala that provides a robust implementation of the data analysis language Quirrel on top of a proprietary data store. John discusses the challenges the team has had building systems-level code in the presence of megamorphic functions, monadic recursion, boxing, and monad transformers, while also highlighting some of the strengths of Scala and the bright hope of inlining, TCO, specialization, and macros.
Scala keeps Java's dependency management, with metadata fetched on demand from central repositories. This makes it difficult to mirror, publish releases, reliably cache, and efficiently build. The metadata is limited, with no compatibility data. The lack of this data led to the cross-versioning hack now used to publish for multiple Scala versions. This talk describes current limitations, some improvements, and tips. It proposes a future system addressing compatibility, builds on distributed version control of metadata, and has a mechanism for working with the existing standard.
Asynchronous programming is the latest hype for web development. While Asynchronous programming can help improve total throughput on a multi-core machine, the current state of the art lacks common patterns for how to define asynchronous flow. This talk covers those patterns, from joining together a series of asynchronous operations to chaining a pipeline of asynchronous tasks. We’ll present a few core abstractions (applicative functors, monads, traversal) that help define asynchronous workflow and then use these same abstractions to test the same flows synchronously.
In 1970, the British Empire lay in ruins, and foreign nationalists frequented the streets - many of them Hungarians (not the streets - the foreign nationals). Anyway, many of these Hungarians went into tobacconist's shops to buy cigarettes....
Typical discussions about monads focus on specific data structures like the Option or State monads. However, where our code gets really interesting is when we begin abstracting over these types allowing it to be evaluated strictly and sequentially, lazily and sequentially, or strictly and asynchronously simply based on the monadic context we choose to perform our operations in. We will look at building a small client library for the Riak database that leverages this idea, scalaz7 and monad transformers to get the job done.
If you want to query entity-oriented data (people, places, and things), you have SQL. If you want to query graph-oriented data (networks), you have Datalog. But what if you want to query event-oriented data? For that, the Precog team has developed the Quirrel language, an open standard for data analysis, which makes it easy to analyze event-oriented data (analytics, statistics, and machine learning). In this talk, John A. De Goes and Daniel Spiewak, inventors of the Quirrel language, show you what this language is all about and how it's different than anything else you've seen before.
At Tumblr, we have adopted Scala as our backend language of choice and found it to be an excellent fit due to the expressiveness of the language and the runtime performance on the JVM. Although Scala is often cited as being an excellent target platform for highly concurrent applications, in practice it can be easy to shoot yourself in the foot. In this talk I will review code found in the wild here at Tumblr and discuss the implications in a server context. We'll also look at some graphs. This talk will be most interesting to engineers responsible for building backend service applications.
The macro support in Scala 2.10 allows sbt 0.13 to have a direct syntax for defining tasks and settings. It also makes the task system more flexible, while improving error messages. Behind the new syntax is a set of macros that supports arbitrary applicative functors and monads as well as allowing different tuple representations. This talk presents the new task syntax, the macros implementing it, and general techniques for using macros like stub method rewriting.
"Finagle is a network stack for the JVM that you can use to build asynchronous Remote Procedure Call (RPC) clients and servers in Java, Scala, or any JVM-hosted language. Finagle provides a rich set of protocol-independent tools." It's node.js for Scala, deployed on one of the most heavily trafficked sites on the web, Twitter. In this talk, we'll review the concepts of Finagle in code and see just how simple it is to create robust asynchronous apps.
100% live coding session where we’ll go into three highly interesting examples of modern distributed programming using Scala and GridGain to highlight how distributed Scala programming can be simple, productive and fun... We’ll live code the following applications: - Calculating Pi on the grid. This shows typical MPP processing. - PingPong on the grid. We’ll show MPI-like style distribution in this almost “magical” example. - Data affinity on the grid. We’ll show data and compute affinity.
The new, reorganized version 7 of Scalaz has been under development for quite a while now. However, we are slowly converging against a release. In this talk I'll give a brief overview about the library and new things which improve its usability by far: à-la-carte implicits, helping type constructor inference, automated checking of type class instances, typelevel programming and more.
When we write a script that shuffles text files on a Unix system and dumps the results to the output stream, is that mathematics? Are login forms secretly modeled in terms of Category Theory? What is the significance of the word "Chauvet"? We write programs in a real world with real constraints. We deal with messy problems and conflicting requirements. This talk explores how *everything* we do in the realm of programming, from the prosaic to the imaginative, comes back to mathematics despite all of the "real world" intrusions.
How do you count the number of distinct values when there's too many to fit in a Set? How do you find the most frequent items when you don't have space for a Map[T,Int]? When dealing with very large or streaming datasets, it's common to use probabilistic algorithms like bloom filters, hyperloglog counters, or count min sketches. In Scala, it's nice to model these as approximate versions of normal collection classes like Set and Map. I'll discuss some work we're doing on this in the context of the Algebird project started at Twitter.
This talk will focus on how to achieve simplicity in Scala library, DSL, and application design. It will highlight general principles that can be applied to any programming language, and show specific techniques that can be used in Scala to "implement" the general principles. This talk will give you a set of concrete guidelines that can help you manage complexity in your Scala projects.
(Joint talk with Paul Chiusano) If we want to work with I/O streams, our usual choices are to either resort to side-effects or use complicated composable structures like "iteratees" that interleave monadic effects. In this talk, we walk through the design of a simple but powerful purely functional streaming I/O library, using concrete real-world examples to motivate its development. This is a tutorial-style talk and (hopefully) beginner-friendly.
More of a suggestion for a Day 2 workshop than a talk, but I think it'd be fun to get people started with Scalatron. We could host a game server during the day and people could upload their bots.
(Joint talk with Paul Chiusano) Stream processing, and especially distributed processing, is one of those problems in FP that is crying out for a simple and usable solution. Iteratees are too complicated (and so last year), and IO monads and Actors just get in the way since I/O and message passing are rather not the point. This is an advanced talk on the design space for modular, compositional stream processors, and we take a stab at creating a library for declarative stream processing that is both powerful and comprehensible.
This talk covers what's on the horizon for Scala through the lens of what's happened so far. We'll cover the features new in 2.10 and how this feeds into the work being done for the 2.11 release. In particular, we'll cover the general themes of: * Faster runtime * Faster compile times * Cleaner syntax in relation to features like: Value classes or Type Macros and experiments like a new specialization strategy or compiler backend cleanups. If you're interested in getting involved with Scala's development process, come hear where we're going.
Functional programming has a rich history of drawing from mathematical theory, yet in this talk, we make the case that programming is distinct from mathematics. This distinction is healthy and does not mean we can't leverage many results and concepts from mathematics. As examples we'll discuss some recent work: github.com/twitter/{algebird,bijection,scalding} and show cases where mathematical purity were both helpful and harmful to developing products at Twitter.
As pointed out by Paul Snively, programming is interpretive dance. I've also independently stumbled upon this interesting isomorphism since working for Precog. This talk will cover a dance interpreter written in Scala which will then be used to show the Curry-Howard correspondence. Dancing, programming and mathematical logic. It's all the same.
At Bridgewater (an investment management firm), we've started using Scala for modeling and analytics, and found it hard to do rich data exploration like you can do in MATLAB. So, we built and are open sourcing Scala Notebook - an interactive Web-based Scala evaluator. Based on iPython Notebook, it lets you evaluate Scala expressions as with a REPL, but also supports rich HTML, graphics and persistent documents. It even offers two-way interactivity by connecting an FRP to Knockout JS. We'll demo the product, talk a bit about how it's built and how we're planning to evolve it on github.
Scala has a feature called specialization that allows one to write generic code without paying boxing penalty. Current scheme implemented in Scala compiler relies on generating a ton of repeated, almost identical byte code. The talk is about a new proposal for specialization that relies on MethodHandles, a new, shiny tool brought in Java 7. I'll go through examples that show the difference between the two schemes and explain the advantages of the new scheme. There're plenty of them! We'll skim over hastily why this could become one of the most exciting features in Scala 2.11.
As functional programmers, many of us have made use of monoids and semigroups. However, abstract algebra is a rich field that provides many more useful abstractions. This talk will introduce some of these algebraic structures, starting with monoids, but also discussing groups, rings, fields, vector spaces and commutativity. This talk will show why these abstractions are important, how we can model these in Scala, and how they can be of benefit in everyday programming.
With 2.10.0 finally released (!!!) many developers are poised to be able to take advantage of macros, value classes, interpolation, and many other exciting additions to the language. Spire 0.3.0 makes full use of these features, supporting many new number types (natural, rational, real, complex, unsigned, intervals) as well as algebraic type classes from abstract algebra, improved libraries, and more. This talk will show how to integrate Spire into Scala projects, give an overview of some basic use cases of Spire, and talk about the library's design and features.
Can Scala compete with Python for numerical computing and data analysis? For a time, I was a lead contributor to pandas, a data manipulation toolkit built on Numpy. Missing its functionality in Scala, I built Saddle, a library of array-backed, indexed, 1D and 2D data structures and functions which provides functionality similar to, performance on par with, pandas and numpy. This talk will dive into Saddle's data structures and algorithms, the optimization techniques involved such as specialization, and how the library asserts correctness via specs and scalacheck.