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

Edits to reference material #5528

Closed
1 of 17 tasks
nickmcintyre opened this issue Jan 8, 2022 · 4 comments
Closed
1 of 17 tasks

Edits to reference material #5528

nickmcintyre opened this issue Jan 8, 2022 · 4 comments
Labels

Comments

@nickmcintyre
Copy link
Member

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Details about the bug:

Hello! I'm in the process of translating a subset of the p5.js reference to Python here and am collecting minor edits as I go along. Here is an example from frameRate:

rectX = rectX += 1; // Move Rectangle

should probably be

rectX = rectX + 1; // Move Rectangle

Most of the edits fix minor typos and grammatical errors. I'm through the DOM section and have edited the following docs:

  • frameCount
  • frameRate
  • fill
  • stroke
  • ellipse
  • circle
  • quad
  • rect
  • rectMode
  • beginShape
  • endShape
  • DEGREES
  • noLoop
  • looping
  • p5.Element
  • createSlider
  • createCheckbox
  • createSelect
  • createRadio
  • createColorPicker

I still have a day or two of work ahead of me and would love to contribute something back once finished.

Would it be helpful for me to edit the inline documentation and open a pull request? If so, is there a way to do so that won't make people's eyes glaze over?

@limzykenneth
Copy link
Member

You can go ahead and file them with one PR. No specific way to do this but it could take longer for us to review this if it is a big PR, so just be patient with it.

@soegaard
Copy link

The intention was probably to write:

rectX += 1;

The effect is the same. The command

 rectX = rectX += 1;

is parsed as

 rectX = (rectX += 1);

.

First (rectX += 1) is evaluated. The effect is to increment rectX and the value of the expression
is the new value. This new value is then, due to

     rectX = 

stored in rectX.

That is, the mistake is benign in the sense that the both

     rectX = rectX += 1;

and

     rectX += 1;

have the same result.

@nickmcintyre
Copy link
Member Author

That is, the mistake is benign in the sense that the both

Agreed! The code runs fine, but it probably wasn't the original author's intent to highlight this particular language feature. The statement happens to be illegal in Python and caught my attention, so I highlighted it.

The rest of my suggested edits are all minor typos and grammatical errors.

@limzykenneth
Copy link
Member

Addressed by #5560

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

3 participants