Posts

  • The Clojure Style Guide Redux

    Prelude

    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 <bozhidar@batsov.com>
    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.

    1. https://github.com/clojure-emacs/cider/releases/tag/v0.20.0 

  • CIDER's Orchard: The Future

    Prologue

    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

    Prelude

    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

    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