Re: Log4j not detected when using recent jars

2010-01-13 Thread Stuart Halloway
I would like for logging to be less magical in its implementation. I don't see the leveraging of macro evalutaion to be "magic"; I view it as a great advantage of clojure to not be limited to only compile- time and run-time (given the recent AOTC-compatibility demands, not everyone agrees). Ha

Re: deftype and macros

2010-01-13 Thread Konrad Hinsen
On 13 Jan 2010, at 21:00, Rich Hickey wrote: a bit of a pain. But even inside method definitions macros do not seem to be expanded. Any use of a macro inside a method leads to a compile- time error message. Is this intentional or just a temporary state? Do you have a small example? This o

Re: I'm going to teach Clojure at university - suggestions/comments?

2010-01-13 Thread ajay gopalakrishnan
I think it is better not to say "It is a better Lisp" although it actually is in many ways. Talking about its other Concurrency features and advantages of side-effect free programming is a good way to interest the students in this world dominated by OOPs Ajay On Wed, Jan 13, 2010 at 10:58 PM, mac

Re: I'm going to teach Clojure at university - suggestions/comments?

2010-01-13 Thread mac
> The issue that is > particularly interesting to me to explore is how alien Clojure is to > Java programmers, what are subjective and objective causes, and how > hard is to overcome each of the identified issues. This sounds very interesting. I try to explain the point of lisp to java programmers

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Wed, Jan 13, 2010 at 8:38 PM, brian wrote: > > I was wondering if this is the right statement for setting the external > classpath? > > setq swank-clojure-classpath > Another way is to use M-x swank-clojure-project. You enter a directory and it automatically adds that directory/src to the cl

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Wed, Jan 13, 2010 at 8:38 PM, brian wrote: > > I was wondering if this is the right statement for setting the external > classpath? > > setq swank-clojure-classpath > That's the right variable. You can set it, and then Clojure Box's setup appends to it to make sure clojure, contrib, and swan

Re: classpath in clojure box

2010-01-13 Thread brian
I was wondering if this is the right statement for setting the external classpath? setq swank-clojure-classpath Shawn Hoover wrote: On Tue, Jan 12, 2010 at 10:05 PM, brian > wrote: Hi all, I put the example code from Programming Clojure book here:

Re: classpath in clojure box

2010-01-13 Thread brian
Shawn Hoover wrote: On Tue, Jan 12, 2010 at 10:05 PM, brian > wrote: Hi all, I put the example code from Programming Clojure book here: C:\shcloj-code\code\examples I verified that "introduction.clj" is there. This is cut and pasted from m

Re: Contrib Logging change

2010-01-13 Thread Timothy Pratley
Hi Alex, 2010/1/13 ataggart : > You mean dropping it from the level-specific macros such as error and > fatal?  I'm inclined to disagree; being able to access the exception > instance itself is a Good Thing. Yes. You are quite right; preserving the exception is more important. If I understand co

Re: clojure unicode on Windows

2010-01-13 Thread Lukas Lehner
Ok, tried to put this at the top of the file, but same bad result on Win (System/setProperty "file.encoding" "UTF8") and actually here http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding it looks like JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 has the same effect

Re: clojure unicode on Windows

2010-01-13 Thread Kevin Downey
java uses local settings, on windows the default encoding is some godawful thing (same on Mac, still godawful, but different) set file.encoding to pick something sane On Wed, Jan 13, 2010 at 1:52 PM, Lukas Lehner wrote: > Hi all > > The clojure unicode reading, evaluating and printing was discuss

clojure unicode on Windows

2010-01-13 Thread Lukas Lehner
Hi all The clojure unicode reading, evaluating and printing was discussed already with various results. Let me add one more, and kindly ask for advice if anyone has. OS: Windows 7 clojure 1.1 C:\>java -version Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 java version "1.6.0_17" Java(TM)

Re: Redis-Clojure: NoRouteToHostException

