:bootclasspath causes java.lang.NullPointerException

2015-09-02 Thread J . Pablo Fernández
Hello, I'm trying to compile my project with :bootclasspath set to true, so as to have the jar for a java agent added to my classpath, but in one of my projects it's generating java.lang.NullPointerException on this line: (def app (middleware/wrap-base #'app-base)) which is preceded by: (defr

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-06 Thread J . Pablo Fernández
On 5 August 2015 at 19:33, James Reeves wrote: > So when you're testing, presumably you use a dynamic binding to override > the global connection to the test database? > The wrap transaction always overrides the dynamic binding, whether it's in tests or not. -- J. Pab

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-04 Thread J . Pablo Fernández
a dynamic var to track connections is consistent across the code-base. -- J. Pablo Fernández (http://pupeno.com) -- 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 po

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-03 Thread J . Pablo Fernández
https://github.com/luminus-framework/conman You are still in control of the connection so you can do other things with it and have more than one if necessary. On 31 July 2015 at 01:44, J. Pablo Fernández wrote: > Hello Clojurians, > > I found passing around the database connection to each func

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-03 Thread J . Pablo Fernández
que manner if it is > touched? > > > R. > > > > > On 31 Jul 2015, at 01:54, J. Pablo Fernández wrote: > > Hello James, > > Thanks for your answer. I do understand your point. Pure functions are > easier to reason about and my use of dynamic here break

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-08-03 Thread J . Pablo Fernández
that deals with the database" and yes, you can do that, but it still is 90% of the code. On 3 August 2015 at 06:00, James Gatannah wrote: > > > On Thursday, July 30, 2015 at 7:44:31 PM UTC-5, J. Pablo Fernández wrote: >> >> Hello Clojurians, >> >> I fou

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-07-31 Thread J . Pablo Fernández
On Friday, 31 July 2015 11:48:54 UTC+1, Colin Yates wrote: > > I am away from the code at the moment, but is there any reason why the > dynamic connection can’t be private? This goes some way to providing safety. > No, I don't think there's a problem with it being private, I just didn't think

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-07-31 Thread J . Pablo Fernández
because the language is not protecting me from shooting myself in the foot with it). Does it make sense? On 31 July 2015 at 03:16, James Reeves wrote: > On 31 July 2015 at 01:44, J. Pablo Fernández wrote: >> >> I found passing around the database connection to each fun

Using a dynamic var for my database connection for implicit connections+transactions

2015-07-30 Thread J . Pablo Fernández
Hello Clojurians, I found passing around the database connection to each function that uses it very error prone when you are using transactions as passing the wrong one could mean a query runs outside the transaction when in the source code it is inside the with-db-transaction function. So I en

Re: (flatten non-sequential) has a surprising result

2015-07-02 Thread J . Pablo Fernández
> > (defn flatten1 [x] (filter (complement sequential?) (tree-seq sequential? > seq x))) > > > > > Il giorno mercoledì 1 luglio 2015 13:55:28 UTC+2, J. Pablo Fernández ha > scritto: >> >> Hello Clojurists, >> >> Today I was surprised by the result

Re: (flatten non-sequential) has a surprising result

2015-07-01 Thread J . Pablo Fernández
I agree with you Mikera, it also maintains the homogeneity of always returning a sequence but some people disagreed with it, so an error might be better. -- J. Pablo Fernández http://pupeno.com On Jul 1, 2015 4:22 PM, "Mikera" wrote: > On Wednesday, 1 July 2015 12:55:28 UT

(flatten non-sequential) has a surprising result

2015-07-01 Thread J . Pablo Fernández
Hello Clojurists, Today I was surprised by the result of (flatten 1) which is '(). I was expecting '(1) or an error. Talking in some other people in #clojure @ clojurians.net, not everybody agrees that '(1) is a good result but that '() is somewhat surprising. Would it be better if it raised an

Re: More functional Quil

2014-03-19 Thread J . Pablo Fernández
> I think this parameters should be explicitly passed to the function. > > What do you think? > > Nikita > > On Sunday, March 9, 2014 1:21:58 PM UTC, J. Pablo Fernández wrote: >> >> >> >> On Sunday, March 9, 2014 1:02:52 PM UTC, Laurent PETIT wrote: &

Re: More functional Quil

2014-03-09 Thread J . Pablo Fernández
On Sunday, March 9, 2014 1:02:52 PM UTC, Laurent PETIT wrote: > > Hello, > > To be honest I don't see any fundamental difference between your first > attempt and the improvement: both share the fact that the mutation of the > state happens within the draw function. So in both cases, you have a

More functional Quil

2014-03-09 Thread J . Pablo Fernández
Hello Clojurians, I'm starting to play with Processing and I want to use my favorite programming language for it, so I started using Quil. The problem is that Processing has a imperative architecture and makes my Clojure code look bad. For those that don't know Pr

Is The Joy if Clojure up to date?

2013-11-30 Thread J . Pablo Fernández
Hello, I have a copy of The Joy of Clojure that I bought a couple of years ago. Is it still a good way to learn Clojure or is it out of date? Thanks. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

New Clojure Brush for Alex Gorbatchev's SyntaxHighlighter

2011-09-27 Thread J . Pablo Fernández
Hello, I took Travis Whitton's brush for Clojure[1] for Alex Gorbatchev's SyntaxHighlighter[2] and put it in a git repo in GitHub, with an index file to easy development and trying it out. I also fixed some bugs and did some improvements. The new code is here: https://github.com/pupeno/clojure

Re: Errors in Clojure

2011-08-19 Thread J . Pablo Fernández
Petr, I do not care about this particular error, but about how to deal with this one liners. Ambrose's reply is what I needed, and no, it's not PostgreSQL problem. It's a library trying to establish a connection when it shouldn't with credentials that should never be used because I never specif

Errors in Clojure

2011-08-19 Thread J . Pablo Fernández
Hello Clojurians, I'm struggling to work with errors in Clojure. This is one example, one case, but I had many like these before: user=> (load-file "/Users/pupeno/Projects/mgr/src/lobos/migrations.clj") org.postgresql.util.PSQLException: FATAL: role "lobos" does not exist (config.clj:1) It jus

Re: REPL and Leiningen checkouts

2011-08-18 Thread J . Pablo Fernández
Thanks for the reply Chas. Does that mean that I have to create a Java project inside IntelliJ, instead of just opening the directory containing a Clojure/Lein project? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: REPL and Leiningen checkouts

2011-08-18 Thread J . Pablo Fernández
I'm currently using La Clojure. Not sure if I can directly hook it to lein. -- 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 patien

REPL and Leiningen checkouts

2011-08-18 Thread J . Pablo Fernández
Hello, I want to play around with a library I'm using so I started using the Leiningen checkouts feature and if I do lein repl it works. But when I'm running the REPL inside my editor I'm not running it through lein. Any ideas how to get my REPL to pick up checkouts like when I run it with lein

Uploaded Clinorm, an ORM-like system for Clojure

2008-11-28 Thread J. Pablo" Fernández
ittle free time in a week. Yes, feel free to consider this whole thing vapor-ware, you'd probably be right. Or you can help me build it ;) Note that I didn't say "released", I only uploaded it to: http://github.com/pupeno/clinorm Enjoy! -- J. Pablo Fernández <[EMAIL PR

Global debug variables

2008-11-19 Thread J . Pablo Fernández
Hello, While using clojure.contrib.sql I find many times that I am not generating good SQL (like when doing create-table with bad arguments). I'd like to add a debugging mode for clojure.contrib.sql, that when enable, it would cause it to print the statements or something like that. Is there any

Compojure and Clojure 1094+

2008-11-16 Thread J . Pablo Fernández
Hello, I've just forked Compojure and made it work with Clojure 1094+, the change is here: http://github.com/pupeno/compojure/commit/3cac756c89f63bbe009dcb6abbeb4646c252dee4 I haven't updated the clojure.jar and clojure-contrib.jar because I don't believe Compojure should distribute those or an

Re: Concerned about Clojure's license choice.

2008-11-03 Thread J . Pablo Fernández
Hello, On Nov 3, 7:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 3, 5:35 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > > > One thing that might be doable and acceptable is dual licensing. If > > Clojure is realsed as CPL *and* GPL,

Re: Concerned about Clojure's license choice.

2008-11-03 Thread J . Pablo Fernández
One thing that might be doable and acceptable is dual licensing. If Clojure is realsed as CPL *and* GPL, it can be combined with GPL programs and it is not in any way more free than the CPL (say, like if you add BSD in the bag). In that way you can keep GPLists happy and still use CPL. On Nov 1,

Modifying the classpath in Slime

2008-10-30 Thread J . Pablo Fernández
Hello, Can the classpath be modified for Clojure running in Slime after it has been started? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: offtopic - where are you come from? (poll)

2008-10-19 Thread J . Pablo Fernández
I think it might be more important where people are, where they live, than where they come from. I live in Zürich, Switzerland. On Oct 17, 11:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > Hello Clojurians, > > I think after 1st year of Clojure life it's good to check how far has > Clojur