bigfleet

bigfleet

Hands-on Rust: treehouse or hello_yourname? (pg. 20)

In the “Prompting for the Visitor’s Name” section, contextually, the reader has just created the treehouse project. As they look for a prompt to which file to edit, they see, in the blue highlighted section,

FirstStepsWithRust/hello_yourname/src/main.rs

This appears to be a delightful convention that allows the source to be downloaded directly-- awesome!! – but the reader was in the treehouse, not hello_yourname. A small info box that explains the convention, and how to (perhaps) focus on the filename after src for their own work may be helpful.

Marked As Solved

herbert

herbert

Author of Hands-on Rust

Thanks for reporting the issue! I’ve put it into the issue tracker, I’ll try to clean it up for beta 3. There’s a note in the preface about source examples advancing through the chapter, but it’s not as clear as I’d like it to be - so I’ll see if I can make it more explicit in the body text. The “embed source” feature of the book builder is awesome in general, but does make it tricky when a chapter needs to work over multiple examples (I wanted to provide the reader with source for steps along the way, rather than a big dump of the final product of each chapter; the journey is more important than the destination for learning a language).

I’m not sure if the system will let me change the rendering of the source names, so it’ll probably take the form of a note that it’s advanced to the next section. (I’ll also triple-check that I intended to advance at each point).

Thanks - beta 3 will clear this up. :slight_smile:

Also Liked

seanjseymour

seanjseymour

Wow, I didn’t realize that the highlighted sections were links to source, that is great! It also explains what happened to cause the errata in my post. Looks like the source code changed but the book didn’t. I agree, calling this convention out more explicitly would be useful.

Popular Pragmatic topics Top

jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
New
jskubick
I’m running Android Studio “Arctic Fox” 2020.3.1 Patch 2, and I’m embarrassed to admit that I only made it to page 8 before running into ...
New
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
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
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
Keton
When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New

Other popular topics Top

AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
New

Latest in PragProg

View all threads ❯