This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-09
Channels
- # beginners (22)
- # boot (80)
- # cider (6)
- # cljs-dev (5)
- # clojure (190)
- # clojure-berlin (5)
- # clojure-dev (24)
- # clojure-italy (14)
- # clojure-russia (70)
- # clojure-spec (39)
- # clojure-uk (82)
- # clojurescript (121)
- # clojurewest (1)
- # core-logic (2)
- # cursive (25)
- # datascript (186)
- # datomic (33)
- # dirac (266)
- # emacs (9)
- # gsoc (4)
- # hoplon (37)
- # immutant (34)
- # instaparse (22)
- # jobs (4)
- # juxt (6)
- # lambdaisland (2)
- # leiningen (1)
- # liberator (1)
- # luminus (5)
- # lumo (28)
- # off-topic (9)
- # om (23)
- # onyx (26)
- # other-lisps (1)
- # parinfer (39)
- # pedestal (45)
- # proton (1)
- # protorepl (10)
- # re-frame (18)
- # reagent (4)
- # ring-swagger (8)
- # rum (4)
- # specter (13)
- # test-check (14)
- # testing (1)
- # unrepl (164)
- # untangled (10)
- # yada (14)
@adamkowalski Out of curiosity, why do you need to enumerate implemented/extended protocols of an object?
silly question but having trouble using the clj-fuzzy lib
Could not locate clj_fuzzy/metrics__init.class or clj_fuzzy/metrics.clj on classpath
I added to project file and namespace
project file: ;; Fuzzy String Matching [clj-fuzzy "0.3.3" :exclusions [org.clojure/clojure]]
namespace [clj-fuzzy.metrics :as fuzzy]
@josh_tackett I cannot repro that problem locally — perhaps you can elaborate on exactly what you’re doing?
I’m currently trying to long poll a url every 5 secs and print the output, but after the first response it ends up in an infitnite loop. What am I doing wrong?
(go (let [resp-chan (chan)
callback #(http/jsonp
“<url>"
{:callback-name "callback" :timeout 3000 :channel resp-chan})
interval (js/setInterval callback 5000)]
(loop []
(let [status (<! resp-chan)]
(println status)
(recur)))
Okay, I avoided the infinite loop with a when
check, but the responses after the first one aren’t showing
@yonatanel I am making a tree data structure which I want to feel like any of the other native types. So I am hoping to learn about what kind of protocols or interfaces they implement so that I can see which ones make sense for me. The idea is to minimize the amount of new things somebody would need to learn to use it, and instead focus on the abstract idea.
how can I format a string with a non-space padding?
eg (f "a" "x" 6) = "xxxxxa"
I'd like to use, if at all possible, the stock format
, and I cant find much of a reference for it online
@schmee thanks, i had actually browsed through that already but couldn't find how to pad a string with anything but spaces...
take a look at this as well: https://clojuredocs.org/clojure.pprint/cl-format
user=> (cl-format nil "Pad with leading asterisks ~5,'*d" 3)
"Pad with leading asterisks ****3”
thanks, ya, i saw that too and didn't invest more than a few minutes in trying to get it to work. I'm... baffled this isn't a more common problem.
i mean, i'd think java could handle it without additional custom logic
@shmee thanks for your help there, I ended up settling for a custom fn