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

Minor text improvements #3790

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Minor text improvements #3790

merged 3 commits into from
Apr 5, 2024

Conversation

Blatko1
Copy link
Contributor

@Blatko1 Blatko1 commented Nov 30, 2023

I have made changes to the book to increase clarity for specific sentences. Some of the changes are: removed/added commas where needed, added/removed articles before words where needed, broke down some sentences, simplified some expressions.

@StefanSalewski
Copy link

Thank you very much for providing the list of fixes. For me, as a non native English speaker, most look great. For a few I can not agree. This fix of you seems to be definitely wrong:

If you don’t see this information and check that Rust is in your %PATH% system variable as follows.

The original was fine:

If you don’t see this information, check that Rust is in your %PATH% system variable as follows.

For the following fix I do not really agree:

Original:

The opposite situation, where your project uses Rust 2018 and a dependency uses Rust 2015, works as well.

You have removed the comma after 2015, which I regard as wrong.

Original:

To be clear: most features will be available on all editions.

You replaced the colon with a comma. But still, the phrase is not really nice.

Original:

If you’d like an improvement in Rust, you can write up a proposal, called an RFC.

You removed the comma after proposal. For me the comma is fine, and GPT-4 agrees with me.

Original:

An important part of the process of learning Rust is learning how to read the
error messages the compiler displays: these will guide you toward working code.

You changed this to

An important part of learning Rust is learning how to read the
error messages the compiler displays: these will guide you toward working code.

Perhaps a tiny improvement, but the sentence is still awkward due to the verb "learning" occurring twice. This is what GPT-4 suggests instead:

"An important aspect of mastering Rust involves understanding how to interpret the error messages displayed by the compiler:"

OK, that is enough for today. May I ask, are you just a native speaker and careful reader, or have you used an AI tool like GPT-4 to find these issues? I did it with GPT-4 for my book about the Nim programming language earlier this year, and got hundreds of similar hints, which I all have merge manually, because a few have been wrong.

Best regards,

Dr. Stefan Salerwski

PS: I really hope all the provided fixes will finally be integrated into the book. I would then like to buy the fixed version and read (parts of it) again, as I was not able to remember all the details for the first reading. I think (and hope) that buying the book will support the Rust project -- I think I read such an statement somewhere some months ago?

@Blatko1
Copy link
Contributor Author

Blatko1 commented Dec 13, 2023

@StefanSalewski Hi, and thank you for reviewing my changes! After rereading some of my changes, I found that some really are wrong. In the next commit, all your suggestions will be applied.
Yes, I've used multiple AI models to find hints like these, and I have applied all of them manually, just like you did. Also, I have filtered a lot of proposed hints by the AI models because many would make the sentences worse. If I have time, I will do the same for the rest of the Rust book.
Do you maybe know why aren't the repository maintainers not reviewing and processing all the pull requests? I see that there are many of them, but non have any comments or reviewers.

@StefanSalewski
Copy link

Thanks you very much for your kind reply.

Unfortunately I have no insight into the details. I was using Nim in the last nine years, and finally decided to learn some Rust this winter. So I read the official Rust books some weeks ago. I am very thankful that it was available online, so I had not to buy it before deciding if I ever will really use Rust (There are many other interesting languages available as well, Go, Zig, Julia, Mojo, and some more). As the book was already printed by NoStarchPress, I assumed that it was already corrected by professional editors and proofreaders. So I assumed only a few context related issues left, and I reported a few as GitHub issues. Unfortunately, I have no information about the update politics for the book, I was also surprised by the many open issues and pull requests. I think, with these new insights, and as a non native English speaker, I should be just quite and wait for the next official version of the book, which I will buy when I should decide to continue using Rust as my primary programming languages.

Best regards,

Dr. Stefan Salewski

@Blatko1
Copy link
Contributor Author

Blatko1 commented Dec 14, 2023

