TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Getting started with Rust by building a tiny Markdown compiler

178 pointsby jesselawsonabout 5 years ago

7 comments

AlchemistCampabout 5 years ago
I&#x27;m not completly new to Rust, but for some reason writing a Markdown has become a routine project I do in every language I&#x27;m learning.<p>This tutorial looks fantastic. Is the layout based on a 3rd-party theme or template? I really like the presentation.
评论 #23207328 未加载
评论 #23211400 未加载
berkusabout 5 years ago
Hmm, I see the author liberally using _filename as a variable name saying &quot;I just use names with underscores as functions arguments names&quot;.<p>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.<p>@jesselawson - please update this.
评论 #23263432 未加载
gilmiabout 5 years ago
I think the author did a great job with the format of this tutorial!<p>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!
评论 #23212156 未加载
einpoklumabout 5 years ago
1. This is more of a &quot;taste-teaser&quot; than a tutorial in my opinion, but it&#x27;s nice enough I guess.<p>2. Perhaps a different page for each chapter&#x2F;part would have been nice.<p>3. I wonder how different would a C++ &quot;taste-teaser&quot; with the same scope and goal be.<p>4. I&#x27;m not a Rustian (Rustic? Rust-guy?); this seems strange to me:<p><pre><code> &#x2F;&#x2F; Try to open the file let file = File::open(&amp;input_filename) .expect(&quot;[ ERROR ] Failed to open file!&quot;); </code></pre> why am I expecting an error? Shouldn&#x27;t that keyword be &quot;on_exception&quot; or something?
评论 #23208274 未加载
评论 #23207490 未加载
评论 #23208187 未加载
评论 #23207511 未加载
greglindahlabout 5 years ago
I&#x27;m a bit confused by the use of the word &quot;compiler&quot; to refer to something that turns markdown into html.
评论 #23208387 未加载
评论 #23207692 未加载
mrlonglongabout 5 years ago
I tried Rustlings, found it a wee bit too easy to do, but I&#x27;m not quite finished yet.
Laplandabout 5 years ago
Looks great, thanks for creating this!
评论 #23217852 未加载