Scalar 2018 takeaways

This year I once again had a pleasure to participate in Scalar conference. It was awesome as always and even better than the last year. Below you can find links and main points I noted during the conference. Enjoy.

If you don’t have time to read the article or watch all the presentations, these are the best ones:

  1. Paweł Szulc - ILLOGICAL ENGINEERS
  2. Manuel Bernhardt - IS THERE ANYBODY OUT THERE?
  3. John A de Goes - SCALAZ 8 VS AKKA ACTORS
  4. Otto Chrons - MANY USES OF SCALAFIDDLE

Takeaways

  • You can make a game with Akka Streams.
    • Libgdx seems to be the most popular solution for jvm game dev.
    • Extra credits is a youtube channel talking about game design.
    • Akka streams don’t log errors by default - add supervision decider with logging
    • You should always try to use built-in stages for processing instead of using the basic ones, because perfomance.
    • travesty is a tool for visualizing Akka Streams flows.
  • Clusters are hard
    • Greate quote:

    Life is a single player game. You’re born alone. You’re going to die alone. All of your interpretations are alone. All your memories are alone. You’re gone in three generations and no one cares. Before you showed up nobody cared. It’s all single player.

    ~Naval Ravikant

    • Three main issues with clusters:
      • discovery: who is there?
      • load balancing: who can pick up work?
      • failure detection: who is in trouble?
    • There was so much content in the presentation I resigned from taking notes and you just have to watch it.
  • Scalaz8 IO is important to know
    • Scalaz8 looks great and may be available in Q3 2018
    • It will have innovative IO[Err, Out] which allows you to express errors on typelevel
    • Talk itself was really hilarious(compostable!).
  • IPFS is a thing
    • IPFS is distributed file system
    • Someone is using it already!
    • IPLD - tree-based data model based on ipfs
  • You should learn intervals api in Spire
    • Spire has a nice API for intervals and interval sets
    • Its really good to know it before you need it. I had a perfect opprotuinity to use it couple years ago and I missed it.
    • I tried to find any docs for it and failed. This is one more argument to watch the whole presentation.
  • Endpoints are great, I promise!
    • My own talk :)
    • Endpoints can be used for defining http protocols that share endpoints definitions between the server, client and documentation.
  • There are memory-optimized collections you can use already
    • scala-packed is custom collections library focused on memory optimization.
    • Each collection is packed into single ByteArray and kept in that form.
  • Traversables are powerfull
    • They have plenty of variants and there is a lot to learn for me
    • I have to come back to the video after a year or two to see if I have grown up
  • ScalaFiddle is awsome
    • ScalaFiddle is actively developed project and Otto is putting a lot of effort into it.
    • You can modify html with Scala code in a fiddle, e.g. using scalajs-react or d3
    • Maybe we could use ScalaFiddle in reveal-based slides or on the blogs?
    • Maybe it could be integrated with jupyter notebook?
    • You can (and should!) create a fiddle when asking for help!
    • There is nice integration.js script and plugins for doc genenerators
    • It’s already integrated with scala docs and circe docs!
  • You can do blockchain in Scala
    • There is a scala framework for blockchain apps - Scorex.
    • Writing blockchain apps seems to be hard
    • Doing live coding is hard
  • Typelevel programming is not that hard
    • HSets and HMaps exists along HLists and are not so complicated. If you think they are you should definitely watch Jon’s presentation
    • You can go further and crete even more complicated structures, like HDags!
  • You can implement your own programming language in Scala
    • Cartographer.io is a site for sharing environmental information.
    • It’s backed by Atlas - A tiny embedded scripting language implemented in Scala.
    • Atlas is implemented with Li Hayoi’s fastparse
    • Writing custom language is almost never a good idea(slow, no tools, hard to do right and a ton of other problems)
    • Maybe your next side project should be a non-profit site instead of a next library?
  • Collections can surprise you
    • There are huge differences between collections memory consuption:
      • Array: 430mb
      • Vector: 2.1 gb
      • List 3.9 gb
    • Recommended post: Benchmarking Scala Collections by Li Hayoi
    • Using between 32 and 40 GB of ram doesn’t make sense because of longer pointers
  • You can use recursion schemes to solve real problems
    • Resursion schemes stayed as hard to grasp for me as it was last time I tried to learn it.
    • It seems that there is a circle with understanding complex abstract problems: you need a concrete use case to build good undesrtanding, you need understanding to notice a use case.
  • We will never have a perfect langauge
    • A lot of things in software development has not changed in 50 years
    • Curry–Howard correspondence
      • Predicate = type
      • Proof = value
      • Can we express laws, such as monad laws, as types?
    • Book recommendation: An eternal golden braid
    • In non-turing-complete language, like agda and coq, you cannot write a compiler for itself
    • System cannot be consistent and complete at the same time, so we would never have a perfect programming language.
  • Other
    • Errors in stream processing should be treated as events
    • You can use intellij templates in live coding instead of copy & paste. This improves experience A LOT!
    • Live coding should be in short parts because even good ones can easy loose attention
    • caffeine seems to be popular caching library that I didn’t know of
    • Poland can into space! - University of Warsaw is sending a satelite in Elon Musk’s rocket - video
    • If you haven’t tried scala.js watch this
    • If you haven’t yet abstracted your code from effects watch this
    • Logic prorgramming is alive. There are companies still using logic programming like prolog, one of them is LogicBlox and they cereate their own language LogiQL.
    • Zipkin has poped out once again and I have to check it out finally.
comments powered by Disqus