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

Byte representation #59

Closed
GregTheGreek opened this issue Dec 17, 2018 · 9 comments
Closed

Byte representation #59

GregTheGreek opened this issue Dec 17, 2018 · 9 comments

Comments

@GregTheGreek
Copy link
Member

Related to #35
Is your feature request related to a problem? Please describe.
We are somewhat restricted in regards to what we can do with bytes.

Describe the solution you'd like
Ideally something native to vanilla JS, C/C++ bridge or WASM.

Describe alternatives you've considered
Webpack so we can use class Buffer() from node. Not ideal.

This was referenced Dec 17, 2018
@aunyks
Copy link
Contributor

aunyks commented Dec 20, 2018

Is this for individual bytes or byte arrays? If the latter, why isn't Buffer ideal?

@GregTheGreek
Copy link
Member Author

We're updating our contributers and "mission statement" so to speak. Our ideal goal is to not use node, so we can maintain browser support. Without using webpack/browserify/et al

@aunyks
Copy link
Contributor

aunyks commented Dec 20, 2018

Uint8Array is a great runtime-agnostic representation of bytes imo.

Although I must ask: how is networking planned to take place without assuming Node as the target runtime and then browserifying for the browser? Is there an isomorphic TCP library? Basically I'm asking how p2p stuff is gonna go down in the browser.

@GregTheGreek
Copy link
Member Author

You make a good point, maybe I should clarify. The goal is to use it as little as possible. I think we can get away with a TCP library, we had someone make a poc for a wallet app, not sure how extensive it is though...

@ansermino
Copy link
Member

Can you please elaborate on this? What are you trying to do with bytes and can't?

@GregTheGreek
Copy link
Member Author

This is outdated tbh. Bytes 8array put us in the right direction

@ansermino
Copy link
Member

Does that mean we can close this?

@wemeetagain
Copy link
Member

not related to just this issue but:

I believe we're going to need to use a bundler of some sort, regardless if we use Buffer or not, to run this software on the web.
Web JS can't just simply import x from y nor can it require(z) without being linked together beforehand.

@GregTheGreek
Copy link
Member Author

GregTheGreek commented Dec 22, 2018

Mmm, this is true with plain HTML. Best case scenario is meant for react, angular etc... That way we can get away without it.

wemeetagain added a commit that referenced this issue Aug 2, 2019
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

4 participants