Fork me on GitHub

There's a new release of Kaocha, a modern and extensible test runner, featuring many improvements and fixes. Thanks to @actuallyalys_slack, @dharrigan. @socksy, and Rob Hanlon for your contributions!

❤️ 27
👍 12

lambdaisland/glogi 1.0.83 is out. Glögi is a ClojureScript logging library based on goog.log. This version handles some upstream breaking changes, and adds a lambdaisland.glogc namespace for cross-platform logging, which dispatches to io.pedestal.log on Clojure.

👍 24
❤️ 6

New release of saberstack/loop {:mvn/version "0.2.2"}. This is a bug fix release which fixes a concurrency bug. Loop allows you to take control of your core.async loops with just a bit of state (one atom). Start/stop a go-loop from the REPL or “re-define” a running go-loop by starting a new one with the same :id

😋 3

Brilliant! I look forward to trying this out.

👍 3

@UC681SR17 great, let me know how it goes

Mark Wardle11:03:58

Hi. Pleased to announce hermes 0.4 release - an open source and clojure-based SNOMED CT terminology library and microservice I use it in my electronic health record software running here in the UK - and it is part of a suite of clojure services to support electronic health and care records - answering the 'who', 'what', 'why' and 'when' of health and care. Now with much faster import and indexing, and support for the expression constraint language (e.g. answering complex queries such as does my patient have a diagnosis that is a lung disease associated with oedema) for supporting both direct care / rules / decision support and analytics. I use it to show specialist pages like specialised summaries for motor neurone disease or multiple sclerosis so the clinician sees the right information at the right time.

👀 15
🇬🇧 6
👌 24
Mark Wardle11:03:08

The other linked projects are concierge ( - integration with legacy enterprise APIs in NHS in Wales, UK), nhspd ( - providing UK geographical services mapping postcodes to administrative regions/indices of socio-economic deprivation - I've used extensively in our research output on outcomes in multiple sclerosis), trud ( - providing sane access to the UK NHS' reference data) and clods ( - providing a library and microservice for UK health and care organisations. These essentially drive a tonne of logic in my health and care software - e..g find local GPs or hospitals etc. I've never been able to create so much functionality with so little code so thank you clojure!


I don’t work in healthcare so I have no idea about the functionality, but it was really interesting to take a look at this codebase, thanks for sharing! :thumbsup:

Mark Wardle17:03:14

Thanks! Well I have only recently started using clojure in the last year so I hope you mean "good" interesting and not "oh crumbs" interesting...


haha, definitely the first one 😄

👍 3

Debuting Monnit, just another monads library

🐟 18
clojure-spin 12

as an experienced clojurian I don't really understand what the value prop of the lib is in practice; do you have any examples of how it should be used?


in the tests I see e.g. fmap/flat-map/sconcat used on vectors, but I don't see the benefit of that over the clojure.core seq ops


just to clarify: this isn't a dig btw, I'm genuinely curious. it sounds like you have some concrete use cases for this and went and built a lib to handle it


The point is not that it is somehow better to use fmap than mapv or something. I built this mostly as a basis for other libs that do stuff like async IO, parsing or algebraic effects. But the included monads can automate the plumbing around error handling, context parameters and immutable state.


yeah! I've been banging on my own experiments w/ async IO and effects in my spare time, and find myself having to do a lot of complex stuff with dynamic bindings, which is why I'm interested in learning how I could use more formal patterns in those efforts


maybe I should just wait for you to announce your other libs 😄


It's a polarized topic; I think nil and exceptions promote bad error handling and that dynamic Vars are usually a code smell while other people think it's cool and I've just had too much Haskell.


Yeah I hope the other libs will be more exciting or at least mindblowing


lol, I've also been working on a monad lib @U4MB6UKDL ... not quite ready yet, but taking shape...


I did say "just another monads library"


must be a mini-zeitgeist


@U4YGF4NGM and others wishing to explore the value-proposition of Monads from a clojure perspective may appreciate this talk


Monads are very powerful and FWIW, I am glad to see this new library from @U4MB6UKDL ... one of my favorite things about Clojure is that it can be extended so flexibly that we can poach most excellent ideas from other languages.

Ben Sless07:03:08

Any chance to bother you for a sneak peak on how you intend to use it for async IO or effects?


i like the formulation with the various effect operations implemented as different types @U4MB6UKDL ... food for thought - are you heading towards a general purpose effect-combining approach like fused-effects &c ?


So is my async library, the goal is something similar to Scalaz ZIO and Concurrent ML. I also have a freer monad with higher-order effects for maximum expressivity but I am not sure whether that is even a good idea; the ZIO/polysemy approach might not support backtracking with scoped resources or whatever but that is hardly called for in web apps.


Obviously those should not be used yet and fell doesn't even use monnit ATM


this looks great - and i haven't really grokked the free/freer stuff yet, having a clojure should help me with that 🙂


It's hard and dynamic typing probably makes it even harder. Again, not sure if bringing such a thing into Clojure is even a good idea.


well i won't be able to discuss that point until i've grokked them 🙂


but even if free/freer is not the route, i do think that there's a lot of scope for bringing effectful stuff into clojure


Yes and the re-frame (-style) effects processing is very clunky, surely we can do better than that


@U4MB6UKDL How do you know which monad to use in mlet?


(mlet [a (foo 5)] ... just becomes (bind (foo 5) (fn [a] ... and bind is a protocol method. The mlet bindings could even use different monads but don't do that (seems that in Haskell do is not just syntactic sugar after all since using different monads in one do is a type error).


(In Haskell it is just sugar since bind has the type m a -> (a -> m b) -> m b; the m cannot change.)


Now I see. While you have a multimethod pure, you actually use regular function for the particular monad.


(I see it now.)


Yes there is no magic to emulate return value polymorphism for pure.


The docs for mlet is a bit misleading I think, unless I'm missing something.


You found a bug in the docstring, the pure part would not work (unless you e.g. :refer monnit.option/pure)


To make it work you'd have to save away the result of e.g. (foo 0) and pass that as the first argument to pure.


Actually (type a). algo.monads implicitly wraps the body in the right pure and Cats sets a dynamic Var to a MonadContext so that (pure 0) usually just works (but there have been bugs).


One of my motivations is to avoid any indirections and tricks like that. Even the pure multimethod is just for situations where pure must actually be polymorphic like helper fns/macros.


Unfortunately that approach doesn't work well with lazy evaluation, eg if you use it in a function that you use with map. Then the context might be missing, or even the wrong context, when running the function.


As I said earlier I usually see dynamic Vars as a code smell. The Reader monad should be less fragile (but the Cats implementation uses dynamic Vars 🤯).