Posts

  • CIDER's Orchard: The Periphery

    Prologue

    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

    Prologue

    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
    • CIDER’s Orchard: The Periphery
    • CIDER’s Orchard: The Future
  • Managing Multiple JDKs on macOS

    Prologue

    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

    Prologue

    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'
      # ...
    else
      # ...
    end
    
  • 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