Clojure defonce: Keep Your Apps State

October 25, 2019

One of the great strengths of Clojure is interactive development. Usually, you run a REPL and an editor that interacts with that REPL. You try out small things in the REPL, send pieces of code from the editor to the REPL, reload modified files, etc. You rarely restart the app, but keep going editing code. I’m missing that in other programming environments.

Continue reading →

Compiling Java Classes with Clojure Deps

October 24, 2019

In the past, I used Leinigen for Clojure projects. It downloads dependencies, compiles, handles the classpath, runs tests etc. Clojure 1.9 introduced the clj command line and the deps tooling. You can specify a deps.edn file and declare the dependencies in there. Deps not a build tool by design. it only downloads dependencies from Maven- and git repositories and builds the Java classpath. It doesn’t have other build features. However, for smaller Clojure projects that is enough and you can go without an extra build tool.

Continue reading →

Java, Let me use the damn FileDescriptor!

October 15, 2019

Recently I hacked on some utility in Java which should be able to bind low ports like 80 or 443 on demand without running as root. When I needed to bind these port I wanted to execute an external process as root which opens the ports for the main process and then sends the ports via Unix domain socket.

Continue reading →

Intro to MVStore, an embedded key value store

September 25, 2019

MVStore is the backend storage for the popular embedded H2 relational database. If you don’t need a relational database, but a lower level storage MVStore is maybe an option. The MVStore has a good nice range of features. The documentation isn’t as detailed, but the intro documentation gives a decent overview. Anyway, this post is another small intro.

Continue reading →

Missing SNI with Java's HTTPS client

September 6, 2019

Recently I got strange exceptions connection to HTTPS while developing a Java app. The app connected to my local machine using it’s host name with the Apache HTTP client:

Continue reading →