2. Perhaps a different page for each chapter/part would have been nice.
3. I wonder how different would a C++ "taste-teaser" with the same scope and goal be.
4. I'm not a Rustian (Rustic? Rust-guy?); this seems strange to me:
// Try to open the file
let file = File::open(&input_filename)
.expect("[ ERROR ] Failed to open file!");
why am I expecting an error? Shouldn't that keyword be "on_exception" or something?"Rustacean", pronounced like "crustacean" without the initial 'c'; remember that Rust's logo is a crab (named Ferris).
Also, regarding ".except": like ".unwrap", you almost never want to use it, because it panics on failure. Instead, you can write:
let file = File::open(&input_filename)?;
That will propagate the error upwards; if you propagate an error out of main, Rust will print an error message and exit with exit code 1, which is often what you want. Some error handling libraries also let you add context to the error before propagating it.`expect` takes an input that is either an error or a value, then turns that input into just a value. The provided string is the error message if something goes wrong (i.e. the input was an error).
If there a word for the action of converting the description of a ritual to the actual practice of that ritual, that would provide a suitable root word form here. That said, using the closest example I can think of, music, the root word there is 'performing' when the music is performed and recorded when the music is performed into a storage medium, and transposed when the music is converted from one description to another description while maintaining the overall musical relationship between the timbres.
It is that latter version, transposition, which suggests the word 'transpile'.
However, what we're talking about here is closer to TeX than cfront-to-c or even TypeScript-to-Javascript.
[ kuh m-pahyl ]
SEE SYNONYMS FOR compile ON THESAURUS.COM
verb (used with object), com·piled, com·pil·ing.
to put together (documents, selections, or other materials) in one book or work.
A large fraction of the words I use in physics and math are not used the same way, within the field, as the generic dictionary definition.
This tutorial looks fantastic. Is the layout based on a 3rd-party theme or template? I really like the presentation.
If you are referring to the layout of the website, it's a custom theme I wrote specifically for writing tutorials like this. It's heavily inspired by the Octopress theme for Jekyll.
For those who don't know, Alchemist Camp is a YouTube channel and website for learning Elixir: https://alchemist.camp
However: In Rust, variables starting with underscores are usually indicating unused ids and if you actually forget to use it - you will not get a warning. As a tutorial material this sets very wrong mindset for the beginners. ONLY start variable with an underscore if you mean to not use it.
@jesselawson - please update this.
It includes all the steps needed to write the app, has exercises, is neatly splitted to chapters with clear expectations and summaries for each chapter and so on. Everything needed to reduce frustration, maximize knowledge retention, and make it a nice experience as possible to the reader. Awesome work!