Is apply not as lazy as it could be?

2011-05-17 Thread Ken Wesson
It seems that "apply" realizes one more element than is required to a) bind all non-rest arguments and b) determine/validate the arity, in the case that the function has a rest argument. user=> (defn report-seq [] (iterate (fn [n] (println n) (inc n)) 0)) #'user/report-seq user=> (doall (take 3 (r

Comparison of CCW and Enclojure

2011-05-17 Thread Ken Wesson
I have gotten a more recent version of CCW up and running in Eclipse and can now compare some aspects of their behavior, particularly regarding the REPL. On the plus side for CCW: * No timeout bug starting REPLs. The timeout period seems much longer than Enclojure's. (The Enclojure Google Group

Re: ClojureQL and Oracle

2011-05-17 Thread Corvette
> On 19 April 2011 22:34, Michael wrote: > I've used it with Oracle for basic select/join/union queries. I didn't > try any update operations. The only read operation I had a problem > with was 'take', as Oracle doesn't support LIMIT, but then I was just > playing around, not trying to test exhaus

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread Ken Wesson
On Mon, May 16, 2011 at 9:44 AM, Fogus wrote: > Hi Ken, > > Thanks for this.  I agree that a different name would be much more > clear. Here's one from chapter 7. Section 7.1.2, near the end, has: "Perhaps you see a familiar pattern: we apply the column-names vector as a function across a set of

Re: ClojureQL and Oracle

2011-05-17 Thread Rick Moynihan
On 19 April 2011 22:34, Michael wrote: > > As far as I can tell, ClojureQL does not directly support Oracle. Has > anybody been able to get Clojure QL to work with Oracle?  Are there > plans to directly support it? Would be great to use this with Clojure > inside the corporate ship. While we're o

Unchecked floating point division

2011-05-17 Thread Ken Wesson
How does one perform an unchecked floating point division? (/ 1.0 0.0) throws an exception -- what goes in place of _ to make (_ 1.0 0.0) produce Double/POSITIVE_INFINITY? (And run faster than something that does checking instead of just boiling down to a single FDIV instruction post-JIT.) -- Pro

Re: Clojure stack

2011-05-17 Thread Timothy Washington
For the record, I'm trying to get a better understanding of the issues myself. So mea culpa. I should have provided more context on technomancy's statement. From my understanding, the issue had to do with technomancy not getting patches accepted at a faster pace, into clojure core (anyone with more

[ANN] Radial layout for the Lacij graph visualization library

2011-05-17 Thread Pierre Allix
Hello, I'm pleased to announce that a radial layout has been added to the Lacij graph visualization library. Here is an example of how the radial layout looks: https://github.com/pallix/lacij/raw/master/resources/lacij/examples/radial.png It's an implementation of the algorithm described in

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Chas Emerick
On May 17, 2011, at 4:57 AM, Ken Wesson wrote: > * There's no easy way to restart a REPL or close one; one must close > the REPL tab and also find and kill a java process using ps/kill or > Windows Task Manager or whatever tool, depending on OS. Cleaning up a REPL involves closing the REPL inter

Re: Clojure stack

2011-05-17 Thread Chas Emerick
That particular soap opera found its local minima here: http://news.ycombinator.com/item?id=2053908 I don't think that that is germane to the "Clojure stack" question though. There are innumerable ways to assemble Clojure applications for any scale desired; they're discussed here and in #clojur

Clojure ant tasks: Now with Clojure 1.2

2011-05-17 Thread Ilya Kasnacheev
Hi *, As if somebody cared, I made clojure-ant-tasks to run with Clojure 1.2 https://github.com/alamar/clojure-ant-tasks Here is the checklist of things I want to implement but hasn't yet in case I forget something: * Fix a bug where compilepath property on clojure-compile is relative to curren

Re: Learning Idiomatic Clojure

2011-05-17 Thread J.R. Garcia
Thanks all for the recommendation of The Joy of Clojure! I received my copy in the mail about two hours ago and I've already read up to Chapter 2 (am I the only that reads the foreword and acknowledgments?). It's hard to work with this book sitting next to me. It's been great so far! Thanks again,

Re: Clojure stack

2011-05-17 Thread Sean Corfield
On Tue, May 17, 2011 at 5:34 AM, Timothy Washington wrote: > I'm a former java developer, whose tried scala, ruby, etc. And with clojure, > I haven't been this intellectually excited since I designed my first DSL :) My commercial background is primarily (in historical order): C, C++, Java, CFML -

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread Alan
On May 17, 4:35 am, Ken Wesson wrote: > On Mon, May 16, 2011 at 9:44 AM, Fogus wrote: > > Hi Ken, > > > Thanks for this.  I agree that a different name would be much more > > clear. > > Here's one from chapter 7. Section 7.1.2, near the end, has: > > "Perhaps you see a familiar pattern: we apply