Hello again!
I find it interesting that you are thinking about switching to Rust as your primary language after so many years of using Nim. May I ask why you are considering that (or maybe this isn't the place to discuss that)? By the way, I don't know much about Nim.
I also saw the conversation where you tagged this PR, and somebody said this PR is a bit too long. Is it abnormal for pull requests to be this long? Should I do something about it? I don't have much experience in this field.

@StefanSalewski
Copy link

Hello,

to your second question, your large pull request and the question if it is too big: I have no real experience with pull requests. But I assume that it is very problematic to fix all the issues of the Rust book by pull requests. If I consider all the content related issues I already reported, all the stuff I marked with the Textmarker Firefox plugin in the book, all the stuff others already reported as PRs or issues, and all the fixes you may find with AI tools, it might be very very much totally, and PRs may block each other. For my Nim book, I got in 2020 also some longer lists of grammar issues, which I all merged fully manually, and that was a lot of work. Later, I fed the whole book text section for section to GPT-4, and ask them to check for grammar issues. I think they found around 5 tiny issues per page, maybe 2500 totally. I proved and merged most of them manally, which took me about 300 hours. For the Rust book, I have no idea if someone of the authors is willing to spent so much work, or if they may just trust your pull request and merge them unchecked. So, maybe you should ask the authors before continuing? At least I have decided to pause reporting new issues until the next release of the Rust book has been published.

For my sad story with Nim: I used mostly Ruby until 2013, and then wanted to switch to a faster, and statically typed language. I considered Rust, which was really young at that time, and also discovered a few other languages, like Crystal, Go, and Nim. I decided to try Nim, which is really a nice language. Some sort of compiled Python with static types, typically fast as C or Rust. Nim was young that time, with a small community with a few bright and friendly users. I spend a lot of unpaid work for Nim -- the GTK bindings, modules like a delaunay triangulation, an RTree, and later, in early 2020 I started with the book, because some people had asked for a detailed beginner book. Unfortunately, Nim became never really popular, and over the time many people left the community. Some have even been banned by the project leaders for various reasons. These "leaders" have never been really friendly people, and in such a tiny community, it is difficult to continue using the language while at the same time avoiding all contact to them. I tried in the last two years -- deleted all my open Nim GitHub issues, and avoided use of their Forum. But that is difficult: New compiler versions made my old code not working any longer, or I got requests from other people about my GTK bindings, which I could not answer myself. So over the last two years, I observed that I have rarely used Nim at all, and typically just felt tired and unmotivated whenever I tried some Nim work. I think one of the last signs of their unfriendly behaviors was a comment in their forum about my book, see https://forum.nim-lang.org/t/10101#66729, but there have been many more. Actually, they just ignored my book from the beginning. Of course they can do whatever they want, maybe the book is just bad? But the point is, that I just lost all motivation to do any more Nim work. In this year, I have done nearly no Nim work, the only exception are some more grammar fixes in the book. And most of my friends left Nim as well even earlier. Initially I had some hope that I may get motivated again, but after 9 months without writing a single line of new Nim code, I lost the hope. I have still a larger project, which I converted in the last nine years from Ruby to Nim, see https://github.com/StefanSalewski/SDT. Converting that to another language is again some work, but not impossible. I am not yet sure if Rust will really become my new main language. Rust is not bad, and seems to have a welcoming community and leadership. But still, writing code is Rust is a bit harder compared to other languages. So I am considering other languages including Go, Zig, Julia, and Mojo as well. But this winter I will concentrate on learning some more Rust, I already started porting my tiny chess game from Nim to Rust as a small exercise.

Copy link
Contributor

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestions. Unfortunately, most of these are either unnecessary and in some cases actively wrong. I did identify one change worth keeping, though. If you are still interested in landing that one change, please update this PR to remove all the others or close it in favor of a new PR with that one change. Thanks!

@@ -45,7 +45,7 @@ The `Debug` trait allows you to print instances of a type for debugging
purposes, so you and other programmers using your type can inspect an instance
at a particular point in a program’s execution.

The `Debug` trait is required, for example, in use of the `assert_eq!` macro.
The `Debug` trait is required, for example, in using the `assert_eq!` macro.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is a good grammatical fix.

@chriskrycho chriskrycho added this to the appendix milestone Apr 3, 2024
@Blatko1 Blatko1 requested a review from chriskrycho April 4, 2024 17:11
Copy link
Contributor

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

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

Thank you!

@chriskrycho chriskrycho merged commit ca38b93 into rust-lang:main Apr 5, 2024
2 checks passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 9, 2024
Update books

## rust-lang/book

23 commits in 19c40bfd2d57641d962f3119a1c343355f1b3c5e..3131aa4642c627a24f523c82566b94a7d920f68c
2024-04-05 22:09:59 UTC to 2024-03-27 18:14:05 UTC

- Correct the description of Listing 5-6 (rust-lang/book#3878)
- Minor text improvements (rust-lang/book#3790)
- Update full code reference main.rs in ch20-03 (rust-lang/book#3857)
- Make Note text in ch. 20 consistent with other notes (rust-lang/book#3876)
- Consistency fix: start note sentence with a capital (rust-lang/book#3652)
- Update README.md (rust-lang/book#3656)
- Update panic! formatting style for Guess example (rust-lang/book#3767)
- Small correction in ch13-01 (rust-lang/book#3780)
- Fix a wording typo in ch07 (rust-lang/book#3694)
- Fix a typo: remove an extra 's' from ch. 18.01 (rust-lang/book#3874)
- Remove redundant words (rust-lang/book#3672)
- Fix rust-lang#3703 (rust-lang/book#3704)
- Update loop to Result: 10 (rust-lang/book#3711)
- Added "--" between run and args on ch12-03-l12 (rust-lang/book#3726)
- Add  maintenance time section in  appendix-07-nightly-rust.md  (rust-lang/book#3859)
- Update the link to the farsi translation repository (rust-lang/book#3839)
- Update README to use --locked for installing mdbook (rust-lang/book#3830)
- Reword "`union`s" to "a `union`" (rust-lang/book#3738)
- Fix two typos in 04-03 and 07-03 (rust-lang/book#3849)
- Fix typo in Chapter 7 Section 3 (rust-lang/book#3743)
- Improve ch03-05-control-flow collection looping wording (rust-lang/book#3758)
- Fix missing column separator (rust-lang/book#3855)
- Update compiler message (rust-lang/book#3856)

## rust-lang/edition-guide

3 commits in 98b33e9a441457b0a491fe1be90e7de64eafc3e5..eb3eb80e106d03250c1fb7c5666b1c8c59672862
2024-03-27 20:44:27 UTC to 2024-03-26 19:26:15 UTC

- some mdbook conveniences (rust-lang/edition-guide#297)
- typo (rust-lang/edition-guide#296)
- Clean up the `editions/index.md` page (rust-lang/edition-guide#294)

## rust-embedded/book

1 commits in 2e95fc2fd31d669947e993aa07ef10dc9828bee7..aa7d4b0b4653ddb47cb1de2036d090ec2ba9dab1
2024-04-05 07:42:54 UTC to 2024-04-05 07:42:54 UTC

- Dependencies: changed "qemu-arch-extra" to "qemu-system-arm" on arch section (rust-embedded/book#368)

## rust-lang/nomicon

2 commits in 6bc2415218d4dd0cb01433d8320f5ccf79c343a1..0d5f88475fe285affa6dbbc806e9e44d730797c0
2024-04-06 13:51:11 UTC to 2024-04-03 02:23:07 UTC

- chore: fix typo (rust-lang/nomicon#448)
- add link to reference about undefined behavior (rust-lang/nomicon#447)

## rust-lang/reference

3 commits in 984b36eca4b9293df04d5ba4eb5c4f77db0f51dc..55694913b1301cc809f9bf4a1ad1b3d6920efbd9
2024-04-03 21:31:14 UTC to 2024-04-01 19:56:13 UTC

- Add the `#[diagnostic]` attribute namespace and the `#[diagnostic::on_unimplemented]` feature to the reference (rust-lang/reference#1449)
- type-layout: be more specific about 32-bit alignments (rust-lang/reference#1393)
- Fix clippy warning in procedural macro example (rust-lang/reference#1488)

## rust-lang/rust-by-example

1 commits in 7601e0c5ad29d5bd3b518700ea63fddfff5915a7..60d34b5fd33db1346f9aabfc0c9d0bda6c8e42be
2024-04-07 13:00:53 UTC to 2024-04-07 13:00:53 UTC

- chore: fix some typos (rust-lang/rust-by-example#1833)

## rust-lang/rustc-dev-guide

11 commits in ffa246b..b77a34b
2024-04-06 20:41:09 UTC to 2024-03-27 08:49:05 UTC

- Explicitly mention compiletest directives are supported in rmake.rs (rust-lang/rustc-dev-guide#1949)
- Add docs for sharded descriptions (rust-lang/rustc-dev-guide#1959)
- Add basic docs for the new `aux-bin` header (rust-lang/rustc-dev-guide#1942)
- Add needs-threads header command (rust-lang/rustc-dev-guide#1943)
- Fix some broken links under bootstrapping. (rust-lang/rustc-dev-guide#1958)
- Replace -Zno-parallel-llvm with -Zno-parallel-backend (rust-lang/rustc-dev-guide#1957)
- Rewrite the `Parameter Environments` chapter (rust-lang/rustc-dev-guide#1953)
- Add quickstart for how to build and run the compiler (rust-lang/rustc-dev-guide#1951)
- Delete length check (rust-lang/rustc-dev-guide#1952)
- Fix some comments (rust-lang/rustc-dev-guide#1950)
- add opaque-types-region-inference-restrictions (rust-lang/rustc-dev-guide#1948)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2024
Rollup merge of rust-lang#123636 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

23 commits in 19c40bfd2d57641d962f3119a1c343355f1b3c5e..3131aa4642c627a24f523c82566b94a7d920f68c
2024-04-05 22:09:59 UTC to 2024-03-27 18:14:05 UTC

- Correct the description of Listing 5-6 (rust-lang/book#3878)
- Minor text improvements (rust-lang/book#3790)
- Update full code reference main.rs in ch20-03 (rust-lang/book#3857)
- Make Note text in ch. 20 consistent with other notes (rust-lang/book#3876)
- Consistency fix: start note sentence with a capital (rust-lang/book#3652)
- Update README.md (rust-lang/book#3656)
- Update panic! formatting style for Guess example (rust-lang/book#3767)
- Small correction in ch13-01 (rust-lang/book#3780)
- Fix a wording typo in ch07 (rust-lang/book#3694)
- Fix a typo: remove an extra 's' from ch. 18.01 (rust-lang/book#3874)
- Remove redundant words (rust-lang/book#3672)
- Fix rust-lang#3703 (rust-lang/book#3704)
- Update loop to Result: 10 (rust-lang/book#3711)
- Added "--" between run and args on ch12-03-l12 (rust-lang/book#3726)
- Add  maintenance time section in  appendix-07-nightly-rust.md  (rust-lang/book#3859)
- Update the link to the farsi translation repository (rust-lang/book#3839)
- Update README to use --locked for installing mdbook (rust-lang/book#3830)
- Reword "`union`s" to "a `union`" (rust-lang/book#3738)
- Fix two typos in 04-03 and 07-03 (rust-lang/book#3849)
- Fix typo in Chapter 7 Section 3 (rust-lang/book#3743)
- Improve ch03-05-control-flow collection looping wording (rust-lang/book#3758)
- Fix missing column separator (rust-lang/book#3855)
- Update compiler message (rust-lang/book#3856)

## rust-lang/edition-guide

3 commits in 98b33e9a441457b0a491fe1be90e7de64eafc3e5..eb3eb80e106d03250c1fb7c5666b1c8c59672862
2024-03-27 20:44:27 UTC to 2024-03-26 19:26:15 UTC

- some mdbook conveniences (rust-lang/edition-guide#297)
- typo (rust-lang/edition-guide#296)
- Clean up the `editions/index.md` page (rust-lang/edition-guide#294)

## rust-embedded/book

1 commits in 2e95fc2fd31d669947e993aa07ef10dc9828bee7..aa7d4b0b4653ddb47cb1de2036d090ec2ba9dab1
2024-04-05 07:42:54 UTC to 2024-04-05 07:42:54 UTC

- Dependencies: changed "qemu-arch-extra" to "qemu-system-arm" on arch section (rust-embedded/book#368)

## rust-lang/nomicon

2 commits in 6bc2415218d4dd0cb01433d8320f5ccf79c343a1..0d5f88475fe285affa6dbbc806e9e44d730797c0
2024-04-06 13:51:11 UTC to 2024-04-03 02:23:07 UTC

- chore: fix typo (rust-lang/nomicon#448)
- add link to reference about undefined behavior (rust-lang/nomicon#447)

## rust-lang/reference

3 commits in 984b36eca4b9293df04d5ba4eb5c4f77db0f51dc..55694913b1301cc809f9bf4a1ad1b3d6920efbd9
2024-04-03 21:31:14 UTC to 2024-04-01 19:56:13 UTC

- Add the `#[diagnostic]` attribute namespace and the `#[diagnostic::on_unimplemented]` feature to the reference (rust-lang/reference#1449)
- type-layout: be more specific about 32-bit alignments (rust-lang/reference#1393)
- Fix clippy warning in procedural macro example (rust-lang/reference#1488)

## rust-lang/rust-by-example

1 commits in 7601e0c5ad29d5bd3b518700ea63fddfff5915a7..60d34b5fd33db1346f9aabfc0c9d0bda6c8e42be
2024-04-07 13:00:53 UTC to 2024-04-07 13:00:53 UTC

- chore: fix some typos (rust-lang/rust-by-example#1833)

## rust-lang/rustc-dev-guide

11 commits in ffa246b..b77a34b
2024-04-06 20:41:09 UTC to 2024-03-27 08:49:05 UTC

- Explicitly mention compiletest directives are supported in rmake.rs (rust-lang/rustc-dev-guide#1949)
- Add docs for sharded descriptions (rust-lang/rustc-dev-guide#1959)
- Add basic docs for the new `aux-bin` header (rust-lang/rustc-dev-guide#1942)
- Add needs-threads header command (rust-lang/rustc-dev-guide#1943)
- Fix some broken links under bootstrapping. (rust-lang/rustc-dev-guide#1958)
- Replace -Zno-parallel-llvm with -Zno-parallel-backend (rust-lang/rustc-dev-guide#1957)
- Rewrite the `Parameter Environments` chapter (rust-lang/rustc-dev-guide#1953)
- Add quickstart for how to build and run the compiler (rust-lang/rustc-dev-guide#1951)
- Delete length check (rust-lang/rustc-dev-guide#1952)
- Fix some comments (rust-lang/rustc-dev-guide#1950)
- add opaque-types-region-inference-restrictions (rust-lang/rustc-dev-guide#1948)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants