Fork me on GitHub
#announcements
<
2019-09-10
>
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
  :type)

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

(m/defmethod my-multimethod String
  [m]
  (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
  [m]
  (assoc m :before? true))

(m/defmethod my-multimethod :around String
  [m]
  (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! https://github.com/camsaul/methodical

👏 16
parrot 4
gerred04:09:44

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
gerred04:09:25

(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

ahungry06:09:27

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

ahungry06:09:34

let me know what you all think of this: http://slugclojure.ahungry.com/

👏 32
borkdude09:09:25

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?

Stefan11:09:27

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.

Stefan11:09:49

This one for example.

ahungry12:09:10

Good idea on the desc

ahungry12:09:08

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

metasoarous16:09:18

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?

tony.kay18:09:37

Fulcro Beta 15 is on clojars. This release fixes a few more minor issues and adds a bit of dropped SSR logic back. https://github.com/fulcrologic/fulcro/

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