Scala Italy 2018

At the end of September, my employer sent me to the awesome city of Florence to attend the Scala Italy conference. Thanks to this patronage, this is the third year I’m able to be at the conference of the Italian Scala Community.

For the first time this year, the conference lasted two days with two distinct tracks – talks and workshops. The choice of one working and one non-working day can be a bit odd and likely a symptom of some ambivalence about the target audience. To keep the conference for Scala enthusiasts attending in their spare time or to move it to the professional realm, that’s the question. Given that the ticket price wasn’t very light on pockets, maybe half of the decision has already been made.

I dutifully took notes during all the talks so I’d like to prepare some posts with my notes. I noted that after I did so for ++it 2018 (Channels are Useful, not only for Water, Zero Allocation and No Type Erasure Futures, Time Travel Debug, ++it 2018 – Coroutines – coming soon… ?, ++it 2018 – Key Notes) conference organization put all the conference videos online. I’m pretty sure the same is going to happen for Scala Italy 2018 as well. So I’ll wait for your feedbacks before investing the time needed for writing all the blogs.

Demographic

I expected more people, after all this is the national conference of a language that – even if not so widespread – has a strong support. I have no hard data, but I guess that we were around 150 people. Many of them young with a good female presence… at least for a programming language conference (that means some twenty in 150 :-)).

People here were younger than those at ++it 2018. White and grey-haired men were sparse (and all of them had that wise-look… especially me :-D)

Stands

There were just two stands – Signify and Vodafone. This could be a consequence of the split nature of the conference. Stands will appear when (if) the conference will turn more to the professional side. I expected at least to see Bitrock (not that Bitrock) / Databiz as the Italian incarnation of Lightbend (Bitrock / Databiz still are platinum sponsors of the conference).

Also, I expected some more “we’re hiring” boards or at the end of the talks. I’m pretty sure the interest in Scala language is growing not just abroad. I’m more inclined in thinking that this is again a consequence of the lack of a clear business target.

Location & Food

Grand Hotel Mediterraneo was hosting the conference. The hotel is on the banks of the Arno river, just outside downtown Florence. The building is not new, nonetheless good. The same can’t be said about the technological infrastructure. Video projectors were clunky. In the talk of Miles Sabin, the audio-video support was dreadful – making impossible for the audience to ear most of the talk and having long periods where the video was lacking.

Other talks were better, with just some video flickering, but for this kind of conference the problems poor Miles had to suffer are just not acceptable.

Food was great, as you may expect from a catering in Italy, some standing tables where to put plates and glasses could have helped both in some extra comfort and in some extra networking.

Tracks

Attending the conference you could choose mostly between two tracks – speeches and workshops. Workshops were intended to be hands-on moments were an expert led attendees through some activities.. such as SBT or IDE development. I found speeches were more interesting so I cannot say anything about workshops.

Here is a brief summary of each talk along with my comments.

Day 1 – Opening Key Note

The opening keynote was held by Heather Miller former Scala Central director and freshly appointed university professor in the US. This speech was about free software and its future. She presented an interesting research (by Leo Meyrovich) about the drivers of language adoption in teams. According to this research, one of the fundamental reason that drives the choice is the presence of a community.

The speech was quite unexciting – sometimes on the verge of patronizing the audience and sometimes indulging in wishful thinking. Now, no doubts free software plays a vital role not only in the internet infrastructure but also in products we take for granted in our everyday life. I think the main reason for a for-profit organization to chose free software is the price. Contributing back to the project would be akin to pay for it.

Sono ten years ago  I wrote what I think of free software and my thought is not changed that much. I enjoy the free software, but I can’t do away without thinking that even programmers have to feed their children.

Day 1 – 5 things you need to know about Scala compilation

Mirco Dotta held this speech showing quite an interesting parade of common reasons for slow compile time. Now if you ever used sbt and Scala you know that lightning fast does not belong here. Mirco didn’t promise rocket speeds but showed some techniques to help poor Scala programmers to understand compilation times and take actions to improve them. Strongly recommended. Video available here.

Day 1 – Leveraging Scala and Akka to build NSDb, a distributed time-series database

This talk by RadicalBit‘s Paolo Mascetti and Saverio Veltri was about their experience in using Scala and Akka to write a database for time series. The talk tackled the design and the development decision to implement this database, how to get the most efficient approach to storing time series in a distributed database and later retrieve data using an SQL like language.

