This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-21
Channels
- # announcements (26)
- # aws (1)
- # babashka (40)
- # beginners (36)
- # calva (9)
- # cider (38)
- # clara (5)
- # clj-commons (4)
- # clj-kondo (29)
- # cljs-dev (8)
- # cljsrn (2)
- # clojars (12)
- # clojure (151)
- # clojure-europe (16)
- # clojure-gamedev (1)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (2)
- # copenhagen-clojurians (2)
- # datalevin (18)
- # fulcro (7)
- # graphql (7)
- # gratitude (9)
- # helix (2)
- # honeysql (3)
- # introduce-yourself (1)
- # jobs (1)
- # lsp (13)
- # malli (10)
- # nextjournal (2)
- # off-topic (13)
- # pathom (1)
- # pedestal (2)
- # portal (4)
- # remote-jobs (1)
- # ring-swagger (1)
- # shadow-cljs (21)
- # specter (1)
- # testing (2)
- # tools-build (6)
- # vim (2)
- # xtdb (5)
After three years, a new release of ring-logger
is here š
ā¢ Version 1.1.1 adds support for async ring handlers
ā¢ Adds :status-to-level-fn
, which allows you to control the logging level of HTTP status codes in wrap-log-response
ā¢ Updates org.clojure/tools.logging
dependency to version 1.2.3
https://github.com/nberger/ring-logger
Pathom Viz 2022.1.21 is out! This release adds a long waited support for setting custom headers when setting up a connection via URL! It will also keep a record of the latest connections so you can reconnect with ease. Check it out at https://github.com/wilkerlucio/pathom-viz/releases/tag/v2022.1.21!
I have just released a new update for cq
(Clojure Query) - version 2022.01.21-16.20.00
, which adds XML support - and this is also my first time posting it on the Clojurians Slack.
cq
is a Command-line Data Processor for EDN, YAML, JSON, XML and other data formats.
Essentially, it brings the joy of Clojure's threading macros to the command line.
It is inspired by jq
and jet
but aims to provide a bit more support for transforming deeply nested data structures.
https://github.com/markus-wa/cq
@U0244CZ9LAF Awesome. I'll add you to the list of SCI projects here https://github.com/babashka/sci
ahh thanks! š - yeah sci is such an amazing project, thanks a lot for building/maintaining it ā¤ļø - it really does all of the heavy lifting for cq! š
š„³ - note that thread-last is actually the default š - so echo '[1 2 3]' | ./cq -i edn -- '(s/transform [s/ALL] inc)'
works as well!
@U0244CZ9LAF Is there a way I can just evaluate regular clojure without a threading macro? like
echo '[1 2 3]' | ./cq -i edn -- "(require '[com.rpl.specter :refer :all]) ..."
I guess the -i
input format matches the output. It would be interesting to have a -o
option to define the output separately. So, read in a structure in the defined format, process it, and output as a potentially different format.
in theory you can do
echo '[1 2 3]' | ./cq -i edn -- "#| (do (require '[com.rpl.specter :refer :all]) (identity .))"
but that gives Could not find namespace com.rpl.specter
I'm thinking of borkdude's question as whether it is possible to extend the operations possible on the data
@U8ZE1VBSS actually the output always defaults to edn - I use it often to just convert from JSON to EDN by doing cat file | cq
you can define vars & functions like this - there might be a way to make this a bit nicer, but so far I haven't done this myself so I'm just thinking about it now
echo '[1 2 3]' | cq -i edn -- "#| (do (def x identity) (x .))"
if you have suggestions on what would be a good syntax let me know and I can try to see if we can make that work š@U04V15CAJ if I do {:namespaces {'s {...}}}
in sci - I should be able to then (require '[s :refer :all])
- no? (currently getting Could not find namespace s
)
If I can figure that out then it should be possible to do what you're looking for š
@U0244CZ9LAF So, this works:
echo '[1 2 3]' | ./cq -i edn -- "#| (do (require '[s :refer :all]) (ns-publics 's))"
but it might be better to add the namespace com.rpl.specter
and alias that as s
in the user namespace
ahh, amazing! thanks for elaborating š - I will try to make the required changes early next week! I'm thinking I'll go with the aliases approach
glad to hear! @U56R03VNW š
io.github.hlship/test-pipeline. 0.1
test-pipeline
is a small (very small!) library that can be used to improve your Clojure test suite, by breaking test code into composable, reusable steps.
https://github.com/hlship/test-pipeline
pppmap 1.0 was released
It is a small library which adds progress logging and partitions to map
and pmap
In 1.0.0 the logging happens via tap>
now
https://clojars.org/pppmap/versions/1.0.0