• Meta Reduce, Volume 2019.0


    For a while now I’ve been thinking of starting some form of online journal, following mostly my open-source work and programming exploits, but not limited strictly to that. I know that a blog is supposed to be just that (an online journal), but many of the things I’m working on are not really worthy of dedicated blog posts (and won’t fit in a tweet), and still I feel that they deserve to be shared with a broader audience.1

    Lately every edition of Alex Miller’s excellent InsideClojure Journal has been a constant reminder for me to get something done about my idea. And finally here we are - “Meta Reduce” is my version of such a journal - a reduction of my recent activities in writing. I’m not quite certain on the exact format yet, but I guess I’ll sort it out along the way.

    It’s very hard for me to write this first post simply because a lot has happened since I returned from my OSS “sabbatical” about a month ago. A lot of things have piled up in my absence and I literally don’t know where to begin. Here we go…

    1. Twitter threads are also an option. 

  • Ruby's Creed

    Every programming language has some fundamental idea(s) that drives its design and evolution. For Haskell that’s functional purity and state-of-the-art static typing, for Erlang that’s distributed programming and fault tolerance, for Clojure that’s simplicity and stability. What all these examples have in common is that they are relatively easy to understand and map to design decisions in the languages. This, in turn, makes it possible to determine down the road whether a language sticks to its core values or deviates from them.

    Ruby, however, is very different. It’s world famous for its unique creed - “optimizing for programming happiness”. But what does this really mean? How does one optimize for happiness?

    Unfortunately I’ve never heard Matz speak about this, so I’ll offer you my perspective instead - happiness is simplicity, readability, consistency, expressiveness and flexibility. If I have to describe happiness via Ruby code I’d probably do it like this:

    3.times do
      puts "Ruby Rocks!"
  • New York, New York

    Start spreadin’ the news, I’m releasin’ today
    I want to be a part of it
    New York, New York
    These vagabond forms, are longing to eval
    Right through the very REPL of it
    New York, New York…

    Following the long overdue overview of nREPL 0.6 I’ve got a new one for you! Brace yourselves for an overdue overview of the recently released CIDER 0.21 (New York)!

    It terms of volume of changes it’s a pretty small release. If you consider their impact, however, you’ll see it packs quite the punch! In fact it’s probably one of the most significant releases CIDER has had in the past couple of years.

  • The Missing Ruby Code Formatter

    Ever since Go made popular the idea of having one canonical way of formatting the code for a particular programming language (by bundling the gofmt tool with the language), programmers in every community have been trying (with various degree of success) to replicate this. JavaScript’s Prettier became a huge hit and is very widely used today. Elixir 1.6 bundled a standard formatter out of the box. Many similar initiatives are underway.

    In the Ruby community the quest for the One True Formatter has been going on for quite a while and at this point there are already several projects to chose from:

    And, of course, last but (hopefully) not least, there’s RuboCop - a project that I’ve started way back in 2012. Most people probably think of RuboCop as a lint tool only, but it actually has an entire department (type) of cops (code checks) dedicated to inspecting and fixing code layout (a.k.a. code formatting).

    Having options to chose from is generally a good thing, but it also implies that you have to make some thinking, and perhaps even a bit of research, to make sure you’ve chosen the right thing.1 So, which code formatting tool should you use? Have we solved by this point the problem of Ruby’s missing code formatter?

    As I’m the author of RuboCop it’s obvious that I’m biased. It’s fair for you to assume that I’ll be praising RuboCop and extolling its virtues and advantages over the competition for the remainder of this post. Well, I’ll do my best to surprise you, at least a bit.

    1. One has to appreciate the irony - after all this formatter tools should spare from having to make certain decisions. 

  • nREPL 0.6

    nREPL 0.6 was released almost two months ago, but it never got the attention it deserved. At the time of the release I was enjoying some time off from development, and when I got back home I was swamped with work. Still, I had a created todo item to write a blog post detailing the important improvements in nREPL 0.6 and I’m finally doing this.

  • The Clojure Style Guide Redux


    Recently I’ve noticed that the Community Clojure Style Guide has turned 6! According to git log the project started its life on the 3rd of January, 2013!

    commit 3abbcfb8b536999d0b1d64b531a9c57b49b4562a
    Author: Bozhidar Batsov <>
    Date:   Thu Jan 3 10:09:53 2013 -0800
        Initial commit

    Time sure flies fast!

    After the initial announcement of the guide, I never really revisited the topic, so it seems to me that this “birthday”, is as good of an opportunity as any, to do so.

  • CIDER 0.20 (Oslo)

    Hot on the heals of yesterday’s article I’ve got a new one for you! This one is going to be short and sweet - just a few notes about the release of CIDER 0.20 (Oslo).

    I guess some of you are surprised by the news - after all wasn’t CIDER 0.19 (Raleigh) released only a couple of weeks ago? Usually CIDER releases are (many) months apart. Well, while that’s normally the case, I’ve always wanted to do more focused and frequent releases and it seems that I managed to succeed this time around.

    CIDER 0.20 includes very few changes overall.1 I’ll cover them briefly here.

  • CIDER's Orchard: The Future


    This post is part of the mini-series “CIDER’s Orchard”. That’s intended to be the final article in the series, but this might change depending on my inspiration.

  • nREPL: Beyond Clojure


    Many people think of nREPL as a Clojure-specific REPL server and that’s perfectly fine. After all the project started its life in the realm of Clojure and the canonical and most widely used implementation is written in Clojure. However, nREPL is much more than its reference implementation and a recent conversation with Phil Hagelberg, reminded me of the significance of this.

    The default network protocol (socket-based communication with messages encoded using bencode) used is simple, depending neither on JVM or Clojure specifics, thereby allowing (encouraging?) the development of non-Clojure REPL clients. The REPLs operational semantics are such that essentially any non-JVM Clojure implementation should be able to implement it, with allowances for hosts that lack the concurrency primitives to support e.g. asynchronous evaluation, interrupts, etc.

  • Happy New CIDER!

    What can be a better start of 2019 than some freshly brewed CIDER’(0.)19? Consider the release of the latest CIDER my attempt to keep the New Year festivities going for a while longer. It’s also an attempt to clear some overdue items from my (humongous) personal todo list at the start of the new year (other overdue items I tackled today were shaving and taking a shower).

  • (reduce summarize year)

    Year’s end is neither an end nor a beginning but a going on, with all the wisdom that experience can instill in us.

    – Hal Borland

    Another year is almost behind us and I guess it’s time for all of us to take some time to look back on it. For me 2018 was a pretty mixed year both professionally and personally. On one hand I finally managed to re-ignite my desire to work on OSS projects and I’ve managed to get a lot done on so many projects, but on the other hand I ran into some health issues, combined with burnout, and I’ve started pondering a lot about the meaning of everything that I’m doing (and the meaning of life in general). Yeah, yeah - I’m one deep and profound individual. I know.

  • CIDER's Orchard: The Periphery


    This post is part of the mini-series “CIDER’s Orchard”. Currently I’m planning 3 installments in the series, but this might change depending on my inspiration.

  • CIDER's Orchard: The Heart


    This post is part of the mini-series “CIDER’s Orchard”. Currently I’m planning 3 installments in the series, but this might change depending on my inspiration.

  • Managing Multiple JDKs on macOS


    Installing JDKs wasn’t something I needed to do often in the past - after all, Java releases were usually 3-4 years apart. Recently, however, this has changed1 and I find myself installing a new JDK every 6 months. There’s also the problem that now I have to switch between more JDKs to test things…

    I did a bit of research into streamlining my workflow with multiple JDKs and I thought I might share some of my findings with you. My workflow is macOS-specific, but I think that users of other Unix-like operating system can easily adapt it to their environment.

    Another thing to note about my workflow is that it’s very lightweight and doesn’t depend on the usage of any third-party tools. You won’t find here anything about using SDKMAN! and jEnv. You can think of this post as something in the spirit of the awesome talk Programming with Hand Tools - sometimes the journey is way more important than the destination itself.

  • nREPL Redux


    Naming is hard! It truly is! I’ve spent a lot of time ruminating on the title for that particular post, before coming up with “nREPL Redux”. I could have just as easily gone with something like “nREPL Reborn”, “nREPL Returns”, “nREPL Forever”, “nREPL Strikes Back” or “The Revenge of nREPL”.1 Anyways, the name doesn’t matter that much - what matters is the story I’m about to tell you. Namely the story of the rise, fall and re-birth of the most important tool in the Clojure ecosystem today.

    If you’re into Clojure development you probably know that I’m the author of CIDER - a (somewhat) popular Clojure programming environment. Most people think of CIDER as an Emacs project, but it’s much bigger than this - there are so many moving pieces that make the whole thing work, that I should probably write separately on this subject (and I totally plan to do so). One piece is special, though. It’s the very heart of CIDER and it’s the nREPL server which powers all the magic that happens behind the scenes - code evaluation, code completion, debugging and all that jazz.

    nREPL is, very simply put, a network REPL server, which aims to provide a common ground for Clojure tool authors who need access to a REPL. This post is mostly about nREPL, but it’s also about some bigger topics like building inclusive communities, avoiding past mistakes and driving progress forward. So, here we go…

    1. Probably by now you’ve realized I’m a huge Batman and Star Wars fan. 

  • A Better Way to Compare Versions in Ruby

    Very often we need to compare version strings in the Ruby code we write - e.g. we need to handle something differently if some library is newer than some version (perhaps because it changed its API). As versions are often represented as strings many Rubyists would write code like this:

    if version > '2.3.4'
      # ...
      # ...
  • A Safer RuboCop

    I’ll assume that if you’re reading this post, then you probably already know what RuboCop is, so I won’t go into any details on that subject.1

    Yesterday the project reached a very important milestone2 on its way to the “magic” 1.0 release - namely the introduction of extended cop3 metadata and the ability to run only cops and auto-corrections that can’t possibly break your code by changing its meaning. We call such cops and their auto-corrections “safe”. Making use of the new functionality is very easy:

    # Run only safe cops.
    $ rubocop --safe
    # Perform only safe auto-corrections.
    $ rubocop --safe-auto-correct
    # Run only safe cops and perform only safe auto-corrections.
    $ rubocop --safe --safe-auto-correct
    1. For those of you who don’t know - it’s a popular Ruby static code analyzer and formatter. 

    2. RuboCop 0.60. The complete release notes are here

    3. RuboCop’s lingo for a check. 

  • nREPL's Secret TTY Transport

    Ever since I took over the development of nREPL a few months ago, I’ve been spending a lot of time learning about its inner workings and documenting them meticulously.1 I’ve learned a ton so far, and I’d like to share some of my findings. I hope this post is going to be the first of a series of posts on nREPL internals, but I won’t make any promises. So, let’s get to the point!

    1. I plan to write a lot more down the road about the process of migrating nREPL out of Clojure Contrib and creating its new site/manual. 

  • Going Meta

    Writing is hard. As is naming stuff.1

    Meta Redux is a re-boot of my blogging endeavours that failed miserably so far due to a combination of poor choice of tools and lack of vision, time, and writing skills. I believe this time around I got the tooling2 and the vision right, but I can make no promises about the rest.

    1. The name of this blog is, of course, a tribute to Emacs (in particular to its legendary Meta-x keybinding). 

    2. It’s just Jekyll. No bells, no whistles, no nonsense. 

subscribe via RSS