This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-15
Channels
- # aws-lambda (6)
- # beginners (8)
- # cider (12)
- # cljs-dev (12)
- # cljsrn (9)
- # clojars (2)
- # clojure (161)
- # clojure-berlin (9)
- # clojure-italy (10)
- # clojure-russia (18)
- # clojure-spec (20)
- # clojure-uk (18)
- # clojurescript (37)
- # cursive (13)
- # data-science (1)
- # datomic (23)
- # flambo (2)
- # hoplon (22)
- # immutant (11)
- # jobs (1)
- # klipse (11)
- # leiningen (5)
- # liberator (7)
- # luminus (5)
- # lumo (3)
- # off-topic (28)
- # om (8)
- # onyx (15)
- # parinfer (111)
- # pedestal (21)
- # re-frame (6)
- # reagent (38)
- # rum (4)
- # spacemacs (2)
- # specter (34)
- # unrepl (122)
- # untangled (3)
- # vim (1)
- # yada (8)
random thought. Iām working my way though 4clojure. I was playing with clojure.spec to. I could create specs for the 4clojure problems and run them against ppls submitted solutions. I wonder what we could find out from that.
Sigh. very nub question, here goes. Still getting used to data structures. I'm getting this as params from compojure/ring as a POST:
{image {:filename avatar.jpg, :content-type image/jpeg, :tempfile #object[java.io.File 0x47a213e8 /tmp/ring-multipart-4338227995799003474.tmp], :size 28460}}
I'm just trying to get the filename, and tempfile, but I can't seem to figure it out, I do (get params :image)
or (get params :filename)
and whatever else and it's always returning nil
. Please someone wack me with a clue-by-four?welp. never stop trying, heh. it was (get params "image")
. Nice little touch there š
@eslachance You seem to be using println
or similar to print your data structure. When it's data, it's better to use prn
, which prints strings with quotes. Like: {"image" {:filename "avatar.jpg",,,}}
Then it would maybe be more obvious to use (get params "image")
. Also, check out get-in
.
Thanks for the tip, madstap!
@noisesmith, thanks. Just to see if I understand, it could work with:
(testmacro {:a 1 :b 2} '(1 2 3))
but not with
(def t {:a 1 :b 2})
(testmacro t '(1 2 3))
Welp, I'm pretty happy with the way this turned out! https://github.com/eslachance/eviemg
Will have to make a little readme and instructions for ShareX but otherwise, it's a great start for a little project š