Re: ANN qarth 0.1.0, an OAuth library

2014-07-24 Thread Robin Heggelund Hansen
I was just looking for a OAuth library, this looks great! kl. 19:15:11 UTC+2 torsdag 24. juli 2014 skrev Mike Thvedt følgende: > > Qarth is a simple interface to OAuth. Qarth's goal is to fix the problem > of Ring/Compojure and/or Friend apps reinventing the wheel for OAuth. > > Qarth features ze

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Michael O'Keefe
Ambrose, thanks -- I was NOT aware of that. Sorry I misunderstood your original. Andy, good advice and I agree. Thanks. I'll think on it then. Cheers, Michael On Thursday, July 24, 2014 10:20:57 PM UTC-6, Ambrose Bonnaire-Sergeant wrote: > > On Fri, Jul 25, 2014 at 12:13 PM, Michael O'Keefe

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Andy Fingerhut
I do not see any straightforward change to Clojure that would enable this to work (someone else might, though). Given that adding a loop form inside the function is a fairly straightforward workaround to the limitation, and the difficulty of enhancing it to avoid the limitation, I would personally

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Ambrose Bonnaire-Sergeant
On Fri, Jul 25, 2014 at 12:13 PM, Michael O'Keefe < michael.p.oke...@gmail.com> wrote: > > >- Ambrose, both (number? %) and number? are valid post-condition >forms; the issue is that the post-condition check bumps the recur out of >tail position > > > I'm aware of the context, I just wa

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Michael O'Keefe
Thank you everyone, for the replies: - The macro expansion was helpful - Andy, thanks for pointing out where the lines are -- very helpful - Ambrose, both (number? %) and number? are valid post-condition forms; the issue is that the post-condition check bumps the recur out of tail

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Ambrose Bonnaire-Sergeant
Hi Michael, I believe your post condition should read {:post [(number? %)]}. Thanks, Ambrose On Fri, Jul 25, 2014 at 6:56 AM, Michael O'Keefe wrote: > Hello All, > > I encountered the following behavior in Clojure 1.6 and wanted to check if > it should be considered a bug or not. I would say

Re: More Clojure XML challenges

2014-07-24 Thread Adrian O'Sullivan
Great, thanks for the feedback. Will try it tomorrow. On Thursday, July 24, 2014 7:22:35 PM UTC-4, Stan wrote: > > > On 07/24/2014 02:45 PM, Adrian O'Sullivan wrote: > > I'm really struggling to understand how to parse XML in Clojure. > > > > Here's my xml: > > > > > > > > java.comple

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-project for a while an

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

2014-07-24 Thread Tony Tam
I've been using korma in a side-project for a while and it behaves well. There sure are a bunch of PRs on their github that could be merged, not sure what's up with that. One problem I ran into last week was that I got some conflicts when trying to upgrade the versions of some dependencies. One

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Andy Fingerhut
I do not know whether it is considered a bug or not, but it is definitely caused by the postcondition handling causing the recur to be knocked out of tail position. Here is a reference to the code: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4185-L4192 Andy On Thu,

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread adrian . medina
Indeed this is the case and no; I would not consider it a bug. Because you have specified a post condition on the return value, the clojure.core/fn macro is macroexpanding properly to support that post condition. By recursively macroexpanding the form, you can see the what the form will eventua

Re: More Clojure XML challenges

2014-07-24 Thread Stan Dyck
On 07/24/2014 02:45 PM, Adrian O'Sullivan wrote: I'm really struggling to understand how to parse XML in Clojure. Here's my xml: java.complexity.HelloWorld.notcomplex() 2 1 0 java.complexity.HelloWorld.complex(int) 4 2 0 ... etc I can do

Re: clojure.stacktrace/root-cause VS clojure.repl/root-cause, are they redundant?

2014-07-24 Thread mascip
Saving *e in a def for further investigation, handy :) Cheers On 24 Jul 2014 15:48, "Andy Fingerhut" wrote: > I know of no way that older exceptions than *e are automatically saved > anywhere (unlike the results of previous REPL expressions, of which the > last 3 are saved in *1 *2 *3). > > When

Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Michael O'Keefe
Hello All, I encountered the following behavior in Clojure 1.6 and wanted to check if it should be considered a bug or not. I would say yes but wanted to double check on the list first. Here's a minimal test case that elicited the error: (defn f [xs acc] (if (nil? xs) acc (recur (

