This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-14
Channels
- # atom-editor (5)
- # babashka (6)
- # beginners (29)
- # calva (16)
- # cider (1)
- # clj-kondo (20)
- # cljs-dev (44)
- # clojure (29)
- # clojure-europe (19)
- # clojure-nl (8)
- # clojure-norway (7)
- # clojure-spec (2)
- # clojure-sweden (1)
- # clojure-uk (56)
- # clojurescript (32)
- # code-reviews (30)
- # conjure (24)
- # cursive (49)
- # datomic (4)
- # fulcro (31)
- # helix (3)
- # instaparse (4)
- # kaocha (100)
- # lambdaisland (2)
- # mid-cities-meetup (1)
- # monads (1)
- # off-topic (42)
- # pathom (13)
- # pedestal (6)
- # portal (5)
- # re-frame (6)
- # reagent (9)
- # reitit (11)
- # remote-jobs (1)
- # rewrite-clj (11)
- # shadow-cljs (44)
- # sql (22)
- # tools-deps (13)
- # uncomplicate (1)
- # xtdb (15)
@smith.adriane Just checking: you did switch your credentials from username/password over to the new username/token?
I did. I just got a response in #clojars that I posted a few hours ago. The problem was the size of my jar. I guess I was too impatient when I reposted in #clojure!
imo clojure is a marxist language because it liberates you from all the superstructures of all the other programming languages lol
When there are failing tests in our CICD, it would be pretty cool if the test output could report the last people to touch the test ns in git. I was wondering if someone knew about existing functionality like this? Maybe a Clojure test lib, or some blog post discussing an implementation of what Iâm thinking of?
Perhaps one could use with-tap-output
, then handle errors programmatically and have Clojure ask git who the failing ns file âownerâ is, printing that along with the regular test output. It doesnât seem straightforward đ
Oh, I conflated tap
and TAP
. Oops.
Does anyone know a good way to get Clojure test output as data?
Is it a matter of redirecting stdout output somewhere else during the tests, intercept the text and do regex inspection to find the interesting bits, inject strings where appropriate and forward to stdout?
almost all clojure test runners can output results as data. which one you are using?
Thanks for the rubber ducking + statement of general fact đ I didnât know that, and knowing it gives me confidence that it makes sense to invest time pursuing the issue!
I think we might be using more than one. One subproject uses https://github.com/lambdaisland/kaocha , for example
Looking into this, it seems to me that for Kaocha I might need to inject a test report that does what I want. https://github.com/lambdaisland/kaocha/blob/master/src/kaocha/report.clj
What conventions do you use when renaming namespaces?
I typically only rename in a consistent way rather than shortening on an arbitrary name I like. For instance, it would be common to rename library.something.algo
to algo
, which I find confusing in the longer term. Instead, I would reduce the first "node" to a capital letter, it if is used frequently and well-known. If it still remains clear, I can allow myself to do the same with any subsequent "node" and append all those capital letters. For instance, library.something.algo
would preferably become L.something.algo
, and possibly LS.algo
.
In my own application, I tend to replace "root" nodes with $
. So, if my main namespace is
, then I can rename my-company.app.algo
to $.algo
.
Seems good to me. For the last thing about shortening for your own app, I'd choose a different symbol, since that will create confusion/problems with ClojureScript (`$` may create an expectation that you are using jQuery or something).
What I do is to only have abbreviations (somewhat arbitrary ones) for 3-5 namespaces in my own app that are commonly used, and for the rest I just use the long version (no :as
alias).
what I attempt to do is treat aliases as canonical - so if I alias a namespace to algo
, I will use that same alias everywhere
this way I build up a short hand language in my head of what Iâm talking about, so I know algo
is always library.something.algo
I tend to use pretty short aliases - e.g. h
or s
- but I also prefer to never refer
so I feel like I get something back by using short aliases đ
What I dislike about dropping "nodes" is that it is easy to loose track of where that namespace come from, especially if we end up with such a generic name as algo
. That why I keep those capital letters.
I do that only if it's really, really obvious. For instance: lambdaisland.glogi.console
-> glogi.console
("glogi" is already very specific and recognizable)
com.fulcrologic.fulcro.application
-> F.app
("F" reminds me of Fulcro and it is used very often, "com.fulcrologic" is truly unnecessary, and "application" can be somewhat exceptionally shortened to "app" because it is so guessable)
@U4YGF4NGM But yes, being canonical about it is of the uttermost importance!
that makes sense. what Iâll do with long & generic namespaces is abbreviate it by the last two or three words - e.g. com.fulcrologic.fulcro.application
becomes fa
Mandatory link :) https://stuartsierra.com/2015/05/10/clojure-namespace-aliases the other week I implemented a rewrite-clj thing that makes a given project conform with it. Works really nicely, will share in a few months when rewrite-cljc is released
Hm, is there a more idiomatic way to write (mapv #(%1 %2) [funcs...] [vals...])
? Just wondering.
don't think so
seems clear to me!
@alexmiller thanks, it was just a hunch I might be missing some abstraction