Jesús Gómez wrote:
> Simply: 1.7 works but 1.9 not.
> Test:
> $ # Download Clojure 1.7, 1.8 and 1.9 jars
> $ seq 7 9 | xargs -L1 -I% wget
http://repo1.maven.org/maven2/org/clojure/clojure/1.%.0/clojure-1.%.0.jar
> $ seq 7 9 | xargs -L1 -I% java -jar clojure-1.%.0.jar -e
Kevin Kleinfelter wrote:
> Can someone help me get un-stuck with a problem of using class in a case?
>
> This returns true, as I expect:
> (= (type "x") java.lang.String)
>
> This returns an error, and I'd hoped it would print STRING:
> (case (type "x")
> class
Timothy Baldridge wrote:
> The syntax (I think) comes from Ruby although they call keywords "symbols".
The reader syntax for Common Lisp's keywords has the leading colon too.
John
--
You received this message because you are subscribed to the Google
Groups
JvJ wrote:
> (try (do
> (q/text "Putting beacon..."0 40)
> (put! beacon true)
> (let [ns ((q/fill 255)
>(q/text (str "State: " ns) 0 60)))
>(catch Exception e
> (q/fill 255 0 0)
> (q/text (str
Cecil Westerhof cldwester...@gmail.com wrote:
I read a little about it. And no, I do not use dynamic binding. So I
probably should use atoms. Is there a convention how to name atoms?
Nope, none that I've come across anyway. Dynamic variables can have very
surprising effects if you're not aware
Hi Cecil,
Cecil Westerhof cldwester...@gmail.com wrote:
- The book displays all the lines of a look on separate lines. In my
case it is just one long line. Am I doing something wrong?
No, you're not doing anything wrong. There's nothing in that data
structure which would inherently cause it to
Agreed - thanks Mark!
If anyone is able to share the query languages you're using (the language's
grammar more than the implementation), I'd be very interested (and
grateful).
I'm always struggling to create reports for our non-technical staff which
are flexible enough to be useful but don't
Hi,
Mike Fikes mikefi...@me.com wrote:
In fact, section 5 of that document defines comp as a reduce
involving the identify function in some way. (Now, I want to re-read
this paper, but translated into Clojure.)
Here's one definition of comp in terms of reduce:
(defn comp [ fs]
(reduce (fn
there's a reason to prefer one over the
other?
--
John Mastro
--
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
On Sat, Apr 12, 2014 at 5:13 AM, Cecil Westerhof cldwester...@gmail.com
wrote:
But it looks a ‘little’ cumbersome. Is there a better way to do this?
Here's another way. Not the best way, but I offer it to introduce you
to atoms [1] if you're not familiar yet.
[1] http://clojure.org/atoms
(def
think that should be safe.
(let [f '(+ 1 1)]
(apply (resolve (first f) (rest f
;= 2
--
John Mastro
--
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
On Fri, Mar 21, 2014 at 4:44 PM, John Mastro john.b.mas...@gmail.comwrote:
(let [f '(+ 1 1)]
(apply (resolve (first f) (rest f
;= 2
Sorry, I have a typo in there. It should be:
(let [f '(+ 1 1)]
(apply (resolve (first f)) (rest f)))
--
John Mastro
--
You received this message
On Fri, Mar 21, 2014 at 4:44 PM, John Mastro john.b.mas...@gmail.comwrote:
That's interesting. It seems it's the last form in the list that's being
returned, and it doesn't matter what function you apply
Sigh, clearly sometimes I type faster than I think. That should be it
doesn't matter what
Due to the path-copy semantics, the contention gets driven to the root of the
tree.
Out of curiosity, would reference counting (rather than or in addition to
normal GC) help with this? Or is reference counting problematic in a highly
concurrent environment? It seems like reference cycles
after they become
unreachable. The normal GC would then have a lot less to do, helping
achieve shorter pauses.
(AFAIK no such thing actually exists for the JVM, this is just an idle
thought.)
--
John Mastro
--
You received this message because you are subscribed to the Google
Groups Clojure group
t x txrev...@gmail.com wrote:
@David:
* set operations is not what I'm looking for
Just in case you didn't notice it (it's not called out very prominently), when
the `clojure.set` documentation [1] mentions a rel it's referring to a set of
maps - a table similar to what you mentioned.
[1]
Hi Andy,
Andy C andy.coolw...@gmail.com wrote:
user (= s1 s2)
true
user (= (seq s1) (seq s2))
false
Thx. If a=b then f(a) must = f(b). Something is broken here.
If a seq is a sequential view of a thing, and a set is an unordered thing, then
it does not seem shocking to me that multiple
/a priori/ mean they're wrong.
- John
John Mastro john.b.mas...@gmail.com wrote:
Hi Andy,
Andy C andy.coolw...@gmail.com wrote:
user (= s1 s2)
true
user (= (seq s1) (seq s2))
false
Thx. If a=b then f(a) must = f(b). Something is broken here.
If a seq is a sequential view of a thing
Stuart Sierra the.stuart.sie...@gmail.com wrote:
Don't know if it's relevant or helpful here, but here's my Emacs org / babel
/ Clojure setup:
Thanks Stuart, very useful indeed (for me anyway).
- John
--
--
You received this message because you are subscribed to the Google
Groups Clojure
If there's another reason then I'm hoping someone will correct me, but I
can't think of any other reasons at the moment.
Since Clojure doesn't do tail call elimination implementing let atop fn would
also use up stack.
I believe many or all Schemes (which are required by the spec to eliminate
Hi Lee,
Can anyone tell if I'm right that this is a bug in clojure.zip? If so, then
is the right thing to do to post an issue on JIRA?
I don't have any insight regarding whether this is a bug (haven't yet had an
opportunity to dig into clojure.zip or zippers in general). However, I think
On Sun, Dec 29, 2013 at 1:30 PM, larry google groups
lawrencecloj...@gmail.com wrote:
Thanks for that. But the app has no problem reading the schema.edn file when
I start the app with:
java -jar admin-1-standalone.jar
So why would it have trouble reading the file when I'm in the repl?
Can
Hi Larry,
4.) load whatever file holds the (main-) function that starts the app. So for
me, for instance, it might be: (load-file src/admin/core.clj)
I don't think the `load-file` should be necessary. Do things not work if you
omit it?
The code on disk when you jacked in will already have
Manning (the publisher) has an interesting early-access program called MEAP. I
used it to buy [1] electronic access to both the first edition and the second
edition (the in-progress version immediately, plus the final version when it's
released). I've been very happy with the arrangement.
[1]
This was my first thought (quite close to Jim's):
(def the-maps [{:key 3 :value 30} {:key 4 :value 40}])
(def mandatory-keys [1 2 3 4 5])
(defn find-missing-keys [maps keys]
(let [found (into #{} (map :key maps))]
(remove #(contains? found %) keys)))
(defn ensure-mandatory-keys [maps]
On Tue, Nov 19, 2013 at 6:24 AM, smk mshanm...@hotmail.com wrote:
Hi
I am trying to parse a text file that has some binary characters(such as
0x001 or 0x002) and replace them with text characters.
How to do it in clojure?
Would something like this work?
(require '[clojure.java.io :as io])
This isn't a very deep question, but I wonder every time I come across it:
to what does -dup in `print-dup` and `*print-dup*` refer?
Thanks
- John
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
John, thanks. Not a stupid question at all. When learning a new language, a
new environment, and using an unfamiliar OS, there are so many moving parts
that it is sometimes hard to know where to begin when tracking stuff down. My
old and favorite line here is that signposts are generally
So, clearly I need to get the libs onto the classpath. The questions are
what libs, where and how?
Forgive me if this is a stupid question, but have you already listed the
dependency coordinates under the :dependencies key of your project.clj?
Leiningen has a sample project.clj here:
On Aug 25, 2013, at 2:43 PM, ngieschen nickgiesc...@gmail.com wrote:
I'm somewhat new to clojure and trying to understand mapcat, so apologies in
advance if this is an embarrassingly elementary question.
mapcat's signature is (f colls) which indicates to me I should be able to
so
30 matches
Mail list logo