Comparing and selecting web API libraries

2018-03-08 Thread Jonathon McKitrick
I’m looking at Liberator for our first web API project. But I’m also considering Compojure-API and Yada. Any thoughts from anyone who’s done this comparison, or has used one of them? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

What’s the best way to browse all lein templates?

2018-03-04 Thread Jonathon McKitrick
There are 1860 lein templates on clojars as of this writing. Is there a sane way to view them and group them by category? I’m looking for a handful of templates to consider for my next project. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Best way to include dev-only functions?

2018-01-15 Thread Jonathon McKitrick
I’d like to have a namespace loaded with dev-only versions of some functions. Is there a better way than using environ with ‘require’ and ’ns-resolve’ to do this? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Adding http header to SOAP request

2017-12-29 Thread Jonathon McKitrick
If anyone has used clj-soap, it has built-in SOAP auth, IIUC. I need to call an endpoint that is expecting custom http authentication headers as well. Has anyone else done this before? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: spec key aliasing or different specs for same keyword

2017-12-28 Thread Jonathon McKitrick
clojure.spec.alpha/keys has a :req-un and :opt-un argument. > > On Thursday, December 28, 2017 at 11:28:18 AM UTC-5, Jonathon McKitrick > wrote: >> >> I have one spec question covering two scenarios. >> >> 1. Suppose I want to spec a payload from a third-party API

spec key aliasing or different specs for same keyword

2017-12-28 Thread Jonathon McKitrick
I have one spec question covering two scenarios. 1. Suppose I want to spec a payload from a third-party API that has the keyword ':resultCount' in it. Does that mean my specs for that item must have the same name? 2. Supposed I have a few payloads from that API and each has a keyword ':result'

Re: Transducers eduction vs sequence

2017-12-22 Thread Jonathon McKitrick
ield -- (970) FOR-SEAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > -- > *From:* clo...@googlegroups.com >

Transducers eduction vs sequence

2017-12-22 Thread Jonathon McKitrick
I have a `get-summary` function that builds stats and returns them as a web service. Under the hood, it calls quite a few map, group-by, filter, etc. functions. I’m experimenting with transducers, and `sequence xform` does the trick most of the time. But I want to understand `eduction` use case

Re: spec for different http responses

2017-12-18 Thread Jonathon McKitrick
e it is, which > might be useful). The other consideration is that the multispec is based on > a multimethod so it can be externally extended later rather than by > modifying an existing spec. But maybe that's unimportant for you. > > On Monday, December 18, 2017 at 8:19:13

spec for different http responses

2017-12-18 Thread Jonathon McKitrick
I'm really diving into spec now, and I'd like to have a spec that covers successful http responses, but also allows me to conform different body content. For example, in one case I just expect raw html, but in another, JSON with a specific structure. Are spec multimethods the correct way to do

Good examples of spec use for review?

2017-07-17 Thread Jonathon McKitrick
Are there any relatively simple projects out there that illustrate the best practices for clojure.spec? I’d like to see namespacing guidelines, generative testing, and instrumentation on tests that can of course be disabled or completely elided in production. thanks! -- You received this mess

Namespace question and request for project with non-trivial use of clojure.spec

2016-12-16 Thread Jonathon McKitrick
I've run into some odd namespace issues with clojure.spec, and I'm sure it's because I'm doing something wrong. I have this in my ns declaration: [foo.schema :as schema] However: foo.main> (s/valid? :foo.schema/email "f...@bar.com") true foo.main> (s/valid? :schema/email "f...@bar.com") Excepti

Re: Converting json to work with clojure.spec

2016-12-04 Thread Jonathon McKitrick
Ah, I see that now. That being said, I see the benefits in moving to namespace qualified keys. Currently, I'm returning structures directly in Compojure handlers, and the JSON conversion is implicitly handled. I checked Cheshire and didn't immediately see a way to generate namespaced keys. What

Converting json to work with clojure.spec

2016-11-19 Thread Jonathon McKitrick
A good chunk of my API consists of returning Yesql directly as the body of the response. But clojure.spec wants namespaced keywords. Is there a simple way to wrap my json responses to make them conform to this requirement? -- You received this message because you are subscribed to the Google Gr

Protocols for persistence - not sure about a few cases

2016-08-28 Thread Jonathon McKitrick
I'm beginning a foray into protocols after coming from the Common Lisp world of multimethods. I'm using them initially to implement a consistent load/save API over the DB layer. It's pretty simple to have a Saveable protocol to save one object, because the first argument is a Record of the type

Re: Using OAuth2 to call one web app from another

2016-06-20 Thread Jonathon McKitrick
both use the :oauth-token parameter). > > > On Monday, June 20, 2016 at 4:30:32 PM UTC-7, Jonathon McKitrick wrote: >> >> I'm looking for the simplest way possible to get OAuth2 working so I can >> call an API which has recently switched from username/password to OAuth2

Using OAuth2 to call one web app from another

2016-06-20 Thread Jonathon McKitrick
I'm looking for the simplest way possible to get OAuth2 working so I can call an API which has recently switched from username/password to OAuth2. Any suggestions? Most of what I've found so far is server implemenation, rather than web app to web app. -- You received this message because you a

Re: Simple memory usage tuning for clojure

2016-05-03 Thread Jonathon McKitrick
. So it'll help you see things like "500MB > of data is held by this single reference". > > Getting up-to-speed on YourKit isn't bad if you're familiar with > profilers. If not...maybe try learning it anyways, it's a good skill to > have. > >

Simple memory usage tuning for clojure

2016-05-03 Thread Jonathon McKitrick
I have some time constraints, and need to figure out why an import script is hogging so much memory and crapping out on Heroku. What tools would you recommend that would (a) give useful information for tuning and (b) have a short learning curve? -- You received this message because you are su

HTTP basic auth for some pages but not all

