Hi all,
I started learning Clojure very recently by rewriting my old college Java
project to Clojure.
Having bunch of records I wanted to automate record creation with macros
and to finally learn Clojure macros, but I got stuck.
Example (Real code will be more complicated but I need to make
понедељак, 15. септембар 2014. 04.23.41 UTC+2, Tobias Kortkamp је
написао/ла:
Hi,
you need to syntax-quote the list you return from your macro.
(defmacro some-record
[some-name]
`(defrecord ~some-name ['in 'out]))
Note the backtick `. You then also have to explicitly
As Clojure 1.7 is finally released, I tried to wet my feet with
transducers.
I tried eduction example from official site http://clojure.org/transducers
but it's not working:
user= (def xf (comp (filter odd?) (map inc)))
#'user/xf
user= (def iter (eduction xf (range 5)))
#'user/iter
user=
On Thursday, July 21, 2016 at 6:15:46 AM UTC+2, James Reeves wrote:
>
> On 21 July 2016 at 05:05, Ashish Negi > wrote:
>
>> with core async `go` you can not do blocking IO or any time consuming
>> work.
>> `go` uses fixed threadpool (no of cpus + 2 or something).
>>
I'm fooling around with Clojure and I implemented simple server that will
randomly query/insert/update/delete random data from DB on every request.
When I benchmark (wrk) server is slow (compared to similar solution) and I
noticed that CPU is not maxed out, it's about ~30-40%.
I used http-kit