Skip to content

Implement FileWrite#5

Closed
qti3e wants to merge 1 commit into
denoland:masterfrom
qti3e:q/writefile
Closed

Implement FileWrite#5
qti3e wants to merge 1 commit into
denoland:masterfrom
qti3e:q/writefile

Conversation

@qti3e

@qti3e qti3e commented May 29, 2018

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread util.ts Outdated
export function strToUint8Array(str: string): Uint8Array {
const ab = new ArrayBuffer(str.length);
const ta = new Uint8Array(ab);
ta.forEach((_, i) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use .map ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YurySolovyov thank you : )

@styfle

styfle commented Jun 1, 2018

Copy link
Copy Markdown
Contributor

I'm curious, why this is named fileWrite instead of writeFile?

@qti3e

qti3e commented Jun 1, 2018

Copy link
Copy Markdown
Contributor Author

@styfle because it's going to have the same behaviour of good old write function, so we should call it write but then the name would be confusing so we should say it's write function from file family. (a group of functions).
So simply File.Write -> FileWrite : )
man 2 write

@styfle

styfle commented Jun 1, 2018

Copy link
Copy Markdown
Contributor

Go lang uses ioutil.WriteFile and Node.js uses fs.writeFile so I was expecting writeFile but I guess FileWrite is fine too 😅

@kevinkassimo

Copy link
Copy Markdown
Contributor

Need to update sendMsg to pubInternal, see #136

@gillchristian gillchristian mentioned this pull request Jun 10, 2018
@ry

ry commented Jun 22, 2018

Copy link
Copy Markdown
Member

@qti3e we will revisit rust soon. Closing this now.

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

Successfully merging this pull request may close these issues.

5 participants