Re: Error when tried to compile with C-c C-k in emacs.

2010-04-09 Thread Stefan Kamphausen
Hi, On Apr 9, 4:56 am, Phil Hagelberg p...@hagelb.org wrote: On Thu, Apr 8, 2010 at 3:32 PM, Stefan Kamphausen ska2...@googlemail.com wrote: In the long run the Clojure community should either create an official fork of SLIME (and try to port the good stuff, that happens in SLIME) or try

Java 7 is adding dynamics

2010-04-09 Thread Alen Ribic
I came across this post http://www.baptiste-wicht.com/2010/04/java-7-more-dynamics/ and though this would be a good place to share. This JSR only impact the bytecode not the language. But with Java 7 we’ll see a new package java.dyn that use this new functionality. That package will improve the

Version of netbeans with extra Clojure and Polyglot Maven/Leiningen support ...

2010-04-09 Thread Antony Blakey
I have a private build of Netbeans that adds the following features to the maven support: 1. In the project view, Clojure srcs are listed under 'Clojure Packages' and 'Clojure Test Packages', using a package view - no more digging through directories under 'Other Sources'. 2. Polyglot Maven

Re: iterating over a nested vector

2010-04-09 Thread Russell Christopher
http://rosettacode.org/wiki/Matrix_transposition#Clojure Does anyone know if transpose exists in core or contrib? A cursory check doesn't reveal it, seems like it should be available. Thanks On Thu, Apr 8, 2010 at 10:27 PM, Per Vognsen per.vogn...@gmail.com wrote: Or you can separate concerns

Re: New clojure support in Polyglot Maven

2010-04-09 Thread Graham Fawcett
Hi Antony, On Wed, Apr 7, 2010 at 8:07 PM, Antony Blakey antony.bla...@gmail.com wrote: I've just pushed a major update to the Clojure support in pmaven to http://github.com/sonatype/polyglot-maven. It now covers 100% of maven by reflecting over the maven object model. Examples are in the

Re: New clojure support in Polyglot Maven

2010-04-09 Thread Antony Blakey
On 10/04/2010, at 12:24 AM, Graham Fawcett wrote: Your building/installation instructions are a bit on the terse side, and left this Maven newbie in trial-and-error-land. :) I haven't written any instructions, but yes, the instructions on the project aren't extensive. And the documentation

clojure.contrib.sql error: java.lang.Exception: no current database connection

2010-04-09 Thread Base
HI Group! I am attempting to use sql for inserts into H2 db. It works quite well when inserting a single record, however when I try and map an insert function over a collection i keep getting an exception saying : java.lang.Exception: no current database connection I defined a function,

Re: clojure.contrib.sql error: java.lang.Exception: no current database connection

2010-04-09 Thread Meikel Brandmeyer
Hi, On Apr 9, 5:16 pm, Base basselh...@gmail.com wrote: (with-connection db   (transaction      (map insert-user users ))) Any thoughts on why this is occurring?  What am I missing? Laziness. The map does not get realised in the with-connection. map is not a loop. Use doseq.

Re: clojure.contrib.sql error: java.lang.Exception: no current database connection

2010-04-09 Thread Base
You are THE MAN! Thank you so much Meikel !!! On Apr 9, 10:24 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Apr 9, 5:16 pm, Base basselh...@gmail.com wrote: (with-connection db   (transaction      (map insert-user users ))) Any thoughts on why this is occurring?  What am I

Re: New clojure support in Polyglot Maven

2010-04-09 Thread Graham Fawcett
Hi Antony, On Fri, Apr 9, 2010 at 11:10 AM, Antony Blakey antony.bla...@gmail.com wrote: On 10/04/2010, at 12:24 AM, Graham Fawcett wrote: Your building/installation instructions are a bit on the terse side, and left this Maven newbie in trial-and-error-land. :) I haven't written any

Re: mutating multiple java swing components

2010-04-09 Thread Josh Stratton
Here's an example of trying to use map to bring the two tables together together in the same scope. I'm doing this because the nth element in one sequence correlates to its nth counterpart in the second sequence. mainTables is a sequence of JTables and fixedTables is an equally sized sequence of

Re: mutating multiple java swing components