I don’t know if this kind of matter was hard to present in an addictive – or at least exciting – way, or the emotion of being on stage (possibly both), but the talk tended to be a bit flat.

(I’m sorry to write this because I worked with Paolo and really appreciated his work and his professional attitude and I wished his talk to be more entertaining).

Recommended only if you are really interested in the matter. Video available here.

Day 1 – Cloud Native Akka & Kubernetes: the holy grail to elasticity?

Fabio Tiriticco talked about cloud computing and how to use just the right amount of computing resources to handle the current demand for a given service. The talk was quite didactical showing the path from the needs of a modern high traffic application to the Akka cluster and kubernetes architecture. Video available here.

Day 1 – Numerical Programming with Spire

In this talk, Lars Hupel presents the Spire library part of the cats library. Spire offers infinite precision rational numbers. Lars first presented Spire, its goals and its relationship within the cats library collection. Then he turned to algebras and their role in proving laws. Eventually, he came to maths. In this part, Lars showed the problems and limitations of the float/double representation and the risks derived from them pretending to be Real numbers. Rational numbers are much less than Real, but you can get the number of decimal digits you want as long as that number is finite.

I greatly enjoyed this talk since it was comprehensive, clear and entertaining and, above all, proved to be a very good introduction to Spire library. Video available.

Day 1 – Idris for (im)practical Scala programmers

Marcin Rzeźnicki talked about types, their relationship and the relationship with lambda calculus, lambda omega. The talk was quite complex and it got above my head after a while. Slides are available here.

Day 1 – Panel – the future of Scala.

This time was devoted to a short roundtable moderated by Jon Pretty. Panelists were Miles Sabin, Heather Miller, Mirco Dotta, Luka Jacobowitz and Ólafur Páll Geirsson.

As my brother in law could put it, this was much about oh-oh-oh, ah-ah-ah and shoulder patting. The topic was mostly about the next iteration of Scala – Dotty also known as Scala 3. I caught a single line that worried me a bit about the transition. It was Miles Sabin saying “the pain of transition will be significant”. Nowadays I am a bit more relaxed than the first time I heard Scala 3 was not going to be source level compatible with Scala 2. I grew to know better Scala and it semantic. Its syntax despite all that diabetic-level sugar has a sound structure. On the other hand, I keep seeing that even a great IDE such as IntelliJ has its own troubles in properly highlight the syntax on files where the programmer made heavy use of shapeless or similar abstract techniques. WIll the translation tool be able to deal precisely and faithfully with these cases? Only time will tell.

I know, I’m digressing, but this is indeed a bold move (or a terribly stupid one) – breaking source code compatibility is something that is feared in other mainstream languages to the point that they prefer to keep legacy dumb constructs that hamper a new more readable syntax. C++20 – the next C++ standard will compile most of the C++98 code base (i.e. code more than 20 years old). Syntax changes are mostly related to a few new keywords and a single syntax that’s no longer valid. Moreover, in C++, the backward compatibility for source code is so strong that you are likely to successfully compile C89 source code (i.e. 30 years old code). (Of course Scala doens’t have 30 years old code, but I would like today Scala elite wouldn’t prevent that from happen).

Python architects broke compatibility when they introduced Python 3000 and lost most of the community. Python being a weakly typed language could not provide a robust automatic translation tool. Well… we’ll see.

Day 1 – Community Party

The sponsored community party the first evening was very informal. People gathering and talking together at tables. The only drawbacks were – the  pub was very distant from the conference venue and since most of us had no car, the walk had been not so relaxing; also the pub personnel seemed not to be prepared to deal with so many people and orders took forever to be served (well some lesson in reactive could have helped them). Despite these drawbacks, food was good and beverages too.

Day 2 – Addressing recent events

Viktor Klang talked about the evolution in the challenges presented by processing increasing quantities of data and how the viable solutions converge to cloud computing, microservices, streaming processing and functional programming. If you go to this type of conferences you wouldn’t hear nothing new. If you need to convince your boss to move in this direction here you can find a lot of good arguments.

Day 2 – Ten Cool Things You Can Do With Scala 3

