)
nil
user=> (meta (:a (w/prewalk identity data)))
nil
--
Krešimir Šojat
--
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 - plea
Hi,
> (defn foo []
> (letfn (bar [acc val]
> acc)
> (reduce bar {} (range 1 10
>
> doesn't compile
> java.lang.IllegalArgumentException: Don't know how to create ISeq
> from: clojure.lang.Symbol
Try (letfn [(bar [acc val] acc
se it though?
>
> Thank you
As JAX-RS requires use of annotations, you will need to create part of
the code in plain Java. After that you can use standard gen-class/
proxy macros for the rest of your application.
--
Krešimir Šojat
--
You received this message because you are subscribed to
Hi,
On Mar 5, 3:05 pm, Glen Rubin wrote:
> The following code does not work, when using (range 1 5) as coll
> input:
Remove the extra () around the coll in (rest (coll)) expression.
--
Krešimir Šojat
--
You received this message because you are subscribed to the Google
Groups "Clo
how to get listed are at:
http://groups.google.com/group/clojure/browse_thread/thread/affb08d66c048c7f/77f10a8a9a55d089#77f10a8a9a55d089
--
Krešimir Šojat
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
f c)
(time (write-data 6000 "dump.txt"))
(def d (time (read-data "dump.txt")))
On my machine this version needs ~800mb to load 6000 doubles.
--
Krešimir Šojat
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
e to know if there is a way i could get the macro
> i wanted going.
Macro will not work in this situation, but you can write it as:
(let [obj (MutatingJavaObject.)]
(doseq [item list-items] (.add obj item)))
--
Krešimir Šojat
--
You received this message because you are subscribed to the
commons-
cli:commons-cli:1.3 while ivy roundup repository in
org.apache.commons:commons-cli:1.3, there is a namespace mechanism
that you can use to rename artifacts. This way there is no need for
central naming body and repositories can realy be distributed.
--
Krešimir Šojat
--~--~-~--~
what amounts to a distributed repository.
There is no centralized repository with Ivy. You can build one, but
with Packager resolver every project can create its own repository, it
can even keep it in /repo dir in its git/hg/svn tree.
--
Krešimir Šojat
--~--~-~--~~~---
esing
is that serve there package repository straight from there svn
repository so history is tracked.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
that is, is there a method to refer to
> clojure.lang.APersistentList as APersistentList? I've tried (use
> 'clojure.lang) and (require ['clojure.lang :as 'c]), but neither seem
> to work.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You receiv
Hi,
Try:
(def x [[:a 1] [:b 3] [:b 5] [:c 1]])
(into {} (map (fn [[k v]] [k [v]]) a))
Returns:
{:c [1], :b [5], :a [1]}
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
Sorry about that, didn't see that :b should concat it's vals:
(def x [[:a 1] [:b 3] [:b 5] [:c 1]])
(reduce (fn [x [k v]] (assoc x k (if (contains? x k) (conj (x k) v)
[v]))) {} x)
Returns:
{:c [1], :b [3 5], :a [1]}
--
Krešimir Šojat
--~--~-~--~~~---~--
Hi,
Take a look at project Wonderland -- https://lg3d-wonderland.dev.java.net/
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
> Hum... that's not my experience, I'm at my job right now so I can't
> double check this. Looking at the javadoc, it appears that if n is
> larger than the string length it will throw an
> IndexOutOfBoundsException. That must have been the reason why I've
> written drop-str in the first place.
m one task/target script with others.
If you can't solve this with normal Ant construct you can drop down to
Java and create new Task, or even in Clojure (you will need to
initialize your antlib with classpath set to point to clojure.jar).
--
Krešimir Šojat
--~--~-~--~~---
also check out scriptdef
and presetdef tasks.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
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
To unsubscribe
> Can't you just write:
> (.load (Properties.) (FileInputStream. f))
> and skip separate function altogehter?
Err.. that should be:
(doto (Properties.) (.load (FileInputStream. f)))
.. point remains.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You
> If not
> I will add it to java-utils.
>
Can't you just write:
(.load (Properties.) (FileInputStream. f))
and skip separate function altogehter?
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
library, it is easy to use it
even if jar is not in external repository, url resolver can just
download it from web, or packager resolver can extract jars from other
archive types like zip files located on external server, custom
resolver are also supported.
--
Krešimir Šojat
--~--~-~--~
Is link broken? blogpost return pagen not found message.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegro
ar (proxy [IFoo] (foo [n] (* 3 n
Or you can use gen-class instead of gen-interface and implement Foo as
concrete class. Proxy will accept any method name you give him, but it
will expose only methods in class and interfaces it extends.
--
Krešimir Šojat
--~--~-~--~~~---
> user=> (repeat 10 (rand-int 49))
> (4 4 4 4 4 4 4 4 4 4)
Hi,
(rand-int 49) will produce one integer, and repeat will repeat it 10
times, that is why you see same number repeated.
To fix this use:
user=> (take 10 (repeatedly #(rand-int 49)))
(21 29 9 20 15 34 8 28 16 26)
--
Kr
is more a feature preview for now,
not something you would use just yet.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@goo
If you want offline version of clojure.org:
hg clone https://bitbucket.org/ksojat/truba/
cd truba
ant clojure-org-download
(requires wget)
When finished, it will place it in dist/clojure.org directory.
Or you can just copy wget command from clojure-org-download target.
--
Krešimir Šojat
h' and 'classpathref' attributes like javac and
will try to find all .clj files that have (ns ..) in theme, so it can
avoid compilation of files that are imported with load directive.
Note: It will add srcdir and destdir to classpath for you.
--
Krešimir Šojat
--~--~-~--~~
> this errors on loading. Should that be "add-watch" instead?
In revision 1194 add-watch was renamed to add-watcher.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure&
values, but if you wish you can set cell's value with:
(assoc (.state cell) :value new-value)
If you need something more deterministic, you could change update-cell
function in first implementation by Stuart so it updates all
dependencies in one dosync block.
--
Krešimir Šojat
--~--~-~--
28 matches
Mail list logo