I'm new to Maven. Thank you for the explanation.
Using git-submodules and is a good idea. Prior to
using your plugin, I use clojure and clojure-contrib with Maven like
this:
1. Manually download from GitHub and compile clojure and clojure-
contrib.
2. Install them to the local Maven repository:
The plugin itself has NO dependency on clojure or clojure contrib so you'll
need to add them to your own pom.xml first.
This is mostly because a) clojure contrib hasn't been released or in maven
central, b) I'm using clojure 1.1 on my own projects which isn't released.
For my own projects, I have
> (defn fzipmap [f col]
> "Takes a col, applies f to each element and generates a
Note that the args should have come after the doc string!
On Tue, Aug 25, 2009 at 6:20 AM, Adrian
Cuthbertson wrote:
> For completeness we should include a loop/recur pattern;
>
> (defn fzipmap [f col]
> "Takes a
Also just what I needed - thanks!
On Mon, Aug 24, 2009 at 8:05 PM, Dragan Djuric wrote:
>
> It may look silly, but that's just what I need AND the last time I
> checked
> it didn't work!
> Now it does :)
>
> Thanks!
>
>> On Aug 24, 7:14 pm, samppi wrote:
>> I just discovered something cool that
For completeness we should include a loop/recur pattern;
(defn fzipmap [f col]
"Takes a col, applies f to each element and generates a
hash map keyed on each element of col."
(loop [col (seq col) mp {}]
(if col (recur (next col) (assoc mp (first col) (f (first col
mp)))
user=
Hi,
Is clojure-contrib included?
I tried but mvn clojure:compile gives:
Exception in thread "main" java.io.FileNotFoundException: Could not
locate clojure/contrib/json/read__init.class or clojure/contrib/json/
read.clj on classpath
pom.xml:
http://gist.github.com/174217
hello.clj:
(ns hello)
(
Currently clojure doesn't support annotations, which is a huge issue at
times when integrating with some newer java frameworks.
I'm not sure if anyones working on it yet either, and to be honest I'm not
even sure what syntax would work well - something encoded in the metadata
woud be good I guess.
I had created the plan, but couldn't clone any of the clojure plans ( I
could clone others ). However, as the project is now pretty stable (I just
released 1.0 in fact) a CI build isn't really needed any more. However I
can't seem to find any links to delete the plan I created :(
Mark
--
On Mo
Hey all,
I've released 1.0 of my clojure-maven-plugin and its now available in
maven-central.
To use it, a minimal pom.xml declaring a dependency on clojure, and the the
plugin (without configuration) is all you need.
- http://gist.github.com/174217
With the above pom, running "mvn clojure:com
Hi,
Am 24.08.2009 um 21:37 schrieb Sang Ahn:
I have the same issue even w/ the cursor directly above the 'd'
character.
Hmm... Do you have syntax highlighting turned on?
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
I have the same issue even w/ the cursor directly above the 'd' character.
On Mon, Aug 24, 2009 at 5:48 AM, Meikel Brandmeyer wrote:
>
> Hi,
>
> On Aug 24, 1:33 pm, Michael Wood wrote:
>
>> > I'm not sure, what you mean with "inside the first cursor". But my
>> > suspicion is, that you place the
Hi,
Am 24.08.2009 um 20:03 schrieb Laurent PETIT:
Yes. The trick is that
(keyword 'x/y)
is different from
(ns x)
::y
??
::y is similar to `y. (Besides the resolving issue, which doesn't make
sense for keywords...)
For keyword there was some issue, that (keyword "foo/bar") creates a
ke
Hi!
Am 24.08.2009 um 18:31 schrieb Dragan Djuric:
> I needed (and created) a macro to generate keywords from symbols. I
> couldn't find anything ready, and I am still not completely
> comfortable with the solution I came up with. Any suggestions for
> improvement?
If I understand you correctly,
On 24 Aug 2009, at 19:55, Dragan Djuric wrote:
> Yes. The trick is that
> (keyword 'x/y)
> is different from
> (ns x)
> ::y
Not in my copy of Clojure:
user=> (ns x)
nil
x=> ::y
:x/y
x=> (identical? ::y (keyword 'x/y))
true
Konrad.
--~--~-~--~~~---~--~~
You re
It may look silly, but that's just what I need AND the last time I
checked
it didn't work!
Now it does :)
Thanks!
> On Aug 24, 7:14 pm, samppi wrote:
> I just discovered something cool that might seem obvious to some
> people but is, as as I can tell, undocumented and caught me totally by
> sur
2009/8/24 Dragan Djuric
>
> Yes. The trick is that
> (keyword 'x/y)
> is different from
> (ns x)
> ::y
??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojur
Yes. The trick is that
(keyword 'x/y)
is different from
(ns x)
::y
On Aug 24, 7:07 pm, Konrad Hinsen wrote:
> On 24 Aug 2009, at 18:31, Dragan Djuric wrote:
>
> > I needed (and created) a macro to generate keywords from symbols. I
> > couldn't find anything ready, and I am still not completely
>
I just discovered something cool that might seem obvious to some
people but is, as as I can tell, undocumented and caught me totally by
surprise. It's well known that the reader resolves ::something
into :the-current-namespace/something. But what I found out is that if
you use require to alias a n
Wonderful; I totally didn't know about zipmap. I've been using into
and map this whole time. Was it added right before Clojure 1.0? It
seems to be a lot faster than using into:
Clojure 1.0.0-
user=> (time (into {} (for [i [1 2 3]] [i (+ 3 i)])) )
"Elapsed time: 0.705 msecs"
{3 6, 2 5, 1 4}
user=>
On 24 Aug 2009, at 18:31, Dragan Djuric wrote:
> I needed (and created) a macro to generate keywords from symbols. I
> couldn't find anything ready, and I am still not completely
> comfortable with the solution I came up with. Any suggestions for
> improvement?
What are your exact requirements?
Hi,
I needed (and created) a macro to generate keywords from symbols. I
couldn't find anything ready, and I am still not completely
comfortable with the solution I came up with. Any suggestions for
improvement?
Here is what it should do:
=> (def name1 "A")
=> (to-keyword name1)
:user/name1
=> (n
Hello,
2009/8/23 Seth.Powsner
>
> Is there some simple way to spin-up the REPL and start stepping
> through top-level expressions in a source file?
> (I've probably missed something simple.)
>
> Background-- Eclipse 3.4.2 is running on my MacBook under OS 10.4.11.
> Works fine for a little Java
(require 'ns-a) will 'install' the namespace ns-a in the clojure
environment. If ns-a has other namespaces that it requires ... they will
also be installed for ns-a to be fully functional.
(use 'ns-a) will not only 'install' the namespace ns-a, but also create
mappings for all public vars of nam
(zipmap coll1 coll2) should be faster than (apply hash-map (interleave
coll1 coll2)) and the doc description hints that's what it was made
for.
On Aug 24, 8:25 am, Garth Sheldon-Coulson wrote:
> Welcome again.
>
> Here's another way. Not sure if it's any more or less efficient, but it's
> the wa
Laurent would you mind explaining what is the difference between
require and use? I don't understand the documentation for those
functions.
Thanks a lot
-Patrick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Cloj
On Mon, Aug 24, 2009 at 3:00 AM, ngocdaothanh wrote:
>
> I'm new to Clojure. How can I add @ChannelPipelineCoverage("one")
> annotation to a proxy as in?
>
> http://viewvc.jboss.org/cgi-bin/viewvc.cgi/netty/trunk/src/main/java/org/jboss/netty/example/http/snoop/HttpResponseHandler.java?view=markup
Hi,
I'm new to Clojure. How can I add @ChannelPipelineCoverage("one")
annotation to a proxy as in?
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/netty/trunk/src/main/java/org/jboss/netty/example/http/snoop/HttpResponseHandler.java?view=markup
I tried:
(def handler
(proxy [SimpleChannelUpstreamHan
Hi,
On Aug 24, 1:33 pm, Michael Wood wrote:
> > I'm not sure, what you mean with "inside the first cursor". But my
> > suspicion is, that you place the cursors *on* the '(' of the defn.
> > This will not work. The cursor must be really *inside* the parens. Eg.
> > on the 'o' of the `defn`. If t
On Aug 23, 5:21 pm, Stan Dyck wrote:
> I'm still new to this so bear with me.
>
> I'm trying to apply a function to a seq-able thing to produce a hashmap. So
> for instance say the function is (inc 3).
> I'd like to write a function that does
>
> [1 2 3] --> {1 4, 2 5, 3 6}
>
> Can someone help
Hi,
How can I define annotation for a proxy?
For example:
Java code:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/netty/trunk/src/main/java/org/jboss/netty/example/http/snoop/HttpResponseHandler.java?view=markup
Clojure code:
(def handler
(proxy [SimpleChannelUpstreamHandler] []
(message
Welcome again.
Here's another way. Not sure if it's any more or less efficient, but it's
the way my brain works.
=> (defn map-hashmap [coll f]
(apply hash-map (interleave coll (map f coll
#'user/map-hashmap
=> (map-hashmap [1 2 3] #(+ % 3))
{1 4, 2 5, 3 6}
On Mon, Aug 24, 2009 at 2:1
2009/8/24 Meikel Brandmeyer :
>
> Hi,
>
> On Aug 22, 11:43 pm, Sang Ahn wrote:
>
>> I am having trouble sending expressions to repll.
>> If I have (defn greet [] (println "Hello")), I position the cursor to
>> be inside the first cursor, then type \et, and I get the message,
>> "Error: Not in top
Hi,
On Aug 22, 11:43 pm, Sang Ahn wrote:
> I am having trouble sending expressions to repll.
> If I have (defn greet [] (println "Hello")), I position the cursor to
> be inside the first cursor, then type \et, and I get the message,
> "Error: Not in toplevel expression!"
> What gives?
I'm not
(def a [1 2 3])
; zipmap takes two collections and makes a hash-map
user=> (zipmap a (map #(+ 3 %) a))
{3 6, 2 5, 1 4}
; another way is to build up a map starting with empty {} and
associating key values
user=> (reduce #(assoc %1 %2 (+ 3 %2)) {} a)
{3 6, 2 5, 1 4}
; hash-map constructs a map fo
34 matches
Mail list logo