GithubHelp home page GithubHelp logo

base16-bytestring's People

Contributors

23skidoo avatar andreasabel avatar bodigrim avatar bos avatar emilypi avatar hvr avatar joeyadams avatar loisch avatar vincenthz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

base16-bytestring's Issues

Build failures with older GHCs and upcoming bytestring-0.11

                           8.10.2  8.8.4  8.6.5  8.4.4  8.2.2  8.0.2  7.10.3  7.8.4  7.6.3  7.4.2  7.2.2  7.0.4
base16-bytestring-1.0.0.0  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.1.7  OK      OK     OK     OK     OK     OK     FAIL    FAIL   FAIL   FAIL   FAIL   FAIL 
base16-bytestring-0.1.1.6  OK      OK     OK     OK     OK     OK     FAIL    FAIL   FAIL   FAIL   FAIL   FAIL 
base16-bytestring-0.1.1.5  OK      OK     OK     OK     OK     OK     FAIL    FAIL   FAIL   FAIL   FAIL   FAIL 
base16-bytestring-0.1.1.4  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.1.3  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.1.2  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.1.1  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.1.0  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP
base16-bytestring-0.1.0.0  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP  NO-IP   NO-IP  NO-IP  NO-IP  NO-IP  NO-IP

Please make revisions to 0.1.1.7, 0.1.1.6 and 0.1.1.5. Thank you in advance.

1.0.0.0 release planning

We should do a new minor release that includes #8 soon-ish.

We can also decide to fix #6 while we're at it, in which case the version number should be 0.1.2.0.

Allow `bytestring-0.12`

rejecting: base16-bytestring-1.0.2.0 (conflict: bytestring==0.12.0.2, base16-bytestring => bytestring>=0.9 && <0.12)

Lazy decoding broken when chunks don't have even length

Steps to reproduce:

Prelude> import qualified Data.ByteString.Base16.Lazy as BL16
Prelude BL16> import qualified Data.ByteString.Lazy as BSL
Prelude BL16 BSL> :set -XOverloadedStrings
Prelude BL16 BSL> BL16.encode "aB9"
"614239"
Prelude BL16 BSL> let encoded1 = BL16.encode "aB9"
Prelude BL16 BSL> let encoded2 = BSL.fromChunks ["614","239"]
Prelude BL16 BSL> BL16.decode encoded2
("aI#","")
Prelude BL16 BSL> BL16.decode encoded1
("aB9","")

Lazy decoding is not lazy when decoding fails

Lazy decoding is lazy when successful:

λ> (B.unpack . B.take 8 . fst . B.decode) (B.iterate id 48)
[0,0,0,0,0,0,0,0]

But it is not lazy when there is a decoding failure:

λ> (B.unpack . B.take 8 . fst . B.decode) (B.iterate id 47)

I would expect this second example to produce [], but it never terminates.

Broken reverse dependencies since 1.0.0

I believe the release broke at least:

and as a consequence all deps that depend on text-conversions:

and all deps that depend on string-interpolate:


Yes, I believe checking reverse dependencies is what we should do before a release: https://packdeps.haskellers.com/reverse/base16-bytestring

This will just be a revision update, so a hackage trustee could unbreak this. @phadej ?

Add 'decodeEither' function

This function is convenient. Here is the sample implementation of this function:

newtype Decode16Error = Decode16Error ByteString

-- | Decode base16-encoded ByteString.
decodeEither :: ByteString -> Either Decode16Error ByteString
decodeEither = handleError . decode
  where
    handleError (res,rest)
      | BS.null rest = Right res
      | otherwise = Left $ Decode16Error $ "suffix is not in base-16 format: " <> rest

Faulty handling of uppercase input

*Prelude Base16> Base16.encode . fst . Base16.decode $ BSC.pack "AA"
"bb"
*Prelude Base16> Base16.decode $ BSC.pack "FF"
("","FF")

There seems to be an off-by-one error in the decoding table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.