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.

A half-hour to learn Rust (2020)

219 pointsby onderkalaciover 1 year ago

15 comments

jetpackjoeover 1 year ago
The YouTube channel &quot;No Boilerplate&quot; turned this into a 10-minute video version, for anyone that prefers video:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=br3GIIQeefY">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=br3GIIQeefY</a>
评论 #37246951 未加载
评论 #37244886 未加载
nathellover 1 year ago
As a recent newcomer to Rust, I find Amos&#x27; articles an indispensable source of knowledge. His post on recursive iterators [1] has been a lifesaver while I was working on my problem. Thanks, Amos!<p>[1]: <a href="https:&#x2F;&#x2F;fasterthanli.me&#x2F;articles&#x2F;recursive-iterators-rust" rel="nofollow noreferrer">https:&#x2F;&#x2F;fasterthanli.me&#x2F;articles&#x2F;recursive-iterators-rust</a>
skulkover 1 year ago
This is, more or less, how I learned Rust circa 2015 (might have been a couple years later). I quickly started to write programs like I would have in C but got completely thwarted by the borrow checker because I wanted pointers everywhere. This made me throw my hands up and leave for other languages.<p>However, 8 years later I did eventually come to love rust after learning the One Weird Trick of using indices instead of pointers.
评论 #37237957 未加载
评论 #37237791 未加载
评论 #37239874 未加载
评论 #37237863 未加载
评论 #37238399 未加载
karimfover 1 year ago
Previous discussion with 333 comments (2021):<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25610741">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25610741</a>
评论 #37237949 未加载
Thaxllover 1 year ago
half an hour to learn Rust, the other half to wait for compilation.
评论 #37237789 未加载
评论 #37246966 未加载
评论 #37237752 未加载
ramesh31over 1 year ago
Why do I love this language so much having never written a line of it? Something about it is just so damn aesthetically pleasing.
评论 #37238894 未加载
distcsover 1 year ago
I know this is not going to make me an expert in Rust. That&#x27;ll probably take 10 years. But this is just the kind of thing I was looking for to get started with Rust. Thanks for sharing it here.
评论 #37237659 未加载
评论 #37237883 未加载
评论 #37239111 未加载
评论 #37238651 未加载
gtaniover 1 year ago
Helps a lot to track toolchain improvements:<p>- in distrib: cargo, analyzer, clippy<p>- others: Aquascope godbolt intellij flowistry<p>__________________________<p><a href="https:&#x2F;&#x2F;www.infoworld.com&#x2F;article&#x2F;3267624&#x2F;whats-new-in-the-rust-language.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.infoworld.com&#x2F;article&#x2F;3267624&#x2F;whats-new-in-the-r...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;cognitive-engineering-lab&#x2F;aquascope">https:&#x2F;&#x2F;github.com&#x2F;cognitive-engineering-lab&#x2F;aquascope</a><p><a href="https:&#x2F;&#x2F;intellij-rust.github.io&#x2F;thisweek&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;intellij-rust.github.io&#x2F;thisweek&#x2F;</a>
trevor-eover 1 year ago
Feels like every language should have an introduction like this. It&#x27;s frustrating that lang intros are either your very basic and trivial example, or a full-blown set of tutorials, nothing in-between.<p>I also chuckled at the &quot;20 minute read&quot;.
g4zjover 1 year ago
Also useful is the &quot;Learn X in Y Minutes&quot; page for Rust.<p><a href="https:&#x2F;&#x2F;learnxinyminutes.com&#x2F;docs&#x2F;rust&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;learnxinyminutes.com&#x2F;docs&#x2F;rust&#x2F;</a>
mstaoruover 1 year ago
<p><pre><code> fn tail&lt;&#x27;a&gt;(s: &amp;&#x27;a [u8]) -&gt; &amp;&#x27;a [u8] { &amp;s[1..] } ... fn main() -&gt; Result&lt;(), std::str::Utf8Error&gt; { let s = std::str::from_utf8(&amp;[240, 159, 141, 137])?; println!(&quot;{}&quot;, s); Ok(()) } </code></pre> Sorry, `|::|&amp;(_Rust!){}?`. I know you&#x27;re sexy. But I&#x27;ll prefer my eyesight and sanity over you.
评论 #37246939 未加载
WilliamCarlosover 1 year ago
Wish there was a version of this for C++!
AlanSEover 1 year ago
Can someone explain to me where the feeling_lucky variables comes from in the match example? I don&#x27;t get it. The variable isn&#x27;t defined anywhere in the relevant scope.
评论 #37239729 未加载
bornfreddyover 1 year ago
This might not be a popular opinion, but - I love the idea of Rust, but the language itself seems needlessly complex to me. It looks like the authors tried to cover so many esoteric usecases that the result is more like C++ than C (which is not good in my eyes).<p>One example:<p>&gt; `let` patterns can be used as conditions in `if`:<p>Anyway, this tutorial looks great, I&#x27;ll give Rust another go when I have a good project for it, but to me it seems there is a great need for a simpler language with similar memory management. Rust is just too complex, imho.
评论 #37238092 未加载
评论 #37238119 未加载
评论 #37238600 未加载
评论 #37238718 未加载
评论 #37238373 未加载
评论 #37238642 未加载
molenzwiebelover 1 year ago
(2020)
评论 #37237617 未加载