Re: Basic integer-overflow error: (- 0 -9223372036854775808)

2010-12-12 Thread James Koppel
tp://dev.clojure.org/jira/browse/CLJ-32) > > have been caught and fixed, but this one still lives. > > > (I now appreciate why "How do you detect integer overflows?" is one of > > the favorite interview questions of the Software Engineering > > Institute.) >

Basic integer-overflow error: (- 0 -9223372036854775808)

2010-12-12 Thread James Koppel
g.: http://dev.clojure.org/jira/browse/CLJ-32) have been caught and fixed, but this one still lives. (I now appreciate why "How do you detect integer overflows?" is one of the favorite interview questions of the Software Engineering Institute.) Sincerely, James Koppel -- You rec

Re: Dynamically accessing static fields

2009-06-17 Thread James Koppel
Thanks! Seems I forgot java.lang.reflect exists when I wrote that. On Wed, Jun 17, 2009 at 4:47 PM, Michael Reid wrote: > > On Mon, Jun 15, 2009 at 9:13 AM, Parth wrote: > > > > > > > > On Jun 15, 7:08 am, James Koppel wrote: > >> I am trying to wr

Dynamically accessing static fields

2009-06-15 Thread James Koppel
I am trying to write a function to simplify working with GridBagConstraints -- that is, instead of writing (let [c (GridBagConstraints.)] (set! (.weightx c) 2.0) (set! (.gridwidth c) GridBagConstraints/REMAINDER) (let [button (JButton. "Hello, world!")] (.setConstraints (.getLayo