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 Prag Prog topics Top

ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
edruder
I thought that there might be interest in using the book with Rails 6.1 and Ruby 2.7.2. I’ll note what I needed to do differently here. ...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
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
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
oaklandgit
Hi, I completed chapter 6 but am getting the following error when running: thread 'main' panicked at 'Failed to load texture: IoError(O...
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
AufHe
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113. Iteration A1 - Seeing the list of prod...
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

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
AstonJ
Or looking forward to? :nerd_face:
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
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
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
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New

Latest in PragProg

View all threads ❯