Clojure 1.10's datafy and nav

December 3, 2018

One of the more mysterious new features in Clojure 1.10 seems to be the pairing of datafy and nav (and their underlying protocols, Datafiable and Navigable). Interest in these new functions has been piqued after Stuart Halloway showed off REBL at Clojure/conj (video). Stu presented this functionality as "generalized laziness": datafy produces a "data representation" of things and nav lets you (lazily) navigate around that data.

The REBL "is a graphical, interactive tool for browsing Clojure data". And in Clojure we're used to the concept of "it's just data" so a graphical browser might sound useful but not exactly earthshaking. But REBL is just an example of what can be built with the new functionality in 1.10 and, indeed, Stu's claim of "generalized laziness" is well made but a little hard to grok until you actually build something with the new protocols and functions.

Continue reading →

Excited About Clojure/conj

October 25, 2018

It has been a crazy busy year, both at work and personally, and it's hard for me to believe my last blog post was in April!

Clojure/conj is coming up fast and the schedule was posted today, which has made me even more excited about it. Here's a run down of the sessions I plan to attend -- I'll write up my thoughts on everything shortly after the conference.

Continue reading →

All The Paths

April 18, 2018

With the recent arrival of clj and tools.deps.alpha as a "standard" lightweight way to run Clojure programs and the seed for tooling based on deps.edn dependency files, it's time to take a look at the terminology used across Clojure's various tools.

Running Java/JVM Programs

Continue reading →

Boot localrepo?

November 17, 2017

Sometimes you just can't help having a "random 3rd part JAR file" in your project. The best practice is, of course, to upload it to your preferred Maven-compatible repository via whatever service or software you use for all your in-house shared artifacts. But sometimes you just want to play with that JAR file locally, or you haven't gotten around to running your own shared repository.

If you're using Leiningen, you'll probably reach for the excellent lein-localrepo which lets you "install" your random JAR file into your local Maven cache (in ~/.m2/repository).

Continue reading →

Release 0.7.0 of clojure.java.jdbc

July 17, 2017

The stable 0.7.0 release of java.jdbc -- the Clojure Contrib JDBC library -- has been baking for over a year, across of a trail of alpha and beta releases, and is now, finally, available!

While you could read the java.jdbc Change Log to figure out what is new in this release, I thought it would be easier to consolidate all the changes into a blog post, with changes organized by category, and provide justification for the various changes.

Continue reading →

seancorfield/boot-new has moved to boot/new

January 19, 2017

I'm pleased to announce that the "Boot new" task formerly known as seancorfield/boot-new has moved to the Boot organization, as boot-clj/boot-new and that the group/artifact ID is now boot/new.

You can use this to easily create a new Boot-based project:

Continue reading →

Clojure, New Relic, and Slow Application Startup

July 29, 2016

A couple of years ago, I blogged about instrumenting Clojure for New Relic monitoring and we've generally been pretty happy with New Relic as a service overall. A while back, we had tried to update our New Relic Agent (used with our Tomcat-based web applications) from 3.21.0 to 3.25.0 and we ran into exceedingly long application start times, so we rolled back and continued on with 3.21.0. Recently, we decided to update the Agent to 3.30.1 to take advantage of advertised performance improvements and security enhancements. Once again we ran into exceedingly long application start times.

An application that took just over four minutes to start up fully with 3.21.0 was taking around forty minutes to start up with 3.30.1 -- an order of magnitude slower!

Continue reading →

Start Your Engine

July 18, 2016

Today I'm inspired by the latest issue of Eric Normand's Clojure Gazette which talks about why his "Joy of Programming" comes from learning and exploration.

I got into programming as a child because I was curious about solving puzzles and problems: given the (relatively) limited vocabulary of a programming language and its input and output features, and some interesting problem that came to mind, can I solve it in a usable (and hopefully elegant) way?

Continue reading →

More Boot

June 17, 2016

Back in February I talked about boot-new and talked about a "future 1.0.0 release". We're not there yet, but generators got added in release 0.4.0 and, in the four minor releases since, the focus has been on refactoring to match the core Boot task structure and improving compatibility with Leiningen templates. At World Singles, we've continued to extend our usage of Boot until we have only a couple of Ant tasks left and we expect those to be within Boot's reach soon. In this post, I want to cover some of the things we've been doing with Boot recently.

I feel I should start with an apology for the "radio silence" since February -- it's a combination of work being extremely engaging (and busy!) and some aspects of my personal life going somewhat to hell in a handbasket... But things have improved lately (thankfully!) and I hope to be more regular in my blogging (I certainly have a decent queue of article ideas in my head!).

Continue reading →

boot-new

February 2, 2016

In my previous three blog posts about Boot -- Rebooting Clojure, Building On Boot, and Testing With Boot -- I looked at why World Singles decided to switch from Leiningen to Boot, as well discussing one of the missing pieces for us (testing). Once I had boot-expectations written, I was casting around for other missing pieces in the ecosystem and one glaring one was the lack of something to generate new projects from templates.

Leiningen has long-supported the generation of new projects from templates and it's pretty slick. Want to get a new Framework One application up and running?

Continue reading →