Dare I mention the idea of an official (or semi-official) Clojure documentation
project that ties together the disparate sources that currently exist? What say
you, community?
There is a lot of information out there that simply needs to be placed in the
right bucket in order for it to be
Dare I mention the idea of an official (or semi-official) Clojure
documentation project that ties together the disparate sources that currently
exist? What say you, community?
I was thinking about something. This is just an idea spil I didn't do
anything jet.
Kind of like a learning
On Tue, 29 Mar 2011 16:49:48 -0700 (PDT)
Phil Hagelberg p...@hagelb.org wrote:
On Mar 28, 10:24 pm, Andy Fingerhut andy.finger...@gmail.com wrote:
And I should have known about this before, but had not used it. It adds to
Leiningen the capability to search, and I'm not sure, but perhaps
On 03/29/2011 10:51 PM, Meikel Brandmeyer wrote:
[(with-meta key {:key true})] do not set ID/name.
Which Clojure version are you using? If it is 1.2, try (with-meta key {:tag
:key}).
Clojure 1.2 and your are correct, thanks. I added a comment to remember
that variant, for when I switch
On Wed, Mar 30, 2011 at 5:28 PM, Nick Zbinden nick...@gmail.com wrote:
Dare I mention the idea of an official (or semi-official) Clojure
documentation project that ties together the disparate sources that
currently exist? What say you, community?
I was thinking about something. This is just
Looks like that bit is not finished yet. See
http://dev.clojure.org/display/doc/Enhanced+Primitive+Support under hash
maps and sets now use = for keys
-S
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Take a look at http://www.stringtemplate.org/ for a Turing-complete,
purely-functional, Java-based template language designed for code
generation.
-Stuart Sierra
clojure.com
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
Hola,
I'm looking for a function that updates a map value by calling a
function on it.
(def foo {:a 1})
So instead of this:
(assoc foo :a (inc (:a foo))); = {:a 2}
Something like this:
(map-fn foo :a inc); = {:a 2}
Does that exist somewhere, or should
(update-in foo [:a] inc). It also works for nested maps, the same way
assoc-in and get-in do.
On Mar 30, 10:21 am, Jeff Rose ros...@gmail.com wrote:
Hola,
I'm looking for a function that updates a map value by calling a
function on it.
(def foo {:a 1})
So instead of this:
(assoc foo
On Wed, 30 Mar 2011 10:21:41 -0700 (PDT)
Jeff Rose ros...@gmail.com wrote:
Hola,
I'm looking for a function that updates a map value by calling a
function on it.
(def foo {:a 1})
So instead of this:
(assoc foo :a (inc (:a foo))); = {:a 2}
Something like this:
hi,
I have 2 report files in JSON format like below:
# file 1: a.json
{ abcdef : { value : 10 }
# file 2: b.json
{ abcdef : { value : 20 }
I am using clojure.contrib.json to read each file, and I want a
function that takes in the 2 structures and a metric name (e.g.
abcdef). The function will
(keyword abcdef) = :abcdef
(defn metric-diff [metric json-objs]
(apply - (map (comp :value (keyword metric)) json-objs)))
Probably does what you want.
On Mar 30, 12:04 pm, Avram aav...@me.com wrote:
hi,
I have 2 report files in JSON format like below:
# file 1: a.json
{ abcdef : {
Many thanks!
On Mar 30, 12:11 pm, Alan a...@malloys.org wrote:
(keyword abcdef) = :abcdef
(defn metric-diff [metric json-objs]
(apply - (map (comp :value (keyword metric)) json-objs)))
Probably does what you want.
On Mar 30, 12:04 pm, Avram aav...@me.com wrote:
hi,
I have 2
clojure.contrib.json (or the new clojure.data.json) has an option to *not*
convert JSON Object keys into keywords. I still think that should be the
default, but I was out-shouted.
-Stuart Sierra
clojure.com
--
You received this message because you are subscribed to the Google
Groups Clojure
On Sunday, March 27, 2011 6:17:59 AM UTC-4, Stefan Sigurdsson wrote:
How do you guys normally manage resources when using lazy sequences?
You have to manage resources at a larger scope that encompasses all your use
of the lazy sequence. The quick-and-dirty solution is to use `doall` inside
On Tue, Mar 29, 2011 at 6:56 PM, Rayne disciplera...@gmail.com wrote:
I think emailing me or telling me on IRC or
twitter or one of the other easily found and plentiful ways to get a
hold of me is much better than complaining about it as if it were
something that is impossible to fix.
I
One more thing…
If I try this, it looks okay
user= (Integer/parseInt (:value (j1 (keyword abcdef
10
But within the function, I get cast exceptions.
user= j1
{:abcdef {:value 10}}
user= j2
{:abcdef {:value 20}}
user= (defn metric-diff [metric json-objs]
(apply - (map (comp
Perfect. Thanks again.
-A
On Mar 30, 3:17 pm, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
Am 31.03.2011 um 00:02 schrieb Avram:
user= (defn metric-diff [metric json-objs]
(apply - (map (comp (Integer/parseInt :value) (keyword metric))
json-objs)))
(defn metric-diff
[metric
On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
Except in 1.3 it will be a little bit harder to do throw-away per-thread
memoizes for vars you do no own if their author didn't make their holding
var :dynamic ('cause then you will not be able to rebind them).
On Mar 29, 10:56 pm, Nick Zbinden nick...@gmail.com wrote:
One more thing people should do is update there blogs. I know its
stupid work but I should be done. Its extremly confusing when google
for something.
Update your blog with a little notice or update it that it is correct
again.
On Tue, Mar 29, 2011 at 4:43 PM, B Smith-Mannschott wrote:
Horrible hack, maybe, but it got me thinking. What you seem to be
doing is moving between code and literal mode by quoting with #.
This is a little like traditional quasi-quote...
And that got me thinking about Scribble [1] again. In
21 matches
Mail list logo