Re: Is there a reader setting support BigDecimal by default?
Thank for the replies and I appreciate the suggestions, however they some of the rationale behind them doesn't match well my experience. First, BigDecimal is plenty fast the large business systems I've worked on. Actually, it has been plenty fast for every large business system I've worked on. This includes a group insurance rate engine that generated hundreds of thousands of calculations in each web request. Second, storing values with implied decimal points is a nightmare. In the insurance application for example, some of the rate tables have precision to three decimal places, others to five. Picking some arbitrary value imposes code complexity throughout the whole in app in a very nasty way. Of course, what happens when you need to change that value two years from now? Unless there's a really good performance issue for a given application, I would never pick implied decimal representation over BigDecimals. Finally, for the business applications I've worked with, I haven't had to worry about representing all rationals, just base 10 numbers. In my experience, using BigDecimal by default for any number with a decimal point has worked out very well for balancing the needs of accuracy, speed and code complexity. It appears that the answer to the original question is no, there is no way to configure the reader to default numbers with a decimal point to be BigDecimal instead of Double. Scott Hickey -- 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: Is there a reader setting support BigDecimal by default?
I'm looking to avoid qualifying every number that has a decimal point with an M. For the business applications I've built over the last 25 years (credit card processing, healthcare claims, loans,etc.), there's never been a situation where inexact numbers were appropriate. That's why I was hoping for a global default for reading decimal numbers as BigDecimal instead of IEEE floats or doubles. Scott Hickey -- 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
Is there a reader setting support BigDecimal by default?
In some versions of Scheme or Lisp, there is a flag that you can set so that the reader will create exact numbers by default (BigDecimal) instead of inexact doubles. Is there a way to do this in Clojure? Scott Hickey -- 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: Is there a reader setting support BigDecimal by default?
I've been using 1.2 but I would be OK with a solution in any version. Scott Hickey -- 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: Java 6 dependency in clojure-contrib ok?
I would strongly recommend Java 5 and plan on staying with that version for a while if you have a goal seeing corporate uptake for Clojure. The Java version debate comes up every few months on the Groovy lists. The most common argument I've heard was that any company progressive enough to use a language like Groovy or Clojure would be using current versions of Java so there is no harm in using the current version of Java. My experience consulting for medium and large companies is that this is a false assumption. Most companies are years behind the current Java version but are still open to using new technologies that will run on their current platforms. The web app servers that get deployed usually lag way behind Java releases and converting legacy Java apps to newer versions of Java + app servers is a major project for many companies. They put it off for as long as possible. It may not make sense to those of us trying new languages on the JVM but it is a reality that is out there. Scott Hickey Senior Consultant Object Partners, Inc. From: Rich Hickey richhic...@gmail.com To: Clojure clojure@googlegroups.com Sent: Wednesday, April 8, 2009 7:31:19 PM Subject: Re: Java 6 dependency in clojure-contrib ok? On Apr 8, 7:52 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: Perry's proposed props functions (http://groups.google.com/group/clojure/browse_thread/thread/c8ec751b8... ) uses some Java 6 methods. Is it ok for me to add such things to contrib, or are we maintaining Java 5 compatibility? I'd prefer we maintain Java 5 for now. Rich --~--~-~--~~~---~--~~ 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 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: Using a Java Debugger with Clojure
It should work. Before I had a debugging working in Eclipse with Groovy, I used JSwat, JEdit and Ant for project work with success. Scott Hickey Senior Consultant Object Partners, Inc. - Original Message From: Bill Clementson [EMAIL PROTECTED] To: clojure@googlegroups.com Sent: Tuesday, October 28, 2008 1:43:58 PM Subject: Re: Using a Java Debugger with Clojure Hi Peter, On Tue, Oct 28, 2008 at 11:27 AM, Peter Wolf [EMAIL PROTECTED] wrote: Hello all, I am new to Clojure, but not Java or LISP (I used to work at LMI). I am considering a project written in a mixture of Clojure, Java and Groovy. Clojure for the concurrent inner loop. Groovy/Grails for the Web UI. And lots of Java reused from other projects. How would I debug something like this? Can I compile Clojure so that a standard Java debugger understands it? I don't know about Groovy, but some people have used standard Java debuggers to debug Clojure code. For example: 1. Read Rich's section on debugging in Getting Started: http://clojure.org/getting_started#toc5 2. Have a look at my blog post: http://bc.tech.coop/blog/081023.html 3. There was a recent discussion on this group where another individual had some problems getting JSwat working: http://groups.google.com/group/clojure/browse_thread/thread/403e593c86c2893f# 4. A general search for debugger on this group will also bring up some other relevant threads. Is there a better way? Better is subjective. ;-) You could use traditional lisp debugging techniques as well. I've covered some of these on my blog: http://bc.tech.coop/blog/040628.html Cheers, Bill --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---