This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-08
Channels
- # beginners (52)
- # boot (230)
- # cider (67)
- # clojure (166)
- # clojure-canada (1)
- # clojure-dev (91)
- # clojure-japan (6)
- # clojure-korea (1)
- # clojure-russia (2)
- # clojure-uk (10)
- # clojurescript (222)
- # core-async (27)
- # datomic (5)
- # editors (13)
- # euroclojure (12)
- # ldnclj (10)
- # off-topic (12)
- # om (16)
- # onyx (4)
- # other-lisps (2)
- # overtone (1)
- # re-frame (4)
- # sim-testing (1)
iae: fwiw, the dev packs in Emacs Live have the latest paredit, clj-refactor, and cider, as well as magit, and life is very good with it I expect the next stable release to be fairly soon at this point.
say i want to use clj-http in my clojure app - what’s the best way to check for the latest version?
browse http://clojars.org or the clj-http github repo?
What you could do is issue a pull-request for clj-http to include a version-badge from clojars in the readme
@mikecarter: all you need to do is fork clj-http on github, edit the readme file and add this snippet, create a pull-request and you're done
thanks @slipset - clj-http was just an example, i was wondering if there’s a quick way to get the latest version of a library
i’ve written a little package for emacs that does it but was wondering if i’m reinventing the wheel
thanks, i’ll check it out!
yeah, i was wondering that
I cannot seem to recall, nor find it, but I know that http://github.com/expez showed it to me while he was working on clj-refactor
I usually check GitHub and then Clojars. And if you’re using Leiningen, look into https://github.com/xsc/lein-ancient once you have a dependency in your project to automatically check (and update, if you’d like) your dependencies.
Would there be any interest in a leiningen plugin along the lines of leiningen install-dependency clj-http
, which adds clj-http to your project.clj file with the latest version?
Alternatively, does that already exist?
@surreal.analysis lein change :dependencies conj '[your.lib "0.1"]'
But it'll make the vec ugly
Yeah, I’m thinking of a setup where you don’t want to specify the 0.1
there is something like this already, although I'm blanking on the name
It’s not really a huge deal, but, for example, with npm you can pretty easily install a bunch of packages you know you want without worrying about specific versions
So if I do lein new my-app
you can do "lein search clj-http"
And I know I want some basic things I use for db access
after it updates the index it will tell you the latest
Something like:
lein add-deps [org.postgresql/postgres org.clojure/java.jdbc honeysql hikari-cp migratus]
Thanks!
ah, that's it!
for one-off stuff, I use https://github.com/rkneufeld/lein-try
i started writing this - https://github.com/mikos/helm-clojars
which makes use of the search on Clojars
(for emacs)
it’s very basic so far but you can do M-x helm-clojars
and search for a library, i suppose it could add it to your project.clj and run lein deps
too
So I've got this basic function:
(defn keyword->attr [k]
(-> (name k)
(string/split "-")
(string/join)))
It takes a keyword like :foo-bar-baz
and modifies it somewhat, but what I really need it to do is after the split it needs to do an initial cap on every part except the head, so in my example the result would be "fooBarBaz"
.(defn camel [avector]
(conj (head avector) (map clojure.string/capitalize (tail avector)))
(defn keyword->attr [k]
(-> (name k)
(string/split "-“)
camel
(string/join)))
@meow: http://conj.io/store/v1/org.clojure/clojure/1.7.0/clj/clojure.string/capitalize
yeah, the style guide has & more
listed here: https://github.com/bbatsov/clojure-style-guide#idiomatic-names
@alejandro: the result of removing the head might be more than just the tail