2010-04-09 Thread Per Vognsen
On Fri, Apr 9, 2010 at 10:39 PM, Josh Stratton strattonbra...@gmail.com wrote: Here's an example of trying to use map to bring the two tables together together in the same scope.  I'm doing this because the nth element in one sequence correlates to its nth counterpart in the second sequence.  

Re: mutating multiple java swing components

2010-04-09 Thread Michael Gardner
On Apr 9, 2010, at 10:39 AM, Josh Stratton wrote: Here's an example of trying to use map to bring the two tables together together in the same scope. I'm doing this because the nth element in one sequence correlates to its nth counterpart in the second sequence. mainTables is a sequence of

Re: mutating multiple java swing components

2010-04-09 Thread John Williams
This is how I would write it: (doseq [[main fixed] (map vector mainTables fixedTables)] (println Setting up table) (doto fixed (.setAutoCreateColumnsFromModel false) (.setModel (.getModel main)) (.setSelectionModel (.getSelectionModel main)) (.setFocusable false)) (let

Re: iterating over a nested vector

2010-04-09 Thread Konrad Hinsen
On 09.04.2010, at 16:44, Russell Christopher wrote: http://rosettacode.org/wiki/Matrix_transposition#Clojure Does anyone know if transpose exists in core or contrib? A cursory check doesn't reveal it, seems like it should be available. Not that I know. But here's a version that works even

Re: How do I call Foo.class?

2010-04-09 Thread dknesek
So to be clear - I should be able to use: (. getEnrty entry-url PortfolioEntry) Right? P.S. Great Clojure book. On Apr 9, 1:43 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: Clojure doesn't make you say class to talk about a class: String = class java.lang.String Saying class

Re: Clojure Concurrency Screencast Available

2010-04-09 Thread Raoul Duke
On Fri, Apr 9, 2010 at 11:53 AM, Craig Andera cand...@wangdera.com wrote: I've recorded a screencast on Clojure concurrency primitives. It's available at http://link.pluralsight.com/clojure. Thought some here might find it useful. It's in six parts, the first four of which are up now. The last

Java interop question: proxy or gen-class?

2010-04-09 Thread Gregg Williams
Hi--I'm continuing on my path to learning how to use Clojure with the graphics library Piccolo2D (http:// www.piccolo2d.org) by re-implementing some of Piccolo2D's sample programs. This time, I'm working on the Building the Interface program described at

Getting started with labrepl...

2010-04-09 Thread Douglas Philips
Having a few free moments, I thought I would try to get labrepl according to the instructions at: http://github.com/relevance/labrepl Since I'm using a Mac, I went to the Getting Started (Mac/Linux command line) section. Java installed: Check. lein installed: Check. I even re-re-ran

Re: Symbol resolution (between quote and eval/execution)

2010-04-09 Thread Per Vognsen
On Sat, Apr 10, 2010 at 10:22 AM, Douglas Philips d...@mac.com wrote: On 2010 Apr 9, at 9:04 PM, Per Vognsen wrote: On Sat, Apr 10, 2010 at 7:48 AM, Douglas Philips d...@mac.com wrote: Odd:  user= (binding [m1 (fn [a b] (println m1 from binding a b))]                 (eval '(if true (m1

Re: Error when tried to compile with C-c C-k in emacs.

2010-04-09 Thread Phil Hagelberg
On Fri, Apr 9, 2010 at 12:53 AM, Stefan Kamphausen ska2...@googlemail.com wrote: I would like to keep swank in line with upstream slime, but it is a lot of work. There are just so many more valuable things to work on right now... when using an older version of slime is such a low-friction

Re: Symbol resolution (between quote and eval/execution)

2010-04-09 Thread Douglas Philips
On 2010 Apr 10, at 12:29 AM, Per Vognsen wrote: Not surprising. The binding form deals with dynamic run-time extents. Here you are treating it like Common Lisp's macrolet. When you explicitly wrap the inner expression in eval, then the run time of the outer code effectively becomes the

Re: Symbol resolution (between quote and eval/execution)

2010-04-09 Thread Per Vognsen
On Sat, Apr 10, 2010 at 12:25 PM, Douglas Philips d...@mac.com wrote: The differences between def and binding are also weird, since binding does not also shadow the meta-data on the var, so not only :macro will be wrong, but :file, :line, :arglists could also be wrong. The binding form doesn't