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

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

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

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,

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

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

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

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

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

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

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

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

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.

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

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

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

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

[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

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

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

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

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

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.