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! https://github.com/lambdaisland/kaocha/blob/main/CHANGELOG.md#10829-2021-03-08--a88ebda
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. https://github.com/lambdaisland/glogi
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
https://github.com/saberstack/loop
Brilliant! I look forward to trying this out.
@blak3mill3r great, let me know how it goes
Hi. Pleased to announce hermes
0.4 release - an open source and clojure-based SNOMED CT terminology library and microservice https://github.com/wardle/hermes 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.
The other linked projects are concierge
(https://github.com/wardle/concierge - integration with legacy enterprise APIs in NHS in Wales, UK), nhspd
(https://github.com/wardle/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
(https://github.com/wardle/trud - providing sane access to the UK NHS' reference data) and clods
(https://github.com/wardle/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:
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...
Debuting Monnit, just another monads library https://github.com/nilern/monnit
i like the formulation with the various effect operations implemented as different types @nilern ... food for thought - are you heading towards a general purpose effect-combining approach like fused-effects &c ?
So https://github.com/nilern/taksi 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 https://github.com/nilern/fell 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
@nilern 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 π€―).
I put out 0.1.2 with docstring improvements https://cljdoc.org/d/com.deepbeginnings/monnit/0.1.2/api/monnit.core (thanks @lodin.johan!)
haha, definitely the first one π
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 @nilern ... not quite ready yet, but taking shape... https://github.com/mccraigmccraig/promisefx
I did say "just another monads library"
must be a mini-zeitgeist