Re: Clojure stack

2011-05-17 Thread Alan
On May 17, 11:00 am, Sean Corfield wrote: > On Tue, May 17, 2011 at 5:34 AM, Timothy Washington > wrote: > > I'm a former java developer, whose tried scala, ruby, etc. And with clojure, > > I haven't been this intellectually excited since I designed my first DSL :) > > My commercial background i

Re: Clojure stack

2011-05-17 Thread László Török
Chas, Sean, Alan, thank you for taking the discussion back on track. I completely support Rich's position re protecting Clojure form becoming bloated with half-baked features. (half-baked = conceptually and practically mature) I'm happy to have Rich as a "benevolent dictator for life" :) ( live a

clojure contrib build failure on win7

2011-05-17 Thread chris nuernberger
Hey all, I am running a fairly new win7-64 system (jdk6-64) and the maven build of clojure contrib fails due to test failures in at least logging. Do you want stack traces and debug logs and such? Chris -- A foolish consistency is the hobgoblin of little minds - Emerson -- You received this

Re: Clojure stack

2011-05-17 Thread Sean Corfield
On Tue, May 17, 2011 at 11:16 AM, Alan wrote: > For what it's worth, a year ago I had never touched Emacs and was > terrified by it, partly because of the attitude of superiority Emacs > users tend to have. But I was learning lisp, and Emacs was reported to > be the best tool for lisp, so by God I

extending types

2011-05-17 Thread jlk
Hello Apologies if I'm misunderstanding something here, but is it possible to easily extend to a new java type? For example: proxy -> allows you to implement methods that are already defined in an interface or class, so you can redefine methods (proxy [ClassA] [] (thisMustBeDefinedInClassA [] .

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread pmbauer
Manning's forum would be a better home for errata than the Clojure mailing list. http://www.manning-sandbox.com/forum.jspa?forumID=624 -- 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

Re: clojure contrib build failure on win7

2011-05-17 Thread pmbauer
clojure-contrib was left broken 1.5 months past. clojure/core are no longer maintaining the monolithic clojure-contrib library as it is deprecated. A bunch of new projects are starting to fill the void (see listing at https://github.com/clojure) Some functionality isn't making the migration - so

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Sean Corfield
On Tue, May 17, 2011 at 6:04 AM, Chas Emerick wrote: > You certainly can load sources from open editors with one keystroke -- the > default is Ctrl-L (maybe Cmd-L on Macs). Opt-Cmd-L on Mac. Ctl-Alt-S on Ubuntu. The difference between platforms is kind of annoying (since I switch back and forth

Re: extending types

2011-05-17 Thread Ken Wesson
On Tue, May 17, 2011 at 5:52 PM, jlk wrote: > Hello > > Apologies if I'm misunderstanding something here, but is it possible > to easily extend to a new java type?  For example: > > proxy -> allows you to implement methods that are already defined in > an interface or class, so you can redefine me

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread Ken Wesson
On Tue, May 17, 2011 at 2:03 PM, Alan wrote: > On May 17, 4:35 am, Ken Wesson wrote: >> On Mon, May 16, 2011 at 9:44 AM, Fogus wrote: >> > Hi Ken, >> >> > Thanks for this.  I agree that a different name would be much more >> > clear. >> >> Here's one from chapter 7. Section 7.1.2, near the end,

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread Ken Wesson
On Tue, May 17, 2011 at 5:57 PM, pmbauer wrote: > Manning's forum would be a better home for errata than the Clojure mailing > list. > http://www.manning-sandbox.com/forum.jspa?forumID=624 Sorry; I don't really care for web forums much. I think mailing lists and Usenet are much to be preferred.

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Ken Wesson
On Tue, May 17, 2011 at 9:04 AM, Chas Emerick wrote: > > On May 17, 2011, at 4:57 AM, Ken Wesson wrote: > >> * There's no easy way to restart a REPL or close one; one must close >> the REPL tab and also find and kill a java process using ps/kill or >> Windows Task Manager or whatever tool, dependi

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Sean Corfield
On Tue, May 17, 2011 at 4:09 PM, Sean Corfield wrote: > BTW, CCW 0.2.0.STABLE001 on my Mac works fine with Clojure 1.3.0 if I > have nrepl 0.0.5 on the classpath. Doesn't work on Ubuntu. That might > be a useful data point for tracking down that problem I talked to you > about off-list. I'll try 0

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Sean Corfield
On Tue, May 17, 2011 at 6:50 PM, Ken Wesson wrote: > There doesn't seem to be a way to get CCW's version reported, short > perhaps of triggering an attempt to update it, but I think it's > 0.2.something. Help > About Eclipse SDK > Installation Details - You'll see a list of all installed plugins

Re: Joy of Clojure errata: Chapter 5

2011-05-17 Thread Aaron Bedra
On 05/17/2011 09:21 PM, Ken Wesson wrote: On Tue, May 17, 2011 at 5:57 PM, pmbauer wrote: Manning's forum would be a better home for errata than the Clojure mailing list. http://www.manning-sandbox.com/forum.jspa?forumID=624 Sorry; I don't really care for web forums much. I think mailing lists

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Chas Emerick
On May 17, 2011, at 10:42 PM, Sean Corfield wrote: >> 2. Enter in the middle of a REPL submission breaks the line even if >> the sexp lacks unmatched delims, unlike Enclojure. > > I've gotten used to using ctl-enter or shift-cmd-x to just submit the > form I'm typing so I don't need to jump to t

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Chas Emerick
On May 17, 2011, at 10:27 PM, Sean Corfield wrote: > On Tue, May 17, 2011 at 4:09 PM, Sean Corfield wrote: >> BTW, CCW 0.2.0.STABLE001 on my Mac works fine with Clojure 1.3.0 if I >> have nrepl 0.0.5 on the classpath. Doesn't work on Ubuntu. That might >> be a useful data point for tracking down

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Chas Emerick
On May 17, 2011, at 9:50 PM, Ken Wesson wrote: > On Tue, May 17, 2011 at 9:04 AM, Chas Emerick wrote: >> >> On May 17, 2011, at 4:57 AM, Ken Wesson wrote: >> >>> * There's no easy way to restart a REPL or close one; one must close >>> the REPL tab and also find and kill a java process using ps

[ANN] Radically simplified Emacs and SLIME setup

2011-05-17 Thread Phil Hagelberg
I pushed out some changes last night that make it much, much easier to get set up with Emacs and SLIME. If you've tried it and ended up bewildered by issues with ELPA or how to launch a swank server, give it another go! It only takes three steps to get started: 1. Install clojure-mode via git

Re: [ANN] Radically simplified Emacs and SLIME setup

2011-05-17 Thread Ambrose Bonnaire-Sergeant
As a VimClojure user, the big problem I have with SLIME is the installation process! Great stuff, looking forward to trying it out. Ambrose -- 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

Re: Comparison of CCW and Enclojure

2011-05-17 Thread Ken Wesson
On Tue, May 17, 2011 at 10:42 PM, Sean Corfield wrote: > On Tue, May 17, 2011 at 6:50 PM, Ken Wesson wrote: >> There doesn't seem to be a way to get CCW's version reported, short >> perhaps of triggering an attempt to update it, but I think it's >> 0.2.something. > > Help > About Eclipse SDK > In

Lazy prime sieve

2011-05-17 Thread Ken Wesson
I stumbled onto this and found it quite intriguing: https://github.com/fredericksgary/lazy-prime-sieve/blob/master/src/primes/core.clj Unfortunately, there isn't any obvious way in the site's interface to discover what the project's license is (which I'd have no trouble finding at e.g. SourceForg

Re: Lazy prime sieve

2011-05-17 Thread Sunil S Nandihalli
http://richhickey.github.com/clojure-contrib/lazy-seqs-api.html what makes the version you mention more interesting? Sunil. On Wed, May 18, 2011 at 10:55 AM, Ken Wesson wrote: > I stumbled onto this and found it quite intriguing