Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-10-23 Thread Dragan Djuric
Neanderthal 0.4.0 has just been released with OpenCL-based GPU support and pluggable engines. http://neanderthal.uncomplicate.org On Tuesday, June 23, 2015 at 12:39:40 AM UTC+2, Dragan Djuric wrote: > > As it is a *sparse matrix*, C++ library unavailable on JVM, I don't > consider it relevant

Re: State Change Listener in Clojure on a Database

2015-10-23 Thread ducky
It is possible to use Apache Kafka with PostgreSQL: http://www.confluent.io/blog/bottled-water-real-time-integration-of-postgresql-and-kafka/ It may be an overkill depending on your use case. On Thursday, 22 October 2015 10:02:59 UTC+1, Adrian Cooley wrote: > > Thank you guys so much for all

Re: ThreatGRID/Cisco Looking for Clojure Developers

2015-10-23 Thread Bryan Maass
I can't speak to this position, but I have actually worked with Alex before. Noone asked for my opinion, but he is an amazing and impressive engineer. Working with him was one of the best parts of my previous gigs. Even though I wasn't employed on Alex's team, he would often stop by and have

Re: How to tell buffy which file to read?

2015-10-23 Thread Amith George
Hi Alex, > first one is to slice the buffer and then feed it to buffy, which means that you have to implement streaming yourself. Is this the same as say manually skipping till byte position X, read in 1MB (as described by the size bytes) of data into a buffer and pass that buffer (and a

aatree release 0.4.1--Make me a Database

2015-10-23 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements

Re: how to make a function of a map argument ?

2015-10-23 Thread r/ Wobben
Thanks, Still not what I was expecting. Suppose I have a map called records which has this [{:name ‘roelof’ :city ‘secret’} {:name ‘somewhere-else’ :city ‘who-knows’}] When I do : (defn convert-back "converts the map back to a csv string" [{:keys [name, glitter-index]}, records ]

Re: how to make a function of a map argument ?

2015-10-23 Thread Colin Yates
Oops, ‘my-map’ should be ‘my-map-sequence’ assuming ‘my-map-sequence’ is something like [{:name ‘roelof’ :city ‘secret’} {:name ‘somewhere-else’ :city ‘who-knows’}] A solution using juxt: (map (partial clojure.string/join ",") (map (juxt :a :b) [{:a "a1" :b "b1"} {:a "a2" :b "b2"}])) > On 23

Re: how to make a function of a map argument ?

2015-10-23 Thread r/ Wobben
Thanks, I tried it like this : (defn convert-back "converts the map back to a csv string" [{:keys [name, city]}, records ] (map (fn [{:keys [name city]}] (clojure.join/string “,” [name city]))) records) and then I do : (convert-back {:name "roelof" :city: secret}, { :name

Re: how to make a function of a map argument ?

2015-10-23 Thread Colin Yates
clojure.string/join not clojure.join/string > On 23 Oct 2015, at 13:49, r/ Wobben wrote: > > Thanks, > > I tried it like this : > > (defn convert-back > "converts the map back to a csv string" > [{:keys [name, city]}, records ] > (map (fn [{:keys [name

Re: how to make a function of a map argument ?

2015-10-23 Thread Colin Yates
Can you produce a runnable gist. Not much time to help unfortunately, but a gist would help. > On 23 Oct 2015, at 14:27, r/ Wobben wrote: > > Thanks, > > Still not what I was expecting. > > Suppose I have a map called records which has this [{:name ‘roelof’ :city >

Re: how to make a function of a map argument ?

2015-10-23 Thread Colin Yates
(apply clojure.string/join “," (vals my-map)) would work but you can’t guarantee the order. (map (fn [{:keys [name city]}] (clojure.join/string “,” [name city]))) my-map) gives you control of the order in which the fields are processed. You could also look at juxt as well? > On 23 Oct 2015,

how to make a function of a map argument ?

2015-10-23 Thread r/ Wobben
Hello, As a challenge I need to convert a map structure to a csv structure. So ( { :name "roelof", :city secret }) need to be converted to roelof, secret. I think I can use something like (map clojure.string/join ..) for it but it seems I have to make a function out of the :name roelof

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-10-23 Thread John Gabriele
Excellent news! Looking forward to receiving my hard-copy, though haven't yet heard when it's shipping. On Thursday, October 22, 2015 at 7:32:57 PM UTC-4, Daniel Higginbotham wrote: > > Clojure for the Brave and True is now > available in print and ebook form

Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-10-23 Thread Gregg Reynolds
I'm glad to see that you and Mike are making a productive dialog out of what could have gone the other way. It's a credit to you both. Simple question wrt documentation. The Great White Whale of open source software. Suppose core.matrix had insanely great documentation. What difference would

Re: how to make a function of a map argument ?

2015-10-23 Thread Aaron Cohen
I think you might find the following blog post helpful: http://blog.jayfields.com/2011/01/clojure-select-keys-select-values-and.html What you are asking for is basically (clojure.string/join (select-values my-map vals)) where select-values is defined in several ways in the linked blog post. For

Re: how to make a function of a map argument ?

2015-10-23 Thread Colin Yates
Kicking myself I didn’t grok (map m [:a :b])! > On 23 Oct 2015, at 15:32, Aaron Cohen wrote: > > I think you might find the following blog post helpful: > http://blog.jayfields.com/2011/01/clojure-select-keys-select-values-and.html >

ArithmeticException while using unchecked-multiply

2015-10-23 Thread Garrett Rowe
Should `unchecked-multiply` throw an exception in this case? (see also: http://stackoverflow.com/questions/33306984/why-does-my-hash-function-fail-with-arithmeticexception-integer-overflow-even/33308956#33308956 ) user> (reduce unchecked-multiply (range 1 22)) ArithmeticException integer overflow

Re: how to make a function of a map argument ?

2015-10-23 Thread Beau Fabry
(map m [:a :b]) is a nice trick, we use it a lot in cascalog queries: (map ?account [:id :updated-at :created-at] :> ?id ?updated-at ?created-at) Where juxt would require more ceremony because of the need for serialization ((mapfn [m] ((juxt :id :updated-at :created-at) m)) ?account :> ?id