This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-29
Channels
- # aws (1)
- # aws-lambda (1)
- # beginners (34)
- # boot (61)
- # cljs-dev (126)
- # cljsjs (10)
- # cljsrn (4)
- # clojure (27)
- # clojure-russia (7)
- # clojure-spec (1)
- # clojure-uk (26)
- # clojurescript (42)
- # cursive (31)
- # datascript (4)
- # datomic (16)
- # hoplon (51)
- # klipse (1)
- # lein-figwheel (1)
- # lumo (79)
- # off-topic (16)
- # om (7)
- # parinfer (5)
- # planck (2)
- # re-frame (6)
- # reagent (3)
- # ring-swagger (5)
- # untangled (11)
I am trying to authenticate with docker-registry2
api
Some how giving me 401
@sifou they act the same, but I think resolve is a function so you can do (apply resolve '(+))
var is a special form that is a compiler intrinsic so apply won't work, but the var is found at compile time.
@tbaldridge I see, Thank you for your clarification 🙂
I am trying to get repository-name
out of my Map but unfortunately it is giving me nil
output
(defn desc-repo []
(ecr/describe-repositories {}))
Output is ArrayMap
I shall be a noob again for a second. How do I make a newline within a string. I'm trying to write to a log file, using spit. But it shoves everything in one line. Google tells me this should work but it still doesn't print a new line: (spit "event.log" (str msg (newline)) :append true)
I thought of that, but... nope. Still on the same line. (spit "event.log" (str "Test\n blah\n blah\n"), :append true)
does everything on the same line, just Test blah blah
Clojure 1.8.0?
Just to be sure it wasn't my project config or whatever, I tried it in a fresh folder with lein repl
. Doesn't work. It is \n
within the string and now outside of it, right?
Windows at the moment
So... \r\n I guess?
I've been spoiled by easy-mode JavaScript which probably does an internal conversion.
What happens if this code is deployed on a linux host in the future though?
Alright. I just also realized that even though I'm spitting to a log, my repl output has new "random" newlines in it. Bravo, Windows. Bravo.
I would except I'm a gamer.
And I refuse to have to deal with WINE, really.
Darnit. It might be something else. (spit "event.log" (str msg "\r\n") :append true)
still doesn't make a new line.
WAIT, no, it's fine now. must have borked my code update somehow.
Also tail -f
for the win 😄
Hmm. I'm looking to retrieve a keyword from a hashmap, while also removing that keyword from said hashmap. Something a little like array.shift()
in javascript, but more like... hm... let's say
(def thing {:bar "blah"
:thing "amagig"
:super "califragilous"})
(def foo (get-and-delete thing :blah))
This would (in my world) make foo
equal to "blah"
and thing
no longer having the :bar
key, only :thing
and :super
. Is there such a thing or do I make it myself?@eslachance data is immutable so you can’t remove an entry from a map, but you can define a new map without that entry...
(let [bar-less (dissoc thing :bar)
foo (:blah thing)]
…do stuff with foo and bar-less…)