Re: tools.logging question

2012-02-18 Thread Alexander Taggart
The options are:


   - (when (condition? ...) (debug ...))
   - Altering of your logging library's configuration file (some logging 
   libs support reloads at runtime, iirc)
   - Altering your logging library's configuration directly in code 
   (implementation-specific)
   - Provide your own clojure.tools.logging.impl.Logger/LoggerFactoryprotocol 
implementations which embed the conditional logic you want.  The 
   upside to that is you can access rebindable vars that were set further back 
   in the call stack.  Look at the impl.clj code; it's pretty 
   straightforward.  Once you have that, you just need to alter-var-root or 
   bindings the *logger-factory* var.


Which one makes sense really depends on the context of your desire to 
disable individual log items at runtime.  Then again, perhaps this is an XY 
problem.




-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.core/max and NaN

2011-11-01 Thread Alexander Taggart
See http://dev.clojure.org/jira/browse/CLJ-738 for clarity on this issue.

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure struct with java

2011-10-13 Thread Alexander Taggart
I suspect this...

Var struct = RT.var("clojure.core", "struct","employee :diego 10 :coach 
1000"); 

isn't doing what you think it will.  That will set the root binding of 
clojure.core/struct to the string you gave it.  you probably want to get the 
var for the struct function, and then invoke it with the arguments to create 
an employee struct instance.

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.contrib.base64

2011-10-10 Thread Alexander Taggart
Base64 decoding support has been added.

http://github.com/ataggart/clojure.data.codec

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.contrib.base64

2011-10-10 Thread Alexander Taggart
I see about a 50% increased throughput over apache commons-codec as well.  I 
use the perf-base64 ns generate input data and output timing files to keep 
track of changes to the performance over time, lest a regression creep in. 
 I'll add some documentation if you want to play with it.

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.contrib.base64

2011-10-10 Thread Alexander Taggart


On Sunday, 9 October 2011 19:49:17 UTC-7, Stuart Sierra wrote:
>
> Clojure unless somebody clever can make one that's actually *faster* than 
> the best Java lib.
>

Here ya go:  https://github.com/ataggart/clojure.data.codec 

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: inconsistent results from String.valueOf

2011-10-10 Thread Alexander Taggart
It's precisely the behaviour you would get by calling String.valueOf(null) in 
java.  Nulls match to the most specific parameter type in a given hierarchy, 
and in this case, that would be char[] instead of Object.  If the param 
types were not in the same hierarchy, say char[] and String, then you'd get 
an ambiguity exception.

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.contrib.base64

2011-10-06 Thread Alexander Taggart
Sure, I'll start working on it.  Do you want it to be worked on in a contrib 
project or just submit it once it's functional?  Also, I assume you'd want 
this to work with 1.2, right?

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure.contrib.base64

2011-10-06 Thread Alexander Taggart
I threw a base64 encoder together a while ago when playing with the new 
primitive stuff.  Interesting to note that it is faster than the one in 
Apache commons-codec.

https://github.com/ataggart/codec/blob/master/src/codec/base64.clj

-- 
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.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en