Re: doseq vs dorun

2013-10-18 Thread Stefan Kamphausen
Hi,

On Friday, October 18, 2013 12:12:31 AM UTC+2, Brian Craft wrote:
>
> I briefly tried working with the reducers library, which generally made 
> things 2-3 times slower, presumably because I'm using it incorrectly. I 
> would really like to see more reducers examples, e.g. for this case: 
> reading a seq larger than memory, doing transforms on the data, and then 
> executing side effects.
>

I used reducers for processing lots of XML files.  Probably the most common 
pitfall is, that fork only does parallel computation when working on a 
vector.  While all the XML data would not have fit into memory, the vector 
of filenames to read from certainly did, and that made a big difference.  
Plus, I reduced the chunksize from default 512 to 1.


Cheers,
Stefan

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Are there any GUI based Clojure apps out there?

2013-10-18 Thread Manuel Paccagnella
Here is an embarrassingly spartan one, but maybe useful if you want 
something quite small to start with: https://github.com/manuelp/tracktime

In there I 
use 
Seesaw  with the MiG-style 
layout
.

Hope it helps,

Manuel

Il giorno giovedì 17 ottobre 2013 15:31:12 UTC+2, Jonathon McKitrick ha 
scritto:
>
> 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 clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


recursive mapcat over lazy seq

2013-10-18 Thread Maris

hi

This function doesn't work properly.  It doesn't call itself for all 
elements of  tree-ids.
For example,  if tree-ids is  '(1 2 3 4 *5 6*),  then find-events gets 
called only on first 4 elements.

(defn find-events [tree-id]
  (let [children (get-children tree-id)   ;; returns lazy seq
_ (debug "<-" (prn-str children) "->")

tree-ids (->> children
  (filter :category)
  (filter :visible)
  (map :tree-id))

event-ids (->> children
   (remove :category)
   (map :event-id))]
(concat event-ids *(mapcat find-events tree-ids)*)))



If I do this (*vec* (get-children tree-id))  then everything is fine. 
Can someone explain why it happens ?   Two functions iterating the same seq 
- children ?

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread Christopher Bird
I know this is a pretty old thread, but my questions are quite 
similar/related, so I figured here would be a good place for them.

I am seriously struggling with both the Eclipse/Kepler-CounterClockwise 
version in general and the command prompt versions of lein. 
My major issue is how to tell the environments which libraries, etc. to 
load. For example, one of the libraries I really want to use is the whole 
zipper approach for dealing with xml.

>From this location http://grokbase.com/t/gg/clojure/11ccz70h0y/xml-zip I 
see the following code:

(ns play.xml-example
(:require [clojure.zip :as zip]
[clojure.data.zip :as zf]
[clojure.xml :as xml])
(:use clojure.data.zip.xml))
And this is what I get:

C:\Users\Christopher Bird>lein repl
nREPL server started on port 64784 on host 127.0.0.1
REPL-y 0.2.1
Clojure 1.5.1
Docs: (doc function-name-here)
  (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)