More Clojure XML challenges

2014-07-24 Thread Adrian O'Sullivan
I'm really struggling to understand how to parse XML in Clojure. Here's my xml: java.complexity.HelloWorld.notcomplex() 2 1 0 java.complexity.HelloWorld.complex(int) 4 2 0 ... etc I can do (xml-seq (xml/parse .. )) on this, or

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

2014-07-24 Thread Brandon Bloom
> > I think you mean (not date-range) and (not qualifier)? Otherwise you'll > have (true OR ...) if the params are present... But that's a very neat > trick! > Ah, yes, that's of course what I meant. Was wasting mental cycles on parameter ordering... Use named parameters people! > I ran it past

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

2014-07-24 Thread Sean Corfield
On Jul 23, 2014, at 6:34 PM, Brandon Bloom wrote: > SELECT ... main query stuff WHERE basic conditions > AND (? OR dateUpdated >= ? AND dateUpdated < ? > AND (? OR someColumn = ?) > ... > (query db basic params (boolean date-range) (or date-range (now)) (or > date-range (now)) (boolean qualifier)

ANN qarth 0.1.0, an OAuth library

2014-07-24 Thread Mike Thvedt
Qarth is a simple interface to OAuth. Qarth's goal is to fix the problem of Ring/Compojure and/or Friend apps reinventing the wheel for OAuth. Qarth features zero-effort Friend integration. The interactive auth flow in "friendless" Qarth is two or three lines of code plus configuration. All OAu

Re: timbre logging, java libs

2014-07-24 Thread Sean Corfield
On Jul 23, 2014, at 7:11 PM, Jonah Benton wrote: > Sean Corfield has a great example of writing a log4j logging backend in > clojure: > > http://corfield.org/blog/post.cfm/real-world-clojure-logging Thanx for the referral. That made me go back and look at what that code has evolved into today.

Re: Leiningen resource-paths

2014-07-24 Thread Laurent PETIT
My suggestion then: instead of storing the jar files, unzip them in their respective resource directories? Should solve the über jar problem if Leiningen isn't too strict in filtering what's copied from resources folders to final build dir. Le mercredi 23 juillet 2014, Yura Perov a écrit : > In

Re: clojure.stacktrace/root-cause VS clojure.repl/root-cause, are they redundant?

2014-07-24 Thread Andy Fingerhut
I know of no way that older exceptions than *e are automatically saved anywhere (unlike the results of previous REPL expressions, of which the last 3 are saved in *1 *2 *3). When an exception occurs, it is probably much less error-prone to type a short expression like (def e1 *e) to save the excep

Re: clojure.stacktrace/root-cause VS clojure.repl/root-cause, are they redundant?

2014-07-24 Thread mascip
Thank you Stuart, this is a very useful answer. Is there any way to access an exception older than *e? What happens to me regularly is to mistype (.printStackTrace *e), which makes me lost my previous exception. -- Pierre Masci On 24 July 2014 13:33, Stuart Sierra wrote: > They're just differ

Re: Leiningen resource-paths

2014-07-24 Thread Thomas Heller
I don't quite understand the issue against using the way I described. Assuming you keep everything in a git repo (inclucing that maven directory), only you have to execute the mvn command ONCE, all it does it put the file into the "correct" directory and generate the needed metadata files. Afte

Re: Leiningen resource-paths

2014-07-24 Thread Yura Perov
Dear Thomas Heller, Thank you very much for your reply. As I mentioned in my initial post (sorry, it was a bit long), I successfully managed local Maven repository to work with Leiningen: > I know that there exist way to use local Maven repository, but I would > like to avoid this way to simpl

Re: [ClojureScript] London Clojure/ClojureScript job

2014-07-24 Thread Colin Fleming
I live in New Zealand - the commute is a little long :-). But it's generally encouraging to see an active Clojure job market anywhere. Cheers, Colin On 24 July 2014 12:49, Bruce Durling wrote: > Colin, > > Where do you live? I know there are other clojure jobs in Manchester > and Bristol. > >

Re: clojure.stacktrace/root-cause VS clojure.repl/root-cause, are they redundant?

2014-07-24 Thread Stuart Sierra
They're just different versions of the same thing, written at different times by different people, that both got merged into Clojure at different times. Speaking as the original author of clojure.stacktrace, I now think neither one of them should exist. The .printStackTrace method on an excepti

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

2014-07-24 Thread Jony Hudson
Pressed send to eagerly! Relevant code: https://github.com/krisajenkins/yesql/blob/master/src/yesql/types.clj Jony On Thursday, 24 July 2014 12:58:27 UTC+1, Jony Hudson wrote: > > > It passes the queries through clojure.java.jdbc, so provides the same > level of protection as that, as far as I

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

2014-07-24 Thread Jony Hudson
It passes the queries through clojure.java.jdbc, so provides the same level of protection as that, as far as I am aware. Jony On Thursday, 24 July 2014 12:08:52 UTC+1, Paul Butcher wrote: > > I wasn’t aware of yesql - thanks for the pointer. > > My concern with “write your queries in pure SQL

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

2014-07-24 Thread Paul Butcher
I wasn’t aware of yesql - thanks for the pointer. My concern with “write your queries in pure SQL” is increased vulnerability to SQL injection. From a quick glance at yesql, it seems likely that it does provide protection against SQL injection, but there’s nothing in the documentation (that I c

Re: [ClojureScript] London Clojure/ClojureScript job

2014-07-24 Thread Bruce Durling
Colin, Where do you live? I know there are other clojure jobs in Manchester and Bristol. cheers, Bruce On Thu, Jul 24, 2014 at 11:48 AM, Colin Fleming wrote: > Although I don't live in London, it's encouraging to see how much Clojure > work is on offer there! That's great > > Cheers, > Coli

Re: [ClojureScript] London Clojure/ClojureScript job

2014-07-24 Thread Colin Fleming
Although I don't live in London, it's encouraging to see how much Clojure work is on offer there! That's great Cheers, Colin On 24 July 2014 12:40, Paul Butcher wrote: > On 24 July 2014 at 11:32:53, Bruce Durling (b...@otfrom.com) wrote: > > Paul, > > You might also want to post this on Lo

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

2014-07-24 Thread Bobby Eickhoff
Slight tangent: I've never used honeysql, but every time I see the name I want it to be pronounced "honeysuckle". Is that the naming intent, or is it simply "honey s q l"? On Tuesday, July 22, 2014 8:10:16 AM UTC-4, Jonathon McKitrick wrote: > > Development and support seem to have slowed down

Re: [ClojureScript] London Clojure/ClojureScript job

2014-07-24 Thread Paul Butcher
On 24 July 2014 at 11:32:53, Bruce Durling (b...@otfrom.com) wrote: Paul,  You might also want to post this on London Clojurians Jobs  https://groups.google.com/forum/#!forum/london-clojurian-jobs  Ah! I’ve just posted it to London Clojurians - I wasn’t aware of the separate jobs list (blush).

Re: [ClojureScript] London Clojure/ClojureScript job

2014-07-24 Thread Bruce Durling
Paul, You might also want to post this on London Clojurians Jobs https://groups.google.com/forum/#!forum/london-clojurian-jobs cheers, Bruce On Thu, Jul 24, 2014 at 10:45 AM, Paul Butcher wrote: > I’m looking to recruit a senior software engineer in London to work with > Clojure, ClojureScript

London Clojure/ClojureScript job

2014-07-24 Thread Paul Butcher
I’m looking to recruit a senior software engineer in London to work with Clojure, ClojureScript, React/Reagent, Docker, and a bunch of other equally interesting technologies.  We’re not necessarily looking for Clojure/ClojureScript experience, so if you’ve been champing at the bit to get into t

Re: Looking for Clojure-centric career advice/suggestions

2014-07-24 Thread VaedaStrike
The QA thing has passed my mind, and for the same reason you mentioned, being able to sneak in some clojure/clojurescript into the automation. I may need to look more into the whole contracting thing. It is a bit scary when I've got so little real world experience. On Wednesday, July 23, 2014 6

Re: Looking for Clojure-centric career advice/suggestions

2014-07-24 Thread VaedaStrike
I appreciate that Zach. The whole idea of casting a wider net is certainly something I'm open to, I may have made it appear that I'm picky when it comes to what I code in. I'm really not. I've gotten where I have simply because I've both been fortunate and driven by more unusual motives than wh

Re: Leiningen resource-paths

2014-07-24 Thread Thomas Heller
Hey, I had this problem with a jar from Bing which is not available on maven. You can use a local repo without any plugins or extra work for "others". Try this: Pick a directory for your local maven repo, should be inside your git repo. I'm using "maven". Take your jar and run mvn deploy:dep