An Architect's View

Clojure, Software Design, Frameworks and more...

Next.JDBC Release Candidate 1

| Comments

seancorfield/next.jdbc 1.0.0-rc1

next.jdbc – the “next generation” of clojure.java.jdbc – is a modern Clojure wrapper for JDBC. The first Release Candidate is now available to test – containing only accretive and fixative changes from Beta 1. The API should be considered stable enough for production usage.

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-rc1/doc/readme

The focus of this release is providing more flexibility in result set builders, so that it is easier to implement your own naming strategies, via new builders that accept :label-fn and :qualifier-fn options. These mirror the :column-fn and :table-fn options used in next.jdbc.sql – which are updated versions of clojure.java.jdbc’s :entities option. These new builder options are updated versions of clojure.java.jdbc’s :identifiers option.

Changes since Beta 1

  • Fix #24 by adding return type hints to next.jdbc functions.
  • Fix #22 by adding next.jdbc.optional with six map builders that omit NULL columns from the row hash maps.
  • Documentation improvements (#27, #28, and #29), including changing “connectable” to “transactable” for the transact function and the with-transaction macro (for consistency with the name of the underlying protocol).
  • Fix #30 by adding modified variants of column name functions and builders. The lower variants have been rewritten in terms of these new modified variants. This adds :label-fn and :qualifier-fn options that mirror :column-fn and :table-fn for row builders.

Please take it for a test drive and let me know if you run into any problems via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

Next.JDBC Beta 1

| Comments

seancorfield/next.jdbc 1.0.0-beta1

next.jdbc – the “next generation” of clojure.java.jdbc – is a modern Clojure wrapper for JDBC. Beta 1 is now available to test – only accretive and fixative changes will be made from this point on, so the API should be considered stable enough for production usage.

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-beta1/doc/readme

The group and artifact ID will remain seancorfield/next.jdbc, the namespace structure will remain next.jdbc.*. With auto-generated documentation hosted on cljdoc.org and Continuous Integration testing hosted on circleci.com, I have decided to continue work on next.jdbc outside Clojure Contrib, rather than merge it into clojure.java.jdbc as new namespaces there. I have updated the Contributing page on GitHub to reflect that Pull Requests can now be submitted.

Changes since Alpha 13

  • Set up CircleCI testing (just local DBs for now).
  • Address #21 by adding next.jdbc.specs and documenting basic usage.
  • Fix #19 by caching loaded database driver classes.
  • Address #16 by renaming reducible! to plan (this is a BREAKING CHANGE! from Alpha 13 – the naming of this function was the blocker for moving from Alpha to Beta).
  • Address #3 by deciding to maintain this library outside Clojure Contrib.

Please take it for a test drive and let me know if you run into any problems via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

Next.JDBC

| Comments

seancorfield/next.jdbc 1.0.0-alpha8

I’ve talked about this in a few groups – it’s been a long time coming. This is the “next generation” of clojure.java.jdbc – a modern wrapper for JDBC, that focuses on reduce/transducers, qualified-keywords, and datafy/nav support (so, yes, it requires Clojure 1.10).

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-alpha8/doc/readme

The next generation of clojure.java.jdbc: a new low-level Clojure wrapper for JDBC-based access to databases. It’s intended to be both faster and simpler than clojure.java.jdbc and it’s where I intend to focus my future energy, although I have not yet decided whether it will ultimately be a new set of namespaces in the Contrib lib or a separate, standalone OSS library!

At this point, I’m looking for feedback on the API and the approach (as well as bugs, performance issues, etc). Please take it for a spin and let me know what you think via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

The group/artifact ID will change at some point: and the actual namespaces will too, but I will try to make that as painless as possible when I take this out of the alpha phase.

Atom, Chlorine, and Windows

| Comments

About a month ago, I was praising Chlorine, the new Clojure package for Atom and I’ve been using it, day-in, day-out, for all my Clojure development. On a Mac, that’s straightforward because I start a Socket REPL on the Mac and I run Atom on the Mac so when I connect via Chlorine and issue the Chlorine: Load File command (via Ctrl-, f in my keymap), it sends (load-file "/path/to/file.clj") to the REPL, for the file being edited, and that is evaluated and loads the source from disk and compiles it. On Windows…

Clojure 1.10's Datafy and Nav

| Comments

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.

Excited About Clojure/conj

| Comments

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.

  • Welcome Event – I’m hoping my flight is on time and Lyft can get me there in time to chill and network with all the interesting Clojurians!
  • Stuart Halloway – In his recent Apropos podcast, he hinted that this talk would be about new tooling he has been using. Maybe prepl-related?
  • Christopher Small – Clojure on the cyberpunk frontier of democracy – This sounds fascinating.
  • Chris Johnson Bidler – Serverless-ish: Zero to App with Datomic Cloud and GraphQL.
  • Ghadi Shayban – Java Made (Somewhat) Simple – Although Ghadi told me this might be a beginner/intermediate-level talk, he’s a great speaker and I look forward to hearing his insights about the platform.
  • Boris Kourtoukov – Machines that Judge Us.
  • Tiago Luchini – Declarative Domain Modeling for Datomic Ion/Cloud.
  • Lily Goh + Dom Kiva-Meyer – Robust APIs with clojure.spec & GraphQL – I’m a huge advocate of spec and we’re also using GraphQL at work so this should be very applicable.
  • Rich Hickey – Maybe Not – Rich is always worth the price of entry!
  • Unsessions – Looking forward to seeing the schedule for these. Past years' unsessions have included some real diamonds!
  • David Chelimsky – AWS, meet Clojure.
  • Ben Kamphaus – AI Systems: Foundations for Artificial Minds or Aaron Cummings – Making Memories: Clojure For Hardware Engineers (And Others). I’m undecided but leaning toward the AI talk.
  • Elena Machkasova – Babel: middleware for beginner-friendly error messages – Anything that helps with Clojure’s error messages (much improved in Clojure 1.10!) is always worth learning about!
  • Wilker Lucio da Silva – Scaling Full-Stack Applications Over Hundreds of Microservices or Daniel Gregoire – Tables Considered Helpful. Undecided again but leaning toward the table talk.
  • Nikolas Göbel – Reactive Datalog for Datomic or Tyler Hobbs – Code goes in, Art comes out. Undecided but leaning toward the Datalog talk (because I’m not hugely interested in art/computing).
  • Gary Fredericks – What Are All These Class Files Even About? And Other Stories – Having been repeatedly bitten by AOT, I’m looking forward to this!
  • Tomomi Livingstone + Hans Livingstone – Party REPL — A multi-player REPL built for pair-programming – This looks very, very interesting!
  • Rebecca Parsons – Closing day two keynote.
  • (Party!)
  • Carin Meier – Can you GAN? – No idea about the topic but Carin is always an engaging speaker.
  • Dave Fetterman – Learning and Teaching Clojure on the job at Amperity – Because coming up to speed (and bringing others up to speed) is important.
  • Vikash Mansinghka – Probabilistic programming and meta-programming in Clojure – WAT?
  • Alex Engelberg and Derek Slager – Every Clojure Talk Ever – Cryptically enticing…

All the Paths

| Comments

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.