Re: classpath in clojure box

2010-01-14 Thread brian
Shawn Hoover wrote: On Wed, Jan 13, 2010 at 8:38 PM, brian brw...@gmail.com mailto:brw...@gmail.com 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

Re: classpath in clojure box

2010-01-14 Thread Michael Wood
2010/1/14 brian brw...@gmail.com: Shawn Hoover wrote: On Wed, Jan 13, 2010 at 8:38 PM, brian brw...@gmail.com mailto:brw...@gmail.com wrote:    I was wondering if this is the right statement for setting the    external  classpath?    setq swank-clojure-classpath Another way is to use

Re: classpath in clojure box

2010-01-14 Thread brian
Michael Wood wrote: 2010/1/14 brian brw...@gmail.com: Shawn Hoover wrote: On Wed, Jan 13, 2010 at 8:38 PM, brian brw...@gmail.com mailto:brw...@gmail.com wrote: I was wondering if this is the right statement for setting the external classpath? setq swank-clojure-classpath

Re: classpath in clojure box

2010-01-14 Thread brian
Michael Wood wrote: 2010/1/14 brian brw...@gmail.com: Shawn Hoover wrote: On Wed, Jan 13, 2010 at 8:38 PM, brian brw...@gmail.com mailto:brw...@gmail.com wrote: I was wondering if this is the right statement for setting the external classpath? setq swank-clojure-classpath

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

2010-01-14 Thread Jeff Rose
Dober dan gospodine, A few years ago I taught two semesters of web application programming to undergraduates using Ruby on Rails. None of them had any experience with either programming in Ruby or developing for the web before we started, but by most accounts it was a success. Maybe some of

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

2010-01-14 Thread Dragan Djuric
Thanks Jeff, that was a really interesting report. I'd like to do something like this - unfortunately, it's difficult to enforce here because many students would start the riots (just kidding) :) As for the local economy, it's not a problem in a sense of employment opportunity - half of them

Re: classpath in clojure box

2010-01-14 Thread Shawn Hoover
On Thu, Jan 14, 2010 at 3:17 AM, brian brw...@gmail.com wrote: The above didn't work, but apparently it doesn't pick up my .emacs file, which has (setq swank-clojure-classpath (list c:/shcloj-code/code/examples)) itknows where home is, when it boots up, the default is my home dir, where

Re: Help needed regarding the let

2010-01-14 Thread Graham Fawcett
Hi, On Wed, Jan 13, 2010 at 1:30 AM, Manish manish.zed...@gmail.com wrote: Thanx for ur response, Actually We are using string builder in our project, String Builder causing the memory leak in as I google, Thats the main reason i want to set the StringBuilder object to nil, We are using the

NYC Clojure Users Group Meeting for Jan 28th - I reserved a bigger space!

2010-01-14 Thread Eric Thorsen
I've reserved a larger space to accommodate 55 people (we were out of room). There will be desks in the front and rows of seats in the back so come a bit early if you want a desk. For more details, see the full listing: http://www.meetup.com/Clojure-NYC/calendar/12228936/ When: Thursday, January

[ANN] units.clj - unit conversion functions without repeating yourself

2010-01-14 Thread Scott Jaderholm
Hi, I created a library that provides unit conversion functions[1] for several common units and allows you to define new units conversions with a single equation. The library does a few interesting things automatically: First, if you define inches-to-feet, it will create feet-to-inches for you.

NullPointerException from #' et al.

