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

std/node: add buffer module #5374

Closed
EvanHahn opened this issue May 14, 2020 · 4 comments
Closed

std/node: add buffer module #5374

EvanHahn opened this issue May 14, 2020 · 4 comments
Labels

Comments

@EvanHahn
Copy link
Contributor

For completeness, we should add a polyfill for Node's buffer module.

@jamilservicos
Copy link

I believe that many depend on Buffer.
so publishing an alternative to the nodejs buffer commands, could open the door to many migrations and adaptations.
mainly for encryption modules.

but it doesn't have to be exactly a compatibility for the nodejs Buffer, being the same done in C, the deno could include its own version in the native module with aliases for the already known methods, to facilitate the migration from one language to another.

@seishun
Copy link
Contributor

seishun commented May 24, 2020

I'm currently working on it.

@ahuggins-nhs
Copy link

ahuggins-nhs commented Sep 14, 2020

@seishun I'd like to contribute, but I find the current work on an implementation a little confusing. I'm trying to understand what the goal is, because I don't understand if the effort is simply to polyfill, or if the effort is to also depend on decoders/encoders provided in deno's std lib.

A polyfill exists currently; is there a good reason to roll all "new" code for this instead of porting the previous art with its permissive license? Can you help me understand the direction?

Once I can wrap my head around that, I'll have a better idea of how to spend efforts contributing.

Edit: this will go a long way toward porting EDI/AS2 libraries I wrote for Node that I now regret tangling up in Node's streaming pattern(s). Having a Buffer implementation will make it easier to port cross-platform; at that point, all I'll need to do is kill the Node stream support in favor of WhatWG Streams.

Edit2: I also see this issue: #3403 and I'm wondering if discussion should be done over there instead?

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@stale stale bot closed this as completed Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants