Fork me on GitHub
#beginners
<
2016-03-03
>
curtosis16:03:02

this may be a bit gnarly for #C053AK3F9, but... is there a way to write a macro that includes ~ in the output? what I want the output to be the literal map: {:username ~username :password ~password} (so that the variables get unquoted when the map gets evaluated)

curtosis16:03:53

specifically, lein needs to fill in those values in the defproject form.

curtosis16:03:33

nevermind.... blindingly obvious in retrospect. '~username does the trick.

polymeris19:03:59

Hi. I have a dict m like this: {:scope_identity() 9}. Is there a way to write keyword literals with parentheses or do I have to do (get m (keyword "scope_identity()"))?

mfikes19:03:18

@polymeris: I suppose, more fundamentally, is “keywords are like symbols” aspect, which would imply that parens are not allowed at all.

mfikes19:03:10

FWIW, you can also do (symbol "scope_identity()”), which doesn’t imply that it is legal

seancorfield19:03:28

@polymeris: does m always only have one key and you just want the value from that?

polymeris19:03:23

I am not completely sure, @seancorfield

polymeris19:03:51

I could do (last (vals m)) if it was the case, but it is less clear.

curtis.summers20:03:48

@camilo legal or not, calling with keyword is the most clear to me. Alternatively, you could convert the keywords in the map to strings.

curtis.summers20:03:33

@polymeris: (sorry, my last comment referenced the wrong user)

chromaticgliss21:03:05

having some issues with cljs-ajax requests, my error-handler isn't executing when the server responds with a 401...any insight?

clojuregeek21:03:07

the success case works?

chromaticgliss21:03:49

i'm not sure actually hah, let me check...

chromaticgliss21:03:50

hmmm a 500 triggers it

clojuregeek21:03:12

yeah i think i had that same thing... error is 5xx ...