-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Inconsistency in representation of binary strings #11412
Comments
I don't follow. 10 bytes is |
The command's first example is probably confusing. It says:
but then uses a filesize, Also, the integer example should maybe use a binary literal |
those changes, Ian, seem reasonable. |
This was the source of my confusion. I assumed that B is for bytes and b is for bits and that is the general consensus. For example, in Vim the unit for characters is B for bytes. There is also no documentation on various formats of integer at the moment. Traditionally in C we have:
In Rust, the formats also follow the same convention, Because of these assumptions, I thought that Nu allowed an extra format, e.g. |
we have |
That makes sense now. Thanks. |
@nkarl |
I was misunderstanding the behavior. It's all clear to me now. Thanks |
Describe the bug
001b
0b01
Only the second format is functional when used with
into bits
. Inhelp bits
the format used is the first format.How to reproduce
010b | into bits
0b10 | into bits
Expected behavior
010b | into bits
should evaluate to00000010
.00001010
.Screenshots
Configuration
Additional context
No response
The text was updated successfully, but these errors were encountered: