On Sat, Oct 24, 2009 at 12:19 AM, samppi wrote:
> user=> (defmacro b [form]
> (let [processed-form (a form rec#)]
>`(fn [rec#] processed-form)))
> java.lang.Exception: Unable to resolve symbol: rec# in this context
> (NO_SOURCE_FILE:39)
Try
(defmacro b [form]
(let [r (gensym)
pr
I'm trying to create a macro called "procedure" so that:
(procedure (and _x (pos? _y)))
expands to
(fn [rec#] (and (:x rec#) (pos? (:y rec#
I'm stuck because I can't figure out a way to generate a symbol
outside. I'm a newbie at macros, so I don't know if there's a better
way around this:
Hi,
Am 23.10.2009 um 21:16 schrieb Howard Lewis Ship:
> Here's what I wanted to write:
>
> (defn add-script-links-for-imported-javascript-libraries
> [env dom-nodes]
> (extend-dom dom-nodes [:html :head] :top
> (template-for [:let [aggregation (-> env :cascade :resource-
On Fri, Oct 23, 2009 at 3:16 PM, Howard Lewis Ship wrote:
>
> I like to try and keep my level of nesting under control, and this
> often involves hiding or re-structuring the let macro. The for macro
> can implicitly assemble a let macro for you, but with a limitation
> that the :let clause can't
Hi Rock,
Clojure isn't designed as an array processing language, so it doesn't have
multidimensional array-slicing or matrix algebra tools built in. That's just
not what Clojure's trying to be, and you're right, immutable data structures
might get in the way. There's probably nothing stopping you
re is
little practial experience with this at the moment.
Konrad.
__ Information provenant d'ESET NOD32 Antivirus, version de la base des
signatures de virus 4537 (20091023) __
Le message a été vérifié par ESET NOD32 Antivirus.
http://www.eset.com
--~--~-~--~
I like to try and keep my level of nesting under control, and this
often involves hiding or re-structuring the let macro. The for macro
can implicitly assemble a let macro for you, but with a limitation
that the :let clause can't be first:
1:5 user=> (for [:let [z [:foo :bar]] x z] (name x))
java
If the Java layers are not already thread safe, you are facing a real
problem if you just try to layout some Clojure code on top of them...
You would have to be careful about isolating chunks that are thread safe
then look at what's left.
The difficulty then would be to find a way to introduce Clo
Hello,
I was trying to download a zip file using clojure.contrib.http.agent and
writing it to a file using clojure.contrib.duck-streams.
Apparently the zip file is getting corrupt because I was trying to treat
the stream as a string.
Is there any way to use duck-streams to write data as binary?
What if I wanted to use Clojure for scientific computing, and in
particular for doing linear algebra and matrix computations a la
MATLAB?
What would my options be for representing matrices, not to mention,
especially, MULTIDIMENSIONAL ARRAYS?
Would java arrays be the way to go, or nested vectors
I think the point of this style of api is you just define your functions like
(defn one [] )
(defn two [] )
and call the function like
(redis/with-server *db*
(one) (two))
On Thu, Oct 22, 2009 at 2:44 PM, Radford Smith wrote:
>
> I'm trying out redis-clojure. Right now, my code looks li
When figuring these things out it can sometimes help to look at the
implementations of stuff like defn (in clojure.core).
I'll leave it as an exercise to you, but you should note that you may
want to name-space qualify the database (depending on what you are
doing with it and where the database s
Hi!
I am currently investigating if it is possible to convert a part of a
big Java system to Clojure. The reason for this is to make this part
run in parallel and hence ease the implementation by porting it to
Clojure. The problem is that these parts of the system is today
setting and changing a l
Hi,
On Oct 23, 8:45 am, Christophe Grand wrote:
> Other solutions are to use @#'ns/private-var to access private vars from the
> macro or to make the macro shallow using a public (usually higher-order)
> helper function (is this possible in the general case?).
It is not 100% possible in the ge
14 matches
Mail list logo