Skip to content

Instantly share code, notes, and snippets.

@lihaoyi
Last active January 23, 2016 07:11
Show Gist options
  • Save lihaoyi/77437157eabf0f4851a9 to your computer and use it in GitHub Desktop.
Save lihaoyi/77437157eabf0f4851a9 to your computer and use it in GitHub Desktop.

Title of your talk *

Short description of your talk submission

Advanced Object Oriented Programming in Scala

Abstract *

Submit your abstract proposal, please keep the description under 1000 words

People often associate "Advanced" Scala with pure, monadic functional programming, and "Object Oriented" Scala with newbies fresh from a Java background. In doing so, they're missing out on half of what Scala, a hybrid language, has to offer!

This talk will introduce object-oriented techniques far beyond what you've seen in Java land. We will explore patterns such as:

  • Objects as Modules
  • Deep Interfaces
  • Objects as Dependency Injection

We'll see how these techniques are useful in real-world code bases, such as the Scalatags templating language or the Ammonite REPL. This will give you more tools in the toolbox you use to refactor and improve your Scala code!

Title of your talk *

Short description of your talk submission

Excel-like Web Programming with Scala.js

Abstract *

Submit your abstract proposal, please keep the description under 1000 words

This talk will introduce the use of Functional-Reactive Programming as a way of building interactive websites. I will show how old concepts, previously relegated to obscure papers and academia, can be combined with the Scala.js platform to make building interactive websites as easy as writing Excel spreadsheets!

Keeping state in "sync" is a long-standing problem working with mutable systems; nonetheless, it is often a necessary evil. "Re-compute the world", a strategy common in functional programming, does not work when the world is large and expensive to re-compute. Manually computing intermediate values, caching them, and making sure to update them, is necessary but error prone.

Luckily, there are systems that allow for automatic change-propagation, letting you trivially keep your data in sync without needlessly re-computing it! The most common is the Excel spreadsheet software, and more recently in the web-dev world we've seen the Elm programming language that promises a similar experience. In this talk, I'll show how a single library is enough to provide this spreadsheet-like experience in the Scala language, and how the Scala.js lets you share the programs you write in this style with the whole world!

Title of your talk *

Short description of your talk submission

A Foundation for Objective Scala Style

Abstract *

Submit your abstract proposal, please keep the description under 1000 words

This talk will attempt to lay out an objective foundation for what constitutes "Good Scala Style". We will look not at niggling details like whitespace or identation, but at deeper decisions:

  • Perhaps I could use an implicit parameter or conversion, but should I?
  • Should this (for various values of "this") be a class or a function?
  • Should my data live in built-in data-types, case classes, or classes?
  • How do I inject dependencies? Method-args, constructors, implicits, threadlocals?
  • Should I give my identifiers long names? Short names? Operator names?

These guidelines will be backed by a theoretical model, as well as numerous concrete examples we will discuss and code-review live. We will do head-to-head comparisons of similar-but-different examples, to try and tease out the essence of what makes a stylistic decision good, bad or ugly.

Hopefully this will give a solid basis for these guidelines, beyond the common "I prefer you prefer" conversation. If you've ever complained that Scala provides "many ways to do things", or "more than enough rope to hang yourself", this is the talk for you!

Title of your talk *

Short description of your talk submission

Scripting Scala One-Liners

Abstract *

Submit your abstract proposal, please keep the description under 1000 words

People talking about Scala often talk about how "big" they are: Big Data, Big Systems, Big this or that. This talk will cover the opposite: using Scala to run ad-hoc scripts, computations and commands, in a single line of code.

Sometimes it isn't worth trying to be "reactive" or "scalable" or "functional". Sometimes, it isn't even worth setting up a "project": sometimes you just want to do something and get on with your life. It turns out that the Scala language actually lets you do that quite well!

This talk will introduce the power of the Scala one-liner: parsing JSON, grepping through unstructured text, hitting HTTP endpoints, or spawning sub-processes. Scala can do it all, in a single line, often just as easily as using Python or Bash. And when your requirements grow, as they always do, your Scala script is ready to grow into a robust, maintainable part of your code base!

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