Hi ataggart, thanks for responding. For one it made me realize that
the reason I wasn't getting any output by default is because I
happened to have log4j in my classpath for the current project (sucked
in as a dep for a sub-dependency). It's a bit frustrating that the
behavior is different depend
On Sep 14, 2010, at 4:59 PM, Alan wrote:
> I think you could just keep a vector of (color,shape) pairs as an
> atom, and reify a subclass of JPanel whose paint() method closes
> around that atom, calling (.draw shape color). Then as long as you
> call repaint every time you modify the atom, you s
Encounter time. I am sitting next to Rich as I write this.
Stu
> Ok, I have a 1 and 2 :)
>
> So is it pessimistic or optimistic? So encounter time ensure or commit
> time ensure?
>
> On Sep 14, 9:36 pm, Stuart Halloway wrote:
>> Actually, the second one is basically it. (Except that I don't kn
On Sep 15, 2010, at 8:32 AM, Lee Spector wrote:
>
> The code below is still more than I would like, and I'm wondering if there's
> a more concise way to do this (again, without additional libraries). One way
> to reframe my question is to imagine that you're in front of a class (as I
> will be
On Wed, Sep 15, 2010 at 10:44 AM, Stuart Halloway wrote:
> Encounter time. I am sitting next to Rich as I write this.
>
Guaranteed or implementation detail?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojur
This looks a lot like what I would do - I'm afraid I don't have any
brilliant insights for you. I do have a couple ways you could make
this smaller, though:
- Instead of (atom ()) and convoluted swap! logic, what about (atom
[]) and (swap! shapes conj new-shape)?
- Similarly don't use (list shape-
The ability to use macros to do code generation and transformation is
extremely useful. However, you still have to explicitly "call" the
macro everywhere you want it to be used. In many scenarios, it might
be desirable to do code transformation/generation on code, without
explicitly modifying that
My guess is no. It would remove a huge benefit of Clojure, which is
that you can tell, without having to look over the whole codebase,
exactly what a given form does. (my-thing 20 [x y]) invokes my-thing,
a function or macro, with 20 as its first argument, and then a vector
of locals. No need to hu
Your example can be solved with (binding ...)
For the proposal, I think it's a bad idea : huge potential for abuse
(and importing abuse from other namespaces written by other people)
and little benefit.
I wouldn't be so strongly against it if it was in a delimited scope.
In any case, you can pro
Unless I misunderstand something, (binding...) wouldn't work for this
because I'd have to wrap all of the code I wanted to be "modified"
within a (binding...) form. Fine if it's one source file, not so fine
if I have dozens... Or am I missing something?
On Sep 15, 2:26 pm, Nicolas Oury wrote:
> Y
Binding uses dynamic scope, not lexical scope, right? So any functions
called before the binding expires will be affected by the new
bindings, not just the code explicitly within its lexical scope.
On Sep 15, 11:35 am, Luke VanderHart
wrote:
> Unless I misunderstand something, (binding...) wouldn
Oh, you're right, of course.
Still, that doesn't quite meet the case I described, since the
bindings won't effect any spawned threads/agents.
On Sep 15, 2:47 pm, Alan wrote:
> Binding uses dynamic scope, not lexical scope, right? So any functions
> called before the binding expires will be affec
On Wed, Sep 15, 2010 at 3:35 PM, Luke VanderHart
wrote:
> Unless I misunderstand something, (binding...) wouldn't work for this
> because I'd have to wrap all of the code I wanted to be "modified"
> within a (binding...) form. Fine if it's one source file, not so fine
> if I have dozens... Or am I
My suggestion is inline with other commenters: use binding. If that
doesn't satisfy you, consider using or writing a preprocessor like m4.
--
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
On Sep 15, 3:29 am, Jeff Rose wrote:
> Hi ataggart, thanks for responding. For one it made me realize that
> the reason I wasn't getting any output by default is because I
> happened to have log4j in my classpath for the current project (sucked
> in as a dep for a sub-dependency).
If you real
You can also use binding eval evil brother : alter-var-root.
On Wed, Sep 15, 2010 at 8:04 PM, Richard Newman wrote:
> My suggestion is inline with other commenters: use binding. If that doesn't
> satisfy you, consider using or writing a preprocessor like m4.
>
> --
> You received this message bec
hi,
people have likened stm to gc. what would then be likened to memory
region inference?
hrm.
--
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 moderat
beware pushing analogies too far ? :)
2010/9/15 Raoul Duke
> hi,
>
> people have likened stm to gc. what would then be likened to memory
> region inference?
>
> hrm.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, sen
On Wed, Sep 15, 2010 at 12:23 PM, ataggart wrote:
> If you really need logging, then log4j is probably your best bet
> anyway.
Or SLF4J, which seems to be the way many (most?) java libraries depend
on a some logging library.
--
You received this message because you are subscribed to the Google
> consider using or writing a preprocessor like m4
Could you elaborate on that?
--
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 p
On Sep 15, 2010, at 1:57 PM, Alan wrote:
> This looks a lot like what I would do - I'm afraid I don't have any
> brilliant insights for you. I do have a couple ways you could make
> this smaller, though:
>
> - Instead of (atom ()) and convoluted swap! logic, what about (atom
> []) and (swap! sha
We are speaking of two different things.
SLF4J is a facade, like commons-logging (and to some extent
c.c.logging). Their intent is to allow *libraries* to make logging
calls, but leave the actual logging implementation up to the runtime
application. This in principle allows multiple libraries' lo
22 matches
Mail list logo