This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-01
Channels
- # aleph (2)
- # beginners (137)
- # boot (4)
- # cider (10)
- # clara (29)
- # cljs-dev (71)
- # cljsrn (7)
- # clojure (105)
- # clojure-bangladesh (1)
- # clojure-france (2)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-russia (1)
- # clojure-spec (30)
- # clojure-sweden (5)
- # clojure-uk (71)
- # clojurescript (217)
- # cursive (36)
- # data-science (1)
- # datomic (11)
- # duct (53)
- # fulcro (2)
- # garden (3)
- # jobs (1)
- # lein-figwheel (23)
- # luminus (3)
- # lumo (7)
- # mount (13)
- # off-topic (88)
- # pedestal (3)
- # re-frame (63)
- # reagent (85)
- # remote-jobs (1)
- # ring-swagger (3)
- # shadow-cljs (81)
- # spacemacs (5)
- # tools-deps (16)
- # yada (2)
Mornin' 🙂
Bore da
Anyone got any favourite really simple command-line libraries? I’ve used tools.cli
a fair bit, and it’s nice for real apps, but I’d love something simple for scripts I’m throwing together.
My use case is, I’m trying to use deps.edn
to replace all the little bits of glue I use, most often in ruby or bash, with clojure. If I can.
So I don’t want full user-friendliness, validation, multiple options and the like. Just some simple boilerplate to let me pass parameters with less pain than parsing arguments myself.
I can cut-and-paste the bits I need from tools.cli
but it always seems to have a bit much complexity for what I want.
in the node.js world there's https://github.com/substack/minimist
I did find that I could probably do both simple scripts, and cli parsing, with boot
rather than deps.edn
: https://github.com/boot-clj/boot/wiki/Scripts
… but I suspect that I’m bikeshedding on this. Probably better to get everything working with my ruby scripts, than optimistically move them all to clojure. Especially as I keep meeting things (like graphql clients) that are far better supplied by the ruby ecosystem than the clojure one, at the moment.
Yeah, saw your question on #clojure. Was going to say about lacinia, then I realised you were asking about a client, not a server
If I wanted to do real bikeshedding, I’d write a client 🙂 It’s mostly just JSON/HTTP queries, plus it’d be great to have a client with smart error handling and some pagination support.
Is there a generic way for a client to support pagination? As far as I knew pagination was a pattern that you had to apply bespoke into each schema… i.e. there’s no generic shareable machine understanding of what pagination looks like. Hoping you can tell me this is fixed 🙂
Hmm - I only really know the github api, so I don't really know how other people do pagination...
@korny Just seen your comments on #cursive. How do you use deps.edn
with boot/lein (we're using boot)? Does it just replace the need to have (set-env! :dependencies)
within build.boot
?
I'm the author/maintainer of https://github.com/seancorfield/boot-tools-deps -- is that the sort of thing you're asking about?
@carr0t I’m just trying to use it for small standalone scripts - not integrating with boot/lein at all (though I gather there are plugins to do that)
Mostly, I have a tool I’ve written using lein, which queries git and spits out data as JSON
- I want to post-process that JSON, linking it up with some GraphQL data (from github), and rather than spin up a whole new leiningen project for this rather-hacky post-processing, or add a new endpoint to my app, I thought I could just code it as a single clojure script via command-line clj
morrrrrning
I only care if Australia are trouncing England, so I can 😛 at my UK friends. Or if England are trouncing Australia, so I can 😛 at my cricket-mad Australian brother-in-law.
I'm the author/maintainer of https://github.com/seancorfield/boot-tools-deps -- is that the sort of thing you're asking about?
Sigh. Lessons learned today: - The git API is a hairy beast - The github v4 API is also pretty hairy - Everyone uses git/github differently
(and my simplistic assumptions - at the recent client, tags were all on master
not branches, and releases were clearly tagged. It seems most of the big projects I’ve been looking at use release branches or some other forest-of-branches approach, and tag releases in unclear/inconsistent ways)
Anyway, this was just a random rant, nothing much to do with clojure, please pay no attention and go about your business.
and git lets you do magic strange things, so of course people do magic strange things 🙂
Like, I didn’t even know you could make a commit with 3 parents, until I found one: https://github.com/spring-projects/spring-framework/commit/2deeb54a9b6974b5da03c519d596891393b954df
I read about it when reading about the context of linux kernel. It's how they manage patches from multiple upstreams simultaneously.
(interlude ❤️)
Oh well. I’ve done the most critical task I needed to do - download all the custom emoji from my client’s slack instance before they delete my account 🙂
Is there an automated way of doing that?
There are some chrome extensions, but I wasn't sure I trusted them. The option I used was this script to run in the chrome console : https://gist.github.com/dogeared/f8af0c03d96f75c8215731a29faf172c
awesome
breaking up with a company is one thing
but breaking up with their custom emojis is hard
GDS had a lot - I had to fiddle that script as they didn’t all fit on one page. Some pretty topical too…
hahaha