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

[Feature Request] {To, From}Bytes Protocol #182

Open
lsh opened this issue May 18, 2023 · 0 comments
Open

[Feature Request] {To, From}Bytes Protocol #182

lsh opened this issue May 18, 2023 · 0 comments
Labels
enhancement New feature or request mojo Issues that are related to mojo mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library

Comments

@lsh
Copy link
Contributor

lsh commented May 18, 2023

The other night I was trying to follow the Implement DNS in a weekend course in Mojo. In the course they use struct.pack to make the byte array for the DNS query. Since Mojo has actual sized int types, it might make more sense to have a protocol that describes conversion to and from bytes. One particular caveat is byte ordering, so if this protocol were added it would probably have a to_le_bytes() and to_be_bytes() (though one could possible be inferred from the other).

@lsh lsh added the enhancement New feature or request label May 18, 2023
@ematejska ematejska added the mojo Issues that are related to mojo label Sep 7, 2023
@ematejska ematejska added the mojo-repo Tag all issues with this label label Apr 29, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 3, 2024 — with Linear
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 6, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 6, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo Issues that are related to mojo mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library
Projects
None yet
Development

No branches or pull requests

2 participants