This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (147)
- # boot (12)
- # chestnut (12)
- # cider (22)
- # clara (10)
- # cljs-dev (6)
- # cljs-experience (3)
- # cljsrn (12)
- # clojure (58)
- # clojure-austin (3)
- # clojure-dusseldorf (25)
- # clojure-finland (20)
- # clojure-gamedev (1)
- # clojure-greece (3)
- # clojure-italy (32)
- # clojure-new-zealand (5)
- # clojure-russia (12)
- # clojure-serbia (1)
- # clojure-spec (4)
- # clojure-uk (51)
- # clojurescript (75)
- # cursive (8)
- # datomic (81)
- # fulcro (29)
- # graphql (16)
- # heroku (6)
- # incanter (1)
- # keechma (1)
- # lumo (44)
- # off-topic (21)
- # onyx (22)
- # parinfer (5)
- # portkey (40)
- # re-frame (43)
- # reagent (5)
- # spacemacs (37)
- # specter (8)
- # unrepl (3)
anyone knows what is with immutant? Jim Crossley committed to it last on 20th of July, and its like 1.5 month noone is working on immutant.
@dbushenko not familiar with immutant in particular, but in clojure-land, a project not being worked on, often means that it's done, or at least no open bugs.
deciding whether to use immutant is also easy: do you need or want to integrate with a JEE or JBoss environment? => use immutant Otherwise, you might be better off piecing together various agnostic libraries: pedestal, ring, liberator, ... and run them on whatever server you like
I've got an idea that I would like to discuss with someone that will help people to learn new things and get more contributions to open source.
Who would be the best person to talk to?
If it’s Clojure-specific, I’d post it here and ask people to use “Start A Thread” to reply. If it’s not Clojure-specific I’d take it to the #off-topic channel
@dbushenko what @bendlas said 🙂 we'll fix bugs as they're reported, of course.
when defining assert-tag, is it better to do (assert-tag object keyword) or (asset-tag keyword object) ?
Are you expecting your function to mostly be used in a thread-first or thread-last pattern?
Is it working on single entities, or sequences of entities? I seem to recall the former are generally thread first (asset-tag object keyword), but if you would expect object to be a vector that could be mapped over or similar that's normally thread last (asset-tag keyword object) when called
What do people typically use for running background jobs inside of a Clojure web application? In a past life, I was doing lots of web development with Scala and Play and using Akka for background jobs. With Clojure and Ring, what’s a good choice for firing off the occasional background job?
ScheduledThreadPoolExecutor comes with the vm, but there are handy wrappers like At-At if you need it
there’s also Pulsar if you need to get fancy (eg. distributed state among many servers)
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html https://github.com/overtone/at-at https://github.com/puniverse/pulsar
@stephenmhopper we use Quartzite http://clojurequartz.info/
I'm new at clojure and functional programming, I hope to learn a lot to get the better of it
welcome @rcustodio ! may I suggest joining the #beginners room? there are a lot of useful people in there
@joelkuiper @noisesmith Thanks for the suggestions, I’ll start with those!
What's the go-to lib to process data (e.g. http post request) through a pipeline of validations, enrichment, error handling without deep branching and scattering try-catch, updating db and emitting events? The pipeline being the main thing. It doesn't need to be distributed, just expressed well.
@sundarj Doesn't seem like what I'm looking for. I want to define steps and if something fails I wanna know the step and context. Stuff like that.
i do believe that is the use-case of Monads - i.e https://github.com/funcool/cats/blob/master/test/cats/monad/exception_spec.cljc#L94, or, if you know js, https://drboolean.gitbooks.io/mostly-adequate-guide/ch8.html#pure-error-handling
@sundarj obligatory http://s2.quickmeme.com/img/44/44b0bd758f8ee5c81362923f0d5c8e017c9ddf623925e60c29a4c015b89fbb45.jpg
Jokes aside, are you sure monads are the thing to recommend @sundarj ? It seems to me that unless you are interested in the FP aspects, they won’t be a very pragmatic way for someone to “pipeline processing steps”
what he's asking for is a way to abstract away transforming data and errors into the same operations - that is exactly what category theory does
but there isn’t much of a practical benefit in this specific case over throwing exceptions
we already have nil punning in clojure to abstract away most null checks, this is more of the same
@sundarj out of curiosity, do you use monads on a regular basis in your Clojure code?
@U5ZAJ15P0 i'll pm you so as to not clog up this thread 🙂
aspiring (not much good) Haskell-er here: I thought the heavy category-theoretic stuff like Monad is too rigid - a pros if you're after type safety and predictability but a cons in dynamic world. But sounds like you want explicit control over the pipeline so this might be legit
@yonatanel one approach is following interpreter pattern. if you have functions return instructions that will be evaluated later, any function in the middle of the pipeline can override what the final list of instructions should be
you can also model as a stack machine
if you want side-effects, the pedestal interceptor model or any eager pipeline is a bad approach IMO - if you delay side-effects to the end you can have better commit/rollback, pruning unneeded side-effects, etc
I'm not aware of any library for this but in general, not hard to do. you can, e.g. exploit
delay to decouple the functions that emit the instructions from the one that evaluates them
Agreed, this sort of stuff can easily be modeled via a set of "step" functions that are transformations from a state to a new state. If your state is immutable, rollback is free. Bonus points if (like interceptors) the steps are defined via data. Then everything is introspect-able, and you can even compose steps programmatically via other functions.
All that stuff becomes much harder once you hide it all behind opaque functions.
(as monads do)
just one note: rollback isn't necessarily free (what you're doing might not be commutative), but at least you can control rollback w/ something better than try/catch
yeah, although something like the state monad doesn't help with that either
e.g. your function can return
Unless you use something like an IO monad, and doing that is just madness
@hcarvalhoaves or perhaps a record + a protocol with an optional IRollback
One of the reasons Interceptors use protocols is that once you need more than just (.invoke ...) functions become hard to use
Has anyone had issue with boot-reload trying to reload a file before boot-cljs has had time to write it to resources and be read to be served by your http server? (Aleph in my case; serving using ring.middleware.resource/wrap-resource)