Hi Andy,
On Fri, Jun 8, 2012 at 1:44 PM, Andy L wrote:
> On 06/07/2012 09:22 PM, Ambrose Bonnaire-Sergeant wrote:
>
>> Every Seqable is not Sequential.
>>
>> (sequential? {:a 1}) => false
>>
>
> Is there a simple test for sequable?
No. I assume you mean seqable.
If it did exist, it would look
2012/6/8 Andy L
>
> Is there a simple test for sequable?
seq?
--
Cédric
--
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 pa
On 06/07/2012 09:22 PM, Ambrose Bonnaire-Sergeant wrote:
Every Seqable is not Sequential.
(sequential? {:a 1}) => false
Is there a simple test for sequable?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
Hi Tim,
On Fri, Jun 8, 2012 at 12:11 PM, Tim Visher wrote:
>
> 2. While I would very much expect the type test (coll? seq?) to return
> false on a string, I would _not_ expect the capability test
> (sequential?) to return false, and it does for a String. Is this the
> expected behavior? I would
Hi Andy,
On Thu, Jun 7, 2012 at 7:54 PM, Andy Coolware wrote:
> I was wondering cause we can do all awesome stuff like that:
>
> user=> (last "abc")
> \c
> user=> (first "abc")
> \a
> user=> (map (fn[z] (str z "-")) "abc")
> ("a-" "b-" "c-")
>
> but this renders false
>
> user=> (coll? "abc")
> f
Hi Andy,
Many collection functions call "seq" on their arguments, therefore
those expect a Seqable (or a String, Iterable, Array, java.util.Map etc.),
not an IPersistentCollection (which coll? tests for).
Working these things out can get subtle.
Thanks,
Ambrose
On Fri, Jun 8, 2012 at 7:54 AM, A
The first version completes without problems.
Make sure your JVM has plenty of memory available to garbage collect.
Look at the -Xmx setting (for instance with leiningen :jvm-opts ["-
Xmx2g" "-server"])
REPL started; server listening on localhost port 18885
user=> (def atoms '(a b c))
#'user/a
I was wondering cause we can do all awesome stuff like that:
user=> (last "abc")
\c
user=> (first "abc")
\a
user=> (map (fn[z] (str z "-")) "abc")
("a-" "b-" "c-")
but this renders false
user=> (coll? "abc")
false
A.
--
You received this message because you are subscribed to the Google
Groups
Found the answer and made a tutorial out of it...feel free to enjoy
it:
https://github.com/ftravers/PublicDocumentation/blob/master/clojure-read-xml.md
On Jun 6, 3:56 pm, fenton wrote:
> Nicely formatted version of the
> question:https://github.com/ftravers/PublicDocumentation/blob/master/cloju
On 7 June 2012 07:03, Andy Coolware wrote:
> So my questions is as in subject. I did a bit of research but could not find
> a good answer.
Because otherwise Clojure wouldn't be compatible with Java APIs. It
would also probably be slower than using the native String class.
- James
--
You receiv
On Thu, Jun 7, 2012 at 2:52 PM, Joseph Smith wrote:
> Doesn't "lein pom" do it?
Not yet, but it's planned: https://github.com/technomancy/leiningen/pull/454
Happy to take a patch for it.
-Phil
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
Doesn't "lein pom" do it?
---
Joseph Smith
j...@uwcreations.com
(402)601-5443
On Jun 6, 2012, at 11:20 PM, Mark Derricutt wrote:
> Maybe I should write a lein plugin that generates a pom for my maven plugin -
> but that feels a little rude :)
>
> Mark
>
> On 21/04/12 8:46 AM, Ben Smith-Mann
How would that affect Java interop? It seems like it would make Clojure
strings incompatible with Java functions that take strings as arguments.
On Wednesday, June 6, 2012 11:03:11 PM UTC-7, Andy C wrote:
>
> Hi,
>
> So my questions is as in subject. I did a bit of research but could not
> find
On Jun 6, 2012, at 5:59 PM, Kevin Livingston wrote:
> I was surprised to find that clojure.core.unify returns an exception
> when something does not unify rather than something like nil (false)
> when they don't.
You can use core.logic's unifier:
user=> (require '[clojure.core.logic :as l])
us
Maybe I should write a lein plugin that generates a pom for my maven
plugin - but that feels a little rude :)
Mark
On 21/04/12 8:46 AM, Ben Smith-Mannschott wrote:
It does't configure clojure-maven-plugin, so executing 'mvn package'
with the resulting pom will not produce a useful result.
-
Nicely formatted version of the question:
https://github.com/ftravers/PublicDocumentation/blob/master/clojure-question1.md
I'm not sure if it's that cool to put questions somewhere else and
reference from here...it's just that the formatting there is so nice!
If anyone has some nice pointers to tu
Hi,
So my questions is as in subject. I did a bit of research but could not
find a good answer.
Would appreciate an insight ...
(thank you 'Andy)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegro
Hi,
I am experimenting with Clojure since more than a year in my spare
time - e.g., I solved all but one of the katas in the now defunct
coding-kata.org but know I still have quite a lot to learn.
Thanks for founding a group.
Jorge
P.S. Will join the google group right now.
On 30 Mai, 14:38, J
Hi
I'm trying to generate a sequence which corresponds to a breadth-first
search of a very wide, deep tree... and I'm hitting memory problems when I
go too far along the sequence. Having asked around on the IRC channel and
looked here, the number 1 cause of such problems is inadvertently holdin
Hi,
I've recently started using the matchure library for pattern matching
(https://github.com/dcolthorp/matchure).
Basically, I'd like match a number of different values and bind the
first match to a symbol. In matchure, binding to a variable can be
done like this:
(if-match [(and ?c "Hi") "Hi"
Does anyone know how to change the my-project.core name in the OSX menubar
and icon tray? I have added
:jvm-opts ~(if (= (System/getProperty "os.name") "Mac OS X")
["-Xdock:name=MyProject"] []))
to my project.clj file which fixes the naming issues when I run lein run. I
was having iss
Thanks, I missed that :)
I forgot to take into an account the short `map lookup' form.
четверг, 7 июня 2012 г., 20:28:24 UTC+4 пользователь Bronsa написал:
>
> yes, symbols like keywords lookup themselves into the second element, or
> return the third if they cannot find their value
> ('a {'a 1}
yes, symbols like keywords lookup themselves into the second element, or
return the third if they cannot find their value
('a {'a 1} 2) ;=> 1
('b {'a 1} 2} ;=> 2
2012/6/7 Alex Shabanov
> Oh, I see. This is because of the reader that interprets symbols from the
> quoted forms in different way it
A quoted symbol is just a literal "symbol" typed object. These symbols
act as functions where they evaluate like this:
('x 1) => (get 1 'x) - look itself up in its argument
('x 1 2) => (get 1 'x 2) - look itself up in its argument with a
not-found value.
So, in your example:
(bar '(foo 1 2)) trie
Oh, I see. This is because of the reader that interprets symbols from the
quoted forms in different way it does for the unquoted ones (and this
feature still strikes me as odd).
To make matters more complicated the quoted symbols seems to have some
meanings as functions for the clojure, since ('
you' are calling (apply 'foo '(1 2)), what you want is (apply foo '(1 2))
just call bar as
(bar (list foo 1 2))
2012/6/7 Alex Shabanov
> I'm curious why the following form evaluates to 2:
>
> (defn foo [& more]
> (println "foo(" more " )"))
>
> (defn bar [v]
> (apply (first v) (rest v)))
>
>
I'm curious why the following form evaluates to 2:
(defn foo [& more]
(println "foo(" more " )"))
(defn bar [v]
(apply (first v) (rest v)))
(bar '(foo 1 2))
If the form (bar '(foo 1 2)) extended to, say, (bar '(foo 1 2 3 4)) the
arity exception will be thrown.
The behavior can be reproduce
Thank you! It seems a good begin.
2012/6/3 Karl Krukow
> Regarding those...
>
> Some time ago I created a project containing only the persistent data
> structures for use with Java et al.
>
> https://github.com/krukow/clj-ds
>
> It is the data structures only so no bootstrap penalty. There are a
I just came across this thread (and also [1]) when I was googling for a way
to customize the Clojure agents. Were any of these 'post 1.2' suggestions
reconsidered since then? (I see they haven't been implemented yet).
Marek.
[1]
https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/qD
Any project like
https://github.com/codereading/HQ
?
for Clojure
> some materials/books about language/compiler designing could help me
> better
> > understand these stuffs??
>
> While I think the project is still in a very incomplete stage you can
> find quite a bit of information in Tim Daly's r
On Thu, Jun 7, 2012 at 3:41 AM, jaime wrote:
> Hello everyone,
>
> I really have interests in internals of Cojure. I'm not talking about
> massive details of its implementation but rather some kind of
> overview/architecture of the language itself. I also know that reading
> source code is one of
On Thu, Jun 7, 2012 at 4:41 AM, jaime wrote:
> I really have interests in internals of Cojure. I'm not talking about
> massive details of its implementation but rather some kind of
> overview/architecture of the language itself. I also know that reading
> source code is one of the best ways to und
Hello everyone,
I really have interests in internals of Cojure. I'm not talking about
massive details of its implementation but rather some kind of
overview/architecture of the language itself. I also know that reading
source code is one of the best ways to understand it but it's not easy for
33 matches
Mail list logo