Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bits instances for strict and lazy bytestrings #110

Closed
andrewthad opened this issue Jan 9, 2017 · 4 comments
Closed

Bits instances for strict and lazy bytestrings #110

andrewthad opened this issue Jan 9, 2017 · 4 comments

Comments

@andrewthad
Copy link
Contributor

There is a well-defined Bits instance for bytestrings. Implementations for some of the functions, like shiftL and popCount, are not readily available but could be written. I would be willing to contribute this if the maintainers are interested.

@dcoutts
Copy link
Contributor

dcoutts commented Feb 13, 2017

Yes, I think this could be sensible. I guess it's a Bits instance in a similar way to how Integer is an instance right?

@andrewthad
Copy link
Contributor Author

This recently was discussed on reddit. To my understanding, the instance as you describe it makes sense, but there are some arguments against it that, for lack of greater elaboration, I don't really understand. I'd like to wait and think a little more before I go further with this.

@ysangkok
Copy link
Member

ysangkok commented Nov 4, 2019

@andrewthad What did you conclude?

@andrewthad
Copy link
Contributor Author

I concluded that this just isn't a very useful thing to do. Any time I wanted to do this, the type I really wanted to be working with was a 128-bit word or a 256-bit word. Fortunately, the wide-word library provides a good implementation of a 128-bit word, and I have very nearly added a 256-bit word data type to it. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants