couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: [jira] Commented: (COUCHDB-796) Bignum support
Date Sat, 12 Jun 2010 19:11:45 GMT
Jan also mentioned your new library on IRC, so that was certainly one
of the candidates for that approach.

While it's true that the Javascript view server is where the 32-bit
limitation will be most noticeable, I think we want bignum support
everywhere that the limitation appears.


On Sat, Jun 12, 2010 at 8:06 PM, Jason Smith <> wrote:
> On Sun, Jun 13, 2010 at 01:24, Robert Newson (JIRA) <> wrote:
>>    [
>> Robert Newson commented on COUCHDB-796:
>> ---------------------------------------
>> Sorry, I pasted a terse summary from #couchdb and was then too busy to
>> flesh this out.
>> I'm actually not sure I like the idea of tweaking mochijson2.erl, though it
>> was suggested (by you iirc ;). Also the notion that numbers magically become
>> strings at some point feels wrong, but so also does the notion that a sum()
>> overflows or goes wrong when you hit that limit too.
>> Rather, I think a guarantee that some bignum.js library is always available
>> and some prominent docs about it. Ideally a BigDecimal and BigInteger class
>> like Java has (yes, kill me).
> Weird, I just created that exact project the other day.
> It is indeed the Java class! It is the Apache Harmony BigDecimal/BigInteger
> implementation, compiled to Javascript thanks to GWT. This list isn't the
> place to debate whether that's wise but a the very least, CouchDB's default
> view server can support BigDecimal. I even put up a demo expression
> evaluator:
> What is my point? That CouchDB perhaps does not need bigdecimal support in
> mochijson2 because it is quite straightforward to get things working within
> the view server.
> --
> Jason Smith
> Couchio Hosting

View raw message