Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Dave Ray
> ;; This is how I repaint the frame, after changing the list > (doto *frame* >       (.setContentPane (make-panel)) >       .repaint >       (.setVisible true)) > This is probably the reason it's slow (you don't say how many rects you're drawing). It's only necessary to set the content pane of th

Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Jonathan Cardoso
Thank's, I will try to adapt my code to use watch (I didn't know this feature and found it really interesting!). The problem with JPanel repaint is that, I don't surely know why but the JFrame doesn't "understands" it when I change and has an awkward behavior: if I click on the button that make

Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Jonathan Cardoso
I used (SwingUtilities/updateComponentTreeUI *frame*), worked great and seems faster even without using watch yet. Thank's -- 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 post

On section 11.2.1 of /The Joy of Clojure/

2012-01-31 Thread Guanpeng Xu
Hi all, In section 11.2.1 of the book /The Joy of Clojure/, the author shows the effect of `dosync' by starting 100 threads and then watching the value of a Ref: (go make-move 100 100) (board-map #(dosync (deref %)) board) Here, the first `go' form starts 100 threads, their effect is modifyi

Re: On section 11.2.1 of /The Joy of Clojure/

2012-01-31 Thread Herbert Euler
Hmm, I didn't read the definition of `board-map' carefully. It seems the second form (dosync (board-map deref board)) is the best among the three, as it views `board' as a whole. The other two might have the potential problem of printing incoordinated values of entries in `board', i.e. the e

Re: On section 11.2.1 of /The Joy of Clojure/

2012-01-31 Thread Herbert Euler
I think I'm right. This is a program that demonstrates what I was thinking o: ;; Program begins. (defn traverse [f dat] (vec (map #(f %) dat))) (def data (traverse ref (take 10 (iterate inc 0 (-> (fn [] (dosync (loop [i 0 data data] (when (seq d

Contrib for Clojure 1.3

2012-01-31 Thread kohyama
Dear Sirs and Madams I'm going to use clojure 1.3. What should we do, when we're trying to do things like we've been doing with clojure 1.2 and contrib 1.2? Such as things with contrib.io, contrib.duck-stream, contrib.string. For example, to get lines in a file as a list of strings and do some

Re: Contrib for Clojure 1.3

2012-01-31 Thread Baishampayan Ghose
Yoshinori, > I'm going to use clojure 1.3. > What should we do, when we're trying to do things like we've been doing with > clojure 1.2 and contrib 1.2? > Such as things with contrib.io, contrib.duck-stream, contrib.string. > > For example, to get lines in a file as a list of strings and do some >

Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Dave Ray
Calling repaint directly on the panel (not the frame) should be all that's necessary to update the display. updateComponentTreeUI() is only used when the look and feel of an app changes. Dave On Tue, Jan 31, 2012 at 8:44 AM, Jonathan Cardoso wrote: > I used   (SwingUtilities/updateComponentTreeU

Re: New Version of ClojureScript One

2012-01-31 Thread Craig Andera
> This is a problem with the current version of Leiningen. There are a > couple of ways to work around the problem. Here is one: > > Create a new Leiningen project. > > lein new delete-me > cd delete-me > > Open project.clj and change > > :dependencies [[org.clojure/clojure "1.3.0"]] > > to > > :de

EuroClojure 2012: CfP open

2012-01-31 Thread Marco Abis
Hi all, after quite some time working on this I'm excited to announce "the first 2-day, full-blown conference in Europe for the Clojure community" to be held in London (England) on May 24-25. The conference will be preceded by a 3-day training class delivered by the good guys from Relevance

[ANN] clj-http 0.3.0 released

2012-01-31 Thread Lee Hinman
Hi all, I'm pleased to announce the 0.3.0 release of clj-http. clj-http is an idiomatic clojure http client wrapping the apache client (like ring in reverse). You should be able to use it from Clojars[1] with the following: [clj-http "0.3.0"] New features and bug-fixes: - Added the ability to i

Re: [ANN] clj-http 0.3.0 released

2012-01-31 Thread Baishampayan Ghose
Yay! Regards, BG --- Sent from phone, please excuse brevity. On Feb 1, 2012 12:01 AM, "Lee Hinman" wrote: > Hi all, > > I'm pleased to announce the 0.3.0 release of clj-http. clj-http is an > idiomatic clojure http client wrapping the apache client (like ring in > reverse). You should be able t

Re: ForkJoin updates

2012-01-31 Thread Alex Miller
I think the suggestion from the OP is to change the computational executor pool in Agent from an Executors to a ForkJoinPool to get better scalability. Indeed, the work Doug has been in doing is in response to many libs using fork/join as an alternative to Executors to schedule lightweight computa

Re: Contrib for Clojure 1.3

2012-01-31 Thread Mark Engelberg
On Tue, Jan 31, 2012 at 6:18 AM, Baishampayan Ghose wrote: > As you might know, the monolithic clojure contrib from 1.2 got split > into many independent > contrib projects. The changes are quite well documented here - I know there's some documentation about the migration out there, but I do sym

Re: EuroClojure 2012: CfP open

2012-01-31 Thread Edmund
On 31/01/2012 17:07, Marco Abis wrote: > Hi all, > > after quite some time working on this I'm excited to announce "the > first 2-day, full-blown conference in Europe for the Clojure > community" to be held in London (England) on May 24-25. The > conference will be preceded by a 3-day training cl

[ANN]: cljsh & repls 1.6.0 - so many repls, so little time…

