Home » JVM Languages

JVM Languages

Clojure – comparison of gnuplot, Incanter, oz/vega-lite for plotting usage data

What is the best way to plot memory and CPU usage data (mainly) in Clojure? I will compare gnuplot, Incanter with JFreeChart, and vega-lite (via Oz). (Spoiler: I like Oz/vega-lite most but still use Incanter to prepare the data.) The data looks like this: ;; sec.ns | memory | CPU % 1541052937.882172509 59m 0.0 1541052981.122419892 78m 58.0 1541052981.625876498 199m 85.9 ...

Read More »

Clojure GitLab deps

You need to force  the ssh-rsa host key instead of the default one picked up by the tooling: $ ssh-keygen -R gitlab.com $ cat <<EOF >> ~/.ssh/config Host gitlab.com HostKeyAlgorithms ssh-rsa EOF $ ssh git@gitlab.com CSI version of the above You are using the brand new dependency resolution from the Clojure core team for the first time. So you like ...

Read More »

Testing Kotlin with Spock Part 3 – Interface default method

Kotlin allows you to put method implementation in an interface. The same mechanism can be found in Java interfaces as default methods (and also Groovy or Scala traits). Let’s see the difference between the Kotlin and Java default methods in interface by testing it with Groovy and Spock. What do we want to test? We often have an interface for ...

Read More »

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 »