2010-01-14 Thread C. Florian Ebeling
Hi, out of curiosity, what is the reasoning behind this behavior (I'm pretty sure it is intended): (= nil 1) = false ( nil 1) ;; NullPointerException Same behavior for = = etc. Florian -- Florian Ebeling florian.ebel...@gmail.com -- You received this message because you are subscribed to

Re: NullPointerException from #' et al.

2010-01-14 Thread ataggart
What do you think should be the boolean result of ( nil 1)? Since the inequality functions only work with Numbers, and nil is not a Number. The only way to make that work would be to impute some default numerical value to nil, which would probably introduce more problems than it solved. On Jan

Re: NullPointerException from #' et al.

2010-01-14 Thread C. Florian Ebeling
What do you think should be the boolean result of ( nil 1)? Since the inequality functions only work with Numbers, and nil is not a Number.  The only way to make that work would be to impute some default numerical value to nil, which would probably introduce more problems than it solved. I

Re: [ANN] units.clj - unit conversion functions without repeating yourself

2010-01-14 Thread Brian
This is more java related but there is a java library and application ( http://futureboy.us/frinkdocs/) that provides a set of very powerful unit conversion tools. On Thu, Jan 14, 2010 at 10:49 AM, Scott Jaderholm jaderh...@gmail.comwrote: Hi, I created a library that provides unit

Re: deftype and macros

2010-01-14 Thread Konrad Hinsen
On 14.01.2010, at 08:35, Konrad Hinsen wrote: This one failed yesterday on my office computer, but now I tried it again at home and it works fine: .. I'll check again on my office machine later today. It failed indeed, but after recompilation of Clojure and Contrib it works fine now.

Compilation-aware code?

2010-01-14 Thread ataggart
Some people have had issues with c.c.logging in that it looks for a suitable logging implementation at macro-expansion-time (by simply trying to import the necessary classes), which thus also occurs during AOT compilation; the down-side is that if the desired logging lib is not on the classpath

Re: Compilation-aware code?

2010-01-14 Thread Cyrus Harmon
hmm... perhaps one could have a form called something like ... oh, I dunno, maybe ... eval-when! And then one could have situations like :compile-toplevel and :load-toplevel and, maybe, :execute. Nah... that's a crazy idea; never mind... :) Cyrus On Jan 14, 2010, at 9:22 AM, ataggart wrote:

Re: Compilation-aware code?

2010-01-14 Thread ataggart
I'm detecting sarcasm, but it's not clear to me what point you're trying to make. Care to be more helpful or enlightening? On Jan 14, 12:09 pm, Cyrus Harmon cyrushar...@gmail.com wrote: hmm... perhaps one could have a form called something like ... oh, I dunno, maybe ... eval-when! And then

Re: NullPointerException from #' et al.

2010-01-14 Thread ataggart
On Jan 14, 9:00 am, C. Florian Ebeling florian.ebel...@gmail.com wrote: What do you think should be the boolean result of ( nil 1)? Since the inequality functions only work with Numbers, and nil is not a Number.  The only way to make that work would be to impute some default numerical

Re: NullPointerException from #' et al.

2010-01-14 Thread ataggart
Also, it is consistent given that == is the numerical analogue to =, etc. -- 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

Re: Compilation-aware code?

2010-01-14 Thread Cyrus Harmon
I was referring to common lisp's eval-when special operator: http://www.lispworks.com/documentation/HyperSpec/Body/s_eval_w.htm cyrus On Jan 14, 2010, at 12:22 PM, ataggart wrote: I'm detecting sarcasm, but it's not clear to me what point you're trying to make. Care to be more helpful or

Re: units.clj - unit conversion functions without repeating yourself

2010-01-14 Thread Mike Davis
On Jan 14, 10:12 am, Brian brian.fores...@gmail.com wrote: This is more java related but there is a java library and application (http://futureboy.us/frinkdocs/) that provides a set of very powerful unit conversion tools. I have always liked the units tool available here:

Re: Redis-Clojure: NoRouteToHostException

2010-01-14 Thread mudphone
Timothy, Thanks for the suggestion. Creating a million keys within the same with-server is possible, without seeing the NoRouteToHostException. So, hitting with-server so many times in so short a time period is definitely a bad idea (duh). So, I think there is a problem with how my larger

Re: NullPointerException from #' et al.

2010-01-14 Thread Timothy Pratley
2010/1/15 C. Florian Ebeling florian.ebel...@gmail.com: I agree. It only looks inconsistent when you assume nil is treated uniformly by these comparison function, which does not make sense. I quite often wish to compare comparable objects that are not numbers and wrote some simple operators to

StackOverflowError possible with seq ?

2010-01-14 Thread mudphone
Is it possible that the Clojure core seq function can cause a stack overflow (since it calls itself)? Or is there some other manner in which misuse of a lazy seq could cause this? In the stack trace below, I'm seeing repeated calls to seq in clojure core, until the stack is blown. Thanks, Kyle

ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-14 Thread Constantine Vetoshev
I would like to announce the release of dgraph 1.0, a dependency graph implementation for Clojure. http://github.com/gcv/dgraph dgraph provides a mostly pure functional data structure whose nodes behave like cells in a spreadsheet. Data changes in stored nodes cause their dependent computed

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-14 Thread Timothy Pratley
Hi Constantine, Very interesting! I'll definitely be trying this out. To give me a head-start, are there key differences with clojure.contrib.dataflow so I can better understand? Regards, Tim. 2010/1/15 Constantine Vetoshev gepar...@gmail.com: I would like to announce the release of dgraph

Re: units.clj - unit conversion functions without repeating yourself

2010-01-14 Thread Simon Brooke
On 14 Jan, 15:49, Scott Jaderholm jaderh...@gmail.com wrote: Hi, I created a library that provides unit conversion functions[1] for several common units and allows you to define new units conversions with a single equation. The code is athttp://gist.github.com/276662#file_units.clj I'd

Re: Creating an object given a class object

2010-01-14 Thread evins.mi...@gmail.com
On Jan 12, 1:50 am, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 11 Jan 2010, at 23:09, .Bill Smith wrote: Every class object has a newInstance method: user= (Class/forName java.util.HashMap) java.util.HashMap user= (.newInstance (Class/forName java.util.HashMap)) #HashMap {}

Re: Many foolish questions

2010-01-14 Thread Richard Newman
but the reader spits an illegal argument exception. Is there different syntax which the reader could parse? Or am I using the wrong kind of thing? Wrong kind of thing. defstruct defines a struct-map, which is simply a map with some guaranteed keys. It doesn't make any assertions about the

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

2010-01-14 Thread Eric Lavigne
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: how can i better write this (reflection, str)?

2010-01-14 Thread .Bill Smith
You might change the method-dumps definition to this: method-dumps (map (fn [i x] (str i : x)) (range 0 method-count) methods) It isn't more compact but I suppose it's more Clojure-y. On Jan 14, 6:49 pm, Raoul Duke rao...@gmail.com wrote: hi, i'm guessing there is a more Clojure-y and

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

2010-01-14 Thread Perry Trolard
On Jan 12, 8:58 pm, aria42 ari...@gmail.com wrote: I was seeing this error too and I reckoned it was because my clojure.contribwas not compatible with clojure core. I think if you're using1.2master of clojure you need 1.1 master ofcontrib. Is that right? The 1.1 new branch of Contrib is

Re: Funding Clojure 2010

2010-01-14 Thread Brian Goslinga
I think it would be useful if there was some way to (mostly) automatically donate $10/month. -- 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 -

Re: Funding Clojure 2010

2010-01-14 Thread Giancarlo Angulo
I second this. = angol = -|-^...@^_^, =|+^_^X++~_~,@- www.onthe8spot.com http://www.facebook.com/giancarlo.angulo http://twitter.com/Neoryder On Fri, Jan 15, 2010 at 1:29 PM, Brian Goslinga quickbasicg...@gmail.comwrote: I think it would be useful if there was some way to