ciel

ciel

Hands-on Rust B4.0 183 - amulet char ambiguous for epub and few other thoughts

First, I’m quite enjoying the book. This has been my favorite resource so far that I’ve found for rust. Most of the tiny errors I noticed have been fixed up in the latest version, and from reading some of the threads there’s even more fixes coming.

I used the epub version of the book for my run through (Beta 3). I haven’t gone through the new stuff in B4.0 but I noticed this in 3 and is still in 4.

On the apparently superior PDF version the character for the amulet is pretty clearly the pipe character.

But in the epub version, it’s not that obvious.

I thought the book had a typo doing a slash instead of the pipe character, but I realized way later on that strings and chars seem to be in italics. Which is confusing for the pipe character.

Another thing that “broke my flow”, was needing to get the updated dungeon font. When adding mobs/themes/items. Why not just give an “empty” one for people who want to customize on their own, and a “filled out” one to go through the book. I don’t think it’s really much of a “spoilers” thing since we go over the design doc before writing code for the dungeon crawler. I don’t know if this is a side effect of the book being released in parts and those things not being finalized just yet.

I don’t know if I missed it mentioning this in the book, but something that might be helpful to point out is that if they forget to put “mod X” in their mod.rs file (for example, mod player_input in the systems/mod.rs), they might not get autocompletion/formatting/etc from the rust tooling. I seemed to forget putting it in a few times and I was really confused on why I wasn’t getting errors checked or formatting fixed.

This last thing might just be a rust tools thing…
I’m wondering is if any one else is having issues with autocompletion when using “use crate::prelude::*;” while writing a sub-module? I’m using VSCode. The prelude doesn’t have a problem in the main crate level. This is usually no problem except for when I need something out of bracket-lib or legion. I have a CS degree and I didn’t learn how to write “Dijkstra” until this.

Most Liked

herbert

herbert

Author of Hands-on Rust

Wow, I had no idea that epub was going to cause an issue there. I’ll try to use a different glyph for the next beta.

I definitely agree on underlining the benefits of adding the mod x calls. It’s one of the topics that trips up newcomers to Rust (I understand why it doesn’t just include every .rs file - it’s helpful if you want to do advanced things like conditionally compile for a platform, but it’s confusing when you start). I’ll see if I can clarify that in a few places.

Which Rust plugin are you using for auto-complete? I’ve largely switched to rust-analyzer rather than the default Rust/RLS (it changed its name). It’s quite a bit faster, and generally pretty accurate on auto-complete by using a miniature version of the compiler. It’s come a long way recently; when I started the book, it was too unstable to recommend. Now, I’d have trouble living without it!

I’ll contemplate the font file. I may be able to claw back some page-count by making the font-file up front and reusing it. I need to strike a balance by not confusing people too much with a bunch of content up-front that won’t be used for several chapters. Anyone else want to chime in here? I’m leaning towards making the font up-front, just want to be sure that won’t confuse people!

Where Next?

Popular Pragmatic Bookshelf topics Top

jimmykiang
This test is broken right out of the box… — FAIL: TestAgent (7.82s) agent_test.go:77: Error Trace: agent_test.go:77 agent_test.go:...
New
GilWright
Working through the steps (checking that the Info,plist matches exactly), run the demo game and what appears is grey but does not fill th...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
jgchristopher
“The ProductLive.Index template calls a helper function, live_component/3, that in turn calls on the modal component. ” Excerpt From: Br...
New
brunogirin
When trying to run tox in parallel as explained on page 151, I got the following error: tox: error: argument -p/–parallel: expected one...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1021 17094 374
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
Exadra37
On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New

Sub Categories: