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.

Where Next?

Popular Pragmatic Bookshelf topics Top

johnp
Running the examples in chapter 5 c under pytest 5.4.1 causes an AttributeError: ‘module’ object has no attribute ‘config’. In particula...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
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
jgchristopher
“The ProductLive.Index template calls a helper function, live_component/3, that in turn calls on the modal component. ” Excerpt From: Br...
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
mert
AWDWR 7, page 152, page 153: Hello everyone, I’m a little bit lost on the hotwire part. I didn’t fully understand it. On page 152 @rub...
New
jwandekoken
Book: Programming Phoenix LiveView, page 142 (157/378), file lib/pento_web/live/product_live/form_component.ex, in the function below: d...
New
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
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
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
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
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
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
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
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
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

Sub Categories: