To address the Infinity exception that Sean & AJ are seeing, I think the issue there is that in REPLy / lein repl, we do a `read` of the input, and then `pr-str` the result and send it on to nREPL. So when nREPL goes to re-read the value back in, that's what triggers the compiler error.
user=> (pr-str (read-string "1e308")) "1.0E308" user=> (pr-str (read-string "1e309")) "Infinity" ;;; and then across the wire... user=> (eval (read-string "1.0E308")) 1.0E308 user=> (eval (read-string "Infinity")) CompilerException java.lang.RuntimeException: Unable to resolve symbol: Infinity in this context, compiling:(NO_SOURCE_PATH:1) Incidentally, the reason for the full read rather than a dumb send-on-newline strategy is so that we can accumulate multiple lines of a form before sending to nREPL. Round-tripping read/pr-str like this has seemed to work out fine so far, but I'm imagining there may be other edge cases like this that could get tricky. So maybe there's an alternate strategy we can come up with. I'd appreciate suggestions on the Github issue I just opened for it: https://github.com/trptcolin/reply/issues/71 -Colin On Tuesday, June 26, 2012 4:37:56 PM UTC-5, mefesto wrote: > > When I run the repl from leiningen (v2.0.0-preview6) I get the > Infinity exception. But when I run the repl straight from the > clojure.jar it works without error. > > java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar > > AJ > > On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas <abm221...@gmail.com> > wrote: > > I don't get the exception on 1.4.0: > > > > ~ $ clj > > Clojure 1.4.0 > > user=> 1e309 > > Infinity > > user=> > > > > > > On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote: > >> > >> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang <killme2...@gmail.com> > >> wrote: > >> > Added a postfix "M" to make the number as BigDecimal or "N" as a > >> > BigInteger: > >> > >> Yes... > >> > >> user=> 1e309M > >> 1E+309M > >> > >> The "Infinity" exception seems wrong but clearly using BigDecimal makes > it > >> work. > >> -- > >> Sean A Corfield -- (904) 302-SEAN > >> An Architect's View -- http://corfield.org/ > >> World Singles, LLC. -- http://worldsingles.com/ > >> > >> "Perfection is the enemy of the good." > >> -- Gustave Flaubert, French realist novelist (1821-1880) > > > > -- > > 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 > On Tuesday, June 26, 2012 4:37:56 PM UTC-5, mefesto wrote: > > When I run the repl from leiningen (v2.0.0-preview6) I get the > Infinity exception. But when I run the repl straight from the > clojure.jar it works without error. > > java -jar ~/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar > > AJ > > On Tue, Jun 26, 2012 at 11:25 AM, Armando Blancas <abm221...@gmail.com> > wrote: > > I don't get the exception on 1.4.0: > > > > ~ $ clj > > Clojure 1.4.0 > > user=> 1e309 > > Infinity > > user=> > > > > > > On Monday, June 25, 2012 11:09:14 PM UTC-7, Sean Corfield wrote: > >> > >> On Mon, Jun 25, 2012 at 10:30 PM, dennis zhuang <killme2...@gmail.com> > >> wrote: > >> > Added a postfix "M" to make the number as BigDecimal or "N" as a > >> > BigInteger: > >> > >> Yes... > >> > >> user=> 1e309M > >> 1E+309M > >> > >> The "Infinity" exception seems wrong but clearly using BigDecimal makes > it > >> work. > >> -- > >> Sean A Corfield -- (904) 302-SEAN > >> An Architect's View -- http://corfield.org/ > >> World Singles, LLC. -- http://worldsingles.com/ > >> > >> "Perfection is the enemy of the good." > >> -- Gustave Flaubert, French realist novelist (1821-1880) > > > > -- > > 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 > -- 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