Update translations from SUMMARY.md.
Unfortunately, poedit changes the wrapping length of the po files and I
could not get it back by changing the poedit setting for line length. I
believe we won't get any more of these noisy diffs for my further
changes this week.
`Cancellation` is the last item I modified in this PR.
---------
Co-authored-by: Hidenori Kobayashi <hidenorik@google.com>
Without this, compilation fails. The comment *is* in the included Rust
file — but we only include a fraction of the file to keep the example
short. This makes it cumbersome to both show something that works in the
slides while also making it possible for the instructor to show more
complex examples.
@randomPoison, we need to make our examples simpler here: the complexity
here makes it hard to modify the files and I feel it's hard to show
during class. I would suggest splitting this up into a very basic
example (what the birthday service was) and then add 1-2 slides with
more complex samples (if necessary). Last I taught the class, I had a
hard time a) making every example compile and b) finding time to cover
everything.
I would err on the side of makings things simple and clear.
The page is not mentioned in the `SUMMARY.md` file and has apparently
been forgotten.
We could consider adding a check for this situation, but since I don't
think it occurs very often, I don't consider it high priority.
This is a first draft for a test framework for testing the JS part of
the book that is discussed in #2462
It is using [webdriverIO](https://webdriver.io/) and the webdriverIO
[Expect API](https://webdriver.io/docs/api/expect-webdriverio/) in
combination with [Mocha](https://mochajs.org/). WebdriverIO is taking
care of accessing the webpage with a real browser and can access the
state of the page so behavior can be asserted.
Currently only a small test for the speaker-notes implementation demos
the functionality.
The [Static Server
Service](https://webdriver.io/docs/static-server-service/) is used to
serve the book in a way that the test runner can access it.
A CI integration can look like https://webdriver.io/docs/githubactions/
and is implemented with a headless setup. In CI it uses the language
variable to set environment variable that configures where the built
book should be mounted from
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
I don't know how controversial this is, but I would recommend against
using type aliases where a newtype can be used instead.
Personally, I don't like type aliases much since I feel they cause extra
indirection: I will inevitably have to go look up the alias the first
many times I encounter it. Nothing will tell me to apply the type alias
consistently, and I dislike having multiple names for the same thing.
But I'm sure some people love them, so now I'm just gently reminding
people that newtypes can be a better alternative.
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[arm-gic](https://github.com/google/arm-gic).
Updates `arm-gic` from 0.1.1 to 0.1.2
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
Updates `cc` from 1.1.31 to 1.2.2
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group in /src/exercises/bare-metal/compass with 1
update: [cortex-m-rt](https://github.com/rust-embedded/cortex-m).
Updates `cortex-m-rt` from 0.7.4 to 0.7.5
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group in /src/bare-metal/microcontrollers/examples with
1 update: [cortex-m-rt](https://github.com/rust-embedded/cortex-m).
Updates `cortex-m-rt` from 0.7.3 to 0.7.5
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group in /src/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
Updates `cc` from 1.1.31 to 1.2.2
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Reverts google/comprehensive-rust#2397
I'm seeing
```
POST https://play.rust-lang.org/execute 500 (Internal Server Error)
```
on every request when trying to run code in the Playground. I'm not sure
why, but we need to revert this ASAP if others see the same.
Add a stderr block.
Pros:
- we can make use of dbg macro in our code Cons:
- there's a limitation that the compile message also shows
Applies patches from rust-lang/mdBook#1315 since the original change was
not merged by rust-lang.
Issue: #531
Signed-off-by: Alx-Lai <alexabc722@gmail.com>
Let me refresh the po file, since I plan to work on some of the fuzzy
translation stuff this week.
This is basically output of only doing: `msgmerge --update po/ja.po
book/xgettext/messages.pot` and removing a few fuzzy tags for obviously
correct translations.
Co-authored-by: Hidenori Kobayashi <hidenorik@google.com>
Some lines were much longer than others. They are now consistently
wrapped at 70 columns. Why so short, why not 80 or 90? Because we
sometimes need to browse these files during class, and there we don’t
have a lot of horizontal space when using large fonts.
Naming the slide “Bare-Metal Android” avoids an annoying situation
when searching: before, searching for “android” would list this slide
as a top hit because it matches the search term precisely. This meant
that the whole Rust in Android section course was harder to find.
With this change, the “Welcome to Rust in Android” page becomes easier
to find.
to catch wrong `right == 0` checks.
To change the number like this catches for example a wrong
implementation only looking if `right_result` is zero, but not checking
if we are doing a division.
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When reading the code without an IDE, I find it useful to use explicit
module names, especially when items come from the standard library.
So `io::Error` instead of just `Error`, especially when people have
just been told about `std::error::Error` as well.
I also omitted most single-use items: I find it has less cognitive
overhead to say “we import `fmt`” and then later use `fmt::Display`
and `fmt::Formatter` in the code. It’s clear from the name that these
two things have something to do with formatting.
Finally, I made a few usages more consistent so that we refer to each
item in the same way within a single codeblock.
Despite good intentions, I have not actually been able to make this
work in a classroom.
I suggest we remove it for now and later replace it with a guided
exercise: something where we ask students to write a AIDL client for a
simple system service.