Home » JVM Languages

JVM Languages

Scala Tuple performance

Tuple is very powerful construct in programming language, it allows to create sequence of finite elements. Elements in tuple can be of different type and very easy to declare like (“something”,1,new Date()) Nice thing about tuple is you have to only decided on data type of element not the name. Computer science has 2 hard problem : Cache invalidation and ...

Read More »

Kotlin DSL: from Theory to Practice

I’ll try to explain the language syntax as simple as possible, however, the article still appeals to developers who consider Kotlin as a language for custom DSL building. At the end of the article I’ll mention Kotlin drawbacks worth taking into account. The presented code snippets are relevant for Kotlin version 1.2.0 and are available on GitHub. What is DSL? ...

Read More »

Groovy 2.5 CliBuilder Renewal (Part 2)

The CliBuilder class for quickly and concisely building command line applications has been renewed in Apache Groovy 2.5. This is the second of a two-part article series that highlights what is new. In case you missed it, Part 1 is here. This article shows some of the advanced features of the underlying libraries from CliBuilder. A quick recap of part ...

Read More »

Groovy 2.5 CliBuilder Renewal (Part 1)

The CliBuilder class for quickly and concisely building command line applications has been renewed in Apache Groovy 2.5. This two-part article highlights what is new. Part 2 explains how to leverage some of the advanced features of the underlying libraries from CliBuilder. The groovy.util.CliBuilder Class is Deprecated Previous versions of CliBuilder used Apache Commons CLI as the underlying parser library. ...

Read More »

A tale of Emacs, Clojure and pinned packages

It’s like trying to pin down a kangaroo on a trampoline. – Sid Waddel If you do any clojure[script] development, chances are that you do so through Emacs and CIDER. The experience is generally nothing short of awesome, but every now and then you bump into some quirks. That was the case for me when the latest CIDER came out, ...

Read More »

Creating a YARN Application using Scala

I have been recently playing with Apache Amaterasu, which is an amazing project that helps to deploy data pipelines. It’s still incubating and has a super-friendly team of engineers working on it. Some exciting features are lined up. Don’t take my word for it. Please check it out yourself. Amaterasu launches containers (on YARN/Mesos) all by itself for each of ...

Read More »

Scala Syntax: 7 points

A few years back I dipped into some Scala as a hobby language. But, one aspect I found challenging was just getting my head around Scala syntax again. Some of it, yeah the basic stuff can be counter intuitive depending on your perspective. 1. Method / Function Definition Typing on the right rather than the left. Consider this simple function definition: def ...

Read More »

Dockerize your Scala application

Dockerizing a Scala application is pretty easy. The first concern is creating a fat jar. Now we all come from different backgrounds including maven/gradle and different plugins that handle this issue. If you use sbt the way to go is to use the sbt-assembly plugin. To use it we should add it to our project/plugins.sbt file. If the file does ...

Read More »