Fork me on GitHub
#announcements
<
2021-03-09
>
plexus05:03:18

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

❤️ 9
👍 4
1
plexus06:03:17

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

👍 8
❤️ 2
1
raspasov07:03:22

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

😋 1
blak3mill3r22:03:04

Brilliant! I look forward to trying this out.

👍 1
raspasov03:03:48

@UC681SR17 great, let me know how it goes

nilern18:03:08

Debuting Monnit, just another monads library https://github.com/nilern/monnit

🐟 6
clojure-spin 4
lilactown19:03:29

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?

lilactown19:03:20

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

lilactown19:03:15

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

nilern20:03:39

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.

lilactown20:03:16

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

lilactown20:03:27

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

nilern20:03:32

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.

nilern20:03:25

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

mccraigmccraig21:03:35

lol, I've also been working on a monad lib @U4MB6UKDL ... not quite ready yet, but taking shape... https://github.com/mccraigmccraig/promisefx

nilern21:03:40

I did say "just another monads library"

mccraigmccraig21:03:05

must be a mini-zeitgeist

blak3mill3r01:03:13

@U4YGF4NGM and others wishing to explore the value-proposition of Monads from a clojure perspective may appreciate this talk https://www.infoq.com/presentations/Macros-Monads/

blak3mill3r01:03:57

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?

mccraigmccraig08:03:05

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 ?

nilern12:03:56

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.

nilern12:03:32

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

mccraigmccraig12:03:13

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

nilern13:03:47

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.

mccraigmccraig13:03:14

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

mccraigmccraig13:03:48

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

nilern13:03:05

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

lodin14:03:51

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

nilern14:03:27

(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).

lodin14:03:11

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

lodin14:03:16

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

nilern14:03:26

(I see it now.)

nilern14:03:02

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

lodin14:03:03

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

nilern14:03:00

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

lodin14:03:36

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.

nilern14:03:45

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).

nilern14:03:15

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.

lodin14:03:49

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.

nilern14:03:57

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 🤯).