Fork me on GitHub
Cam Saul01:09:16

Hey everyone. I just put together a library that ports some of the better features of CLOS to Clojure multimethods, and adds a whole lot more. You can call the next method with next-method:

(require '[methodical.core :as m])

(m/defmulti my-multimethod

(m/defmethod my-multimethod Object
  (assoc m :object? true))

(m/defmethod my-multimethod String
  (next-method (assoc m :string? true)))

(my-multimethod {:type String})
;; -> {:type java.lang.String, :string? true, :object? true}
and define auxiliary methods (`:before`, :after, and :around):
(m/defmethod my-multimethod :before String
  (assoc m :before? true))

(m/defmethod my-multimethod :around String
  (next-method (assoc m :around? true)))

(my-multimethod {:type String})
;; -> {:type java.lang.String, :around? true, :before? true, :string? true, :object? true}
and that’s just the tip of the iceberg. Pluggable caching, support for completely custom dispatch and method combination strategies, functions for programmatically creating and composing multimethods, and a whole lot more!

👏 16
parrot 4

inspired by a conversation in #shadow-cljs, i've created the #cloud-native channel to discuss/ask questions about this latest buzzword, including all of your other favorite buzzwords such as kubernetes, docker, service meshes (including istio and linkerd!), spiffe/spire, and basically how to optimize Clojure for these environments or talk about Clojure can help us infrastructure engineers / SREs.

👍 4

(i also sit on several CNCF and LF SIGs related to this, am a core contributor to Kubernetes, Helm, and other projects, and working on a Clojure Kubernetes client for operator development, so happy to spike and grow this channel)

Zac Bir14:09:19

We’re trying to go all-in on CNAB, I’d love to keep abreast of what you’re working on. Joining


I was griping in #clojure about the lack of a good way to search through the multitude of packages - clojars doesn't seem to list popularity, and searching on github for a specific lib is though


let me know what you all think of this:

👏 32

That seems useful! One question: why only 700-ish results? Feedback: maybe use a slash instead of a dot between the org and the lib name?


I like it as well! Another suggestion: I always look at the projects’s description first on github. To me it would be useful to see this above the project’s README.


This one for example.


Good idea on the desc


The 700 or so more closely match the clojure toolbox site results vs an open ended query for all


Good stuff! This is super useful, and I've wanted something like this in the past; So thanks for putting this out there! Now for some constructive criticism: I do however see that when I search for certain terms, items will come up which are only tangentially related. Maybe there's a way to look for term repeat, or if you're feeling really fancy, do some topic modelling to see if the content is associated with whatever term is being search for (vs mentioning off hand)? I found it even matching partial word matches for unrelated words in some cases (particularly short words), so maybe an exact match option would be helpful?


Fulcro Beta 15 is on clojars. This release fixes a few more minor issues and adds a bit of dropped SSR logic back.

❤️ 40
aw_yeah 20
bananadance 16
parrot 12
bmo 12
metal 12