This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # beginners (115)
- # calva (7)
- # cider (8)
- # clj-kondo (3)
- # cljdoc (12)
- # clojure (50)
- # clojure-europe (4)
- # clojure-italy (5)
- # clojure-nl (6)
- # clojure-spec (70)
- # clojure-uk (88)
- # clojurescript (54)
- # core-async (16)
- # cursive (5)
- # datomic (31)
- # editors (4)
- # emacs (4)
- # fulcro (29)
- # graphql (17)
- # luminus (1)
- # lumo (2)
- # off-topic (37)
- # pathom (16)
- # random (2)
- # re-frame (5)
- # reitit (3)
- # rum (2)
- # shadow-cljs (192)
- # sql (11)
Hi. I hope this is the correct channel to ask this query: First the admission: I am not well-versed with the nitty gritty of Rx API. But conceptually I think it enables async programming by employing the Reactive programming paradigm, which in turn is implemented (in Rx) using the functional paradigm. I may either be wrong or very wrong here. Now, I have often encountered the opinion that Rx has a tendency to turn into a 'spaghetti mess' or a 'soup', or something on those lines. One example: https://www.reddit.com/r/reactjs/comments/41w6jb/comment/cz663a4 But I have never seen that claim substantiated. Can anyone with some experience elaborate for or against the claim? Or point me in that direction?
using RX for debouncing click events or using
from(Promise) all the time is overkill and missing the point. nobody needs RX for 99% of their UI
you can always build spaghetti, RX or not. look at
onion architecture or
atomic design... but again those require discipline
I agree. I felt similar about Rx being overkill too, but was quite distracted by all the brouhaha over it in JS land.
I like redux though. Its philosophy is simple. The view is a function of centralized state. Or view is a snapshot of the state at a given time, whichever seems more correct 😅
I guess I will keep learning clojure for now. Found the CSP approach more amenable anyway.
but if you break the centralized state... start building your own middlewares to deal complex business logic... ugh
first thing i always use is the time slider in the redux dev-tools to see if it breaks the site
Anyone using Asana for sprints, issue tracking etc?
It looks like it could be used company wide, also for non-engineering. I'm curious what the experiences are of developers and if it has huge downsides compared to other tools
We've been using asana for years and really like it. but we are a data-team rather than a software engineering team so YMMV. Other non-engineering teams are also moving to Asana from Trello (mostly) and maybe other tools?
We used it for a year or two. Ended up moving to https://clubhouse.io. As an added bonus it's written in Clojure.
Hard to move things between boards. The list view and board view were incompatible and were just settings on the board. Couldn’t easily view between them
I'm trying it now and it seems you can only add it to another project / board (which means it's connected to both). Odd or I miss something
Thanks for the feedback
Just found out how you can move an item between boards 🙂
ah hmm i was hoping to hear something else. Thanks!
If you’re looking for a project management tool I suggest you take a look at Clubhouse — https://clubhouse.io/
re: Rx, I think there are some cases where you want the async flow of values to be first class, and there Rx really shines
it makes explicit all of the implicit stuff you end up doing across your code base with events and requests and websockets etc.
but 80% of my cases, I don’t want that stuff to be explicit. Because the abstraction cost of Rx is extremely high; you have to solve the “how do I get Rx to do this” problem, before you can actually start to solve your real problem - “I need to fetch some data and render it over here”
this is why I really like the things that have come out of React, like apollo/relay and soon the Suspense dataloader stuff. it covers the 80% case so well, while giving me an escape hatch (either a custom data loader, or hooks) to extend to something more complex like Rx, or in CLJS core.async, or whatever the next hotness is
Hah! I love RxJS, I use it almost every day. I appreciate it as a general lib to express a lot of complex problems using the same terminology. I don't see how modeling with Rx is much different from Clojure core or any other FP-like library or language. Bacon, Highland, even Elixir streams and Rx all have a pretty similar API. By learning one I've had no friction picking up the others. I can see how it can get messy when you have a lot of streams you are combining together. I try to have one or two pipelines that everything either pushes to or reads from. I especially love redux-observable which combines RxJS + Redux. While I do like a lot of re-frame, I really love the expressive power of Rx for when simple db updates and pre-made fx doesn't quite cut it. I prefer the generalness of Rx to learning the very specific shape and api of re-frame when it only applies to re-frame.
Granted, I definitely never got into Cycle. I liked the replay-ability of redux, and felt redux-observable allows me to model complex units of behavior in terms of simple transform functions that look for a specific action then emit another action.
In fact, I decided to delve into Rx because I was evaluating redux-observable and redux-saga. Rx certainly looks elegant compared to sagas (which look similar to CSP approach), at least from the examples I encountered. But the former has such a large API surface! On the other hand, saga while looked daunting at first, were reasonably comprehensible. I don't mind bits of imperative code as long as they are easier to reason about. I have found love in the clojure approach where pragmatism is valued over purity. So for now I am keeping Rx at bay. But I am sure my first use of Rx, if within Js, would be redux-observable.
That's a fair assessment. I think Rx's API surface becomes moot if you are coming to it with understanding and experience with streams already. I think people tend to try to think of it as working with Arrays + time when really it's more like data hoses that will eventually have data fluid flowing through them. I feel the metaphor applies to architecture decisions as well. If you have a hose that has many other hoses piping into it and jutting out of it at random places, of course, it's going to become a spaghetti mess. If you stick to forming combinations at the beginning or at the end of your hoses, you always know where to look to make the changes you need.
Also, if it's of any use I did implement a near equivalent of redux + redux-observable in ClojureScript using BaconJS. https://github.com/eccentric-j/benfrankenberg.com/blob/master/src/com/benfrankenberg/app/state.cljs
I think you hit the nail on the head. I am almost certain that I shied away from rx for lack of proper grasp on the underlying concepts; something I need to address first.
Hah. I was dreaming of implementing (in near future of course) redux using rx paradigm in order to learn better the underlying concepts of redux and rx and reactive programming as a whole. Your link will come in handy!
Hey, anyone want to answer a noob kubernetes question? I have two pods, one is a back-end server and the other is front-end code in an nginx container. When a new version of the FE pod is deployed, I want to notify the back-end server that that has happened so it can update a cache-busting parameter while it renders
index.html. What's the approved k8s mechanism for reacting to this kind of event?