2012-01-31 Thread Frank Siebenlist
We already have swank, lein repl, cake, nrepl, detour, clj, reply, … and now we have the combo "cljsh & repls". "repls" is a lein plugin, which is essentially leiningen's native "lein repl" task with some default config options for the (not-)printing of eval results and repl-prompt. It gives yo

Re: Contrib for Clojure 1.3

2012-01-31 Thread Base
+1 Mark. On Jan 31, 1:59 pm, Mark Engelberg wrote: > On Tue, Jan 31, 2012 at 6:18 AM, Baishampayan Ghose wrote: > > As you might know, the monolithic clojure contrib from 1.2 got split > > into many independent > > contrib projects. The changes are quite well documented here - > > I  know there'

Re: Contrib for Clojure 1.3

2012-01-31 Thread cej38
+1 Mark. One of the things that was really nice about clojure.contrib up through 1.2 was the unified API documentation. I would also like to see that come back. On Jan 31, 4:06 pm, Base wrote: > +1 Mark. > > On Jan 31, 1:59 pm, Mark Engelberg wrote: > > > > > > > > > On Tue, Jan 31, 2012 at

Unable to bootstrap ClojureScript

2012-01-31 Thread HB
Hi, Would you please have a look at this thread: http://stackoverflow.com/questions/9087817/unable-to-bootstrap-clojurescript Thanks for help and time. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

group-by by multiple keys

2012-01-31 Thread ron peterson
hello, How to group a collection of maps by multiple keys? For example (def m1 [{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}{:a 1 :b 4 :c 3}{:a 1 :b 4 :c 3}]) (group-by-x [:a :b] m1) I'd it like to return this: [{:a 1 :b 2}[{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}], {:a 1 :b 4}[{:a 1 :b 4 :c 3}{:a 1 :b 4 :c 3}]]

Re: Contrib for Clojure 1.3

2012-01-31 Thread Sun Ning
As the wiki says, there is an unofficial branch of contrib compiled against 1.3 https://github.com/arohner/clojure-contrib/tree/1.3-compat On 01/31/2012 09:22 AM, kohyama wrote: Dear Sirs and Madams I'm going to use clojure 1.3. What should we do, when we're trying to do things like we've bee

Re: problems with meta

2012-01-31 Thread raschedh
> Hope that helps. It did. Thanks a lot ! Your explanation made it perfectly clear, what I was missing. I didn't know that I was able to do something like (def ^{:m 1} ^:dynamic *x* ^{:m 1} ^{:n 1} []) That is useful to me. And thank you for pointing out the relevant part of the LispReader to m

Re: Contrib for Clojure 1.3

2012-01-31 Thread kohyama
Baishampayan, Thank you for your informatioin. The page "Where Did Clojure.Contrib Go" tells me much. O.K. Now I see that what we should do is depend on the namespace in contrib 1.2. Thank you again. Best regards, Yoshinori Kohyama (@kohyama ) -- You received

Re: group-by by multiple keys

2012-01-31 Thread Cedric Greevey
On Tue, Jan 31, 2012 at 7:41 PM, ron peterson wrote: > hello, > > How to group a collection of maps by multiple keys? > > For example > > (def m1 [{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}{:a 1 :b 4 :c 3}{:a 1 :b 4 :c > 3}]) > > (group-by-x [:a :b] m1) > > I'd it like to return this: > > [{:a 1 :b 2}[{:a 1

Re: group-by by multiple keys

2012-01-31 Thread Jay Fields
user=> (def m1 [{:a 1 :b 2 :c 3}{:a 1 :b 2 :c 4}{:a 1 :b 4 :c 3}{:a 1 :b 4 :c 3}]) #'user/m1 user=> (require 'clojure.set) nil user=> (doc clojure.set/index) - clojure.set/index ([xrel ks]) Returns a map of the distinct values of ks in the xrel mapped to a set of the map

Re: NW UK Clojurians?

2012-01-31 Thread Rick Moynihan
Hi all, Sorry for missing this; but I've been running the Manchester Clojure Dojo over the past year. You can keep an eye out on my twitter stream for more information on Clojure & FP related events in and around Manchester. http://twitter.com/RickMoynihan R. On 9 December 2011 09:28, Simon Ho

Re: Contrib for Clojure 1.3

2012-01-31 Thread Sean Corfield
On Tue, Jan 31, 2012 at 11:59 AM, Mark Engelberg wrote: > I  know there's some documentation about the migration out there, but > I do sympathize with the original poster -- it can still be > surprisingly difficult to figure out exactly what lines to put in the > lein project file to make the new

Re: Contrib for Clojure 1.3

2012-01-31 Thread Sean Corfield
On Tue, Jan 31, 2012 at 7:11 AM, kohyama wrote: > O.K. Now I see that what we should do is depend on the namespace in contrib > 1.2. Some parts of the 1.2 contrib are not compatible with Clojure 1.3 so your success will depend on exactly which parts you use... It really would be better to avoid t

Re: Unable to bootstrap ClojureScript

2012-01-31 Thread Sean Corfield
I just tried the git clone and bootstrap on a Mac and on a Ubuntu machine and it worked. I suspect you got a bad download during the bootstrap or hit some sort of network? Sean On Tue, Jan 31, 2012 at 3:11 PM, HB wrote: > Hi, > Would you please have a look at this thread: > http://stackoverflow.

Re: [ANN] cljs-uuid 0.0.1 (micro cljs uuid lib)

2012-01-31 Thread Dave Sann
I added the same simple api for clojure (jvm). client code will work across clj and cljs. clojars - [cljs-uuid "0.0.2"] -- 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 fr