Fork me on GitHub
#clojure
<
2016-03-12
>
ericlavigne01:03:06

The "extend" option sounds better to me.

ericlavigne01:03:29

But you may get better advice if you describe what you're really doing instead of talking about language constructs.

john.carnell03:03:29

hey guys anyone familiar with compojure-api with swagger

john.carnell03:03:59

I have been getting a weird error banging my head on this all day. Trying to do a post to a ring endpoint that I am trying to swagger enable. When call the endpoint with no http body, the calls works fine. However, when I try I call the api with a body, I am getting an error clojure.lang.PersistentArrayMap cannot be cast to java.io.InputStream

john.carnell03:03:58

Here is a partial fragment of my POST definition: (POST "/v1/organizations/:org-id/edges" {:keys [body headers]} :path-params [org-id :- String] :body [body edge-post/PostEdgeRequest] :return edge-post/PostEdgeResponse

john.carnell03:03:14

The code seems to be choking on the {:keys [body headers]}

john.carnell03:03:19

Any help would be appreciated

gniquil04:03:02

Does anyone have any experience with using pedestal with component?

gniquil04:03:27

the point is (io.pedestal.http/start runnable-service) does not return

gniquil04:03:09

so when I have that line in a normal component start function, it doesn’t terminate and allow the rest of the system to get setup correctly

gniquil04:03:01

is there a way around it? Or is there a way to get pedestal started and serving without blocking, so the rest of the component workflow would still work?

talios06:03:39

@firstclassfunc: you uttered the incantation to summon the OSGi overlords? I may be a prophet.... simple_smile

ikitommi07:03:03

@john.carnell you dont have to destucture the body from the request (after the path definition) , :body [body ...] already does that for you.

george.w.singer13:03:45

Suppose L is defined as the list '(fn-call "arg"). When writing a macro m, how does one remove the ' symbol from L so that, at compile time, we can treat L as a function expression that should be called?

george.w.singer13:03:45

Asked differently: what f satisfies (f '(fn-call "arg")) ;=> (fn-call "arg")

george.w.singer13:03:25

**without using eval

rauh14:03:16

@george.w.singer:

(defmacro unq [form] `(do ~(second form))) 
? But it's ok to do eval in a macro. Also I should add: That quoting isnt necessary. A macro will already get the form and not evaluate it.

kingoftheknoll19:03:01

getting the error #object[Error Error: No protocol method ICollection.-conj defined for type number: 1]

kingoftheknoll20:03:52

yup I’m rewriting it with loop and about to test out if it works. But with loop I’m not using the same accumulator for grouping vs counting

kingoftheknoll20:03:00

so it’s acually looping much cleaner

kingoftheknoll20:03:14

I’ll post what I did to share if I get it working