On Day 1, Jon Pretty held the panel about the future of Scala and on Day 2 he talked about 10 features available in next Scala edition. In fact, this was true for the first half of the presentation. In the second part, he talked about his build tool, named fury. Fury is nice, especially if compared to sbt, and Jon nearly managed to keep the presentation informational without falling in a blatant advertisement.

Presented Scala features were varied and interesting. From my point of view, enumation is the most needed, but I’m pretty sure, my friends in the functional programming community will appreciate most other features such as dependent function types, type level constraints and type lambdas.

Day 2 -Adding Kind Polymorphism to Scala

Miles Sabin tried to hold this speech, but he had to confront against video malfunctioning and audio blackout. As written above this was one of the worst moment for the technological support of the conference. The next Scala language won’t support macros anymore. Macros are heavily used in Scala libraries since they enable programmers to easily write DSL (I hate DSL, but this is another story). Shapeless helps in reducing the number of macros. The remaining uses can be handled via kind polymorphism. This is a form of parametric polymorphism. Regretfully I lose my understanding of the speech somewhere halfway to the end.

Day 2 – Scala @ Uber Data Science

In this speech, Nick Jones talks about the use of Scala at Uber for data science. The case in study exposed to introduce the theme was the need to establish if allowing Uber payment via cash in certain countries/areas was a profitable solution or not. Once stated the problem, Nick presented how it was solved (by running an experiment) and the tools used.

This talk was very practical, but also very specific. On a different level, it is a bit scaring that we are continuously employed as guinea pigs in experiments whose goal is to establish how could someone else extract the most money from us or from our behavior, or how to change our behavior to get more money.

On the other hand, it is surely fascinating the scenario described with machine learning clusters and centralized feature repository.

Day 2 – Akka Typed – Next Generation actors with Akka

If you ever felt uncomfortable that Akka actors are untyped, then this talk would cast some light on the future. Johan Andren presented the next generation of Akka Actors which (finally) sports typed messages.
Having typed messages makes things much safer and simpler. Each message type is bound to a behavior. In this way, an actor may not receive a message whose type was not expected. Moreover, those unexpected messages cannot reach the handling code.

Typed Actors should be ready for prime time at the beginning of next year.

This was a solid presentation very clear both in the motivation and in the description of the features and implementation of typed actors. You can find the code here.

Day 2 – Shared State in Pure FP

Fabio Labella talked about the need to separate side effects (mainly I/O) from the computational code. And presented the Shared State pattern (can we say “pattern” in FP? I hope so). He started by giving a workable definition of referential transparency, i.e. when you can always replace an expression for its bound value without changing the result. E.g. f(x)=2*x is referentially transparent since for each x you can choose, the value of f will always be determined by replacing x in the function body with the value you chose. Let g(x) = readInt()*x – this is not transparent, because it depends not just from the value chosen for x, but also from the input arriving from the user via the readInt() function.

As every technique that helps the programmer in closing the context of the code, referential transparency is a Good Thing(TM). Software engineers strive from the very dawn of computer programming to keep things local and avoid external interferences such as globals.

During the talk is presented a way to close side effects operations in boxes that take the external value and fix it for the future, providing referential integrity when they are composed. The library used was cats-effects.

The talk has been so enlighting on why FP matters in 2018. The video is available here.

Day 2 – Random Data Generation with Scalacheck

The topic of this speech, held by Daniela Sfregola, was about testing with random inputs. This is usually a good idea, but it is very time-consuming – if you want to have some chances to randomly hit critical input sequences. Daniela’s idea had been to limit the number of iteration per test, relying on the fact that tests are executed several times, so eventually, your random test will be executed entirely.

In order to achieve this, she forked an existing project and changed a few lines to create her version of the tool.

Daniela tries to convince attendees that it is so cool to add two lines of code to an existing testing library and rebranding it as yours. Maybe it was this, or the emphatic tone, or the overacting, but I wasn’t very touched. I don’t say the idea is bad, quite the contrary, but it seems more like something you tell your coworkers at the coffee machine (or the water dispenser) than something worth be presented at the national Scala conference.

The video is here to judge for yourself.

Wrap-Up

And that’s it. Two days of conferences and workshop. The outcome is good. Quality of the speech has been quite high. For me, this kind of conferences has to be promoted and improved. The road the leads to better software passes here.

2 thoughts on “Scala Italy 2018

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.