Fork me on GitHub
Teemu Kaukoranta08:01:12

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

šŸ„³ 14

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!

šŸŽ‰ 16
gratitude 4

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.

šŸŽ‰ 18

@U0244CZ9LAF Awesome. I'll add you to the list of SCI projects here

šŸ™Œ 1

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! šŸ™‚


$ echo '[1 2 3]' | ./cq -i edn -- '->> (s/transform [s/ALL] inc)'
[2 3 4]


it works :)


šŸ„³ - 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 šŸ™‚


I'll be back in 30 minutes to explain :)


@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


There is also an :aliases {'s 'com.rpl.specter} option


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


^ I've implemented the aliases solution now, thanks for the hint!


Really enjoying cq so far, thanks for making this!

ā¤ļø 1

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.

šŸ‘€ 5
Carsten Behring20:01:06

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

šŸ’„ 5