This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (1)
- # architecture (29)
- # beginners (244)
- # boot (5)
- # cider (2)
- # clara (8)
- # cljs-dev (58)
- # clojure (93)
- # clojure-australia (1)
- # clojure-dusseldorf (4)
- # clojure-france (1)
- # clojure-greece (16)
- # clojure-italy (9)
- # clojure-norway (1)
- # clojure-romania (1)
- # clojure-serbia (3)
- # clojure-spec (68)
- # clojure-uk (103)
- # clojurescript (41)
- # code-reviews (4)
- # community-development (4)
- # cursive (11)
- # data-science (2)
- # datascript (6)
- # defnpodcast (4)
- # docs (21)
- # duct (4)
- # emacs (118)
- # fulcro (120)
- # graphql (1)
- # jobs (1)
- # jobs-discuss (43)
- # leiningen (12)
- # off-topic (39)
- # onyx (11)
- # parinfer (13)
- # perun (1)
- # re-frame (2)
- # shadow-cljs (4)
- # spacemacs (5)
- # unrepl (6)
- # yada (1)
I'm looking at https://clojuredocs.org/clojure.core/comp in h = (comp a b c d e f g) is the idea that: a b c d e f, are all called as 1 arg input, 1 arg output g, h are both N arg input, 1 arg output ?
yes. See also here: https://www.braveclojure.com/functional-programming/#comp
hi everyone, i have a question regarding app auto-updates, plugins/modules and the like. i’m working on a web application code base for a client, several projects will be based on it, and i’d like to add auto-updates and a plugin/module system to it. i’ve heard about OSGi but i’m not sure it’s a good fit for either me or clojure. any pointers/advice?
I think @U04V70XH6 may have some valuable insights into OSGi and whether it's okay or whether it has particular pitfalls. He should be online in a few hours time.
Thanks! In particular, I wonder about the warnings I read when googling this concerning the “classloader interference” and the “large impacts” on my “application architecture”
The CFML (ColdFusion) community have an open source server called Lucee which was rebuilt in the latest major release to make use of OSGi and it caused some edge case issues when trying to deal with certain aspects of Clojure from within a CFML project so it may be completely irrelevant to your questions, but Sean understood the issue in better detail than I could explain it.
I’ll try to find it, thanks again. I hope this Sean you mention has a minute or two to spare 🙂
the java8 host expects that there’s a class that implements
com.amazonaws.services.lambda.runtime.RequestStreamHandler which has a single
my dream is to expose a single fn that one can just do
and it would generate the class. but I’m guessing that a function won’t suffice, since in order to
(deflambda my-fn [request] "Hello")
gen-classthe correct class, it needs to be known at compile time?
:thinking_face: I’m not familiar with reify, but from the example it looks like there’s some ceremony involved to load and invoke the Clojure namespace
I’ve heard about portkey also, but never tried it. https://github.com/portkey-cloud/portkey
looks very similar to what you’re trying to do, if you don’t want to use the lib directly you could probably at least get some good ideas from it 🙂
yeah, I see. they’re using a macro to generate the gen-class. was hoping to avoid macros but c’est la vie
one thing that is interesting… I looked at lambada yesterday and dismissed it because it hasn’t been updated in ~2 years. but looking at the code, it looks still valid
coming from other mainstream languages, anything that hasn’t been updated in a year is invalid 😛
Clojure and Java take backwards compatibility very serious, unlike some other mainstream languages
hence, there is less churn in Github repos and things that worked a couple of years ago tend to still work
is there a version of
(satisfies? P x) that requires an implementation of all methods from
perhaps Rich wanted us to avoid implementing methods which body consists of
(throw (NotImplementedException.)), which happens ocassionally in Java et al
I think the reasoning is largely the “open vs. close” debate, like in spec when it comes to validation (open maps)
Should be achievable with reflection although I’d like to avoid any hacky business, hence my question 🙂
ahh right, to avoid breaking existing implementations if you add new methods to the protocol
one could argue that that's what (semantic) versioning exists for, but then again Rich opposes that
@noisesmith I 3 days ago I asked you a couple of beginner questions about serving json. I did not understand your suggestions at all then. I do now. After reflecting about it (and after reading the docs of ring) I finally understand everything, my problems are gone and I became a better person. Thank you so much!
I just read the announcement about git deps. I have heard of it first when go used that as dependency mechanism and have always been sceptical about that. I think this introduces some risks like, what if I refer to a certain branch that gets deleted, or a tag / version. Or maybe someone deletes its repo or maybe moves it. I guess there are some more risks about dependencies vanishing. Does someone know if this is a problem in the go world? Of course I could clone every repo I use as a dependency, but do I want that? Surely not.
the feature isn't there yet as far as I know, just something interest has been expressed in, so it is hard to critique it
in general maven works pretty well, but some artifacts still get deleted or a given version is overwritten by a different jar from time to time
as a result most organizations of any size actually run a caching proxy maven server of some kind
Worst case you can just fork repos and control this, it s way easier than publishing on maven
(if you are part of a large organization that is not running some kind of caching proxy maven server you should look in to it)
@hiredman I am and we do run our on artifactory. I am talking more about myself when I do my side projects and dont have my own artifactory available.
it looks like the write up says it checks out the repo so it sounds like you will have a back of ever repo+branch you depend on
most build tools do cache 🙂 @alexmiller I am pretty sure you discussed the disadvantages and wonder what your conclucions were? Also, how are transitive versions, that are different, resolved?
@hiredman it currently supports only deps.edn but is designed to support others as they are available. I have spent some time on pom and as expected it’s truly awful to use the apis for this. so it’s not done yet. lein is kind of a pain as there is no api to just read a project.clj and get its deps other than naively reading it as if it were data (which certainly won’t always work)
@sveri it’s git - commits have a relationship. if multiple revs are applicable, the “most descendant” one will be used. if there is no lineage relationship, then this is an unresolvable conflict and your classpath can’t be computed (and you’ll get an error). note that this relationship can even work across forks, because git is awesome. :)
additionally, most maven artifacts contain the git url + rev when they were created so you can also compare versions between maven and git deps, but I have not actually added that yet
I have a dependency free library on github and while trying to pull it with the new deps.edn feature I'm getting the following error:
by default it tries to autodetect the manifest type and it finds the project.clj but doesn’t have a reader for it (yet)
I should probably change that to just not auto detect those types yet
@alexmiller The deps.edn changes are great -- thanks to you/Rich & the rest of Cognitect. I've been doing some crazy things with lein-voom and scripted repo downloading to achieve the same effect for keeping Onyx and it's ~20 sub-projects all tested against each other. This obliterates so much terrible plumbing.