Tristan and other interested parties on the Cafe, Answering your question first, Tristan: I was going to use BSD3 (if it isn't already) for the NumLazyByteString.
For the cafe too: A while ago I made a Num instance for LPS; it is currently on my code.haskell.org account. Notice this isn't on Hackage yet and the semantics will be different soon. Most notably I want to ensure divide and anything else implemented through 'asInteger' and 'asInteger2' results in a bytestring of length equal to the largest of the operands. If that isn't clear then let me be very explicit. NumLazyByteString intentionally allows overflow! If you want operations (mod 2^40) then you need only work with bytestrings of length 5 bytes and the operations will result in 5 byte ByteString. This is already true for basic operations (bit operations, +, -, *) but is not yet done for quot, rem, quotRem, divMod, mod, /, and other you can see leverage Integer instead of using custom code. Any desire for non-overflowing operations (basically, re-expressing Integer as LazyByteString) would have to be done as an newtype with a Num instance that grows the bytestring to the necessary level, preventing overflow prior to calling NumLazyByteString. Finally, I intend for numerous operations to be lazy. If you add two infinite bytestrings you should be able to get the result of that operation (modulo some finite value) using NumLazyByteString. This is obviously not true for those operations leveraging Integer. Any comments or requests on the future of this Library are welcome - I'll probably get around to finishing it and putting it on Hackage in a couple weeks. Cheers, Thomas On Sun, Mar 7, 2010 at 9:24 PM, Tristan Ravitch <travi...@cs.wisc.edu> wrote: > I found myself adding Bits and Num instances for ByteStrings when I > found your implementation (which is much better than mine was shaping > up to be). Do you have any particular license in mind for it? > > I used it in an implementation of the Delta Debugging algorithm > (http://www.st.cs.uni-saarland.de/dd/), which I was thinking I would > like to release, and wanted to make sure the licensing could work out > properly. > > Thanks, > -- > Tristan Ravitch > travi...@cs.wisc.edu > http://pages.cs.wisc.edu/~travitch > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkuUiiUACgkQJklRJNuIcWSxmACfVblD+gR/Fv57teNTArSfXhHg > NtsAnRqBvinNesMk3mxMxDERw5MBn9jZ > =Jm4O > -----END PGP SIGNATURE----- > >
signature.asc
Description: PGP signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe