optimal way to generate/store/compare 256/512/1024 bytes

2014-03-23 Thread t x
Hi,

  In my _cljs_ code, I need to generate keys by:

  * randomly generating a 256/512/1024-bit object
  * testing that it hasn't been used before (and if it's already used,
pick another random value)

  The only use of these ids is as keys to a map. Thus, I would like to
have efficient tests for (1) equality and (2) comparison and (3)
possibly hashing.

  Now, my question is: what is the optimal format for these keys? (not
generate -- which I can do via some prg)

  Should I be using a string, an array of integers, or ... ?

Thanks!

-- 
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/d/optout.


Re: Spawn external process and read from output

2014-03-23 Thread ronen
I highly recommend https://github.com/Raynes/conch, it has a nicer UI and 
it supports timeouts pipelining etc..

On Friday, March 21, 2014 8:34:02 AM UTC+2, Sean Corfield wrote:

 On Mar 20, 2014, at 9:41 PM, gvim gvi...@gmail.com javascript: wrote: 
  I'm not familiar with the Java standard library and didn't find anything 
 matching my question on Google so here goes. From my Clojure app I need to 
 call an executable written in C and parse the text output within my Clojure 
 app. What's the standard way to call an external process and read its 
 output? In Ruby I use: 
  
  ext = IO.popen '/path/to/file' 
  ext.readlines.each {|line| process line} 
  ext.close 

 (- (clojure.java.shell/sh /path/to/file) 
 :out 
 (clojure.string/split #\n)) 

 See: 
 
 http://clojure.github.io/clojure/clojure.java.shell-api.html#clojure.java.shell/sh
  
 and: 
 
 http://clojure.github.io/clojure/clojure.string-api.html#clojure.string/split 

 Sean Corfield -- (904) 302-SEAN 
 An Architect's View -- http://corfield.org/ 

 Perfection is the enemy of the good. 
 -- Gustave Flaubert, French realist novelist (1821-1880) 





-- 
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/d/optout.


clj-pdf: how to serve a pdf with ring

2014-03-23 Thread Mathias Picker


I'm trying to serve a clj-http generated document directly via 
ring/compojure.


I thought ring.util/piped-output-stream would work, but it seems I'm not 
understanding something here...

This:

(defn laminat-pdf-t
 [natno]
(piped-input-stream
 (fn [output-stream])
(pdf
 [ {:title (str Omanimali-Kuscheltierpass natno)
:orientation :landscape
 :size :a6
 :author Omanimali - Stefanie Tuschen
:register-system-fonts true
 }
;; [:svg {} (clojure.java.io/file
;; (str /einbuergern/ natno /svg ))]
[:paragraph Some Text] ]
output-stream)))

(defn laminat-pdf
 generate individualized cuddly toy passport page
[natno]
{:headers {Content-Type application/pdf}
:body (laminat-pdf-t natno)})

leads to an empty response...

What do I need to do differently?

Thanks,

Mathias

-- 
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/d/optout.


Re: How did you learn Clojure?

2014-03-23 Thread Marcus Blankenship
Thank, Blake!

On Mar 20, 2014, at 11:50 PM, blake.wat...@pnmac.com wrote:

 Some Lisp books have been translated to Clojure.
 
 http://juliangamble.com/blog/2012/07/13/amazing-lisp-books-living-again-in-clojure/
 
 On Thursday, March 20, 2014 11:23:10 PM UTC-7, Marcus Blankenship wrote:
 Cool, thanks to all who've replied thus far. 
 
 Question: is there any value in traditional lisp / scheme texts, like SICP, 
 or Little Schemer (etc) or other books like that?  I've spent quite a bit of 
 time with them, imagining they would pay off, but I'm not sure that's a 
 normal route to Clojure proficiency. 
 
 Sent from my iPhone 
 
  On Mar 20, 2014, at 11:12 PM, Sean Corfield se...@corfield.org wrote: 
  
  On Mar 20, 2014, at 6:08 PM, Marcus Blankenship mar...@creoagency.com 
  wrote: 
  So I'm curious: how did you learn Clojure well enough to be proficient 
  with it, or how are you working on learning it? 
  
  Initial dabbling: The Joy of Clojure and a REPL. Caveat: it's not really an 
  introductory Clojure book but I had past FP experience so I felt I could 
  jump in. 
  
  Initial serious learning: Attended Amit Rathore's Clojure Bootcamp - one 
  day course for about $300 (if I remember correctly?). 
  
  Follow-on: 4clojure.com, worked through Clojure in Action as well. 
  
  Then I picked a handful of small-ish problems we'd already solved at work 
  in other languages and re-coded them in Clojure. 
  
  Since then it's been a steady stream of tackling increasingly larger 
  problems at work, over a period of about three years. 
  
  Anyone else facing the focus + fear dilemma? 
  
  There's a lot less fear if you're used to learning new languages. I try to 
  pick up a new language every year or two: Groovy in 2008/2009, Scala in 
  2009/2010, Clojure in 2010/2011 (and onward). Dabbled in Ruby, Python, 
  Haskell since then but nothing serious. Very interested in Elm right now. 
  
  As for focus, yes, you really do need a project. Either pick things 
  you've done before in other languages, or figure out something that would 
  scratch an itch (a small web app, perhaps?) and tackle that. 
  
  Sean Corfield -- (904) 302-SEAN 
  An Architect's View -- http://corfield.org/ 
  
  Perfection is the enemy of the good. 
  -- Gustave Flaubert, French realist novelist (1821-1880) 
  
  
  
 
 -- 
 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/d/optout.

Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

-- 
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/d/optout.


Re: How did you learn Clojure?

2014-03-23 Thread Marcus Blankenship
Thanks to all who responded!


On Mar 21, 2014, at 7:17 AM, Lee Spector lspec...@hampshire.edu wrote:

 
 A little thing but I use it in when teaching Clojure to newbies and maybe 
 it'll be useful for others:
 
 https://github.com/lspector/clojinc/blob/master/src/clojinc/core.clj
 
 -Lee
 
 -- 
 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/d/optout.

Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

-- 
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/d/optout.


clj-pdf: how to serve a pdf with ring

2014-03-23 Thread Jason Stewart
Hi Mathias,

It looks like you've misplaced a paren in your code example:

  (piped-input-stream
   (fn [output-stream])
   (pdf ...)

piped-input-stream accepts a single function argument. Also, according to the 
docs, once the function is finished executing, the output stream is closed. I 
believe that what may be happening is that the stream is closed before you can 
serve it up as the body of your response. I would try creating an InputStream 
another way. Ring will automatically close the input stream after the request 
is served.

-- 
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/d/optout.


Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Alex Miller
Stefan, how do these numbers compare to RC1? Is RC2 better than RC1?

On Saturday, March 22, 2014 7:32:53 AM UTC-5, Stefan Kamphausen wrote:

 Hi,

 On Saturday, March 22, 2014 3:52:00 AM UTC+1, Alex Miller wrote:

 That's pretty weird. 


 that's pretty true. 
  

 1.6.0-RC2 is out now - I would really appreciate it if you could give it 
 a shot.


 Sure.  Tried with Oracle JDK 7 and 8, each run two times and took the 
 average.  Each run was done using 

 lein clean  lein uberjar  run.sh

 where run.sh starts the uberjar and measures the times with /usr/bin/time 
 -v.

 These are the results:

*Version* *Java Version* *User time(s)* *Sys time(s)* *Wall clock(s)* *% 
 CPU*  1.6.0-RC2 Oracle 1.7.0_11 2087,5 104,5 326,5 671  1.5.1 Oracle 
 1.7.0_11 1957 104,5 311,5 661  1.6.0-RC2 Oracle 1.8.0 2022,5 110 318,5 
 669,5  1.5.1 Oracle 1.8.0 2087 105 323 675,5  
 The results for Java7 are in-line with the results of my previous 
 experiments, I tried Java8 just out of curiosity.

 Cheers,
 stefan



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


optimal way to generate/store/compare 256/512/1024 bytes

2014-03-23 Thread juan.facorro
I may be missing something, but why not use gensym to generate unique 
identifiers if their only purpose is to be used as keys in a map?

This should work as long as your map is always built from scratch when your 
clojura program/app is started.

-- 
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/d/optout.


[ANN] stch.schema 0.3.3 - Optional type annotations and type checking

2014-03-23 Thread david
Changes in 0.3.x:

1. Fixed a bug with the documentation generated for multiple arity fns.
2. Replaced eq, pair, one, optional, record, protocol, pred, and enum with 
Eq, Pair, One, Optional, Record, Protocol, Predicate, and Enumerate, 
respectively.
3. Moved utility functions to separate project.

stch.schema is on Clojars as well.

Add the following to your project dependencies to use:

[stch-library/schema 0.3.3]

BTW, I'm currently looking for work as a Clojure developer.  If you like 
what you see, please hit me up.

David

-- 
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/d/optout.


ANN Elastisch 2.0.0-beta2 is released

2014-03-23 Thread Michael Klishin
Elastisch [1] is a small, feature complete client for ElasticSearch
that provides both REST and native clients.

Release notes:
http://blog.clojurewerkz.org/blog/2014/03/23/elastisch-2-dot-0-0-beta2-is-released/

Sister projects: http://clojurewerkz.org

1. http://clojureelasticsearch.info
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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/d/optout.


Re: [ANN] stch.schema 0.3.3 - Optional type annotations and type checking

2014-03-23 Thread david
Forgot github link: https://github.com/stch-library/schema

-- 
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/d/optout.


Re: [ANN] stch.html 0.1.0 - A brand new library for HTML generation that supports Clojure and ClojureScript

2014-03-23 Thread david
0.1.2 released.

class attribute can be a string, set, or sequential type now.

(-html (div :class big bold))
; div class=\big bold\/div

(-html (div :class #{big bold}))
; div class=\big bold\/div

(-html (div :class [big bold]))
; div class=\big bold\/div

-- 
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/d/optout.


Re: Deserialization of a Record

2014-03-23 Thread notofi
This exception also occurred to me, so I created a minimal example in this 
gist:
https://gist.github.com/damn/9728288

Am Freitag, 8. Juni 2012 15:53:21 UTC+2 schrieb Stuart Sierra:

 Can you post a standalone example that doesn't require seesaw? Otherwise 
 it's hard to reproduce the problem.

 If the problem is class visibility on the EDT, there are a couple of 
 possiblities:

 1. Bind *use-context-classloader* to false in your event handler. This 
 might work.

 2. Have the event handler invoke a Clojure Agent to do the actual work.

 -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/d/optout.


Re: CLJS Advanced Compilation JS Libraries lacking externs

2014-03-23 Thread Vincent SeguĂ­
Hi David,
 Is there a way to output an error if the build does not find the specified 
extern file? I recently lost more time than I would like to admit to a typo in 
the extern filename and not getting any error message in the lein build process.


-- 
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/d/optout.


STM history queues, when is a snapshot pushed

2014-03-23 Thread Greg D
Is a new snapshot pushed onto the history queue of a ref when

   1. every time the ref is a target of alter, commute, ref-set, reset, 
   alter-meta!, or reset-meta!, or
   2. only when the committed value for the ref is not identical to the 
   value at the end of the history queue?
   
When checking the committability of a ref before the end of a transaction, 
is the check that

   1. the end position of the history queue for that ref is the same as it 
   was at the beginning of the transaction, or
   2. the value of the ref at the end of the history queue is identical to 
   the value at the beginning of the transaction?

For both questions, choice 1 appears to be unquestionable safe, but could 
sponsor a higher number of retries. The choice 2s may conserve some 
retries, but I'm not sure about the safety. 

For both questions, the implementation complexity and efficiency seem 
similar.

At any rate, the actual implementation is not a part of the documented API, 
yet could affect how one codes transaction functions. Even if I dug through 
the Java source to form my own impressions, one is not supposed to rely on 
such behaviour.

-- 
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/d/optout.


Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Ghadi Shayban
You've piqued my curiosity.  Could I trouble you to post the benchmark 
results on -RC2 with 96f5b5bdc reverted?


On Friday, March 21, 2014 7:47:00 PM UTC-4, Stefan Kamphausen wrote:



 On Saturday, March 22, 2014 12:41:55 AM UTC+1, Andy Fingerhut wrote:

 That is odd.  This is a shot in the dark, and probably unhelpful because 
 I do not know a good way to verify whether my guess is true, but perhaps 
 the seqFrom method went from being small enough to be inlined by your JIT 
 before that change, to being too large to consider for inlining after the 
 change?  It isn't a big change in the code, so it would have to have been 
 close to the threshold if this is true.


 if there is anything I can do to test this, just let me know.

 Best,
 stefan 


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


Re: tools.namespace.repl refresh is trying to refresh test dependencies we don't need

2014-03-23 Thread Stuart Sierra
I have encountered this problem as well. The simple fix is to remove the 
`checkouts` directory. I haven't found another way.

-S



On Friday, March 21, 2014 10:29:54 AM UTC-7, Christopher Poile wrote:

 Hi all,

 clojure.tools.namespace.repl/refresh tries to load (and run) the test 
 files from a dependent project and, since we don't use midje on the main 
 project, it fails when it can't find midje on the classpath. The dependent 
 project is a symlink in the checkouts directory, and that project depends 
 on midje in its :dev profile. I am starting the repl through cider-jack-in, 
 and the :dev profile is active in the main project, but from reading the 
 lein docs it seems that maybe the :dev profile isn't being activated for 
 the dependent project?

 I could add midje as a depency in my main project (which is what I'm doing 
 now to stop the error), but is there a better way to fix this?
 Thanks to anyone who can help solve this.

 Chris.


-- 
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/d/optout.


[ANN] Clojure 1.6.0-RC3

2014-03-23 Thread Alex Miller
Clojure 1.6.0-RC3 is now available.

Try it via
- Download: http://central.maven.org/maven2/org/clojure/clojure/1.6.0-RC3
- Leiningen: [org.clojure/clojure 1.6.0-RC3]

See the full change log here:
https://github.com/clojure/clojure/blob/master/changes.md

Clojure 1.6.0-RC3 has the following changes since 1.6.0-RC2:

- Test temporarily disabled to allow Clojure to build with JDK 1.8
(requires ASM upgrade in future release)
-  Symbol no longer caches hashCode and will lazily cache hasheq. The
hasheq is also computed in a different way to leverage the cached String
hashCode of the Symbol ns (if it exists).

Please let us know how it looks!

-- 
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/d/optout.


Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Stefan Kamphausen


On Sunday, March 23, 2014 6:02:26 PM UTC+1, Alex Miller wrote:

 Stefan, how do these numbers compare to RC1? Is RC2 better than RC1?


If my tests can be trusted, there is an improvement between RC1 and RC2, 
but it is still worse than 1.5.1.

   *Version* *Java Version* *User time(s)* *Sys time(s)* *Wall clock(s)* *% 
CPU*  
   1.6.0-RC1 Oracle 1.7.0_11 2145 107,5 335 672  1.6.0-RC2 Oracle 1.7.0_11 
2087,5 104,5 326,5 671  
Stefan

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


noir.session clojure.lang.Var$Unbound cannot be cast to java.util.concurrent.Future

2014-03-23 Thread Sven Richter
Hi,

I have an error message that I just dont understand. This is what I am 
trying to do:

(ns service)
(defn get-id [] (session/get :id))

(ns http)
(defn get-it [] (parse-string (:body (client/get
  (str
base-url

rest/api/2/search?jql=issuetype=Eposstatus!=closedmaxResults=1000JSESSIONID=
(service/get-id))  ;this is 
there the error occurs
   :accept :json}

Now, when I startup ring I get the following error:

Exception in thread main java.lang.ClassCastException: 
clojure.lang.Var$Unbound cannot be cast to java.util.concurrent.Future
at clojure.core$deref_future.invoke(core.clj:2108)
at clojure.core$deref.invoke(core.clj:2129)
at noir.session$get.invoke(session.clj:24)
at lweb.services.jira$get_jira_session_id.invoke(jira.clj:17)
at lweb.services.epic$get_epics.invoke(epic.clj:19)
at lweb.services.epic$get_epic_sp_map.invoke(epic.clj:40)
at lweb.services.epic$eval10850.invoke(epic.clj:43)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:703)
at 
lweb.routes.epics$eval8170$loading__4910__auto8171.invoke(epics.clj:1)
at lweb.routes.epics$eval8170.invoke(epics.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:1523)
at 
lweb.handler$eval4449$loading__4910__auto4450.invoke(handler.clj:1)
at lweb.handler$eval4449.invoke(handler.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at lweb.core$eval4443$loading__4910__auto.invoke(core.clj:1)
at lweb.core$eval4443.invoke(core.clj:1)
...
Can someone explain please what is happening here and how to do it right?

Thanks,
Sven

-- 
You received this message because you are subscribed to 

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Stefan Kamphausen
Hi,

Additionally differences in -XX:+PrintCompilation ouput might be 
 interesting. 



first, I tested with -XX:+PrintInlining and there actually is a difference 
for seqFrom: in 1.5.1 there are more occurrences of this function in the 
output (see data at the end of this post).  Since the function seems to get 
inlined, I did not experiment with FreqInlineSize.  Some background reading 
indicated that MaxInlineSize is not relevant for this function which 
clearly is a hot spot.

There is a diff with 3000 lines in the output of PrintCompilation.  Right 
now, I don't know what to look for in that output.  I'll have to read about 
how to read those files when time permits.


Cheers,
Stefan

Data:

grep seqFrom print-inline-1.5.1
   @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 bytes)   
inline (hot)
@ 28   clojure.lang.RT::seqFrom (133 
bytes)   inline (hot)


grep seqFrom print-inline-1.6.0master
  @ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (152 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 bytes)   
inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
  @ 28   clojure.lang.RT::seqFrom (152 bytes)   
inline (hot)
  @ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
@ 28   clojure.lang.RT::seqFrom (152 
bytes)   inline (hot)
   

Re: ANN simple-time

2014-03-23 Thread Matt Bossenbroek
That's correct - I defined timespan to be independent of any specific datetime, 
but there's add-years, add-months, add-days, etc if you do need to move 
relative to a specific date.

I do plan to add timezones as the next feature, just haven't gotten around to 
it yet. For my use cases so far I haven't needed it. Generally all I care about 
is how far I am from UTC, which is available via (- (now) (utc-now)).

I wasn't aware of clojure.joda-time, but I like that it favors LocalDateTime 
(what I use). One motivation for making this in the first place was asking 
clj-time what the date was and it being wrong for 8 hours every day :)

-Matt


On Saturday, March 22, 2014 at 2:35 AM, dm3 wrote:

 Hey, this looks really simple and nice. 
 
 So, to map Joda concepts to simple-time -  a timespan is a standard Period (1 
 day is always 24 hours) and a datetime doesn't have a timezone, so more akin 
 to LocalDateTime, right?
 
 There's also https://github.com/dm3/clojure.joda-time, in case you haven't 
 seen it - more of a complete Joda API wrapper.
 
 On Thursday, 20 March 2014 20:15:55 UTC+2, Matt Bossenbroek wrote:
  It is my pleasure to announce simple-time to the world: 
  https://github.com/mbossenbroek/simple-time
  
  simple-time is a dead simple datetime  timespan library for Clojure. It's 
  an opinionated alternative for clj-time that takes a more functional twist 
  on the object-heavy Joda time library.
  
  Full API is here: 
  http://mbossenbroek.github.io/simple-time/simple-time.core.html
  
  Read more about the motivation for simple-time here: 
  https://github.com/mbossenbroek/simple-time#motivations
  
  Enjoy!
  
  -Matt
  
 -- 
 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/d/optout.

-- 
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/d/optout.


ANN: no.disassemble 0.1.3 - data disassembler

2014-03-23 Thread Gary Trakhman
A Clojure library designed to let you inspect bytecode of functions and
things.
https://github.com/gtrak/no.disassemble

This release:
I've merged Aphyr's data disassembler implementation which converts the
underlying eclipse disassembler's class hierarchy into standard clojure
data structures.

It is available as the function 'disassemble-data' in the top-level
no.disassemble namespace.

Tests and patches welcome!

I'd like to explore ASM and cider integration in the future, along with
something approaching current clojure-based analyzer and emitter
implementations, or whatever else might be useful!

-- 
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/d/optout.