Our thoughts, knowledge, insights and opinions

Posts tagged as “Scala”

Exploring Tagless Final pattern for extensive and readable Scala code

In this post we will be exploring a more advanced pattern from functional programming - Tagless Final. Our goal will be to show how we can use it make our programs on one hand simpler, on another easy to extend

by Patryk Jażdżewski
August 10, 2017
Tags : Scala Functional Programming

Using Akka HTTP with Sangria as GraphQL backend

In this article you will learn how to set up GraphQL backend server with Akka HTTP and Sangria. We will also discuss common use cases, like integration with Slick and how to manage many-to-many relations.

by Mariusz Nosiński
August 3, 2017
Tags : Scala Akka Http GraphQL Sangria Slick

Improving Akka dispatchers

Learn what makes Akka tick and what needs to be changed to make it tick faster!

by Zahari Dichev
July 20, 2017
Tags : Scala Akka Performance Concurrency

When old-school developer goes freestyle

Free Algebras based programs with Freestyle: toolkit basics, story of login module development and personal impressions.

by Lech Głowiak
July 13, 2017
Tags : Scala Functional Programming Free Monad

Making UI easily with Binding.scala

Want to create a single-page app with reactive UI but you don't feel like writing the frontend in JS? With Binding.scala we can easily do all the work using Scala!

by Paweł Bartkiewicz
July 5, 2017
Tags : Scala Binding.scala Scala.js Frontend

Reactive streams for RabbitMQ with Monix

Learn how you can use Monix library for creating reactive streams for RabbitMQ. Monix makes it simpler than you think!

by Lech Głowiak
June 29, 2017
Tags : Monix Scala Reactive Streams RabbitMQ

Optics beyond Lenses with Monocle

Most Scala developers have heard about Lenses. But there are much more optics in Monocle

by Michał Sitko
June 15, 2017
Tags : Scala Monocle Optics Functional Programming

Why you should know Monix

Advocating value of Monix asynchronous programming library

by Lech Głowiak
June 1, 2017
Tags : Monix Scala Reactive Streams

Avoiding Unnecessary Object Instantiation with Specialized Generics

What are the implications of boxing/unboxing? How can we decrease heap memory allocation? Read on to find out

by Zahari Dichev
May 25, 2017
Tags : Scala Performance

Custom GraphStage in Akka Streams

What is GraphStage in Akka Streams? When you need it and how to implement it?

by Michał Sitko
April 25, 2017
Tags : Akka Scala

Type classes in Scala

Basic information and suggestions about implementation tactics for type classes in Scala with examples in open source code are described in this blog post.

by Łukasz Indykiewicz
April 19, 2017
Tags : Scala Type class

Introduction to Streams in Akka

An introduction to the concept of Streams and how to utilize them in Akka

by Marcin Gorczyński
April 18, 2017
Tags : Scala Akka Streams Reactive Platform

Extending Spark pipeline

Spark provides many built-in transformers for its Pipeline API. But what if you want something that is unavailable out of the box? You need to extend the Pipeline with your own transformer.

by Tomasz Sosiński
December 1, 2016
Tags : Scala Spark MLlib

ConductR - One tool to rule them all

Deploy and manage your applications using ConductR from Lightbend. Here's why you should care and how to get started.

by Mariusz Nosiński
November 3, 2016
Tags : Scala ConductR Devops Reactive Platform

Handling failure using Xor and Validated data types

How to handle failure in Cats using Xor and Validated data types

by Marcin Gorczyński
October 20, 2016
Tags : Scala Functional Programming Cats

Handling Split Brain scenarios with Akka

A short introduction to the Split Brain scenarios and how to handle them with Akka

by Marcin Gorczyński
October 13, 2016
Tags : Scala Akka Reactive Platform

Compile-time Queries with Quill

Overview of Quill, a new library for working with databases, which provides compile-time query generation and validation using macros.

by Mateusz Bilski
July 21, 2016
Tags : Quill SQL Slick Scala

Your first microservices using Scala and Lagom

Build your first microservices using Scala and Lagom platform

by Arkadiusz Kaczyński
July 14, 2016
Tags : Scala Lagom Microservices Reactive Platform

Learning Scala macros with Each

Some say, the best way to learn is by example. In this post we will grab the 'Each' library by ThoughtWorks, explain why it's useful, how it was designed (macros, implicits and other cool Scala stuff) and try to reuse them in our code. The goal is to learn by exploring Each and pick up some Scala ideas along the way.

by Patryk Jażdżewski
June 23, 2016
Tags : Scala Macro

Overview of free monad in cats

Implementation of simple application using free monad from cats library

by Krzysztof Wyczesany
June 2, 2016
Tags : Scala Functional Programming Free Monad

Domain specific types in a play framework project.

