Open eigenhombre opened 12 years ago
(Ugh, sorry for the duplicate commit.... :'( Thought I needed to format my issue number differently.)
Not sure if I'm missing an edge case, but it satisfies my smoke tests.
pyclojure> (+ 1 1)
2
pyclojure> (* 9223372036854775808 2)
18446744073709551616L
pyclojure> (* 10000000 1000000000999999999999999999999990)
10000000009999999999999999999999900000000L
Thanks for starting this project!
On second thought, if the Python long format is printed then it should be supported in the reader too. Let me try that.
'L' breaks with Clojure's 'N' convention, but Python longs aren't clojure.lang.BigInts so perhaps a distinction is necessary?
pyclojure: pylisp> (* 10000000 10000000000) 100000000000000000 pylisp> (* 10000000 1000000000999999999999999999999990) 10000000009999999999999999999999900000000 is unknown! (exits interpreter)
Clojure: user=> (* 10000000 1000000000999999999999999999999990) 10000000009999999999999999999999900000000 user=>