2016-03-04 Thread Jonathon McKitrick
I'm using [ring-basic-authentication "1.0.5"] as my auth library for a quick app I need to get up and running. The only catch is I need some routes to be protected, and others public. And I'm not getting it to work with something simple like this: (cc/defroutes (cc/routes pub-routes (a

Practical ways to deal with 'bag-of-properties' syndrome, AKA dynamic typing?

2015-11-30 Thread Jonathon McKitrick
I've read the recent comments on 'the end of dynamic languages' and I'm curious what ways you have found for dealing with one of the issues I've heard mentioned frequently: when libraries (or functions in general) pass maps around as arguments or return values, how to go about finding out exact

Suggestions on staying up to date with Clojure

2015-09-28 Thread Jonathon McKitrick
What list of blogs, websites, and/or feeds would you suggest for someone who does not work with Clojure full time that will maximize exposure to advancements in the language, tools, and techniques and give the 'biggest bang for the buck' regarding time investment? -- You received this message

Testing concurrency/async features with clojure.test

2015-09-26 Thread Jonathon McKitrick
If I have code in a go block or a future call, what is the best way to automate test coverage of that code? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members

Re: How to email PDF attachments

2015-09-25 Thread Jonathon McKitrick
't rely on it for persistance. > > https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem > > So, if you had a solution that was "write to disk, then add file as an > attachment to an email" that could work on Heroku. > > On 25 September 2015 at 10:13, J

How to email PDF attachments

2015-09-24 Thread Jonathon McKitrick
I'm using clj-pdf to great success to stream a generated PDF when requested by URL, and postal to send email. I now need to output the PDF to an attachment in the email itself, and this needs to be Heroku-capable (no local filesystem). Has anyone done something similar, or any of the pieces? -

Re: Compojure character encoding

2015-06-24 Thread Jonathon McKitrick
artsWith "text/"))) > > (defn wrap-charset [handler charset] > (fn [request] > (let [response (handler request)] > (if (text-response? response) > (resp/charset response "ISO-8859-1") > response > > However, it'

Compojure character encoding

2015-06-24 Thread Jonathon McKitrick
I have a web app that apparently cannot consume UTF-8 encoding. Can compojure generate responses in latin-1 encoding? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from

Adding a simple hook to lein build process without writing a plugin

2015-06-01 Thread Jonathon McKitrick
I'd like my build and/or deployment process to suck in the output of `git describe` for use as a build version in the app. What's the simplest way to do that without writing a leiningen plugin? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: How to add headers to a clojure.java.io/resource response

2015-05-27 Thread Jonathon McKitrick
r "Cache-Control" "no-cache, no-store")) > > Or write some middleware: > > (defn wrap-cache-control [handler cache-control] > (fn [request] > (some-> (handler request) > (resp/header "Cache-Control" c

Re: How to add headers to a clojure.java.io/resource response

2015-05-27 Thread Jonathon McKitrick
ader "X-Foo" "Bar")) > > That should result in the same thing, as the only thing Compojure does > that Ring doesn't is try to make an educated guess about the content type. > > - James > > On 26 May 2015 at 13:22, Jonathon McKitrick > wrote: > &g

How to add headers to a clojure.java.io/resource response

2015-05-26 Thread Jonathon McKitrick
I have a GET route returning the result of this: (io/resource "public/html/confirm.html") but I need to add Cache-Control headers. Since the `resource` function returns a java.net.URL object, how can I add headers? The normal Ring way with ring.util.response/header only operates on a Ring res

Question about Clojure codebase

2015-04-28 Thread Jonathon McKitrick
What would you say is the most complex, hard-to-grok code in Clojure codebase? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be pa

Friend workflow for JWT

2015-04-18 Thread Jonathon McKitrick
Here's my workflow: (defn workflow-jwt-signed [& {:keys [credential-fn] :as jwt-config}] (fn [{{:strs [authorization]} :headers :as request}] (when (and authorization (re-matches #"\s*Bearer\s+(.+)" authorization)) (println "Found auth" authorization) (if-let [claims (try (-> (

Re: [ANN] Clojure Applied: From Practice to Practitioner

2015-04-13 Thread Jonathon McKitrick
Will we be notified as new content is added so we can update our electronic versions? On Monday, April 13, 2015 at 10:01:04 AM UTC-4, Alex Miller wrote: > > The errata form is for technical errors, typos, and suggestions. > > If you have broader questions or items for discussion, there is also a

Has anyone seen this error while running lein-cloverage?

2015-04-07 Thread Jonathon McKitrick
Here's a test in question: (deftest reports (testing "PDF schedule" (testing "by api call" (let [req (request :get "/schedule.pdf")] (mocking [pts.reports/get-schedule-pdf] (app req);< line 1035 (verify-call-times-for pts.reports/get-sched

Re: ANN: ClojureScript 0.0-3115

2015-03-16 Thread Jonathon McKitrick
The cljsjs issue is fixed! On Monday, March 16, 2015 at 7:03:00 PM UTC-4, David Nolen wrote: > And cut 0.0-3123 based on feedback from releases earlier today. One fix > addresses redundant information in the dependency graph when compiling, the > other fixes an issue when using advanced optimiza

Re: ANN: ClojureScript 0.0-3115

2015-03-16 Thread Jonathon McKitrick
I just tried a build with this version, and I'm getting this error in my CLJS test suite, which does not happen with 0.0-2985. Compiling ClojureScript. Compiling "resources/public/js/unit-test.js" from ["src/cljs" "test/cljs"]... Successfully compiled "resources/public/js/unit-test.js" in 17.483

Re: Conditional dependency question

2015-03-09 Thread Jonathon McKitrick
pl-env (repl-env > :ip "0.0.0.0" > :port 9009 > :working-dir "resources/public/out" > ``` > > Jonathon McKitrick > writes: > > > I'm using environ and lein-environ to pick

Diagnosing a figwheel error

2015-03-07 Thread Jonathon McKitrick
I decided to ditch piggieback/weasel and try figwheel, and though it starts without errors, I get 'Page not found' when visiting localhost:3449. What's the best way to track down the cause? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: Diagnosing a cljsbuild error

2015-03-07 Thread Jonathon McKitrick
gt; Could it be because of the :runner keyword you have in the vector? > > On Sat, Mar 7, 2015 at 2:20 PM Jonathon McKitrick > wrote: > >> >> Any thoughts as to why `lein cljsbuild test` would generate an error like >> this? >> >> Invalid :test-comm

Diagnosing a cljsbuild error

2015-03-07 Thread Jonathon McKitrick
Any thoughts as to why `lein cljsbuild test` would generate an error like this? Invalid :test-command, contains non-string value: [phantomjs :runner resources/es5-shim.js resources/public/js/test.js] -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Has anyone seen this error with weasel/piggieback?

2015-03-07 Thread Jonathon McKitrick
Can't change/establish root binding of: *cljs-repl-options* with set when evaluating (piggieback/cljs-repl :repl-env (weasel/repl-env :ip "0.0.0.0" :port 9001)) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Conditional dependency question

2015-03-06 Thread Jonathon McKitrick
I'm using environ and lein-environ to pick up dev settings, such as enabling weasel/piggieback in development. In my server module, I'm running this code in -main: (when (env :dev?) (println "DEV") (require 'pts.dev) (pts.dev/browser-repl)) But pts.dev still throws a class not

When to use metadata

2015-01-29 Thread Jonathon McKitrick
Is there a rule of thumb or set of use cases when metadata is a more elegant solution than simply adding more entries to a map or record? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com No

Re: How to handle refactoring with TDD and mocking/stubbing

2015-01-06 Thread Jonathon McKitrick
Akos, that is exactly the kind of problem I'm talking about! Right down to the detail about stopping work and returning to the project later, and seeing all the tests pass! -- Jonathon McKitrick On Tue, Jan 6, 2015 at 3:22 AM, Akos Gyimesi wrote: > > On Sat, Jan 3, 2015, at 02:4

How to handle refactoring with TDD and mocking/stubbing

2014-12-31 Thread Jonathon McKitrick
I use TDD and mocking/stubbing (conjure) to test each layer of my code. The problem is when I change the function signature and the tests do not break, because the mocks/stubs do not know when their argument lists no longer agree with the underlying function they are mocking. Is there a way t

Re: core.async go-loop questions

2014-12-21 Thread Jonathon McKitrick
that loop every time I send the emails, and I was under the impression that could be done with a go-loop, which would park until the channel had values to consume. But you are saying that might be 'unhealthy'? -- Jonathon McKitrick On Sat, Dec 20, 2014 at 10:56 PM, Chris Freeman wrote:

core.async go-loop questions

2014-12-20 Thread Jonathon McKitrick
I'd like to implement a thread that will send an email, then send a response via websocket to the client when the send completes. (defn my-wait-loop [] (async/go-loop [status (async/http://localhost";) (catch Exception e (println (.getMessage e "Suc

Lein feature to check for updates in dependencies?

2014-09-11 Thread Jonathon McKitrick
I thought for sure I saw this feature, but I can't find it. Isn't there a way to scan for possible updates to dependencies in a project? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Not

Optimizing lein profile for Heroku deployment

2014-08-26 Thread Jonathon McKitrick
I'm able to deploy my project, but 'lein repl' constantly times out. Yet this profile still loads all dependencies for 'lein repl'. Is there a way to prevent this? {:user {:dependencies [[pjstadig/humane-test-output "0.6.0"] [ring-mock "0.1.5"] [or

Re: Compojure routing of www and api content

2014-08-07 Thread Jonathon McKitrick
Let me clarify. I removed the 'not-found' route and the api calls all return an empty response. -- Jonathon McKitrick On Thu, Aug 7, 2014 at 3:14 PM, Jonathon McKitrick wrote: > Right, I tried removing that as well, and Friend still fails, and the api > rou

Re: Compojure routing of www and api content

2014-08-07 Thread Jonathon McKitrick
Right, I tried removing that as well, and Friend still fails, and the api routes fail as well. -- Jonathon McKitrick On Thu, Aug 7, 2014 at 2:54 PM, James Reeves wrote: > Compojure routes are checked in order until one matches. You've set up > your www-routes to match all possible

Compojure routing of www and api content

2014-08-07 Thread Jonathon McKitrick
I'm serving up some html and js content, and using handler/site for that. I have a separate handler/api group of routes under the "/api" context. If I include the api routes before the site routes, the site works fine. If the www routes come first, the api calls fail, probably because the (ro

Re: Cannot get Friend to work (login or unauthorized handler)

2014-08-07 Thread Jonathon McKitrick
I think it's sequencing. I'm going to try swapping the routes for api and site. On Thursday, August 7, 2014 7:19:33 AM UTC-4, Jonathon McKitrick wrote: > > So here's what I discovered: > > If I wrap ONLY the www-routes in Friend and remove api-routes entirely, it &

Re: Cannot get Friend to work (login or unauthorized handler)

2014-08-07 Thread Jonathon McKitrick
here it intercepts a >> POST request to the provided :login-uri (lines 84-85 on current master). >> >> Which means I have absolutely no idea why it gives you a 404, except >> maybe if it is related to the other point about the order of middlewares. >> >> S

Re: Cannot get Friend to work (login or unauthorized handler)

2014-08-06 Thread Jonathon McKitrick
ord parameters to (by default) /login -- which will discover the specified :credential-fn and use it to validate submitted credentials. <<< -- Jonathon McKitrick On Wed, Aug 6, 2014 at 10:46 AM, Gary Verhaegen wrote: > 1. No, you have to provide it (as a non-protected route, obviou

Cannot get Friend to work (login or unauthorized handler)

2014-08-06 Thread Jonathon McKitrick
First, the code: (ns pts.server (:use [compojure.core]) (:require [ring.adapter.jetty :as jetty] [ring.util.response :as response] [compojure.handler :as handler] [compojure.route :as route] [cemerick.friend :as friend] (cemerick.frie

Friend authentication with static files

2014-08-05 Thread Jonathon McKitrick
I'm working on a singe-page web app, and each page comes from a file in "public" rather than being generated by a compojure route/handler. I use (wrap-resource "public") to do this, and it works fine. How can I wrap this type of handler in Friend authentication? -- You received this message be

Re: Clojure on Cloudbees versus Heroku?

2014-07-30 Thread Jonathon McKitrick
d tier is cheaper than > Cloudbees', but it has been a while since I've compared the two. > > > On Wed, Jul 30, 2014 at 4:40 AM, Jonathon McKitrick > wrote: > >> I've deployed a few apps to Heroku, but I'm always looking for new >> options wi

Clojure on Cloudbees versus Heroku?

2014-07-30 Thread Jonathon McKitrick
I've deployed a few apps to Heroku, but I'm always looking for new options with better pricing or features. Is there any reason Cloudbees might be better for Clojure apps than Heroku? If the big selling point of Cloudbees is Jenkins, I don't think that benefits Clojure projects, right? -- Yo

Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Jonathon McKitrick
That's a handy feature, which I got running on my own to save a lot of connection time in a batch process. But it's probably easy enough to get running on your own. -- Jonathon McKitrick On Thu, Jul 24, 2014 at 9:23 PM, Tony Tam wrote: > I've been using korma in a side-p

Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
I'm sold. I don't know what I was thing, lol. I used straight SQL for the last 3 projects, so why change now? -- Jonathon McKitrick On Tue, Jul 22, 2014 at 7:42 PM, Nick Jones < whatsyourproblemkazan...@gmail.com> wrote: > Agreed, any lib that just lets me use raw sql f

Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
C+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick følgende: >> >> Development and support seem to have slowed down. Are there newer or >> better choices out there with momentum right now? >> >> -- You received this message because you are subscribed to the Google Gr

Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
I liked the no-fuss integration of relationships for the particular project I'm working on. I could live without it, but it would greatly simplify the code on server side. On Tuesday, July 22, 2014 8:29:13 AM UTC-4, Michael Klishin wrote: > > On 22 July 2014 at 16:10:31, Jonatho

Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
Development and support seem to have slowed down. Are there newer or better choices out there with momentum right now? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from

Database schema Heroku and Node-Webkit

2014-07-20 Thread Jonathon McKitrick
I'm developing an app that will initially run on Heroku, but will eventually migrate to a Node-Webkit app. What would you suggest is the simplest way to create and maintain a schema that would work well on both a Heroku app (with PostGres) and a Node-Webkit app (perhaps Sqlite or another altern

Re: Ring mock with GET parameters

2014-07-12 Thread Jonathon McKitrick
Sorry, I just got it... I needed to use 'app' in the test, not 'api-routes.' On Saturday, July 12, 2014 7:42:53 PM UTC-4, Jonathon McKitrick wrote: > > Hmm, except I don't have any issues when accessing it via an http client. > Only with the mock. > > On

Re: Ring mock with GET parameters

2014-07-12 Thread Jonathon McKitrick
rday, July 12, 2014 7:42:53 PM UTC-4, Jonathon McKitrick wrote: > > Hmm, except I don't have any issues when accessing it via an http client. > Only with the mock. > > On Saturday, July 12, 2014 6:24:28 PM UTC-4, James Reeves wrote: >> >> You need to make sure your

Re: Ring mock with GET parameters

2014-07-12 Thread Jonathon McKitrick
ery parameters. > > - James > > > On 12 July 2014 20:41, Jonathon McKitrick > wrote: > >> I'm using ring.mock.request to test an API. POST parameters work fine, >> but for GET requests, the parameters are not where Compojure expects to >> find them.

Ring mock with GET parameters

2014-07-12 Thread Jonathon McKitrick
I'm using ring.mock.request to test an API. POST parameters work fine, but for GET requests, the parameters are not where Compojure expects to find them. Here is the relevant part of the handler: (GET "/outlines" [speaker :as r] (println (str "Request " r)) (pri

Re: Client side tools for Clojure web app (back end questions as well, especially Pedestal)

2014-07-09 Thread Jonathon McKitrick
My new project is coming along nicely already. I'm currently using XHR calls to populate atoms on the client side, which are then automatically rendered into the DOM via Reagent components. It's wonderful, so far. -- Jonathon McKitrick On Tue, Jul 8, 2014 at 3:37 PM, Ahmad Ham

Re: Routes for both WWW and API

2014-06-30 Thread Jonathon McKitrick
te/not-found "Not Found"))) (wrap-reload) ; dev only (wrap-resource "public" On Saturday, June 28, 2014 2:25:57 PM UTC-4, Jonathon McKitrick wrote: > > I'd like my app to server the WWW content as well as the API for t

Routes for both WWW and API

2014-06-28 Thread Jonathon McKitrick
I'd like my app to server the WWW content as well as the API for the client to call. How can I used different middleware with each? Here's what I have so far: (def app (-> (handler/site (routes www-routes api-routes ;; Should this replace the line below?

Client side tools for Clojure web app (back end questions as well, especially Pedestal)

2014-05-20 Thread Jonathon McKitrick
I'm starting on a new Clojure app, and have been really intrigued by Pedestal. But it seems to present a new conceptual model to get my head around. I'm not sure the benefits would be worth the effort for apps that do not fit the problem Pedestal is trying to solve. That said, I'm open to any

Need HTTP Client not to verify cert on Heroku

2014-04-16 Thread Jonathon McKitrick
I'm getting this error in a web service call on Heroku with Clojure: SSLPeerUnverifiedException javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated Has anyone figured out how to disable peer authentication with clj-http? I'm running clj-http "0.7.6" -- You received this message

Re: Breaking out of doseq

2013-11-27 Thread Jonathon McKitrick
mpted. What is the 'reduced' function? On Wednesday, November 27, 2013 9:26:21 AM UTC-5, Jonathon McKitrick wrote: > > I'm iterating a map (regex -> function) and I'd like to call FUNCTION with > the result of re-groups after a match for REGEX is found. I also want t

Re: Breaking out of doseq

2013-11-27 Thread Jonathon McKitrick
Ah, maybe recursion is the answer! On Wednesday, November 27, 2013 9:26:21 AM UTC-5, Jonathon McKitrick wrote: > > I'm iterating a map (regex -> function) and I'd like to call FUNCTION with > the result of re-groups after a match for REGEX is found. I also want t

Breaking out of doseq

2013-11-27 Thread Jonathon McKitrick
I'm iterating a map (regex -> function) and I'd like to call FUNCTION with the result of re-groups after a match for REGEX is found. I also want to exit the sequence, returning the results of FUNCTION. In common lisp, I would use return-from, but how would this be done in clojure? -- -- You

Are there any GUI based Clojure apps out there?

2013-10-17 Thread Jonathon McKitrick
I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojur

Re: Heroku Clojure scheduled tasks versus worker threads

2013-06-18 Thread Jonathon McKitrick
ku isn't going to bill you for threads. Perhaps I've > misunderstood. > > On Monday, June 17, 2013 7:27:21 PM UTC-5, Jonathon McKitrick wrote: >> >> How would you sum up the differences? Does the worker thread simply run >> all the time? Wouldn't that

Heroku Clojure scheduled tasks versus worker threads

2013-06-17 Thread Jonathon McKitrick
How would you sum up the differences? Does the worker thread simply run all the time? Wouldn't that run up the dyno usage? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that p

Re: Clojure performance measuring

2013-05-12 Thread Jonathon McKitrick
Does it help profile SQL calls as well? -- Jonathon McKitrick On Sun, May 12, 2013 at 8:30 AM, Kelker Ryan wrote: > Try VisualVM. https://visualvm.java.net/ > > Here's a screenshot of the memory usage monitor > https://visualvm.java.net/images/monitor.jpg > > 12.

Clojure performance measuring

2013-05-11 Thread Jonathon McKitrick
If I cannot get New Relic to work, I'm going to stick to my development platform for initial optimization and memory troubleshooting. What tools do you recommend for profiling memory under Clojure? I didn't have much luck with VisualVM, since my Mac is a bit dated at this point, but I'd be wil

FTP with Clojure on Heroku

2013-05-11 Thread Jonathon McKitrick
I did some googling today, and didn't find much specifically for Clojure, and most of what I did find was a bit stale. Has anyone had any success accepting FTP uploads in Clojure on Heroku? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
It's currently called 'relic-app'. -- Jonathon McKitrick On Wed, May 8, 2013 at 12:52 PM, Phil Hagelberg wrote: > > Jonathon McKitrick writes: > > > That's a good suggestion. I made that change, and there definitely was a > > different because the he

Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
a separate JVM, so you need to add this to > your project.clj: > > :jvm-opts ["-javaagent:newrelic/newrelic.jar"] > > That was the bit missing for me. Hope this helps. > > Cheers, > > Leonardo Borges > www.leonardoborges.com > > > On Wed, May 8,

Re: New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
I should add... when the idle dyno spins up, I *do* see that in the instance chart on New Relic. But none of the other stats show any activity. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

New Relic installation on Heroku

2013-05-08 Thread Jonathon McKitrick
I followed these directions to install New Relic on my Heroku app: http://www.rafael-chacon.com/post/19069499949/new-relic-clojure-heroku-easy-steps-integration I added my license key to the yml file, and restarted the app. It's a simple app, with an import run from the CLI and an export as JSO

Re: Test strategy

2013-04-22 Thread Jonathon McKitrick
ose as inputs to your extraction fns, and then just > compare the output to what you expected? If the issue is that the > extraction isn't done by top-level fns, and thus is hard to test, perhaps > you could just make them top-level fns? > > Cheers, > > Chris >

Test strategy

2013-04-19 Thread Jonathon McKitrick
As a relatively new Clojure user, I have a relatively simple app which parses a complex JSON structure into a database. I have test code which verifies all the basic database functions, but I'm not sure how best to exercise all the parsing code. The JSON parser is built-in, and most of my code

Inserting multiple rows with clj-jdbc

2013-03-01 Thread Jonathon McKitrick
Does insert-records with a collection of records have any performance advantage over calling insert-values for each row? Is it only a question of network latency? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: Building/inserting multiple records

2013-02-16 Thread Jonathon McKitrick
(map (fn [d] return-map-of-records) datasets) > > > Does the clojure jdbc interface support insertion of multiple records? > I haven't seen such a function yet. > > clojure.java.jdbc/insert-records > > > > On Saturday, February 16, 2013 11:30:08 AM UTC+8, Jo

Building/inserting multiple records

2013-02-15 Thread Jonathon McKitrick
I'm iterating a large dataset and inserting a record for each row. After working in a Salesforce environment, I'm thinking it would be better to build a collection of records and insert them in one fell swoop. 1. Is it easy (and immutable) to build a collection of records to insert? I've bee

Re: Looping and accumulation

2013-02-15 Thread Jonathon McKitrick
So it looks like this might be perfect for what I need. I need to track a hash of the key fields of inserted db records so I can skip duplicates without db access. On Thursday, February 14, 2013 7:35:20 PM UTC-5, Luc wrote: > Look at the first example here: > > http://clojuredocs.org/clojure_

Re: Reusing parameters in a MAP function

2013-02-15 Thread Jonathon McKitrick
Sorry, I should add I haven't gotten to them in my migration studies yet... common lisp to clojure is a longer road than appears. ;-) On Friday, February 15, 2013 8:28:26 PM UTC-5, Jonathon McKitrick wrote: > > Beautiful. I haven't gotten to juxt and identity yet

Re: Reusing parameters in a MAP function

2013-02-15 Thread Jonathon McKitrick
Beautiful. I haven't gotten to juxt and identity yet, and this works brilliantly On Friday, February 15, 2013 7:58:09 PM UTC-5, Sean Corfield wrote: > > (into {} (map (juxt :id identity) map-array)) ;; the first thing that > comes to mind > > On Fri, Feb 15, 2013

Reusing parameters in a MAP function

2013-02-15 Thread Jonathon McKitrick
I'd like turn an array of maps into a map of maps, extracting a unique id from each map as the key. (into {} (map #([(:id %) %]) map-array) was my first attempt, but I'm not sure the syntax would work anyway. However, the first question (and obvious error cause) is how to repeat MAP-ARRAY twi

Re: Looping and accumulation

2013-02-15 Thread Jonathon McKitrick
On Thursday, February 14, 2013 7:44:18 PM UTC-5, Stephen Compall wrote: > On Feb 14, 2013 6:11 PM, "Jonathon McKitrick" > > > wrote: > > I have a loop over a function that is accumulating a list of database > keys for later use. But it is primarily doing othe

Looping and accumulation

2013-02-14 Thread Jonathon McKitrick
I have a loop over a function that is accumulating a list of database keys for later use. But it is primarily doing other processing and returning a collection of processed/filtered records. I'd normally just PUSH the ids and records onto a list in Common Lisp, or even LOOP... COLLECT into 2

Re: Understanding sequences

2013-02-13 Thread Jonathon McKitrick
Yes, both work. Sorry, I've been staring at non-working code too long tonight. ;-) On Wednesday, February 13, 2013 10:49:58 PM UTC-5, Jonathon McKitrick wrote: > > I have 3 arrays, and need to process one element of each array as a > triplet. > > So [1 3 5] [2 4 6] [10

  1   2   >