GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — named anonymous functions in readline & zlib.js by antsmartian · Pull Request #21792 · nodejs/node

Conversation

@antsmartian

@antsmartian antsmartian commented Jul 13, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added readline Issues and PRs related to the built-in readline module. zlib Issues and PRs related to the zlib module and its compression dependencies. labels Jul 13, 2018
apapirovski
apapirovski reviewed Jul 13, 2018
View reviewed changes

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Hi @antsmartian, the goal of naming these functions should be to make a more useful name than the anonymous one. Please try to consider the use cases for these functions and name based on that. In particular this applies to fnWrap.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@antsmartian

antsmartian commented Jul 13, 2018

Copy link
Copy Markdown
Contributor Author

Yeah sure. Will do the same and update.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@antsmartian

antsmartian commented Jul 13, 2018

Copy link
Copy Markdown
Contributor Author

@apapirovski Ok, I did skimmed the source code of zlip.js, looks like we can use syncBufferWrapper, as this function just returns the zlibBufferSync and used for different compression formats like gzip, gunzip etc in sync mode. Similary, for zlibBuffer, we can name it as asyncBufferWrapper as the implementation of zlibBuffer is based on event emitters (async). Let me know if I'm wrong otherwise here.

For SIGCONT, I better rename the function to be continueProcess, as I guess that suits more natural. Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@antsmartian
antsmartian force-pushed the anonymous_functions branch from 31d0635 to 6e0e792 Compare July 14, 2018 13:23
apapirovski
apapirovski approved these changes Jul 15, 2018
View reviewed changes
Comment thread lib/readline.js Outdated

@apapirovski apapirovski Jul 15, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

So we could actually do a slightly better thing here. Instead of the IIFE, we could use an arrow function and replace self with this — unless I'm missing something. Then we will just have a normal event callback instead of this weird thing it is right now. Feel free to either do that change here or in a separate PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@antsmartian antsmartian Jul 16, 2018

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yes that make sense, may be will update the same in another PR. Thanks for your time on this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trivikr

trivikr commented Jul 16, 2018

Copy link
Copy Markdown
Member

Thank you @antsmartian for your first PR in Node.js core!

The user.email needs to be updated in the commit as specified in this step
The current user.email is not registered with Github

antsmartian reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@antsmartian
readline & zlib.js: named anonymous functions
d8ec3d9
@antsmartian
antsmartian force-pushed the anonymous_functions branch from 6e0e792 to d8ec3d9 Compare July 16, 2018 17:07
@antsmartian

antsmartian commented Jul 16, 2018

Copy link
Copy Markdown
Contributor Author

@trivikr Thanks, for some reason, my git config wasn't correct. Now fixed.

trivikr reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

trivikr
trivikr approved these changes Jul 17, 2018
View reviewed changes
cjihrig
cjihrig approved these changes Jul 17, 2018
View reviewed changes
hiroppy
hiroppy approved these changes Jul 17, 2018
View reviewed changes
jasnell
jasnell approved these changes Jul 17, 2018
View reviewed changes
@trivikr

trivikr commented Jul 18, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/15928/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Jul 29, 2018

Copy link
Copy Markdown
Contributor

CI: https://ci.nodejs.org/job/node-test-pull-request/16061/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski apapirovski added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 29, 2018
maclover7
maclover7 approved these changes Jul 30, 2018
View reviewed changes
@maclover7

maclover7 commented Jul 30, 2018

Copy link
Copy Markdown
Contributor

Resumed CI: https://ci.nodejs.org/job/node-test-pull-request/16082/

antsmartian reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7

maclover7 commented Aug 2, 2018

Copy link
Copy Markdown
Contributor

Resumed once again, infrastructure issue on OSX: https://ci.nodejs.org/job/node-test-pull-request/16141/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr

trivikr commented Aug 2, 2018

Copy link
Copy Markdown
Member

Landed in fc6f49a

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr closed this Aug 2, 2018
trivikr pushed a commit that referenced this pull request Aug 2, 2018
@antsmartian @trivikr
readline,zlib: named anonymous functions
fc6f49a
PR-URL: #21792
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
targos pushed a commit that referenced this pull request Aug 2, 2018
@antsmartian @targos
readline,zlib: named anonymous functions
76a6592
PR-URL: #21792
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
@antsmartian
antsmartian deleted the anonymous_functions branch August 4, 2018 08:39
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
@trivikr trivikr trivikr approved these changes
+3 more reviewers
@apapirovski apapirovski apapirovski approved these changes
@maclover7 maclover7 maclover7 approved these changes
@hiroppy hiroppy hiroppy approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. readline Issues and PRs related to the built-in readline module. zlib Issues and PRs related to the zlib module and its compression dependencies.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@antsmartian @trivikr @apapirovski @maclover7 @jasnell @cjihrig @hiroppy @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.