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!

Popular Pragmatic topics Top

brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New
Henrai
Hi, I’m working on the Chapter 8 of the book. After I add add the point_offset, I’m still able to see acne: In the image above, I re...
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
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New
dachristenson
@mfazio23 Android Studio will not accept anything I do when trying to use the Transformations class, as described on pp. 140-141. Googl...
New

Other popular topics Top

AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New

Latest in PragProg

View all threads ❯