2010-01-13 Thread Timothy Pratley
2010/1/14 mudphone : > I believe it has to do with opening too many sockets on the Redis > server, rather than the total number of members in the set. Sounds possible. It would be worthwhile seeing if (redis/with-server REDIS-SPEC (dotimes [i 10] (redis/sadd "large-set" (random-value i w

Re: deftype and macros

2010-01-13 Thread Rich Hickey
On Wed, Jan 13, 2010 at 1:11 PM, Konrad Hinsen wrote: > I have been trying to use macros to build a family of related deftypes, but > with no success. None of the parameters of deftype is evaluated, and > therefore nothing is macroexpanded either. So far, no surprise, though it's > a bit of a pain

Redis-Clojure: NoRouteToHostException

2010-01-13 Thread mudphone
This is a problem I'm having with the Redis-Clojure library, which is not strictly a Clojure issue. But, I know there are a lot of folks using it in the community, so I thought this might be a good shot for getting help. Sorry for the cross-post. After adding about 16328 members to a set, the st

deftype and macros

2010-01-13 Thread Konrad Hinsen
I have been trying to use macros to build a family of related deftypes, but with no success. None of the parameters of deftype is evaluated, and therefore nothing is macroexpanded either. So far, no surprise, though it's a bit of a pain. But even inside method definitions macros do not seem

Re: I'm going to teach Clojure at university - suggestions/comments?

2010-01-13 Thread Michael Wood
2010/1/13 Dragan Djuric : [...] > I hope that I'll also be able to do some research. The issue that is > particularly interesting to me to explore is how alien Clojure is to > Java programmers, what are subjective and objective causes, and how > hard is to overcome each of the identified issues. I

Re: Issue: getAsMethodOfPublicBase fails if getDeclaringClass of method is subclass of target.getClass

2010-01-13 Thread jpraher
Patch that works for that particular problem: diff --git a/src/jvm/clojure/lang/Reflector.java b/src/jvm/clojure/ lang/Reflector.java index 4a7061f..445961a 100644 --- a/src/jvm/clojure/lang/Reflector.java +++ b/src/jvm/clojure/lang/Reflector.java @@ -80,7 +80,11 @@ static Object invokeMatchingMet

Issue: getAsMethodOfPublicBase fails if getDeclaringClass of method is subclass of target.getClass

2010-01-13 Thread jpraher
== Description == The found method's declaringClass is used to call getAsMethodOfPublicBase - this might lead to problems see below. == Steps to Repdoduce == (let [vm (vm-attach-socket host port) eventrequestmanager (.eventRequestManager vm) method-entry-request (.createMethodE

Re: Bug with Clojure 1.2 REPL (aka master branch) ?

2010-01-13 Thread Sean Devlin
~ is platform specific, and doesn't play well with WORA On Jan 13, 1:46 am, David Nolen wrote: > Erg. Turns out I was bitten by the Java classpath again. The path must be > absolute, no ~ allowed. > > Thanks all. > > On Tue, Jan 12, 2010 at 9:58 PM, aria42 wrote: > > I was seeing this error too

Re: trying to call jar files in clojure box

2010-01-13 Thread Shawn Hoover
On Tue, Jan 12, 2010 at 8:20 PM, brian wrote: > Hi, > > I am not sure if this is a Clojure Box problem or a compojure problem but > in an attempt to try calling external jars files in clojure box,and wanting > to try compojure, to eliminate any possible path problems, I've put > compojure and all

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Tue, Jan 12, 2010 at 10:05 PM, brian wrote: > Hi all, > > > I put the example code from Programming Clojure book > here: > > C:\shcloj-code\code\examples > > I verified that "introduction.clj" is there. > > This is cut and pasted from my .emacs file located in c:\program > files\brian > > > (

I'm going to teach Clojure at university - suggestions/comments?

2010-01-13 Thread Dragan Djuric
Hi, This semester I'm teaching a course at MSc studies, and I decided to base it on Clojure. Sorry, It's not a sign that Clojure gets the ground in USA - I'm in South-Eastern Europe, at University of Belgrade (cca 90.000 students altogether, the largest university in the region, but underdeveloped