Posts

  • nREPL 0.8: Evolving the Protocol

    A few days ago I released the first alpha version of what is eventually going to become nREPL 0.8. The upcoming release is quite special, as it adds a couple of additional ops to the core nREPL protocol itself - namely completions and lookup. Apart from this it extends the sideloader functionality, introduced in nREPL 0.7, to allow for dynamic loading of middleware.

    One of the great things about nREPL has always been its simplicity. Implementing both nREPL servers and clients is pretty easy (as they the protocol is simple) and eventually nREPL gained traction even outside of the Clojure community, which gave birth to it.1 While the default set of nREPL ops cover all basic use-cases2, there are many other common use-cases - e.g. code completion, looking up definition and documentation, finding usages, etc. The Language Server Protocol gained a lot of traction in recent years, partly because of its broader API that can power out-of-the-box most programming editors.

    In the world of Clojure this void has historically been filled by third-party nREPL middleware (e.g. cider-nrepl and refactor-nrepl), but there are always merits to having a more powerful out-of-the-box experience. That’s why after some (a lot of) consideration I’ve decided to extend the protocol with an op for code completion (completions) and another that resolves a symbol and looks up as much data for it as possible (lookup). Both those ops make sense for pretty much every programming language and therefore they fit with nREPL’s philosophy.

    Let’s examine the new ops.

    1. You might want to read about the nREPL protocol vs the Clojure nREPL server here

    2. In the words of the Beatles - “All you need is eval…”. 

    Read More
  • The RuboCop Name Drama Redux

    By now, if you’re part of the Ruby programming community, you’ve probably heard of the proposal to rename RuboCop and the unpleasant events that followed it. I really struggled with coming up with a name for this article, as there are many topics I wanted to touch upon (e.g. the burden of OSS stewardship, being respectful and adhering to the norms that once defined the Ruby community, creating a safe collaborative environment, the final decision about the name, etc), but I’m quite limited in time right now. This generic title is the best that I could, but I hope you will forgive me and focus on the content instead. Once again I got reminded that naming is (very) hard.

    I don’t really want to go repeat/retell everything that has transpired. The GitHub issue and the surrounding Twitter conversations should give you a good idea. There’s also a nice summary, written by Tim Riley that you can peruse. The purpose of the article you’re reading now is to provide some closure for that topic and a path for us to move forward.

    So, here we go…

    Read More
  • RuboCop Defaults Survey Results

    A while ago we ran a survey with RuboCop’s users with a the goal to decide if some defaults needed to be updated before cutting RuboCop 1.0. 722 people took part of the survey, and while this number was somewhat disappointing, given the size of RuboCop’s user base, I hope the results are representative of the general sentiment of our users.

    In this article I’ll briefly summarize the results from the survey and provide some personal thoughts on them. I’m too lazy to include some nice charts here (and it’s hard to share directly those generated by Google Forms), but I hope you’ll forgive me.

    Read More
  • A Cornucopia of nREPL Updates

    When I wrote about nREPL 0.7 last week I mentioned that some really exciting things were happening in the broader nREPL/Clojure community and today I want to expand a bit on those. The general theme today is that nREPL is getting more mindshare and broader tool support. The subtheme is that many tools can end up being able to support more programming languages due to nREPL’s language-agnostic nature.

    The format I’ve adopted for this post is a bit chaotic and unstructured, but I hope you’ll forgive me. So, here we go.

    iced-vim Adds support for nREPL’s Sideloader

    We didn’t have to wait long for some editor to adopt the new sideloading functionality in nREPL 0.7 - iced-vim 1.3 did this only a couple of days after nREPL was released.

    You can check out iced-vim’s sideloader documentation for more details.

    So, which client will be next?

    Chlorine Adds Alpha Support for nREPL

    After the demise of Proto REPL, Chlorine has been the undisputed Clojure ruler of the realm of Atom. Chlorine has historically relied on unrepl to power its functionality, but the recently released version 0.5 added alpha support for nREPL!

    Chlorine’s author, Mauricio Szabo, wrote a couple of cool blog posts on the topic that I can heartily recommend:

    I’m pretty sure Chlorine’s support for nREPL will improve a lot in the months to come.

    Conjure Adds Support for nREPL

    In other (amazing) news - Oliver Caldwell has been working on a rewrite of Conjure, that’s powered by nREPL and may (will?) support other programming languages besides Clojure!

    The project is off to a very promising start and I’m very excited about it!

    Calva’s new Debugger

    Calva, CIDER’s dear sibling, now has an interactive debugger! It utilizes cider-nrepl and VS Code’s debugger extension API. This work has been done as part of the Clojurists Together Q1 2020 funding period.

    I’m super excited to finally see another editor reusing CIDER’s debugger, and I’m looking forward to seeing which editor will be next!

    Babashka Now Ships with a Native nREPL Server

    These days everyone has been raging about the awesome babashka, that increased the reach of Clojure almost as much as ClojureScript did a few years ago. Scripting in Clojure is a dream come true for so many people!

    The industrious Michiel Borkent (a.k.a. borkdude) recently unveiled native nREPL support for babashka in version 0.0.79. What’s more - he did such a great job that the new server works pretty well with CIDER and you’ll even get code completion! Michiel shared with me earlier today a short presentation he did for the Amsterdam Clojure User Group on the subject.

    Somewhat amusingly, all of this was achieved with 231 lines of code. I think that’s a great testament to the simplicity of nREPL.

    Arcadia’s nREPL Server is a New Hope for ClojureCLR

    Early on nREPL was ported to ClojureCLR. That port, named nREPL CLR, was a 1:1 reimplementation of the Clojure version, and was off to a pretty strong start. Unfortunately, this port was abandoned relatively quickly, and probably doesn’t even work these days. The lack of an nREPL server for ClojureCLR meant that its users could not take advantage of many of the most popular editor plugins and IDEs for Clojure, but this is finally changing.

    Arcadia’s team have implemented a pretty solid nREPL server for the CLR. I’m hoping that as it matures it will lead to a much improved access to top-notch Clojure dev tooling for ClojureCLR. I’m hoping that the server will be extracted from Arcadia’s codebase soon and will be distributed as a standalone project for the benefit of the entire ClojureCLR community.

    Even though the server is written in C#, its entire code is something like 500 lines of code. If you’re into ClojureCLR I’d encourage you to check out the project and try to help.

    nREPL for ClojureScript

    I guess most people know that nREPL has supported ClojureScript for ages via Piggieback. Piggieback is a pretty cool solution, but it comes with a few quirks and with one important limitation - it doesn’t work with self-hosted ClojureScript, as it’s written in Clojure. This means that if you’re into Lumo and Planck you can’t use with them with your favourite nREPL client. This, however, might change soon as well…

    Chris Badahdah has been working for a while on a native nREPL implementation in ClojureScript, which won’t have this limitation. If you’re into ClojureScript, I’d encourage you to help him with the project.

    Misc

    Let’s wrap things up with several smaller news:

    As usual - I welcome help with everything nREPL-related! Don’t be shy, we’ve got fun, challenging and rewarding tasks for everyone!

    Epilogue

    What a wild ride! I don’t know about you, but so much new things happening in nREPL’s world feels like Christmas to me! I think it’s reasonably safe to say that nREPL’s community is bursting with energy and ideas these days and I’m very optimistic about the future. We’ve achieved a lot already, but I feel the best is yet to come…

    Keep hacking! May the (n)REPL be with you always!

  • Clojure Weekly

    In today’s super dynamic world of programming it’s hard to keep track of everything important going on in any programming community. Too much information, too many information channels (e.g. reddit, Twitter, Slack, Hacker News, RSS), too little time. I’ve always been a big fan of the weekly newsletter format, ever since I’ve first encountered it in the Ruby community some 15 years ago. Newsletters are typically short, they focus on everything important that happened recently and have a predictable cadence.

    Clojure has had several similar initiatives so far. First there was the Clojure Gazette1 by Eric Normand, then we got The REPL from Daniel Compton. While working on this article I also learned about The Def Newsletter, which I had somehow missed completely in the past. Unfortunately it seems it has been abandoned for a while now.

    In the past few years “The REPL” was my go to source for everything important that happened in the Clojure world, but unfortunately Daniel had a lot on his hands lately and “The REPL” lost some of its traction. Fortunately, a couple of weeks ago Aleksandar Simic (a.k.a. @dotemacs) launched Clojure Weekly, a curated set of Clojure-related news. I really enjoyed the first 3 editions and I’ve already learned quite a few cools things from there. I even took some action items for my projects:

    • Remove support for Nashorn from Piggieback (ClojureScript dropped support for Nashorn recently)2
    • Check out Lambda Island’s Clojure Style Guide and see if I can mine some useful ideas for the Community Style Guide.

    It was also nice to read all the nREPL-related announcements for the past couple of weeks, but I’m obviously quite biased on that topic.

    Funny enough, the launch of “Clojure Weekly” coincided with “The REPL” coming out of hibernation, but you can never have enough information about Clojure. Looking forward to their next editions!

    P.S. If you’re into Emacs I can heartily recommend Emacs News by Sacha Chua. It’s a fantastic newsletter for Emacs users of every skill level!

    1. Sadly, it has been defunkt for a while now. 

    2. You can find more details here

Subscribe via RSS | View Older Posts