Method Values

12 Feb 2024

Clojure 1.12.0-alpha6 introduced method values to Clojure and this post will explore them in a bit more depth.

The olden days

Clojure functions are first-class values and can easily be passed around, but...

Read More

Efficient partitioning

15 Jun 2022

Certain tasks call for breaking up sequential data into segments to work on each segment. In Clojure, we often use functions like partition-all and partition to break sequential data (or code)...

Read More

clj exec update

04 Sep 2020

A new prerelease version of clj is now available (1.10.1.672) and it includes some important restructuring of how you use clj.

This version has not yet been promoted to “stable” release. You can either install...

Read More

clj exec

28 Jul 2020

A new development version of clj is now available (1.10.1.600) and it includes the first public release of several strands of work that have been ongoing over the last few months (with more to come).

...
Read More

1.0 all the things

18 Feb 2020

I’ve been working on a write-up for the 2020 State of Clojure survey (sorry that’s taking so long). One feedback comment stuck with me:

“A lot of libraries in the Clojure ecosystem (including in clojure.core)...

Read More

Customizing your REPL in clj

11 Feb 2020

There was a question on Slack this evening about getting a similar effect to the injections feature of Leiningen in clj. There is no built-in feature for this, but you don’t really need one. The...

Read More

Journal 2020.2 - s3 transporter, survey

24 Jan 2020

Happy new year!

clj s3 transporter

I spent a good chunk of the last two weeks wrapping up and releasing the new S3 transporter for tools.deps/clj (supporting access to public and private S3 repos)....

Read More

Journal 2020.1 - Clojure survey, core.async

10 Jan 2020

Happy new year!

core.async

I spent some time with core.async this week, trying to clear up a bunch of old patches and tickets. Many thanks to Kevin Downey, Nicola Mometto, Angus Fletcher, Leon Grapenthin,...

Read More

Journal 2019.23 - 1.11, spec

06 Oct 2019

Clojure 1.11 planning

Lately we’ve been starting to work on planning for Clojure 1.11. I’ve collected a list of possible features and problem areas and we’re starting to flesh those out a bit more...

Read More

Journal 2019.16 - closed spec checking

19 Apr 2019

Closed spec checking

As I mentioned last week, I’ve been working on adding a new form of closed spec checking and that’s in master for spec 2 now, or at least the first cut...

Read More

Journal 2019.13 - schema and select

29 Mar 2019

Spec schema and select

I spent the bulk of the week this week focused on implementing schema support and modifying s/select in spec-alpha2. Rather than leave long-winded stuff here, I tried to summarize in...

Read More

Journal 2019.12 - Clojure 1.10.1-beta1

23 Mar 2019

Clojure 1.10.1-beta1

The big news this week is the release of Clojure 1.10.1-beta1. This is a tightly scoped release and we are not expecting to add much, if anything, more to it before it’s...

Read More

Journal 2019.5 - spec

02 Feb 2019

spec

Again this week, I spent most of my focus time on spec 2. Here’s a picture I spent a lot of time making:

Spec 2

Trying to capture a lot...

Read More

Journal 2019.4 - spec, surveys

28 Jan 2019

spec

Another week spent mostly on spec. In particular, Rich and I had a long talk about the different spec representations and what different parts of the spec API will accept. I updated the...

Read More

Journal 2019.2 - survey, spec

11 Jan 2019

Clojure Survey

Way back in 2010, Chas Emerick had the excellent idea to take a survey of Clojure developers and then keep doing it every year. In 2014, we took over doing and reporting...

Read More

Journal 2019.1 - tools.deps

04 Jan 2019

I got some actual down time over the holidays and mostly stayed away from the keyboard, which was a nice recharge. Between that and the short week this week, I don’t have too much to...

Read More

Clojure 1.10 error messages

17 Dec 2018

One of the things I spent the most time working on for Clojure 1.10 (along with Rich and Stu) is updated error messages. The thing we spent the most time working through was identifying the...

Read More

Default data reader function and tagged literals

21 Jun 2018

Clojure has always avoided including reader macros with the goal of making all code readable by all users of Clojure, without requiring optional code. It’s a small constraint, but on balance I think has been...

Read More

add-lib

04 May 2018

This is a work-in-progress / sneak-peek of a new feature in tools.deps.alpha targeted at the problem of dynamically adding libraries while working at the REPL. For example, perhaps you’re working along and discover a...

Read More

Inside Clojure's Collection Model

16 Mar 2016

What are the Clojure collection types? Most Clojurists would say lists, vectors, maps, and sets are all you need. You might add seqs too - they are collection abstractions (views) which can be backed by...

Read More

Polymorphic performance

27 Apr 2015

There was a question recently on the Clojure mailing list about when to use multimethods vs protocols vs case vs cond:

There are situations where I want to dispatch functions using based on...

Read More

Clojure Tip - "contains?"

27 Jan 2015

There are a number of questions and gotchas that come up over and over in Clojure forums. I thought it might be useful to write some of them up. I initially planned to write them...

Read More

Sequences

02 Jan 2015

Sequences are the key abstraction that connects two of the most important parts of Clojure - immutable persistent collections and the sequence library. Lisp has a deep tradition of list-oriented transformation functions. In Clojure, these...

Read More

Creating a reducible repeat

21 Dec 2014

One fun ticket (CLJ-1603) that I worked on recently involved retrofitting some existing sequence “generator” functions to be directly reducible. Specifically, the clojure.core functions cycle, iterate, and repeat. I’ll just talk about repeat in...

Read More

Creating an interpose transducer

18 Dec 2014

Continuing from yesterday’s post, I wanted to cover the interpose transducer from CLJ-1601.

The sequence version of interpose is a straightforward combination of other existing sequence functions (repeat, interleave, and drop). It’s implemented...

Read More

Creating a distinct transducer

17 Dec 2014

I wanted to talk in this post about implementing some new transducer impls for existing sequence functions which is based on CLJ-1601. If you haven’t checked into transducers yet, it’s probably best if you...

Read More

Boxed math warnings

15 Dec 2014

In Java, there are two forms of numbers - primitive and boxed (Object) forms. This distinction may be resolved some day with value types, but for now that’s just the reality of the JVM...

Read More