user=> (ns play.xml-example
  #_=> (:require [clojure.zip :as zip]
  #_=> [clojure.data.zip :as zf]
  #_=> [clojure.xml :as xml]
  #_=> )
  #_=> (:use clojure.data.zip.xml))

FileNotFoundException Could not locate clojure/data/zip__init.class or 
clojure/data/zip.clj on classpath:   clojure.lang
.RT.load (RT.java:443)
user=>
 So, clearly I need to get  the libs onto the classpath. The questions are 
what libs, where and how?

Thanks in advance for any/all help

Chris
On Wednesday, September 7, 2011 2:09:01 PM UTC-5, Joseph Li wrote:
>
> hi all, 
>
> I have a bare bone Clojure project created in Eclipse with 
> Counterclockwise plugin and am trying to (use clojure.java.jdbc). 
>  I tried adding the jar file downloaded from Maven repo to the 
> project's build path but everytime it runs the (use) line from the 
> repl it will  give a ClassNotFoundException. 
>
> I ended up downloading the source and put it right there along with my 
> own but still have to fully qualify with the ns name to use anything 
> there. 
>
> Is Maven/Leiningen pretty much the only way to obtain clojure lib 
> properly? 
>
> Thanks, 
> Joseph 
>
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread Josh Kamau
I find it easier to let leiningen handle the dependencies.  Eclipse via
counterclockwise plugin adds dependencies declared in project.clj to the
classpath.

Josh


On Fri, Oct 18, 2013 at 4:42 PM, Christopher Bird wrote:

> I know this is a pretty old thread, but my questions are quite
> similar/related, so I figured here would be a good place for them.
>
> I am seriously struggling with both the Eclipse/Kepler-CounterClockwise
> version in general and the command prompt versions of lein.
> My major issue is how to tell the environments which libraries, etc. to
> load. For example, one of the libraries I really want to use is the whole
> zipper approach for dealing with xml.
>
> From this location http://grokbase.com/t/gg/clojure/11ccz70h0y/xml-zip I
> see the following code:
>
> (ns play.xml-example
> (:require [clojure.zip :as zip]
> [clojure.data.zip :as zf]
> [clojure.xml :as xml])
> (:use clojure.data.zip.xml))
> And this is what I get:
>
> C:\Users\Christopher Bird>lein repl
> nREPL server started on port 64784 on host 127.0.0.1
> REPL-y 0.2.1
> Clojure 1.5.1
> Docs: (doc function-name-here)
>   (find-doc "part-of-name-here")
>   Source: (source function-name-here)
>  Javadoc: (javadoc java-object-or-class-here)
> Exit: Control+D or (exit) or (quit)
>
> user=> (ns play.xml-example
>   #_=> (:require [clojure.zip :as zip]
>   #_=> [clojure.data.zip :as zf]
>   #_=> [clojure.xml :as xml]
>   #_=> )
>   #_=> (:use clojure.data.zip.xml))
>
> FileNotFoundException Could not locate clojure/data/zip__init.class or
> clojure/data/zip.clj on classpath:   clojure.lang
> .RT.load (RT.java:443)
> user=>
>  So, clearly I need to get  the libs onto the classpath. The questions are
> what libs, where and how?
>
> Thanks in advance for any/all help
>
> Chris
> On Wednesday, September 7, 2011 2:09:01 PM UTC-5, Joseph Li wrote:
>>
>> hi all,
>>
>> I have a bare bone Clojure project created in Eclipse with
>> Counterclockwise plugin and am trying to (use clojure.java.jdbc).
>>  I tried adding the jar file downloaded from Maven repo to the
>> project's build path but everytime it runs the (use) line from the
>> repl it will  give a ClassNotFoundException.
>>
>> I ended up downloading the source and put it right there along with my
>> own but still have to fully qualify with the ns name to use anything
>> there.
>>
>> Is Maven/Leiningen pretty much the only way to obtain clojure lib
>> properly?
>>
>> Thanks,
>> Joseph
>>
>>  --
> --
> 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 patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Hitting the PermGen bugs (CLJ-1152) with core.logic

2013-10-18 Thread Jamie
We have a little DSL that compiles to core.logic, and we're seeing the 
dreaded PermGen bug (CLJ-1152 ) 
in code that was destined for production.  Fortunately some basic stress 
tests revealed the problem early.  FWIW, here's some mitigation code that 
-- under some currently unknown load threshold -- lets us at least get some 
more testing done.

  https://gist.github.com/jsmorph/7042092

The excellent CLJ-1152 bug report (nice work!) suggests this approach.  
Definitely not a work-around.  Just some mitigation.

--Jamie

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread Christopher Bird
Josh, thanks for replying. The code sample was from my batch lein and not 
the counterclockwise version. So I am clearly still totally messed up[!

C

On Friday, October 18, 2013 9:11:54 AM UTC-5, Josh Kamau wrote:
>
> I find it easier to let leiningen handle the dependencies.  Eclipse via 
> counterclockwise plugin adds dependencies declared in project.clj to the 
> classpath.
>
> Josh
>
>
> On Fri, Oct 18, 2013 at 4:42 PM, Christopher Bird 
> 
> > wrote:
>
>> I know this is a pretty old thread, but my questions are quite 
>> similar/related, so I figured here would be a good place for them.
>>
>> I am seriously struggling with both the Eclipse/Kepler-CounterClockwise 
>> version in general and the command prompt versions of lein. 
>> My major issue is how to tell the environments which libraries, etc. to 
>> load. For example, one of the libraries I really want to use is the whole 
>> zipper approach for dealing with xml.
>>
>> From this location http://grokbase.com/t/gg/clojure/11ccz70h0y/xml-zip I 
>> see the following code:
>>
>> (ns play.xml-example
>> (:require [clojure.zip :as zip]
>> [clojure.data.zip :as zf]
>> [clojure.xml :as xml])
>> (:use clojure.data.zip.xml))
>> And this is what I get:
>>
>> C:\Users\Christopher Bird>lein repl
>> nREPL server started on port 64784 on host 127.0.0.1
>> REPL-y 0.2.1
>> Clojure 1.5.1
>> Docs: (doc function-name-here)
>>   (find-doc "part-of-name-here")
>>   Source: (source function-name-here)
>>  Javadoc: (javadoc java-object-or-class-here)
>> Exit: Control+D or (exit) or (quit)
>>
>> user=> (ns play.xml-example
>>   #_=> (:require [clojure.zip :as zip]
>>   #_=> [clojure.data.zip :as zf]
>>   #_=> [clojure.xml :as xml]
>>   #_=> )
>>   #_=> (:use clojure.data.zip.xml))
>>
>> FileNotFoundException Could not locate clojure/data/zip__init.class or 
>> clojure/data/zip.clj on classpath:   clojure.lang
>> .RT.load (RT.java:443)
>> user=>
>>  So, clearly I need to get  the libs onto the classpath. The questions 
>> are what libs, where and how?
>>
>> Thanks in advance for any/all help
>>
>> Chris
>> On Wednesday, September 7, 2011 2:09:01 PM UTC-5, Joseph Li wrote:
>>>
>>> hi all, 
>>>
>>> I have a bare bone Clojure project created in Eclipse with 
>>> Counterclockwise plugin and am trying to (use clojure.java.jdbc). 
>>>  I tried adding the jar file downloaded from Maven repo to the 
>>> project's build path but everytime it runs the (use) line from the 
>>> repl it will  give a ClassNotFoundException. 
>>>
>>> I ended up downloading the source and put it right there along with my 
>>> own but still have to fully qualify with the ns name to use anything 
>>> there. 
>>>
>>> Is Maven/Leiningen pretty much the only way to obtain clojure lib 
>>> properly? 
>>>
>>> Thanks, 
>>> Joseph 
>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread Josh Kamau
Install counterclockwise plugin on your eclipse. Then import your project
into eclipse. There right click the project and there is something like
"Convert to leiningen project" .

Hope that helps.
Josh.


On Fri, Oct 18, 2013 at 5:41 PM, Christopher Bird wrote:

> Josh, thanks for replying. The code sample was from my batch lein and not
> the counterclockwise version. So I am clearly still totally messed up[!
>
> C
>
>
> On Friday, October 18, 2013 9:11:54 AM UTC-5, Josh Kamau wrote:
>
>> I find it easier to let leiningen handle the dependencies.  Eclipse via
>> counterclockwise plugin adds dependencies declared in project.clj to the
>> classpath.
>>
>> Josh
>>
>>
>> On Fri, Oct 18, 2013 at 4:42 PM, Christopher Bird wrote:
>>
>>> I know this is a pretty old thread, but my questions are quite
>>> similar/related, so I figured here would be a good place for them.
>>>
>>> I am seriously struggling with both the Eclipse/Kepler-**CounterClockwise
>>> version in general and the command prompt versions of lein.
>>> My major issue is how to tell the environments which libraries, etc. to
>>> load. For example, one of the libraries I really want to use is the whole
>>> zipper approach for dealing with xml.
>>>
>>> From this location 
>>> http://grokbase.com/t/gg/**clojure/11ccz70h0y/xml-zipI
>>>  see the following code:
>>>
>>> (ns play.xml-example
>>> (:require [clojure.zip :as zip]
>>> [clojure.data.zip :as zf]
>>> [clojure.xml :as xml])
>>> (:use clojure.data.zip.xml))
>>> And this is what I get:
>>>
>>> C:\Users\Christopher Bird>lein repl
>>> nREPL server started on port 64784 on host 127.0.0.1
>>> REPL-y 0.2.1
>>> Clojure 1.5.1
>>> Docs: (doc function-name-here)
>>>   (find-doc "part-of-name-here")
>>>   Source: (source function-name-here)
>>>  Javadoc: (javadoc java-object-or-class-here)
>>> Exit: Control+D or (exit) or (quit)
>>>
>>> user=> (ns play.xml-example
>>>   #_=> (:require [clojure.zip :as zip]
>>>   #_=> [clojure.data.zip :as zf]
>>>   #_=> [clojure.xml :as xml]
>>>   #_=> )
>>>   #_=> (:use clojure.data.zip.xml))
>>>
>>> FileNotFoundException Could not locate clojure/data/zip__init.class or
>>> clojure/data/zip.clj on classpath:   clojure.lang
>>> .RT.load (RT.java:443)
>>> user=>
>>>  So, clearly I need to get  the libs onto the classpath. The questions
>>> are what libs, where and how?
>>>
>>> Thanks in advance for any/all help
>>>
>>> Chris
>>> On Wednesday, September 7, 2011 2:09:01 PM UTC-5, Joseph Li wrote:

 hi all,

 I have a bare bone Clojure project created in Eclipse with
 Counterclockwise plugin and am trying to (use clojure.java.jdbc).
  I tried adding the jar file downloaded from Maven repo to the
 project's build path but everytime it runs the (use) line from the
 repl it will  give a ClassNotFoundException.

 I ended up downloading the source and put it right there along with my
 own but still have to fully qualify with the ns name to use anything
 there.

 Is Maven/Leiningen pretty much the only way to obtain clojure lib
 properly?

 Thanks,
 Joseph

  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>>
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@**googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>
>>  --
> --
> 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 patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 - ple

Re: [ANN] Counterclockwise - Clojure plugin for Eclipse

2013-10-18 Thread François De Serres
CCW has helped me a lot already, and this release is just beautiful.
Merci so much Laurent ! 

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread John Mastro
> So, clearly I need to get  the libs onto the classpath. The questions are 
> what libs, where and how?

Forgive me if this is a stupid question, but have you already listed the 
dependency coordinates under the :dependencies key of your project.clj?

Leiningen has a sample project.clj here: 
https://github.com/technomancy/leiningen/blob/master/sample.project.clj

You're unlikely to need most of the options - just take a look at 
:dependencies. Each project will list the appropriate coordinate vector (e.g. 
[some/project "1.0.0"]) on their project page and/or GitHub repo.

- John

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Why not automatically generate classes?

2013-10-18 Thread Bruno Kim Medeiros Cesar
I was reading on Erjang implementation, and in an 
article 
about how 
it handles recursion, the author says this about multi-arity functions:

   - Every function is compiled to a class *F* with one method named 
*body**(EProc 
   proc, EObject arg1, ... EObject argN)*.  The function takes the EProc (a 
   reference to the light-weight process) and the N arguments. The class *F* is 
   marked final.  This function contains the result of compiling an Erlang 
   function into Java.
   - If the function takes *2* arguments then *F* is a subclass of class 
   EFun*2*, a class provided by Erjang.  *Erjang has a class loader that 
   triggers when such a class is missing and generates EFun**N classes on 
   the fly.*
   - From the generated superclass, class *F* inherits the virtual methods 
*invoke(EProc 
   proc, EObject arg1, ... EObject argN)* and *go(EProc proc)*.  
   
Recently there was a great discussion on how Clojure could better handle 
primitive types, and it was noticed that combinatorial explosion is a major 
limitation do to primitive interfaces 
declaration,
 
and that this could only be solved by ClojureInClojure. Why can't we use a 
custom ClassLoader that generates the needed interface when asked?

I noticed that Clojure goes until 20 arguments, and then expects Object... 
for the 21st invoke. Does this solve the limitation? Scala is limited to 22 
arguments per function, but I didn't understand the 
explanationabout
 two customly generated classes being of different types. Couldn't 
these problems be solved by a custom ClassLoader as well?

(Of course, I don't think anybody should write a 20+ argument function, but 
you know, we're a bunch of misfits that enjoy having the freedom to do as 
we please...)

Thanks for your attention,

Bruno Kim.

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ANN: core.match 0.2.0

2013-10-18 Thread François De Serres
Hi David,

any chance to see core.match expose its compiler in the near future?
The ability to create "matchers" at runtime (like matchure/fn-match) would be 
much welcome ;)

Thankies,
--
François

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


getting a stack trace

2013-10-18 Thread Brian Craft
In trying to understand how threads work I'd like to dump a stack trace at 
various places. All the stack trace calls take an exception. Is there some 
simpler way, or should I throw & catch an except just to get a stack trace?

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: getting a stack trace

2013-10-18 Thread Alex Baranosky
> jstack 


On Fri, Oct 18, 2013 at 9:44 AM, Brian Craft  wrote:

> In trying to understand how threads work I'd like to dump a stack trace at
> various places. All the stack trace calls take an exception. Is there some
> simpler way, or should I throw & catch an except just to get a stack trace?
>
> --
> --
> 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 patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: doseq vs dorun

2013-10-18 Thread Pradeep Gollakota
Hi All,

Thank you so much for your replies!

For my particular use case ("tail -f" multiple files and write the entries 
into a db), I'm using pmap to process each file in a separate thread and 
for each file, I'm using doseq to write to db. It seems to be working well 
(though I still need to benchmark it).

Thanks to your help, I have a better understanding of how doseq, dorun, et. 
al. work.

On Friday, October 18, 2013 12:05:50 AM UTC-7, Stefan Kamphausen wrote:
>
> Hi,
>
> On Friday, October 18, 2013 12:12:31 AM UTC+2, Brian Craft wrote:
>>
>> I briefly tried working with the reducers library, which generally made 
>> things 2-3 times slower, presumably because I'm using it incorrectly. I 
>> would really like to see more reducers examples, e.g. for this case: 
>> reading a seq larger than memory, doing transforms on the data, and then 
>> executing side effects.
>>
>
> I used reducers for processing lots of XML files.  Probably the most 
> common pitfall is, that fork only does parallel computation when working 
> on a vector.  While all the XML data would not have fit into memory, the 
> vector of filenames to read from certainly did, and that made a big 
> difference.  Plus, I reduced the chunksize from default 512 to 1.
>
>
> Cheers,
> Stefan
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: getting a stack trace

2013-10-18 Thread Brian Craft
ah, sorry, that's a shell tool? I meant dumping a stack trace from code. 
Throwing & catching works, it's just a bit goofy. Like

(defn- stack-trace [msg]
  (try
(throw (IllegalArgumentException. msg))
(catch IllegalArgumentException e
  (stacktrace/print-stack-trace e


On Friday, October 18, 2013 10:17:43 AM UTC-7, Alex Baranosky wrote:
>
> > jstack 
>
>
> On Fri, Oct 18, 2013 at 9:44 AM, Brian Craft 
> > wrote:
>
>> In trying to understand how threads work I'd like to dump a stack trace 
>> at various places. All the stack trace calls take an exception. Is there 
>> some simpler way, or should I throw & catch an except just to get a stack 
>> trace?
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: getting a stack trace

2013-10-18 Thread Stanislav Sedov

On Oct 18, 2013, at 12:35 PM, Brian Craft  wrote:

> ah, sorry, that's a shell tool? I meant dumping a stack trace from code. 
> Throwing & catching works, it's just a bit goofy. Like
> 
> (defn- stack-trace [msg]
>   (try
> (throw (IllegalArgumentException. msg))
> (catch IllegalArgumentException e
>   (stacktrace/print-stack-trace e

Seems like what you want is
,---
| (Thread/dumpStack)
`---
.

--
ST4096-RIPE





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: getting a stack trace

2013-10-18 Thread Brian Craft
Yes, thanks!

On Friday, October 18, 2013 12:42:00 PM UTC-7, Stanislav Sedov wrote:
>
>
> On Oct 18, 2013, at 12:35 PM, Brian Craft > 
> wrote: 
>
> > ah, sorry, that's a shell tool? I meant dumping a stack trace from code. 
> Throwing & catching works, it's just a bit goofy. Like 
> > 
> > (defn- stack-trace [msg] 
> >   (try 
> > (throw (IllegalArgumentException. msg)) 
> > (catch IllegalArgumentException e 
> >   (stacktrace/print-stack-trace e 
>
> Seems like what you want is 
> ,--- 
> | (Thread/dumpStack) 
> `--- 
> . 
>
> -- 
> ST4096-RIPE 
>
>
>
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[ANN] vim-gains-nrepl

2013-10-18 Thread George Kibardin
Hi!

vim-gains-nrepl is a simple plugin for Vim. No frills, just eval...  not 
actually, it also supports multiple  nREPL servers and sessions so you can 
use it for ClojureScript development. Find it here 
https://github.com/shashurup/vim-gains-nrepl

Enjoy!

Georgy

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread xavi
Hello,

I have a strange problem when running an uberjar produced by Leiningen 
2.3.3, which doesn't happen with Leiningen 2.3.2 .
The uberjar corresponds to a web app I'm working on. With 2.3.3 ...

$ lein clean
$ lein uberjar
$ java $JVM_OPTS -cp target/myapp-standalone.jar clojure.main -m 
myapp.server
$ curl -i http://localhost:8080
HTTP/1.1 200 OK
Date: Fri, 18 Oct 2013 21:52:21 GMT
Last-Modified: Fri, 18 Oct 2013 21:50:47 GMT
Content-Length: 0
Content-Type: application/octet-stream
Server: Jetty(7.x.y-SNAPSHOT)

So, requesting the home page, I get an empty response. But if I generate 
the uberjar with lein 2.3.2 ...

$ lein clean
$ lein uberjar
$ java $JVM_OPTS -cp target/myapp-standalone.jar clojure.main -m 
myapp.server
$ curl -i http://localhost:8080
HTTP/1.1 200 OK
Date: Fri, 18 Oct 2013 21:58:54 GMT
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Server: Jetty(7.x.y-SNAPSHOT)



...

then it works!

Any idea on what can be the problem with Leiningen 2.3.3? 
(After hours of trying different things I'm quite desperate now :(

Cheers,
Xavi

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread John D. Hume
How does your app serve up the home page?

Have you tried extracting the working uberjar and the broken uberjar and
comparing the resulting directory trees?
On Oct 18, 2013 5:11 PM, "xavi"  wrote:

> Hello,
>
> I have a strange problem when running an uberjar produced by Leiningen
> 2.3.3, which doesn't happen with Leiningen 2.3.2 .
> The uberjar corresponds to a web app I'm working on. With 2.3.3 ...
>
> $ lein clean
> $ lein uberjar
> $ java $JVM_OPTS -cp target/myapp-standalone.jar clojure.main -m
> myapp.server
> $ curl -i http://localhost:8080
> HTTP/1.1 200 OK
> Date: Fri, 18 Oct 2013 21:52:21 GMT
> Last-Modified: Fri, 18 Oct 2013 21:50:47 GMT
> Content-Length: 0
> Content-Type: application/octet-stream
> Server: Jetty(7.x.y-SNAPSHOT)
>
> So, requesting the home page, I get an empty response. But if I generate
> the uberjar with lein 2.3.2 ...
>
> $ lein clean
> $ lein uberjar
> $ java $JVM_OPTS -cp target/myapp-standalone.jar clojure.main -m
> myapp.server
> $ curl -i http://localhost:8080
> HTTP/1.1 200 OK
> Date: Fri, 18 Oct 2013 21:58:54 GMT
> Content-Type: text/html;charset=UTF-8
> Transfer-Encoding: chunked
> Server: Jetty(7.x.y-SNAPSHOT)
>
> 
> 
> ...
>
> then it works!
>
> Any idea on what can be the problem with Leiningen 2.3.3?
> (After hours of trying different things I'm quite desperate now :(
>
> Cheers,
> Xavi
>
> --
> --
> 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 patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Compulsive over-optimization

2013-10-18 Thread Kendall Shaw
With clojure in particular, I am having trouble not rearranging my code 
to be what I think is more optimal in ways that seem probably not 
practical. I've noticed myself doing that when I'm newish to languages 
and apis. But, I go bonkers with clojure.


Do you have any thoughts about how to avoid that, other than Bob 
Newhart's advice:


http://www.youtube.com/watch?v=Ow0lr63y4Mw

Kendall

--
--
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread Phil Hagelberg
I think this is due to a bug in older versions of Ring's wrap-resource 
middleware:

https://github.com/ring-clojure/ring/commit/89033af49dfe3d6e6fcdebb3f5455f6de0979034

In versions of Ring older than 1.2.0, directory entries will be served out 
of jar files as zero-length HTTP responses. Upgrading to the latest version 
of Ring will fix the problem.

-Phil

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread xavi

@Phil I'm already using ring 1.2

$ lein deps :tree | grep ring
 [compojure "1.1.5" :exclusions [[ring/ring-core] 
[org.clojure/core.incubator] [clout]]]
 [ring-basic-authentication "1.0.3"]
 [ring-middleware-format "0.3.1" :exclusions [[org.clojure/tools.reader]]]
 [ring "1.2.0"]
   [ring/ring-core "1.2.0"]
 [ring/ring-codec "1.0.0"]
   [ring/ring-devel "1.2.0"]
   [ring/ring-jetty-adapter "1.2.0"]
   [ring/ring-servlet "1.2.0"]
 [shoreleave/shoreleave-remote-ring "0.3.0" :exclusions 
[[org.clojure/tools.reader]]]


@John   

The home page is served through Compojure. There are quite a few handlers 
involved:

(defroutes home-routes
  (GET "/" []
(println "/ route handler")
(common/layout {:title (i18n/translate :home-page-title)
:nav nil
:content (home-content)})))

(defroutes app-routes
  home-routes
  ; ...
  (route/resources "/")
  (route/not-found "Not found"))

(def application (-> #'app-routes
 shoreleave/wrap-rpc
 noir/wrap-request-map
 handler/api
 wrap-restful-params
 wrap-multipart-params
 (wrap-resource "public")
 wrap-content-type
 wrap-not-modified
 wrap-noir-validation
 wrap-noir-cookies
 wrap-noir-flash
 (wrap-noir-session {:store (memory-store mem)})
 (wrap-if development? wrap-reload {:dirs ["src"]})))


Here's the result of comparing the uberjar trees...

$ jar tf myapp-by-lein-2.3.2.jar > myapp-by-lein-2.3.2.tree
$ jar tf myapp-by-lein-2.3.3.jar > myapp-by-lein-2.3.3.tree
$ diff myapp-by-lein-2.3.2.tree myapp-by-lein-2.3.3.tree 
6a7
> cheshire/
19a21
> cheshire/custom/
56a59
> cheshire/generate/
113a117,118
> clj_time/
> clj_time/coerce/
...


What I see is that in the tree generated by Leiningen 2.3.3 there are more 
entries because there are paths that have their own entries, while in the 
tree for 2.3.2 there are only entries for the filenames within those paths. 
This is the case of cheshire/ for example, however there are also paths 
that have their own entries in both trees (ex. clojure/core/ ).

I don't understand those differences.
Does that help to diagnose the problem? I still don't have a clue :(

Xavi


On Saturday, October 19, 2013 1:27:43 AM UTC+2, Phil Hagelberg wrote:
>
> I think this is due to a bug in older versions of Ring's wrap-resource 
> middleware:
>
>
> https://github.com/ring-clojure/ring/commit/89033af49dfe3d6e6fcdebb3f5455f6de0979034
>
> In versions of Ring older than 1.2.0, directory entries will be served out 
> of jar files as zero-length HTTP responses. Upgrading to the latest version 
> of Ring will fix the problem.
>
> -Phil
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread Phil Hagelberg

xavi writes:
> @Phil I'm already using ring 1.2

Hm; it's probably the same problem manifested a different way
then. Something is assuming that any entry in a jar file is fair game
whether it's a directory or file.

-Phil


pgpcYIkWpcwtg.pgp
Description: PGP signature


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread xavi
If I comment out 
  (wrap-resource "public")
then it works (i.e. the uberjar produced by lein 2.3.3 serves the home 
page).

Does this mean that the problem was not completely solved in Ring 1.2? 
Argh! I'll try to take a look to Ring's code and see if I can find the 
problem and fix it.
On the other hand, why there's this difference in the uberjars generated by 
2.3.2 and 2.3.3?

Also, in case it may help, when requesting some other pages of the app, I 
get this error...

2013-10-19 02:17:33.219:WARN:oejs.AbstractHttpConnection:/password-resets
java.lang.NullPointerException
  at java.io.FilterInputStream.close(FilterInputStream.java:155)
  at 
sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream.close(JarURLConnection.java:90)
  at ring.util.servlet$set_body.invoke(servlet.clj:94)
  at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112)
  at ring.adapter.jetty$proxy_handler$fn__7145.invoke(jetty.clj:20)
  at 
ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown
 
Source)
  at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
  at org.eclipse.jetty.server.Server.handle(Server.java:363)
  at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
  at 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
  at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
  at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
  at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
  at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
  at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
  at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  at java.lang.Thread.run(Thread.java:680)


Xavi

On Saturday, October 19, 2013 2:15:10 AM UTC+2, Phil Hagelberg wrote:
>
>
> xavi writes: 
> > @Phil I'm already using ring 1.2 
>
> Hm; it's probably the same problem manifested a different way 
> then. Something is assuming that any entry in a jar file is fair game 
> whether it's a directory or file. 
>
> -Phil 
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-18 Thread xavi
It seems it's this problem that somone else already reported a few days 
ago...

https://github.com/ring-clojure/ring/issues/96


On Saturday, October 19, 2013 2:50:16 AM UTC+2, xavi wrote:
>
> If I comment out 
>   (wrap-resource "public")
> then it works (i.e. the uberjar produced by lein 2.3.3 serves the home 
> page).
>
> Does this mean that the problem was not completely solved in Ring 1.2? 
> Argh! I'll try to take a look to Ring's code and see if I can find the 
> problem and fix it.
> On the other hand, why there's this difference in the uberjars generated 
> by 2.3.2 and 2.3.3?
>
> Also, in case it may help, when requesting some other pages of the app, I 
> get this error...
>
> 2013-10-19 02:17:33.219:WARN:oejs.AbstractHttpConnection:/password-resets
> java.lang.NullPointerException
>   at java.io.FilterInputStream.close(FilterInputStream.java:155)
>   at 
> sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream.close(JarURLConnection.java:90)
>   at ring.util.servlet$set_body.invoke(servlet.clj:94)
>   at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112)
>   at ring.adapter.jetty$proxy_handler$fn__7145.invoke(jetty.clj:20)
>   at 
> ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown
>  
> Source)
>   at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>   at org.eclipse.jetty.server.Server.handle(Server.java:363)
>   at 
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
>   at 
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
>   at 
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
>   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>   at 
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>   at 
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
>   at 
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
>   at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>   at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>   at java.lang.Thread.run(Thread.java:680)
>
>
> Xavi
>
> On Saturday, October 19, 2013 2:15:10 AM UTC+2, Phil Hagelberg wrote:
>>
>>
>> xavi writes: 
>> > @Phil I'm already using ring 1.2 
>>
>> Hm; it's probably the same problem manifested a different way 
>> then. Something is assuming that any entry in a jar file is fair game 
>> whether it's a directory or file. 
>>
>> -Phil 
>>
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Compulsive over-optimization

2013-10-18 Thread John D. Hume
What kind of optimal do you compulsively rearrange for? Performance?
Readability? Amusing terseness?
On Oct 18, 2013 6:20 PM, "Kendall Shaw"  wrote:

> With clojure in particular, I am having trouble not rearranging my code to
> be what I think is more optimal in ways that seem probably not practical.
> I've noticed myself doing that when I'm newish to languages and apis. But,
> I go bonkers with clojure.
>
> Do you have any thoughts about how to avoid that, other than Bob Newhart's
> advice:
>
> http://www.youtube.com/watch?**v=Ow0lr63y4Mw
>
> Kendall
>
> --
> --
> 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 patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscribe@**googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en
> --- You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> clojure+unsubscribe@**googlegroups.com
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Are there any GUI based Clojure apps out there?

2013-10-18 Thread Martin DeMello
This one was last updated for clojure 1.3, so it may be a trifle
bit-rotted, but it demonstrates using a custom widget as part of a
gui:

https://github.com/martindemello/xw-clj

martin

On Thu, Oct 17, 2013 at 6:31 AM, Jonathon McKitrick
 wrote:
> 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 clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Compulsive over-optimization

2013-10-18 Thread Kendall Shaw

The premise is that it is rearranging that is not worth the effort.

I guess I will try estimating how long I would spend on a similar task 
using something I am more familiar with and then trying to keep within 
some proportion of that effort.


Kendall

On 10/18/2013 07:41 PM, John D. Hume wrote:


What kind of optimal do you compulsively rearrange for? Performance? 
Readability? Amusing terseness?


On Oct 18, 2013 6:20 PM, "Kendall Shaw" > wrote:


With clojure in particular, I am having trouble not rearranging my
code to be what I think is more optimal in ways that seem probably
not practical. I've noticed myself doing that when I'm newish to
languages and apis. But, I go bonkers with clojure.

Do you have any thoughts about how to avoid that, other than Bob
Newhart's advice:

http://www.youtube.com/watch?v=Ow0lr63y4Mw

Kendall

-- 
-- 
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 patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
--
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 patient 
with your first post.

To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
This.is.easy. This-is-easy-too. Almost as easy to read as this.

--
--
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.