Taking the GPL plunge

One thing I'd like to have in Fabric is decimal (base 10) arithmetic. Most languages have IEEE floating point support, but it causes all sorts of problems that are often subtle and bite you at odd moments.

So instead I'd like to use a decimal arithmetic floating point library. Unlike regular floating point, decimal arithmetic always comes out the same answer you'd get working it out with pencil and paper. The only problem is I can't find a public domain one, the only I can find is from IBM available under the GPL license. That means (I think) I am compelled to provide the source for Fabric under a GPL compatible license. And also CouchDb. Right?

I was probably going to do that anyway, but once I incorporate this library, I no longer have a choice. At least that's my understanding of it.

Quick update, the Fabric formula engine is quite far along. While its still quite rough around the edges, I've now got all this working:

+ addition/string concatenation
- subtraction/negation
* multiplication
/ division
: list concanation
== equality
~= case insensitive equality
!= not equal
< less than
> greater than
<= less than or equal
>= greater than or equal
:= variable/field assignment
[] array subscript/slice
|| logical OR
&& logical AND
! logical NOT
++ increment
-- decrement
id variable/field reference
.. field concatenation range

Literals:
Numbers 1 : 1.2 : 1.2e10
Strings "foo" : 'foo'
Keywords [SomeKeyword] : [AnotherKeyword]
Date-Times [10/24/1973 5:00 pm]

Flow Control:
if/else
forall
user defined functions (including recursion)

My next big tasks are getting the code well organized and commented and writing a formula test suite.

Posted January 2, 2006 9:35 PM