On 01.10.2010, at 03:07, Phil Hagelberg wrote:
I suspect the answer may just be yeah... that's not something you
should do with macros, but I'm curious. I suppose the compiler only
checks the :macro metadata when it's literally in the call position
rather than when there's indirection through
On Oct 1, 2010, at 1:57 AM, Sean Corfield wrote:
On Thu, Sep 30, 2010 at 12:52 AM, David Sletten da...@bosatsu.net wrote:
Huh?! How many solutions do you want? You're starting to annoy me Sean.
Sorry dude. I think it's really insightful to see lots of different
solutions to small point
Dear Clojure Group,
I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
'Clojure in Action' to handle nested s-expressions:
My first version did not work:
(defmacro my-infix [expr]
(if (coll? expr)
(let [ [left op right] expr]
(list op (my-infix left) (my-infix
Yup, I'm wrong.
According to the profiler (visualvm), doseq/bit-shift-left is spending
over 80% of its time in clojure.lang.Reflector.getMethods, but any
other combination (e.g., dotimes/bsl or doseq/+) doesn't spend any
time there at all. For 100k iterations, the doseq/bsl hits getMethods
just
On Sep 18, 7:25 pm, David McNeil mcneil.da...@gmail.com wrote:
http://github.com/alienscience/cache-dot-clj
Thanks for the link. That is helpful.
Would JDBC suit your needs as a storage medium?
I suppose that would work, but I am thinking that an ehcache based
plugin forcache-dot-cljmight
On Fri 01/10/10 06:52 , Mark Engelberg mark.engelb...@gmail.com sent:
On Thu, Sep 30, 2010 at 9:13 PM, ataggart agg...@gmail.com wrote: As with
most microbenchmarks you're measuring
the test more than the subject. In the above case the seq
generation dominates.
Compare the following on
So, if it is true that range produces objects and dotimes produces
primitive longs, then I believe that it is the odd interaction between
bit-shift-left's inlining and long objects (as opposed to primitives)
that is causing the disparity in your measurements, not something
inherent in the
This is a Clojure Java interop problem.If you are doing GUI
programming with Swing in Clojure this is a real problem. The
question is how do you subclass (?) a built-in swing operation to
extend it to include your own code.After the paste, I want to do
something to the pasted text.
Am 30.09.2010 13:46, schrieb Nicolas Oury:
Note that you can't make readermacros yet. It's a supported in CL not
in Clojure but maybe in future versions how knows.
I meant, if you want to modify Clojure to allow a shorter notation for
partial application,
it is better to add a reader macro
There is a subtle difference in how fixed arguments are handled.
partial evaluates the arguments only once while fn evaluates them on
each call. For side-effects free code the former can yield better
performance. To recap:
(partial foo (baz 1 2))
==
(let [b (baz 1 2)]
(fn [ x] (apply foo b
2010/10/1 Stefan Rohlfing stefan.rohlf...@gmail.com:
Dear Clojure Group,
I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
'Clojure in Action' to handle nested s-expressions:
My first version did not work:
(defmacro my-infix [expr]
(if (coll? expr)
(let [ [left op
There is a subtle difference in how fixed arguments are handled.
partial evaluates the arguments only once while fn evaluates them on
each call. For side-effects free code the former can yield better
performance. To recap:
Ah! What a nice caveat! (also applies to taking macros as arguments).
There is no java definition for (Number, long) or (Number, int).
As 1 is now a primitive, I think it cannot find any corresponding function.
Strangely, putting 1M or (num 1) might be faster.
Can someone try?
On Fri, Oct 1, 2010 at 10:28 AM, David Powell djpow...@djpowell.net wrote:
So, if
Hi :
In my web project the namespace is jinrou-clojure.army,
and the file is at jinrou-clojure/army.clj,
most the the classes are compiled to jinrou_clojure directory,
but some files with name army$reify__3155.class are compiled into
jinrou-clojure/army directory
( note: it's a - , not
2010/10/1 sailormoo...@gmail.com sailormoo...@gmail.com
Hi :
In my web project the namespace is jinrou-clojure.army,
and the file is at jinrou-clojure/army.clj,
I guess your file is at jinrou_clojure/army.clj, and not
jinrou-clojure/army.clj
This is a known bug I reported two weeks ago,
On Sep 30, 2010, at 10:37 PM, HiHeelHottie wrote:
(ns test-test.parse
(:use [clojure.contrib.string :only (split)]))
(defn parse-char [m c]
(condp = (:state m)
:degree (cond
(Character/isDigit c) (assoc m :degree (+ (* (:degree
m) 10) (Character/digit c 10)))
On Oct 1, 3:59 am, Stefan Rohlfing stefan.rohlf...@gmail.com wrote:
I wanted to expand the 'infix' macro presented in chapter 7.3.1 of
'Clojure in Action' to handle nested s-expressions:
My first version did not work:
(defmacro my-infix [expr]
(if (coll? expr)
(let [ [left op right]
Hmmm, I'm using clojure 1.2. I'll try out 1.3 when I get home.
Thanks
Tim
On Thu, Sep 30, 2010 at 10:09 PM, Sean Corfield seancorfi...@gmail.comwrote:
On Thu, Sep 30, 2010 at 2:44 PM, Timothy Washington twash...@gmail.com
wrote:
Just in case anyone comes across this, I did get around it.
David pointed out what should have been the obvious overhead (I'll
blame it on being up at 2am), and Nicolas pointed out the specific
problem.
Compare:
user= (time (doseq [x (range 10)] (bit-shift-left x 1)))
Reflection warning, NO_SOURCE_PATH:4 - call to shiftLeft can't be
resolved.
David pointed out what should have been the obvious overhead (I'll
blame it on being up at 2am), and Nicolas pointed out the specific
problem.
two solutions:
- writing all combinations of unboxed/boxed for every function
- having a more clever code generator that try to box every
primitive
For your delectation:
http://www.vimeo.com/15462015
--
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 post.
I see the problem with clojure-mode versions 1.5 and 1.7.1 (I haven't
tried any others). I do not use paredit.
Not happening with the version i am using.
Do you use paredit?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
Fixes to the build provided by Andreas Brenk, who has just mailed a
CA.
You can now have a dependency on all modules in clojure-contrib with
the following dependency targets:
Dependency on single, large JAR:
groupId: org.clojure.contrib
artifactId: standalone
version:
I'm working on the latter right now. Note there's already a ticket
for the reflection problem:
https://www.assembla.com/spaces/clojure/tickets/446
On Oct 1, 12:24 pm, Nicolas Oury nicolas.o...@gmail.com wrote:
David pointed out what should have been the obvious overhead (I'll
blame it on
I don't have time to watch the whole thing until I get home from work,
but just hearing the first 30 seconds has me drooling all over
myself...
On Oct 1, 1:32 pm, George Jahad cloj...@blackbirdsystems.net wrote:
For your delectation:http://www.vimeo.com/15462015
--
You received this message
Yeah, it has been a good educational resource for working through.
I'm not finished, but I've put the Clojure version of all the code up
here:
https://www.assembla.com/code/little_clojure/subversion/nodes
Looking forward to those last couple chapters.
msd
--
You received this message because
Hi,
This is probably an abuse of the Clojure forum, but it is a bit
Clojure-related and strikes me as the sort of thing that a bright,
eclectic bunch of Clojure users might know about. (Plus I'm not really
a software person, so I need all the help I can get.)
I am looking at the possibility of
Fantastic work George!
On Oct 1, 4:32 pm, George Jahad cloj...@blackbirdsystems.net wrote:
For your delectation:http://www.vimeo.com/15462015
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On Thu, Sep 30, 2010 at 11:09 PM, Konrad Hinsen
konrad.hin...@fastmail.net wrote:
On 01.10.2010, at 03:07, Phil Hagelberg wrote:
I suspect the answer may just be yeah... that's not something you
should do with macros, but I'm curious. I suppose the compiler only
checks the :macro metadata when
On Fri, Oct 1, 2010 at 1:32 PM, George Jahad
cloj...@blackbirdsystems.net wrote:
For your delectation:
http://www.vimeo.com/15462015
This is great; the ability to jump between Clojure and Java is really
impressive.
-Phil
--
You received this message because you are subscribed to the Google
That's some great work there, George!
Are there any basic obstructions in the backend to doing
expression-oriented rather than line-oriented breakpoints and
stepping?
-Per
On Sat, Oct 2, 2010 at 3:32 AM, George Jahad
cloj...@blackbirdsystems.net wrote:
For your delectation:
Hi Ross,
I am working on something that may be of help to you, but it's very
early in development.
Basically I wanted to see if I could write a database server in
Clojure and what I have now sounds (kinda) like what you're after. It
was really simple.
Imagine a list of maps as a database
Thanks Daniel,
That sounds like it's in the right direction (although that is
probably true of anything that gives database-like functionality).
I would need some filtered-join-like functionality between tables in
order to select some of the rows of interest.
As to the declarative part: leaving
Excellent! Thanx for this!
On Fri, Oct 1, 2010 at 2:20 PM, Stuart Sierra
the.stuart.sie...@gmail.com wrote:
Fixes to the build provided by Andreas Brenk, who has just mailed a
CA.
You can now have a dependency on all modules in clojure-contrib with
the following dependency targets:
34 matches
Mail list logo