Re: 请教一个问题

2013-06-13 Thread James Xu
Let me translate:  

Hi all,
I am reading lein-ring's source code, and I find that the many functions(defn) 
uses the syntax quote(`), e.g.

 (defn load-namespaces
 [ syms]
 `(require
 ~@(for [s syms :when s]
 `'~(if-let [ns (namespace s)]
 (symbol ns)
 s


My intuition is that syntax quote better be used in macros which is invoke 
during compiling. What's reason/benefit to use syntax quote in functions which 
will are invoked at runtime?
  

--  
xumingmingv
Github: https://github.com/xumingming
Weibo: http://weibo.com/64398966
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On 2013年6月13日Thursday at 下午12:39, stream wrote:

 Hi all
 我在看 lein-ring插件源码时,发现很多 语法引用符号 ` 都用在defn里。
 `(do ~(start-nrepl-expr project) ~(start-server-expr project))
  
 (defn load-namespaces
 [ syms]
 `(require
 ~@(for [s syms :when s]
 `'~(if-let [ns (namespace s)]
 (symbol ns)
 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 
 (mailto: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 
 (mailto: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 
 (mailto: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: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-13 Thread Dan Neumann
I actually like the original lower/upper/digit the best:

lower (seq abcdefghijklmnopqrstuvwxyz)
upper (seq ABCDEFGHIJKLMNOPQRSTUVWXYZ)
digit (seq 0123456789)

It's just immediately obvious, especially for instance if you wanted to 
remove ambiguous chars like 0, O, l, I.


On Wednesday, June 12, 2013 7:30:31 PM UTC-5, Shannon Severance wrote:

 Thank you all, I've learned something from each entry. My latest version, 
 incorporating some of the changes suggested:

 (defn make-crypto []
   (let [lower (map char (range (int \a) (inc (int \z
 upper (map char (range (int \A) (inc (int \Z
 digit (map char (range (int \0) (inc (int \9
 
 [sl su sd] (map shuffle [lower upper digit])
 
 encrypt (zipmap (concat lower upper digit) 
 (concat sl su sd))]
 (fn [s]
   (apply str (map #(encrypt % %) s)

 I specified the range the way I did because I wanted meaningful start and 
 end points, I don't have the code points for many characters memorized.


-- 
-- 
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: Clojure in production

2013-06-13 Thread Rogier Peters
Really inspiring thread and a welcome stick to beat the functional ==
academic nay-sayers with!


On Wed, Jun 12, 2013 at 10:30 PM, Jose A. Ortega Ruiz j...@gnu.org wrote:


 Hi Plinio,

 On Mon, Jun 10 2013, Plínio Balduino wrote:

  Hi there
 
  I'm writing a talk about Clojure in the real world and I would like to
  know, if possible, which companies are using Clojure for production or
  to make internal tools.

 At BigML, our backend is written almost fully (99%) in Clojure.  We've
 released a couple of libraries it uses as open source:

 https://github.com/bigmlcom/histogram
 https://github.com/bigmlcom/sampling
 https://github.com/bigmlcom/io

 Cheers,
 jao
 --
 Where is the Life we have lost in living? Where is the wisdom we have
 lost in knowledge? Where is the knowledge we have lost in information?
   -T.S. Eliot, poet (1888-1965)

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





-- 
http://about.me/rogier

-- 
-- 
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: Clojure in production

2013-06-13 Thread rod naph
I work at boxuk.com, we have some internal apps, and a few small production 
services in Clojure.

On Monday, June 10, 2013 10:47:25 PM UTC+1, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 

 Thank you 

 Plínio Balduino 


-- 
-- 
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: Clojure in production

2013-06-13 Thread jan


Hi Plínio,

at gateprotect, we use clojure in our firewall product for model  
representation and doing all the hard/logic work.


Some stats:
~ 370 namespaces
~ 25000 sloc

A great part of that is written in our model DSL.

Cheers,
Jan

 http://www.gateprotect.com

We are hiring!  http://www.gateprotect.com/en-GB/company/jobs.html


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




End user applications

2013-06-13 Thread Wolodja Wentland
Hi all,

I was recently trying to find some applications written in Clojure that are
meant for end users. The aim was to find those that would be interesting to a
user even though the user does not know anything about Clojure or that the
application is written in it.

Given that Clojure is not that young anymore I was a bit surprised to find
only Riemann [0] and Semira [1] out there among thousands of libraries or
development tools. 

Can you think of others? What are Clojure's killer applications ?

[0] http://riemann.io/
[1] https://github.com/remvee/semira/
-- 
Wolodja babi...@gmail.com

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


ring 如何实现热加载代码?

2013-06-13 Thread stream

今天看了一下ring代码,想看一下,如何实现热加载clj代码。

我尝试 run-jetty :join true
导致server被阻塞,然后emacs nrepl 无法热加载代码。

改成 join false,jetty 进程不加入主进程里,才可以正常加载。

我翻查源码,没发现是如何分离server与逻辑代码,从而实现只热加载handler的。

哪位大神能科普一下呢,谢谢

-- 
-- 
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: Clojure in production

2013-06-13 Thread Stas Krichevsky
Hi Plínio,

We use Clojure for many of our backend services at kontera.com

/stask

On Tuesday, June 11, 2013 12:47:25 AM UTC+3, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 

 Thank you 

 Plínio Balduino 


-- 
-- 
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: End user applications

2013-06-13 Thread Philip Potter
PuppetDB is another:

http://docs.puppetlabs.com/puppetdb/latest/index.html

We use PuppetDB at GOV.UK for host management and reporting purposes.
Nobody else on my team really knows clojure, but nobody has to care
because PuppetDB is self-contained.

On 13 June 2013 10:01, Wolodja Wentland babi...@gmail.com wrote:
 Hi all,

 I was recently trying to find some applications written in Clojure that are
 meant for end users. The aim was to find those that would be interesting to a
 user even though the user does not know anything about Clojure or that the
 application is written in it.

 Given that Clojure is not that young anymore I was a bit surprised to find
 only Riemann [0] and Semira [1] out there among thousands of libraries or
 development tools.

 Can you think of others? What are Clojure's killer applications ?

 [0] http://riemann.io/
 [1] https://github.com/remvee/semira/
 --
 Wolodja babi...@gmail.com

 4096R/CAF14EFC
 081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC

-- 
-- 
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: 请教一个问题

2013-06-13 Thread James Reeves
Leiningen plugins don't run in the project's environment, so they don't
have access to the project's code or dependencies.

In some cases you want to evaluate code in the project's environment, and
Leiningen provides the eval-in-project function, which evaluates a quoted
expression in the context of the project.

The functions in Lein-Ring that return syntax-quoted expressions are for
generating a form to be evaluated with eval-in-project. In this case, to
start a web server or to compile a war file.

- James


On 13 June 2013 07:08, James Xu xumingmi...@gmail.com wrote:

  Let me translate:

 Hi all,
 I am reading lein-ring's source code, and I find that the many
 functions(defn) uses the syntax quote(`), e.g.

 (defn load-namespaces
 [ syms]
 `(require
 ~@(for [s syms :when s]
 `'~(if-let [ns (namespace s)]
 (symbol ns)
 s


 My intuition is that syntax quote better be used in macros which is invoke
 during compiling. What's reason/benefit to use syntax quote in functions
 which will are invoked at runtime?

 --
 xumingmingv
 Github: https://github.com/xumingming
 Weibo: http://weibo.com/64398966
 Sent with Sparrow http://www.sparrowmailapp.com/?sig

  On 2013年6月13日Thursday at 下午12:39, stream wrote:

 Hi all
 我在看 lein-ring插件源码时,发现很多 语法引用符号 ` 都用在defn里。
 `(do ~(start-nrepl-expr project) ~(start-server-expr project))

 (defn load-namespaces
  [ syms]
 `(require
 ~@(for [s syms :when s]
 `'~(if-let [ns (namespace s)]
 (symbol ns)
 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 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.




-- 
-- 
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: ring 如何实现热加载代码?

2013-06-13 Thread Stathis Sideris
Instead of doing:

(defonce server (run-jetty my-app {:port 8080 :join? false}))

do:

(defonce server (run-jetty #'my-app {:port 8080 :join? false}))

This is make the code reload every time you redefine my-app.

Also see:

http://stackoverflow.com/questions/2706044/how-do-i-stop-jetty-server-in-clojure

Stathis


On Thursday, 13 June 2013 10:33:15 UTC+1, Stream wrote:


 今天看了一下ring代码,想看一下,如何实现热加载clj代码。 

 我尝试 run-jetty :join true 
 导致server被阻塞,然后emacs nrepl 无法热加载代码。 

 改成 join false,jetty 进程不加入主进程里,才可以正常加载。 

 我翻查源码,没发现是如何分离server与逻辑代码,从而实现只热加载handler的。 

 哪位大神能科普一下呢,谢谢

-- 
-- 
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: End user applications

2013-06-13 Thread Aaron Cohen
What about Overtone? http://overtone.github.io/


On Thu, Jun 13, 2013 at 5:01 AM, Wolodja Wentland babi...@gmail.com wrote:

 Hi all,

 I was recently trying to find some applications written in Clojure that are
 meant for end users. The aim was to find those that would be interesting
 to a
 user even though the user does not know anything about Clojure or that the
 application is written in it.

 Given that Clojure is not that young anymore I was a bit surprised to find
 only Riemann [0] and Semira [1] out there among thousands of libraries or
 development tools.

 Can you think of others? What are Clojure's killer applications ?

 [0] http://riemann.io/
 [1] https://github.com/remvee/semira/
 --
 Wolodja babi...@gmail.com

 4096R/CAF14EFC
 081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


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




extending a protocol to primitive arrays strange problem

2013-06-13 Thread Jim - FooBar();

Hi everyone,

here is an odd one for you...I've got this tiny protocol:

(defprotocol Normalisable
(normalise [this transform-fn]
  [this transform-fn limits]))

now, I'd like to have it extended to clojure native data-structures; no 
problem:


(extend-protocol Normalisable
java.lang.Number
(normalise
 ([this transform] (normalise this transform [10 -10 1 -1]))
 ([this transform limits] (apply transform this limits)))
clojure.lang.IPersistentVector
(normalise
([this transform]
   (let [top (apply max this)
 bottom (apply min this)]
   (mapv #(normalise % transform [top bottom]) this)) )
([this transform limits]
   (normalise this #(transform % limits))) )
clojure.lang.IPersistentSet
(normalise
([this transform]
   (let [top (apply max this)
 bottom (apply min this)]
 (persistent!
   (reduce #(conj! %1 (normalise %2 transform [top bottom])) (transient 
#{}) this

([this transform limits]
   (normalise this #(transform %1 %2 %3 (first limits) (second limits )
  )

So far so good...now I'd like to have it extended to arrays. I added the 
following to my 'extend-protocol' form:


(Class/forName [D)
(normalise
([this transform]
   (let [top (apply max this)
 bottom (apply min this)]
   (amap ^doubles this idx ret (normalise (aget ^doubles this idx) 
transform [top bottom]

([this transform limits]
   (normalise this #(transform % limits

and this throws this where the 'extend-protocol' form starts:

CompilerException java.lang.UnsupportedOperationException: nth not 
supported on this type: *Character*, compiling: (line 27)


if I replace (Class/forName [D) with (class (double-array 1)) the 
error is slightly different:


CompilerException java.lang.UnsupportedOperationException: nth not 
supported on this type: *Symbol*, compiling: (line 27)


what on earth is going on? What character and what symbol is the error 
referring to? And where is nth being called?


the stack trace is the following but it's not very  helpful (at least 
not to me!):


Compiler.java:6380 clojure.lang.Compiler.analyze
   Compiler.java:6322 clojure.lang.Compiler.analyze
   Compiler.java:2879 clojure.lang.Compiler$MapExpr.parse
   Compiler.java:6369 clojure.lang.Compiler.analyze
   Compiler.java:6322 clojure.lang.Compiler.analyze
   Compiler.java:3624 clojure.lang.Compiler$InvokeExpr.parse
   Compiler.java:6562 clojure.lang.Compiler.analyzeSeq
   Compiler.java:6361 clojure.lang.Compiler.analyze
   Compiler.java:6322 clojure.lang.Compiler.analyze
   Compiler.java:5708 
clojure.lang.Compiler$BodyExpr$Parser.parse

   Compiler.java:5139 clojure.lang.Compiler$FnMethod.parse
   Compiler.java:3751 clojure.lang.Compiler$FnExpr.parse
   Compiler.java:6558 clojure.lang.Compiler.analyzeSeq
   Compiler.java:6361 clojure.lang.Compiler.analyze
   Compiler.java:6616 clojure.lang.Compiler.eval
   Compiler.java:6608 clojure.lang.Compiler.eval
   Compiler.java:7064 clojure.lang.Compiler.load
   Compiler.java:7020 clojure.lang.Compiler.loadFile
  RT.java:318 clojure.lang.RT$3.invoke
 NO_SOURCE_FILE:1 user/eval252
   Compiler.java:6619 clojure.lang.Compiler.eval
   Compiler.java:6582 clojure.lang.Compiler.eval
core.clj:2852 clojure.core/eval
 main.clj:259 clojure.main/repl[fn]
 main.clj:259 clojure.main/repl[fn]
 main.clj:277 clojure.main/repl[fn]
 main.clj:277 clojure.main/repl
 RestFn.java:1096 clojure.lang.RestFn.invoke
interruptible_eval.clj:56 
clojure.tools.nrepl.middleware.interruptible-eval/evaluate[fn]

 AFn.java:159 clojure.lang.AFn.applyToHelper
 AFn.java:151 clojure.lang.AFn.applyTo
 core.clj:617 clojure.core/apply
core.clj:1788 clojure.core/with-bindings*
  RestFn.java:425 clojure.lang.RestFn.invoke
interruptible_eval.clj:41 
clojure.tools.nrepl.middleware.interruptible-eval/evaluate
   interruptible_eval.clj:171 
clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval[fn]

core.clj:2330 clojure.core/comp[fn]
   interruptible_eval.clj:138 
clojure.tools.nrepl.middleware.interruptible-eval/run-next[fn]

  AFn.java:24 clojure.lang.AFn.run
 ThreadPoolExecutor.java:1145 
java.util.concurrent.ThreadPoolExecutor.runWorker
  ThreadPoolExecutor.java:615 
java.util.concurrent.ThreadPoolExecutor$Worker.run

  Thread.java:722 java.lang.Thread.run
Caused by: java.lang.UnsupportedOperationException: nth not supported on 
this type: Character

  RT.java:857 clojure.lang.RT.nthFrom
  RT.java:807 

Re: Clojure in production

2013-06-13 Thread Jay Fields
On Monday, June 10, 2013 5:47:25 PM UTC-4, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 


I've previously written about adopting Clojure at DRW (drw.com): 
http://blog.jayfields.com/2012/01/lessons-learned-while-introducing-new.html
 

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




bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

Hi all,

can anyone explain why these 2 are different given the same protocol 
(the only difference is the swapped ordering)?


(defprotocol FOO
 (bar [this a]
  [this a b]) )

(extend-protocol FOO  ;;THIS WORKS
(Class/forName [D)
(bar
 ([_ a] a)
 ([_ a b] (+ a b)))
String
(bar
 ([_ a] (str a))
 ([_ a b]  (str a b


(extend-protocol FOO  ;;THIS WON'T COMPILE
String
(bar
 ([_ a] (str a))
 ([_ a b]  (str a b)))
(Class/forName [D)
(bar
 ([_ a] a)
 ([_ a b] (+ a b))) )

CompilerException java.lang.UnsupportedOperationException: nth not 
supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1)


it seems that the extension points include arrays, the ordering 
matters!!! The extension to array has to come first otherwise it won't 
even compile...Moreover, and possibly for the same reason, multiple 
extensions for different array-types fails with the same exception. for 
example while the following works:


(extend-protocol FOO
(Class/forName [D)
(bar
 ([_ a] a)
 ([_ a b] (+ a b))) )

trying to add more types fails:

(extend-protocol FOO
(Class/forName [D)
(bar
 ([_ a] a)
 ([_ a b] (+ a b)))
(Class/forName [F)
(bar
 ([_ a] a)
 ([_ a b] (+ a b))) )

CompilerException java.lang.UnsupportedOperationException: nth not 
supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1)


Jim

--
--
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: [pre-ANN] test2, the last Clojure testing framework

2013-06-13 Thread Steven Degutis
We've figured out a way to do groups in a simple, flexible way, that allows
for probably everyone's use-cases. It requires a change to the spec and to
how runners work.

Here's an implementation similar to speclj: https://www.refheap.com/15744
And this is how clojure.test would be translated:
https://www.refheap.com/15752

Each test-fn may have a :group metadata key, pointing to a group-map.
Group-maps must contain :description, :around-each, :around-all, and
optionally its own parent :group.

Then the test-results becomes a nested list rather than a flat one. If you
hate using nested tests, you could just ignore it and make every test-fn
have no group.

The upside is that it allows (perfectly?) emulating fixtures in at least
clojure.test, speclj, and midje.

Another upside is it's all done statically, so you can for example choose
to run a test with or without its fixtures, and you can even run a test
with other fixtures if for some reason you have that need (someone said he
did but I'm not sure I believe him).

The downside is that now the spec talks about fixtures, which might limit
innovation. But maybe not, since it's just using normal static Clojure
data, which is known for very, very easily manipulated and generated.


On Wed, Jun 12, 2013 at 12:13 PM, Steven Degutis sbdegu...@gmail.comwrote:

 There's been some discussion about how nesting should work. It should
 probably be part of the spec, in a flexible and non-intrusive way. Then we
 would consider a flat suite of tests to be just nested suite that's only a
 1-level deep.

 The two things we want nesting for are defining fixture-like behavior
 (around-each or around-all, etc), and reporting groups of tests together.

 The fixture part should almost definitely *not* be part of the spec.
 That's way too limiting for innovation. But the reporting aspect probably
 needs a chance to the spec.

 For fixture stuff, in speclj (rspec) parlance, you could imagine the
 describe macro, which transforms a list of it-blocks into a flat list of
 test-fns that are each wrapped inside any before/after/around functions
 given at the same level, and recursively does this with nested describe
 blocks. All this work could be done in the Definer, and no matter how deep
 the describe-nesting is, the result is always still a flat list of
 test-fns. This is a simple way to conform to the current spec while having
 fixture-like behavior. This was my plan for the speclj port.

 But for reporting, it's trickier. The reporter needs to see the structure
 somehow. This isn't easily faked with a flat list of test-results, so the
 test-results would have to become potentially nested. But this raises the
 question of how a flat list of test-fns produces a nested list of
 test-results.

 This is the part I'm totally confused about.


 On Sat, Jun 8, 2013 at 10:14 AM, Steven Degutis sbdegu...@gmail.comwrote:

 Test2 is a new testing lib for Clojure, where the power is its
 simplicity, extensibility, and a 
 SPEChttps://github.com/evanescence/test2/blob/master/SPEC.md much
 like Ring's.

 Github: https://github.com/evanescence/test2

 Some background: It came out of 
 discussionshttps://github.com/evanescence/test2/wiki/Communal-Brainstorming
  with
 the smart folks in #clojure, who were frustrated with the inflexibility of
 existing libs, and intended this to be the spiritual successor to
 clojure.test. We wanted something that was still simple like clojure.test,
 but could be extended externally much more easily in case you wanted
 features found in clojure.test, Midje, Speclj, or Expectations, or whatever
 else.

 This is a pre-ANN because it's more of a call for extensions. I've
 written one last night, 
 test2-autorunnerhttps://github.com/evanescence/test2-autorunner,
 which took about an hour. This should give some idea of how easy it is and
 how well-designed the SPEC was by the smart folks of #clojure. There are
 some ideas at the bottom of the wiki, but of course any extensions are
 encouraged.

 -Steven

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

'amap' issue after extending a protocol to a primitive array type

2013-06-13 Thread Jim - FooBar();

more weirdness!


try this at your REPL:

-extend any protocol to some primitive array type - let's say 'doubles'
-while in the same namespace, try to use amap passing it an array of 
floats and also type-hint it with ^floats

*
**IllegalArgumentException No matching method found: aset 
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)*


the same would have happened if the protocol had been extended to floats 
and tried to use amap with doubles. In fact any combination of primitive 
types will fail. Only the type that has been extended will work. In the 
above case that would be doubles. If we extended the protocol to longs 
then only longs would work and so forth...


I'm almost certain that this is not intentional...any opinions?

Jim

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




End user applications

2013-06-13 Thread Thom Lawrence
getprismatic.com, orderharmony.com, www.rocketli.st are consumer focused apps 
written in Clojure. FlightCaster is hard to miss.

-- 
-- 
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: bug in 'extend-protocol' ???

2013-06-13 Thread Marshall Bockrath-Vandegrift
Jim - FooBar(); jimpil1...@gmail.com writes:

 CompilerException java.lang.UnsupportedOperationException: nth not
 supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1)

If you examine the implementation of `extend-protocol` and for how it
distinguishes between additional functions being defined for a type and
new types to which to extend the protocol, I think you’ll see what’s
going on here.

-Marshall

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




while loop

2013-06-13 Thread Josh Kamau
Hi there ;

How do i implement the following in clojure

while((entry = stream.getNextEntry())!=null)   {

   System.out.println(entry.getName());

  }

NOTE: calling getNextEntry moves the curse to the next entry.

CONTEXT: I am trying to list the contents of a .zip file using
http://docs.oracle.com/javase/6/docs/api/java/util/zip/ZipInputStream.html


Regards.

Josh

-- 
-- 
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: while loop

2013-06-13 Thread Plínio Balduino
I would use loop/recur

something like this:

(loop [item (get-next-entry)]
  (when item
(do
  (do-something)
  (recur (get-next-entry


On Thu, Jun 13, 2013 at 2:20 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Hi there ;

 How do i implement the following in clojure

 while((entry = stream.getNextEntry())!=null)   {

System.out.println(entry.getName());

   }


 NOTE: calling getNextEntry moves the curse to the next entry.

 CONTEXT: I am trying to list the contents of a .zip file using 
 http://docs.oracle.com/javase/6/docs/api/java/util/zip/ZipInputStream.html



 Regards.

 Josh


  --
 --
 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: bug in 'extend-protocol' ???

2013-06-13 Thread Leon Barrett
It shouldn't be necessary to examine the source to know what's going on in 
a builtin, really, but I also encountered this one recently. The way the 
extend-protocol macro finds which entries are types and which are function 
definitions is by checking which are lists.

Frankly, a better macro would involve a vector, e.g.

(extend-protocol FOO
  [(Class/forName [D)
   (methods...)]
  [otherClass
(methods...)])

On Thursday, June 13, 2013 10:16:16 AM UTC-7, Marshall Bockrath-Vandegrift 
wrote:

 Jim - FooBar(); jimpi...@gmail.com javascript: writes: 

  CompilerException java.lang.UnsupportedOperationException: nth not 
  supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1) 

 If you examine the implementation of `extend-protocol` and for how it 
 distinguishes between additional functions being defined for a type and 
 new types to which to extend the protocol, I think you’ll see what’s 
 going on here. 

 -Marshall 



-- 
-- 
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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

On 13/06/13 18:16, Marshall Bockrath-Vandegrift wrote:

Jim - FooBar(); jimpil1...@gmail.com writes:


CompilerException java.lang.UnsupportedOperationException: nth not
supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1)

If you examine the implementation of `extend-protocol` and for how it
distinguishes between additional functions being defined for a type and
new types to which to extend the protocol, I think you’ll see what’s
going on here.

-Marshall




'extend-protocol' simply expands to a bunch of 'extend-type' forms. In 
my example I used 'extend-protocol' and then 'extend-type' on a type not 
included in the extend-protocol form. I did that only because I get a 
compilation error when I try to provide extension points for both 
'doubles' and 'floats'. That led me to pull out the code-block for 
'floats' and use extend-type specifically for floats. That compiled, but 
because it's using amap internally, throws the exception I mentioned 
previously. The exception you've responded to is only thrown when I try 
to put both extension points in the same 'extend-protocol' form or in 
fact, whenever any extension for primitive arrays doesn't come first 
before everything else! are the 2 problems related? where should I look 
for the one error and where for the other?


thanks,

Jim

--
--
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: 'amap' issue after extending a protocol to a primitive array type

2013-06-13 Thread Aaron Cohen
Are you sure?

user= (defprotocol A (foo [a b]))
A
user= (extend-protocol A (Class/forName [D) (foo [a b] [a b]))
nil
user= (pprint (foo (double-array [1 2 3]) 1))
[[1.0, 2.0, 3.0] 1]
user= (pprint (amap (float-array [1 2 3]) i ret (float (* 2 (aget ret
i)
[2.0, 4.0, 6.0]

My guess is you're not remembering to cast to the appropriate type in your
loop expression in amap.

For instance:
user= (amap (float-array [1 2 3]) i ret i)
IllegalArgumentException No matching method found: aset
 clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)

Whereas you need:
user= (amap (float-array [1 2 3]) i ret (float i))
#float[] [F@6a636064

--Aaron

On Thu, Jun 13, 2013 at 12:57 PM, Jim - FooBar(); jimpil1...@gmail.comwrote:

  more weirdness!


 try this at your REPL:

 -extend any protocol to some primitive array type - let's say 'doubles'
 -while in the same namespace, try to use amap passing it an array of
 floats and also type-hint it with ^floats
 *
 **IllegalArgumentException No matching method found: aset
 clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)*

 the same would have happened if the protocol had been extended to floats
 and tried to use amap with doubles. In fact any combination of primitive
 types will fail. Only the type that has been extended will work. In the
 above case that would be doubles. If we extended the protocol to longs then
 only longs would work and so forth...

 I'm almost certain that this is not intentional...any opinions?

 Jim

 --
 --
 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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

On 13/06/13 18:28, Leon Barrett wrote:
It shouldn't be necessary to examine the source to know what's going 
on in a builtin, really, but I also encountered this one recently. The 
way the extend-protocol macro finds which entries are types and which 
are function definitions is by checking which are lists.


I'm not sure I follow...if we can't have lists that evaluate to Class 
objects  then how am I able to succesfully use (Class/forName [D) as 
the first extension but not in any other position?
should I be using (eval (Class/forName [D)) so the macro definitely 
receives a Class?


You say you've encountered this a lot...can you elaborate? what did you do?

many many thanks,

Jim




--
--
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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

On 13/06/13 18:47, Jim - FooBar(); wrote:

On 13/06/13 18:28, Leon Barrett wrote:
It shouldn't be necessary to examine the source to know what's going 
on in a builtin, really, but I also encountered this one recently. 
The way the extend-protocol macro finds which entries are types and 
which are function definitions is by checking which are lists.


I'm not sure I follow...if we can't have lists that evaluate to Class 
objects  then how am I able to succesfully use (Class/forName [D) as 
the first extension but not in any other position?
should I be using (eval (Class/forName [D)) so the macro definitely 
receives a Class?


You say you've encountered this a lot...can you elaborate? what did 
you do?


many many thanks,

Jim






or can you perhaps show an example of successfully extending any 
protocol to at least 2 primitive array types?


Jim

--
--
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: while loop

2013-06-13 Thread Aaron Cohen
I like the StackOverflow answer for this:

http://stackoverflow.com/questions/5419125/using-java-api-from-clojure-reading-zip-file

(defn entries [zipfile]
  (enumeration-seq (.entries zipfile)))
(defn walkzip [fileName]
  (with-open [z (java.util.zip.ZipFile. fileName)]
 (doseq [e (entries z)]
(println (.getName e)



On Thu, Jun 13, 2013 at 1:25 PM, Leon Barrett lbarr...@climate.com wrote:

 Yeah, Clojure's while construct isn't really good at stuff like that. A
 loop is the basic thing I reach for, and I'd probably write it as:

 (loop []
   (when-let [entry (.getNextEntry stream)]
 (println entry)
 (recur)))


 On Thursday, June 13, 2013 10:20:22 AM UTC-7, Josh Kamau wrote:

 Hi there ;

 How do i implement the following in clojure

 while((entry = stream.getNextEntry())!=null)   {

System.out.println(entry.**getName());

   }

 NOTE: calling getNextEntry moves the curse to the next entry.

 CONTEXT: I am trying to list the contents of a .zip file using 
 http://docs.oracle.com/javase/**6/docs/api/java/util/zip/**ZipInputStream.html
  http://docs.oracle.com/javase/6/docs/api/java/util/zip/ZipInputStream.html


 Regards.

 Josh


   --
 --
 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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

On 13/06/13 18:52, Jim - FooBar(); wrote:

On 13/06/13 18:47, Jim - FooBar(); wrote:

On 13/06/13 18:28, Leon Barrett wrote:
It shouldn't be necessary to examine the source to know what's going 
on in a builtin, really, but I also encountered this one recently. 
The way the extend-protocol macro finds which entries are types and 
which are function definitions is by checking which are lists.


I'm not sure I follow...if we can't have lists that evaluate to Class 
objects  then how am I able to succesfully use (Class/forName [D) 
as the first extension but not in any other position?
should I be using (eval (Class/forName [D)) so the macro definitely 
receives a Class?


You say you've encountered this a lot...can you elaborate? what did 
you do?


many many thanks,

Jim






or can you perhaps show an example of successfully extending any 
protocol to at least 2 primitive array types?


Jim



If I simply def the class objects upfront and use the vars in the 
extend-protocol macro?that could possibly work as there will be no 
confusion as to what is a list and what isn't... I'll try that as soon 
as I get back!


Jim

--
--
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: bug in 'extend-protocol' ???

2013-06-13 Thread Aaron Cohen
On Thu, Jun 13, 2013 at 1:52 PM, Jim - FooBar(); jimpil1...@gmail.com
 wrote:

 or can you perhaps show an example of successfully extending any protocol
 to at least 2 primitive array types?


You can call extend-protocol several times:

user= (defprotocol A (foo [a b]))
A
user= (extend-protocol A (Class/forName [D) (foo [a b] [a b]))
nil
user= (extend-protocol A (Class/forName [F) (foo [a b] [a b]))
nil
user= (foo (double-array [1 2 3]) 1)
[#double[] [D@5a12d46c 1]
user= (foo (float-array [1 2 3]) 1)
[#float[] [F@5e310a07 1]

-- 
-- 
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: bug in 'extend-protocol' ???

2013-06-13 Thread Leon Barrett
On Thu, Jun 13, 2013 at 10:52 AM, Jim - FooBar(); jimpil1...@gmail.comwrote:

 On 13/06/13 18:47, Jim - FooBar(); wrote:

 On 13/06/13 18:28, Leon Barrett wrote:

 It shouldn't be necessary to examine the source to know what's going on
 in a builtin, really, but I also encountered this one recently. The way the
 extend-protocol macro finds which entries are types and which are function
 definitions is by checking which are lists.


 I'm not sure I follow...if we can't have lists that evaluate to Class
 objects  then how am I able to succesfully use (Class/forName [D) as the
 first extension but not in any other position?
 should I be using (eval (Class/forName [D)) so the macro definitely
 receives a Class?

 You say you've encountered this a lot...can you elaborate? what did you
 do?


If you want to understand why it behaves the way it does, then I do
encourage you to read the source(clj/clojure/core_deftype.clj). Basically,
it knows the first thing is a type and then uses (take-while seq?) to find
that type's methods.

extend-protocol is a macro that expands to a bunch of extend-type calls.
Just make a bunch of extend-type calls, or make your own macro that makes a
bunch of extend-type calls.


 many many thanks,

 Jim





 or can you perhaps show an example of successfully extending any protocol
 to at least 2 primitive array types?


 Jim

 --
 --
 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.comclojure%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en
 --- You received this message because you are subscribed to a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/clojure/0TJ-Kl3CsDk/**unsubscribehttps://groups.google.com/d/topic/clojure/0TJ-Kl3CsDk/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 clojure+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://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: Clojure in production

2013-06-13 Thread dgrnbrg
We are using Clojure at Two Sigma to monitor, schedule, and optimize our 
cluster.

On a related note, we're hiring: 
http://functionaljobs.com/jobs/149-distributed-systems-developer-at-two-sigma-investments

On Monday, June 10, 2013 5:47:25 PM UTC-4, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 

 Thank you 

 Plínio Balduino 


-- 
-- 
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: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-13 Thread Alan Thompson
Looks nice, although I like Dan's explicit definition of char sequences.
 One thing that threw me at first was the double arg in the function #(encrypt
% %).  It took a while before I realized you were supplying each character
as both the map key value and a default return value (thus, a
non-alphanumeric char like * would come through w/o translation).

While this works, what I would do instead is be more explicit that only
certain chars are allowed in the first place.  So, I'd add a filter up
front that would throw an exception if any non-alphanumeric char were
encountered.  I can't tell you how many times this fail-fast type of
behavior has saved me, since it makes bugs easy to find rather than burying
the cause of a problem (kinda like getting an error at compile-type instead
of at runtime).

Alan Thompson


On Wed, Jun 12, 2013 at 5:30 PM, Shannon Severance s...@s53.me wrote:

 Thank you all, I've learned something from each entry. My latest version,
 incorporating some of the changes suggested:

 (defn make-crypto []
   (let [lower (map char (range (int \a) (inc (int \z
 upper (map char (range (int \A) (inc (int \Z
 digit (map char (range (int \0) (inc (int \9

 [sl su sd] (map shuffle [lower upper digit])

 encrypt (zipmap (concat lower upper digit)
 (concat sl su sd))]
 (fn [s]
   (apply str (map #(encrypt % %) s)

 I specified the range the way I did because I wanted meaningful start and
 end points, I don't have the code points for many characters memorized.

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




Clojure generates unnecessary and slow type-checks

2013-06-13 Thread Leon Barrett
Hi. I've been working with people at Prismatic to optimize some simple math 
code in Clojure. However, it seems that Clojure generates an unnecessary 
type check that slows our (otherwise-optimized) code by 50%. Is there a 
good way to avoid this, is it a bug in Clojure 1.5.1, or something else? 
What should I do to work around this?

Here's my example. The aget seems to generate an unnecessary checkcastbytecode. 
I used Jasper and Jasmin to decompile and recompile Bar.class 
into Bar_EDITED.class, without that bytecode. The edited version takes 
about 2/3 the time.

(ns demo
  (:import demo.Bar_EDITED))

(definterface Foo
  (arraysum ^double [^doubles a ^int i ^int asize ^double sum]))

(deftype Bar []
  Foo
  (arraysum ^double [this ^doubles a ^int i ^int asize ^double sum]
(if ( i asize)
  (recur a (unchecked-inc-int i) asize (+ sum (aget a i)))
  sum)))

(defn -main [ args]
  (let [bar (Bar.)
bar-edited (Bar_EDITED.)
asize 1
a (double-array asize)
i 0
ntimes 1]
(time

  (dotimes [iter ntimes]
(.arraysum bar a i asize 0)))
(time
  (dotimes [iter ntimes]
(.arraysum bar-edited a i asize 0)


;; $ lein2 run -m demo
;; Compiling demo
;; Elapsed time: 191.015885 msecs
;; Elapsed time: 129.332 msecs


Here's the bytecode for Bar.arraysum:

  public java.lang.Object arraysum(double[], int, int, double);
Code:
   0: iload_2   
   1: i2l   
   2: iload_3   
   3: i2l   
   4: lcmp  
   5: ifge  39
   8: aload_1   
   9: iload_2   
  10: iconst_1  
  11: iadd  
  12: iload_3   
  13: dload 4
  15: aload_1   
  16: aconst_null   
  17: astore_1  
  18: checkcast #60 // class [D
  21: iload_2   
  22: invokestatic  #64 // Method 
clojure/lang/RT.intCast:(I)I
  25: daload
  26: dadd  
  27: dstore4
  29: istore_3  
  30: istore_2  
  31: astore_1  
  32: goto  0
  35: goto  44
  38: pop   
  39: dload 4
  41: invokestatic  #70 // Method 
java/lang/Double.valueOf:(D)Ljava/lang/Double;
  44: areturn   


As far as I can tell, Clojure generated a checkcast opcode that tests on 
every loop to make sure the double array is really a double array. When I 
remove that checkcast, I get a 1/3 speedup (meaning it's a 50% overhead).

Can someone help me figure out how to avoid this overhead?

Thanks.

- Leon Barrett

-- 
-- 
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: while loop

2013-06-13 Thread Josh Kamau
Thanks guys i have now have a bunch of solutions to try out ;)

Josh


On Thu, Jun 13, 2013 at 8:57 PM, Aaron Cohen aa...@assonance.org wrote:

 I like the StackOverflow answer for this:


 http://stackoverflow.com/questions/5419125/using-java-api-from-clojure-reading-zip-file

 (defn entries [zipfile]
   (enumeration-seq (.entries zipfile)))
 (defn walkzip [fileName]
   (with-open [z (java.util.zip.ZipFile. fileName)]
  (doseq [e (entries z)]
 (println (.getName e)



 On Thu, Jun 13, 2013 at 1:25 PM, Leon Barrett lbarr...@climate.comwrote:

 Yeah, Clojure's while construct isn't really good at stuff like that. A
 loop is the basic thing I reach for, and I'd probably write it as:

 (loop []
   (when-let [entry (.getNextEntry stream)]
 (println entry)
 (recur)))


 On Thursday, June 13, 2013 10:20:22 AM UTC-7, Josh Kamau wrote:

 Hi there ;

 How do i implement the following in clojure

 while((entry = stream.getNextEntry())!=null)   {

System.out.println(entry.**getName());

   }

 NOTE: calling getNextEntry moves the curse to the next entry.

 CONTEXT: I am trying to list the contents of a .zip file using 
 http://docs.oracle.com/javase/**6/docs/api/java/util/zip/**ZipInputStream.html
  
 http://docs.oracle.com/javase/6/docs/api/java/util/zip/ZipInputStream.html


 Regards.

 Josh


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




-- 
-- 
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] edn-java 0.4.2 released

2013-06-13 Thread Ben Smith-Mannschott
edn-java [1] is a parser and printer for edn [2].

This release fixes issue #32 [3] EDN List, Vector types indistinguishable
due to common RandomAccess interface.

It should be available on Maven Central within a day.

// Ben

[1] http://edn-java.bpsm.us
[2] https://github.com/edn-format/edn
[3] 
https://github.com/bpsm/edn-java/issues/3https://github.com/bpsm/edn-java/issues/31
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 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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();
I wish I could...if I do that I can't call amap on any other primitive 
array but the first extended - I get the exception I posted earlier and 
it has nothing to do with type hinting the array. I'm type-hinting it in 
both cases:


IllegalArgumentException No matching method found: aset 
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)


ok it's starting t get annoying so let's work with a concrete example:

(defprotocol FOO
 (bar [this a] [this a b]))

(extend-protocol FOO
(Class/forName [D)
(bar
([this a]
   (amap ^doubles this idx ret (a (aget ^doubles this idx) 10.0)))
([this a b]
   (bar this #(apply a %1 (list %2 b) )

user= (bar (double-array 1) +)
#double[] [D@6239ae30
user= (seq *1)
(10.0)

Right, all is well! let's carry on...I'm going to copy-paste the 
code-block above only changing the 'doubles'-floats


(extend-protocol FOO
(Class/forName [F)
(bar
([this a]
   (amap ^floats this idx ret (a (aget ^floats this idx) (float 10
([this a b]
   (bar this #(apply a %1 (list %2 b) )

user= (bar (float-array 1) +)

IllegalArgumentException No matching method found: aset 
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)


any other type I try from now onwards will fail with the same exception. 
Could it be because Clojure changes the types internally to longs?

I don't understand!forgive me but I'm a bit annoyed with this...

Jim



On 13/06/13 19:02, Aaron Cohen wrote:
On Thu, Jun 13, 2013 at 1:52 PM, Jim - FooBar(); jimpil1...@gmail.com 
mailto:jimpil1...@gmail.com wrote:


or can you perhaps show an example of successfully extending any
protocol to at least 2 primitive array types?


You can call extend-protocol several times:

user= (defprotocol A (foo [a b]))
A
user= (extend-protocol A (Class/forName [D) (foo [a b] [a b]))
nil
user= (extend-protocol A (Class/forName [F) (foo [a b] [a b]))
nil
user= (foo (double-array [1 2 3]) 1)
[#double[] [D@5a12d46c 1]
user= (foo (float-array [1 2 3]) 1)
[#float[] [F@5e310a07 1]


--
--
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: Clojure in production

2013-06-13 Thread Leon Barrett
At The Climate Corporation http://www.climate.com/ (formerly 
Weatherbill), we do much, though not all, of our development in Clojure.

On Thursday, June 13, 2013 11:45:42 AM UTC-7, dgrnbrg wrote:

 We are using Clojure at Two Sigma to monitor, schedule, and optimize our 
 cluster.

 On a related note, we're hiring: 
 http://functionaljobs.com/jobs/149-distributed-systems-developer-at-two-sigma-investments

 On Monday, June 10, 2013 5:47:25 PM UTC-4, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 

 Thank you 

 Plínio Balduino 



-- 
-- 
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: bug in 'extend-protocol' ???

2013-06-13 Thread Jim - FooBar();

an epiphany finally!!!

while writing my response previously I realised that adding 2 numbers of 
different type usuallly returns either a double or a long. That was the 
source of confusion... I need to coerce whatever number my fn is 
returning to the type the array is expecting (duh!)


I feel properly stupid now!

thanks all of you who bothered responding...

Jim



On 13/06/13 21:03, Jim - FooBar(); wrote:
I wish I could...if I do that I can't call amap on any other primitive 
array but the first extended - I get the exception I posted earlier 
and it has nothing to do with type hinting the array. I'm type-hinting 
it in both cases:


IllegalArgumentException No matching method found: aset 
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)


ok it's starting t get annoying so let's work with a concrete example:

(defprotocol FOO
 (bar [this a] [this a b]))

(extend-protocol FOO
(Class/forName [D)
(bar
([this a]
   (amap ^doubles this idx ret (a (aget ^doubles this idx) 10.0)))
([this a b]
   (bar this #(apply a %1 (list %2 b) )

user= (bar (double-array 1) +)
#double[] [D@6239ae30
user= (seq *1)
(10.0)

Right, all is well! let's carry on...I'm going to copy-paste the 
code-block above only changing the 'doubles'-floats


(extend-protocol FOO
(Class/forName [F)
(bar
([this a]
   (amap ^floats this idx ret (a (aget ^floats this idx) (float 10
([this a b]
   (bar this #(apply a %1 (list %2 b) )

user= (bar (float-array 1) +)

IllegalArgumentException No matching method found: aset 
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)


any other type I try from now onwards will fail with the same 
exception. Could it be because Clojure changes the types internally to 
longs?

I don't understand!forgive me but I'm a bit annoyed with this...

Jim



On 13/06/13 19:02, Aaron Cohen wrote:
On Thu, Jun 13, 2013 at 1:52 PM, Jim - FooBar(); 
jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote:


or can you perhaps show an example of successfully extending any
protocol to at least 2 primitive array types?


You can call extend-protocol several times:

user= (defprotocol A (foo [a b]))
A
user= (extend-protocol A (Class/forName [D) (foo [a b] [a b]))
nil
user= (extend-protocol A (Class/forName [F) (foo [a b] [a b]))
nil
user= (foo (double-array [1 2 3]) 1)
[#double[] [D@5a12d46c 1]
user= (foo (float-array [1 2 3]) 1)
[#float[] [F@5e310a07 1]


--
--
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: End user applications

2013-06-13 Thread Karsten Schmidt
Hey, just recently I've completed my first full Clojure client
project, the new identity for Leeds College of Music. Some pretty
pictures:

http://flickr.com/toxi/sets/72157630719227308/

The project is a 3-tier system, consisting of:

1) OSX app with custom OpenGL GUI to create  preview new brand assets
2) web app to manage/track render jobs, EC2 instances  generated assets
3) on-demand render farm running on EC2 to render and transcode high
res print  video assets.

The identity is based on a dual strange attractor particle system,
which is computed using OpenCL (approx. 500-800M particles per video
frame). Students at the college can upload their own music via the
render manager web app to create audioresponsive versions of the logo
and embed the generated videos via a custom JS player widget.

Key libraries (incl. some of the best I've ever used):

* JOGL  JOCL -- bindings for OpenGL/CL
* amazonica -- S3, SQS, EC2
* liberator, hiccup, compojure, ring -- render manager API
* http-kit, clj-http -- server etc.
* clutch -- CouchDB
* clostache, markdown-clj -- email templates  documentation
* postal -- email notifications
* timbre -- logging

...of my own (public) ones, but which still largely await some more
TLC before recommended public consumption:

* http://hg.postspectacular.com/simplecl/ - Clojure - OpenCL
* http://hg.postspectacular.com/structgen/ - C struct/typedef parser
* http://hg.postspectacular.com/rotor/ - rotating logs

Also, Lein's profile system itself was invaluable for configuring the
different project tiers from a single project.clj (made even better
together w/ the lein-environ plugin).

A big thank you to all the authors!

Best, K.

On 13 June 2013 18:03, Thom Lawrence t...@thom.org.uk wrote:
 getprismatic.com, orderharmony.com, www.rocketli.st are consumer focused apps 
 written in Clojure. FlightCaster is hard to miss.

 --
 --
 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: Clojure generates unnecessary and slow type-checks

2013-06-13 Thread Jason Wolfe
Taking a step back, the core problem we're trying to solve is just to sum 
an array's values as quickly as in Java. (We really want to write a fancier 
macro that allows arbitrary computations beyond summing that can't be 
achieved by just calling into Java, but this simpler task gets at the crux 
of our performance issues).

This Java code:

  public static double asum_noop_indexed(double[] arr) {
double s = 0;
for (int i = 0; i  arr.length; i++) {
  s += arr[i];
}
return s;
  }

can run on an array with 10k elements in about 8 microseconds. In contrast, 
this Clojure code (which I believe used to be as fast as the Java in a 
previous Clojure version):

(defn asum-identity [^doubles a]
  (let [len (long (alength a))]
(loop [sum 0.0
   idx 0]
  (if ( idx len)
(let [ai (aget a idx)]
  (recur (+ sum ai) (unchecked-inc idx)))
sum

executes on the same array in about 40 microseconds normally, or 14 
microseconds with *unchecked-math* set to true.  (We weren't using 
unchecked-math properly until today, which is why we were doing the hacky 
interface stuff above, please disregard that -- but I think the core point 
about an extra cast is still correct).  

For reference, (areduce a1 i r 0.0 (+ (aget a1 i) r)) takes about 23 ms to 
do the same computation (with unchecked-math true).

Does anyone have ideas for how to achieve parity with Java on this task? 
 They'd be much appreciated! 

Thanks, Jason

On Thursday, June 13, 2013 12:02:56 PM UTC-7, Leon Barrett wrote:

 Hi. I've been working with people at Prismatic to optimize some simple 
 math code in Clojure. However, it seems that Clojure generates an 
 unnecessary type check that slows our (otherwise-optimized) code by 50%. Is 
 there a good way to avoid this, is it a bug in Clojure 1.5.1, or something 
 else? What should I do to work around this?

 Here's my example. The aget seems to generate an unnecessary 
 checkcastbytecode. I used Jasper and Jasmin to decompile and recompile 
 Bar.class 
 into Bar_EDITED.class, without that bytecode. The edited version takes 
 about 2/3 the time.

 (ns demo
   (:import demo.Bar_EDITED))

 (definterface Foo
   (arraysum ^double [^doubles a ^int i ^int asize ^double sum]))

 (deftype Bar []
   Foo
   (arraysum ^double [this ^doubles a ^int i ^int asize ^double sum]
 (if ( i asize)
   (recur a (unchecked-inc-int i) asize (+ sum (aget a i)))
   sum)))

 (defn -main [ args]
   (let [bar (Bar.)
 bar-edited (Bar_EDITED.)
 asize 1
 a (double-array asize)
 i 0
 ntimes 1]
 (time

   (dotimes [iter ntimes]
 (.arraysum bar a i asize 0)))
 (time
   (dotimes [iter ntimes]
 (.arraysum bar-edited a i asize 0)


 ;; $ lein2 run -m demo
 ;; Compiling demo
 ;; Elapsed time: 191.015885 msecs
 ;; Elapsed time: 129.332 msecs


 Here's the bytecode for Bar.arraysum:

   public java.lang.Object arraysum(double[], int, int, double);
 Code:
0: iload_2   
1: i2l   
2: iload_3   
3: i2l   
4: lcmp  
5: ifge  39
8: aload_1   
9: iload_2   
   10: iconst_1  
   11: iadd  
   12: iload_3   
   13: dload 4
   15: aload_1   
   16: aconst_null   
   17: astore_1  
   18: checkcast #60 // class [D
   21: iload_2   
   22: invokestatic  #64 // Method 
 clojure/lang/RT.intCast:(I)I
   25: daload
   26: dadd  
   27: dstore4
   29: istore_3  
   30: istore_2  
   31: astore_1  
   32: goto  0
   35: goto  44
   38: pop   
   39: dload 4
   41: invokestatic  #70 // Method 
 java/lang/Double.valueOf:(D)Ljava/lang/Double;
   44: areturn   


 As far as I can tell, Clojure generated a checkcast opcode that tests on 
 every loop to make sure the double array is really a double array. When I 
 remove that checkcast, I get a 1/3 speedup (meaning it's a 50% overhead).

 Can someone help me figure out how to avoid this overhead?

 Thanks.

 - Leon Barrett


-- 
-- 
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: Clojure in production

2013-06-13 Thread Karsten Schmidt
Just for completeness' sake, my two pence:
https://groups.google.com/d/msg/clojure/Z995K48BZGA/IDSAEm-PKFkJ

 On Monday, June 10, 2013 5:47:25 PM UTC-4, Plinio Balduino wrote:

 Hi there

 I'm writing a talk about Clojure in the real world and I would like to
 know, if possible, which companies are using Clojure for production or
 to make internal tools.

 Thank you

 Plínio Balduino

-- 
-- 
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: End user applications

2013-06-13 Thread Daniel Pittman
On Thu, Jun 13, 2013 at 2:41 AM, Philip Potter
philip.g.pot...@gmail.com wrote:

 PuppetDB is another:
 http://docs.puppetlabs.com/puppetdb/latest/index.html

 We use PuppetDB at GOV.UK for host management and reporting purposes.
 Nobody else on my team really knows clojure, but nobody has to care
 because PuppetDB is self-contained.

That has a fair bit of air-play in the wild, and has been
trouble-free the whole time.  I can probably dig out some numbers from
our marketing department about how widely used it is, if y'all are
interested.

--
Daniel Pittman
♲ Made with 100 percent post-consumer electrons

-- 
-- 
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: Clojure in production

2013-06-13 Thread Deepak Giridharagopal
On Monday, June 10, 2013 3:47:25 PM UTC-6, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 


Puppet Labs (http://puppetlabs.com) uses Clojure in some of our internal 
tools, commercial projects, and open source stuff. I gave a talk on 
PuppetDB (https://github.com/puppetlabs/puppetdb) at Clojure/West a few 
months ago. It's currently in production at ~10k installations across the 
planet.
 


 Thank you 

 Plínio Balduino 


-- 
-- 
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: Clojure in production

2013-06-13 Thread Travis Vachon
We've used Clojure at Copious (http://copious.com) to build our
activity feed (http://www.youtube.com/watch?v=0l7Va3-wXeI) and a
number of backend services.

We're definitely looking to use it even more in the future: it's the
cat's pajamas.

On Thu, Jun 13, 2013 at 2:07 PM, Deepak Giridharagopal
dee...@puppetlabs.com wrote:
 On Monday, June 10, 2013 3:47:25 PM UTC-6, Plinio Balduino wrote:

 Hi there

 I'm writing a talk about Clojure in the real world and I would like to
 know, if possible, which companies are using Clojure for production or
 to make internal tools.


 Puppet Labs (http://puppetlabs.com) uses Clojure in some of our internal
 tools, commercial projects, and open source stuff. I gave a talk on PuppetDB
 (https://github.com/puppetlabs/puppetdb) at Clojure/West a few months ago.
 It's currently in production at ~10k installations across the planet.



 Thank you

 Plínio Balduino

 --
 --
 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: Clojure in production

2013-06-13 Thread Zhemin Lin
We use Clojure in some backend services in Trend Micro.

-- 
-- 
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: End user applications

2013-06-13 Thread Ron Toland
At rewryte.com, we use Clojure for all our back- end data processing.

-- 
-- 
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: Clojure in production

2013-06-13 Thread Korny Sietsma
We're building a few clojure projects at IOOF (a large Australian
superannuation firm) - the biggest is a transformation and routing system
for communicating with other superannuation companies, written in clojure
for the back end, and angular.js for the UI.

(It's technically in production but the actual go-live is in a few weeks.)

I talked about this at the local Yow Lambda Jam conference a few weeks ago
- the slides should be up at
http://www.yowconference.com.au/lambdajam/Program.html soon.  (they are
actually there now, but seem to be corrupted...)

- Korny


On 14 June 2013 12:53, Zhemin Lin lin.zhe...@gmail.com wrote:

 We use Clojure in some backend services in Trend Micro.

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





-- 
Kornelis Sietsma  korny at my surname dot com http://korny.info
.fnord { display: none !important; }

-- 
-- 
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: Clojure in production

2013-06-13 Thread Stuart
We use Clojure across several APIs and for data analysis at SmartBIM in 
Atlanta, and we're hiring! Send me an email at stuart.hinson at the 
company's domain if you're local and interested

On Thursday, June 13, 2013 5:07:07 PM UTC-4, Deepak Giridharagopal wrote:

 On Monday, June 10, 2013 3:47:25 PM UTC-6, Plinio Balduino wrote:

 Hi there 

 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 


 Puppet Labs (http://puppetlabs.com) uses Clojure in some of our internal 
 tools, commercial projects, and open source stuff. I gave a talk on 
 PuppetDB (https://github.com/puppetlabs/puppetdb) at Clojure/West a few 
 months ago. It's currently in production at ~10k installations across the 
 planet.
  


 Thank you 

 Plínio Balduino 



-- 
-- 
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: End user applications

2013-06-13 Thread Wolodja Wentland
On 14 Jun 2013 05:37, Ron Toland rontol...@gmail.com wrote:

 At rewryte.com, we use Clojure for all our back- end data processing.

Sure, but I was rather looking for actual applications that can be
downloaded and installed locally. It wasn't really my intention to compile
a list of companies that use Clojure somewhere in their web stack (that
would simply be a duplicate of the Clojure in production thread).

Thanks

Wolodja

-- 
-- 
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: End user applications

2013-06-13 Thread Wolodja Wentland
On 13 Jun 2013 11:42, Philip Potter philip.g.pot...@gmail.com wrote:

 PuppetDB is another:

 http://docs.puppetlabs.com/puppetdb/latest/index.html

 We use PuppetDB at GOV.UK for host management and reporting purposes.
 Nobody else on my team really knows clojure, but nobody has to care
 because PuppetDB is self-contained.

Ah, wonderful. This is exactly what I was looking for (self-contained, open
source application that appeals to users unfamiliar with Clojure).

Ta!
 On 13 June 2013 10:01, Wolodja Wentland babi...@gmail.com wrote:
  Hi all,
 
  I was recently trying to find some applications written in Clojure that
are
  meant for end users. The aim was to find those that would be
interesting to a
  user even though the user does not know anything about Clojure or that
the
  application is written in it.
 
  Given that Clojure is not that young anymore I was a bit surprised to
find
  only Riemann [0] and Semira [1] out there among thousands of libraries
or
  development tools.
 
  Can you think of others? What are Clojure's killer applications ?
 
  [0] http://riemann.io/
  [1] https://github.com/remvee/semira/
  --
  Wolodja babi...@gmail.com
 
  4096R/CAF14EFC
  081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC

 --
 --
 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: End user applications

2013-06-13 Thread Wolodja Wentland
On 13 Jun 2013 15:31, Aaron Cohen aa...@assonance.org wrote:

 What about Overtone? http://overtone.github.io/

Overtone is certainly great, but I would rather classify it as a library as
you still have to write programs to use it. There might be an independent
UI these days that I am unfamiliar with though.


 On Thu, Jun 13, 2013 at 5:01 AM, Wolodja Wentland babi...@gmail.com
wrote:

 Hi all,

 I was recently trying to find some applications written in Clojure that
are
 meant for end users. The aim was to find those that would be interesting
to a
 user even though the user does not know anything about Clojure or that
the
 application is written in it.

 Given that Clojure is not that young anymore I was a bit surprised to
find
 only Riemann [0] and Semira [1] out there among thousands of libraries or
 development tools.

 Can you think of others? What are Clojure's killer applications ?

 [0] http://riemann.io/
 [1] https://github.com/remvee/semira/
 --
 Wolodja babi...@gmail.com

 4096R/CAF14EFC
 081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


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