In this post we look at two approaches to dealing with domain specific types - unboxed tagged types and case classes and how well they integrate with play framework 2.4 and slick 3.0.

by Dominik Zajkowski
May 26, 2016
Tags : Scala Play framework Slick Macro

Reflections on starting Android project with Scala

Reflections after starting my first Android project in Scala: troubles, solutions, workarounds.

by Mateusz Kubuszok
May 19, 2016
Tags : Android Scala SBT

Improving your project with SBT

How can we use SBT to make our Scala project more manageable: modules, style checking and testing.

by Mateusz Kubuszok
May 12, 2016
Tags : Scala SBT

def hello = macro world

In this post I'll describe the process of creating a macro transforming a function. As a case study I'll use polynomial differentiation.

by Jakub Kozłowski
February 25, 2016
Tags : Scala Macro

Apache Spark 101

Apache Spark by example. Introduction and solving an example problem

by Patryk Jażdżewski
February 4, 2016
Tags : Spark Scala

Common Scala Gotchas

In this article I would like to write down some surprising gotchas that I encountered while working with Scala code.

by Patryk Jażdżewski Tomasz Perek
January 14, 2016
Tags : Scala Akka

Looking into Scala.js

In this post I'm going to present my experiences with Scala.js based on a mini-game that I've created.

by Andrzej Janczak
December 10, 2015
Tags : Scala Scala.js Frontend

Shapeless Monads

In this post we will continue our adventure with shapeless and demonstrate how it can be used to make your code more compact and flexible.

by Tomasz Perek
October 22, 2015
Tags : Scala Shapeless Futures Type-level programming

Shapeless Futures

In this post we will look into shapeless and use it to impove working with futures.

by Tomasz Perek
October 15, 2015
Tags : Scala Shapeless Futures Type-level programming

Using Reactive Extensions for data binding in Scala.js

In the last post we have written a simple Scala.js app. Now we will look how we can limit the number of moving parts by adding Scala.rx

by Patryk Jażdżewski
October 1, 2015
Tags : Scala Scala.js Frontend

Scala in the browser. Getting Started with Scala.js

In this post we will take a look at Scala.js, write a simple app with it and think about it's potential use cases.

by Patryk Jażdżewski
September 24, 2015
Tags : Scala Scala.js Frontend

Websockets Server with akka-http

If you want to know how to use `akka-http` to build your own server, you may find it worth your while reading this article. You'll learn how to build a websocket server. Some other topics are covered here, e.g. basic REST responses or akka-stream processing.

by Mariusz Nosiński
July 30, 2015
Tags : Scala Akka Akka Http Akka Streams Websockets

Introducing Scala Slack Bot

In Scalac we use Slack for communication and more. We decided to create a framework for our custom Slack integrations, so we transform it into a living heart of our company. Here are some details on how and why we did that

by Patryk Jażdżewski
July 16, 2015
Tags : Scala Working Slack

Summary of TSUG meeting

Short summary of Tricity Scala Users Group meeting held on 10th of July

by Scalac Team
July 13, 2015
Tags : Scala TSUG Android Scaloid

A Quick Overview of Slick 3.0

At ScalaC we've recently started adopting Slick 3.0. If you haven't tried it yet, hopefully these notes will make the process go smoother

by Radek Tkaczyk
July 9, 2015
Tags : Scala Slick SQL

Inventory App Part 1. Software Transactional Memory for Scala. Comparing Activate with Slick

In this blog series we will look on how we can use Akka HTTP, Activate and other useful libraries to build an application completely in Scala. This post will explore the persistence layer and how we can use STM to work with the database

by Patryk Jażdżewski
June 19, 2015
Tags : Scala Activate Slick

Inventory App Part 0. Foundations

In this tutorial series we will look on how we can use Akka HTTP, Activate and other useful libraries to build an application completely in Scala. We will explore each component in detail explaining various techniques and approaches. The first part we will lay the foundation for our app and in the next parts we will be extending this framework.

by Patryk Jażdżewski
June 18, 2015
Tags : Scala

Null, NullPointerException and dealing with it.

Article presents how different programming languages address the problem of null reference.

by Tomasz Perek
May 31, 2015
Tags : Scala NullPointerException Clojure Option Haskell

Modes in Rapture and how you can use them to make your code more expressive

This post describes an interesting aspect of Rapture - modes. Modes allow their users to modify the return type based on which one was used.

by Patryk Jażdżewski
May 28, 2015
Tags : Scala Rapture Json

Dynamic member lookup in Scala

A lot of dynamically typed languages have function that catch-all all messages doesn't exists in the object. It gives these languages a lot of power to write DSL. With Scala, you have an opportunity to write DSLs in the same way. Learn why and how.

by Mariusz Nosiński
May 21, 2015
Tags : Scala Dynamic DSL

Creating Domain Specific Languages with Scala - Part 1

