GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — doc: clarify examples section in REPL doc by dario-piotrowicz · Pull Request #57762 · nodejs/node Conversation
|
| before | after |
|---|---|
(the examples are under the multiple REPL section) |
(the examples are listed on their own) |
they link to old gists with code that uses outdates JS syntax (e.g var) and deprecated utilities (e.g. new Buffer)
(so not something really ideal to present as an official example)
the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples
(this might be just me, but when I read the text there it really looked to me like the warning was referring to both examples and that This example was likely a typo and that These examples was supposed to be used)
| before | after |
|---|---|
![]() |
the warning is ananbiguously in the section specific for the example |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bb2fea9 to
1edd98a
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it still makes sense to link to an external gist, maybe we should copy the code over (not sure how it's licensed though it seems short enough to not fall under copyrightable code).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I totally agree, an external gist to a personal github user feels off to me 😕
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
IMO, We should create our own example derived from the sample and still link over to the gist for credit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I can definitely do that 🙂👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done 🙂 0c1abbe
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, one last question! 🙂
Do you think that the multi REPL section should also be moved under the new examples section? 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues
Capitalize list items Co-authored-by: Antoine du Hamel <[email protected]>
29b0720 to
0c1abbe
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| // Hack to thread stdin and stdout | ||
| // simultaneously in curl's single thread | ||
| const iv = setInterval(() => { | ||
| res.write(buf0); | ||
| }, 100); | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed? I can't see what difference it makes
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No I just tried the example without it (I'm on Ubuntu) and it does not seem necessary
I wasn't actually fully sure why this was needed and feared that removing might break the example under some conditions / on some platform? 🤷
However do think that quite likely this is not needed, so I'm totally happy removing it, we can always re-add it if in some cases it is right? 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Removed 🙂 a977fbe
(PS: thanks so much for the suggestion 🫶)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <[email protected]>
|
Landed in b396991 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The current examples presented at the bottom of the REPL doc have two issues: - they look like they're part of the section above (on how to run multiple REPL instances in the same process) but they are not - the alert informing readers not to use the second example in production environments can be wrongly interpreted as to refer to both examples The changes here address both these issues PR-URL: #57762 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.