In this post we will elaborate a bit on how surprisingly easy it is to create Domain Specific Languages in Scala in order to simplify code.

by Patryk Jażdżewski
May 7, 2015
Tags : Scala Encog DSL Machine Learning Neural Networks Java

Quick Poll - Create a web application in 10 minutes

In this post we explore possibilities of rapid prototyping in our favorite programming language using Skinny framework

by Patryk Jażdżewski
April 22, 2015
Tags : Scala Skinny

Scalac Weekly Digest#21

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
March 4, 2015
Tags : Scalac Weekly Digest Scala Functional Programming Mobile Android

Scalac Weekly Digest#20

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
February 25, 2015
Tags : Scalac Weekly Digest Scala Javascript Functional Programming Clojure Technology

Scalac Weekly Digest#19

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
February 18, 2015
Tags : Scalac Weekly Digest Scala Robotics Clojure Event Sourcing Docker Code Quality

Scalac Weekly Digest#18

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
February 11, 2015
Tags : Scalac Weekly Digest Javascript Functional Programming Clojure Scala Performance

Scalac Weekly Digest#17

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
February 4, 2015
Tags : Scalac Weekly Digest Scala Android Soft Skills Programming Working

Scalac Weekly Digest#16

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
January 28, 2015
Tags : Scalac Weekly Digest Scala Javascript Programming Technology Working

The Rough Experience with Slick

Based on a real project experience I present an opinionated warning about some of the shortcomings of the nonetheless exciting framework which Slick is.

by Radek Tkaczyk
January 27, 2015
Tags : Scala Slick MySQL PostgreSQL SQL

Scalac Weekly Digest#14

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
January 14, 2015
Tags : Scalac Weekly Digest Scala Artificial Intelligence Javascript Working

Scalac Weekly Digest#13

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
January 9, 2015
Tags : Scalac Weekly Digest Scala Frontend Working Biotechnology

Scalac Weekly Digest#12

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
December 20, 2014
Tags : Scalac Weekly Digest Scala Apache Kafka IDEA Working REST

Scalac Weekly Digest#11

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
November 28, 2014
Tags : Scalac Weekly Digest Scala Javascript Distributed Programming Working

Scalac Weekly Digest#10

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
November 21, 2014
Tags : Scalac Weekly Digest Security Working DevOps Scala Distributed Programming

Scalac Weekly Digest#9

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
November 14, 2014
Tags : Scalac Weekly Digest Erlang Scala Biotechnology DevOps Javascript Functional Programming Concurrency

Scalac Weekly Digest#8

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
November 7, 2014
Tags : Scalac Weekly Digest Javascript Scala Process Robots Working Mobile

Scalac Weekly Digest#6

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
October 24, 2014
Tags : Scalac Weekly Digest Scala Android Optical Character Recognition Physics Web Development

Scalac Weekly Digest#5

Collection of interesting links from around of web chosen for you by Scalac team

by Scalac Team
October 17, 2014
Tags : Scalac Weekly Digest Domain Driven Development Scala Distributed Systems Databases

Scalac Weekly Digest#3

Collection of interesting links from around of web choosen for you by scalac team

by Scalac Team
September 30, 2014
Tags : Scalac Weekly Digest Working Android Mobile Robots Artificial Intelligence Scala Machine Learning

Scalac Weekly Digest#2

Collection of interesting links from around of web choosen for you by scalac team

by Scalac Team
September 19, 2014
Tags : Scalac Weekly Digest Scala Hiring Distributed Systems Programming NoSQL Hacking Android

Akka Streams and RabbitMQ

Akka Streams is an exciting new technology from Typesafe that is an implementation of the Reactive Streams specification. RabbitMQ is a messaging broker implementing AMQP 0-9-1 protocol. It's known for its reliability, speed and simplicity in everyday use. These two technologies seem like a perfect fit, so in this post I'm going to explore some basic integration possibilities and example usage.

by Jakub Czuchnowski
June 23, 2014
Tags : Scala Akka Akka Streams Reactive Streams RabbitMQ

Running subprocesses from SBT console

Preparing environment for integration tests is not easy. Usually you need to run one or more external services - database, rabbitmq, web server, etc. What's more, you have to be sure that they are up and running. After performing the tests you have to be able to turn them off. My plugin makes it possible to start all required applications directly from SBT console with minimal effort.

by Jan Ziniewicz
June 9, 2014
Tags : Scala SBT Integration tests

Request rate limiting in Lift

A few weeks ago I've started coding in a big Lift project. One of my first tasks was to create a simple HTTP API for communication with underlying Akka actors. This one was easy thanks to RestHelper. Second task was to add request rate limiting for this API. It appears that Lift despite its many features doesn't have rate limiting plugin. So, I had to roll my own.

by Jan Ziniewicz
January 23, 2014
Tags : Scala Lift REST