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 Fresh Look at Rust

379 pointsby boynamedsueover 10 years ago

15 comments

ekiddover 10 years ago
I&#x27;ve been using Rust to process a large text corpus, and as Armin suggests, it&#x27;s a really interesting experience. Here are a few things I&#x27;ve noticed so far:<p>1. Writing Rust code definitely takes more time than Python or Ruby, but it&#x27;s not bad in practice. I can&#x27;t measure the productivity difference yet, partly because I&#x27;m still learning Rust. I do spend more time thinking about how to write zero-allocation and zero-copy algorithms, and trying to get my code to compile (but see 3, below).<p>2. It&#x27;s possible to write very fast code without compromising memory safety. It&#x27;s great to see key parsing operations happening in ~100 nanoseconds, with no allocations.<p>3. Rust is one of those languages where I need to work to make the compiler happy, but once I manage that, the code generally works on the first try.<p>4. The tooling is very good: library management, unit testing, benchmarking, documentation, error messages etc., all work very nicely.<p>Overall, it lacks the instant gratification of a really good scripting language. But I keep finding myself back in Emacs, writing more Rust code for the fun of it. And I really enjoy the combination of low-level code, memory safety, and a useful selection of functional programming features. I&#x27;m glad to see a new language in this niche.
评论 #8392502 未加载
评论 #8392413 未加载
评论 #8392850 未加载
kibwenover 10 years ago
I adore that someone like Armin is so delighted to use Rust. From what I&#x27;ve seen of Flask and his other Python libraries, the level of consideration that he devotes to API design is absolutely inspiring.<p>At such an early stage in the language&#x27;s history, I&#x27;m optimistic that his thoughtfulness in API design will become the baseline for the entire Rust ecosystem. In this vein, I&#x27;d also like to credit Chris Morgan&#x27;s Teepee (<a href="http://chrismorgan.info/blog/introducing-teepee.html" rel="nofollow">http:&#x2F;&#x2F;chrismorgan.info&#x2F;blog&#x2F;introducing-teepee.html</a>) and Sven Nilsen&#x27;s Piston (<a href="https://github.com/PistonDevelopers" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PistonDevelopers</a>) for devoting a great deal of energy to figuring out how best to structure Rust APIs that play to the strengths of the language. It&#x27;s a process of discovery for all of us!
评论 #8392383 未加载
评论 #8394052 未加载
habermanover 10 years ago
&gt; The truth is that the borrow checker is not perfect. The borrow checker prevents you from doing dangerous things and it does that. However it often feels too restrictive. In my experience though the borrow checker actually is wrong much less often than you think it is and just requires you to think a bit differently.<p>I would love to see this explored in more detail. The borrow checker is, from what I can tell, one of the most important and novel parts of Rust. I&#x27;d love to see more detailed examples of where:<p>1. it kept you from doing something idiomatic that you <i>knew</i> was safe but you just couldn&#x27;t convince the borrow checker of it.<p>2. it kept you from doing something that <i>seemed</i> safe, but then you realized that it was actually telling you something important.<p>Also:<p>&gt; Even if it would turn out that the borrow checker is not sound<p>Wait, is this an actual risk? Is there some lingering doubt that the borrow checker is actually sound?
评论 #8392920 未加载
评论 #8392855 未加载
评论 #8392868 未加载
cagefaceover 10 years ago
<i>I have a huge hatred towards both the STL and boost and that has existed even before I worked in the games industry.</i><p>I really don&#x27;t understand why STL gets so little love. It&#x27;s a little lean on features maybe but in my experience it just works, and it&#x27;s <i>fast</i>. Once you get your head around the iterator concept it&#x27;s pretty simple to use. And with lambdas in C++ I can write code that&#x27;s almost as concise as Ruby or Scala.<p>Any strongly-typed, flexible collection &amp; algorithm library is going to be complex and require a learning curve.
评论 #8392485 未加载
评论 #8394886 未加载
评论 #8392842 未加载
jonesetcover 10 years ago
I rarely have to do anything as low-level as rust would demand. More often than not I find myself using Python, but I had the same feelings when I started looking into rust a few weeks ago. It was exciting seeing the full pattern-matching, especially.<p>I have a desire to get some experience in the area, but the problem is what to make. Does anyone have any ideas for some smallish libraries that would benefit the community? I&#x27;m certainly not a networking or concurrency expert, so it&#x27;s difficult to come up with ideas.
评论 #8392545 未加载
评论 #8392608 未加载
评论 #8394169 未加载
wisienkasover 10 years ago
Started using rust just this week.<p>Used more hours than ever expected on it. Simple put you&#x27;ll fall in love with the compiler, because it point out so well your mistakes.<p>Another thing to note is that it greatly encourage you to fix your warnings too. which for me coming from java and php world isn&#x27;t something you&#x27;d give much thought.
评论 #8395364 未加载
InfiniteRandover 10 years ago
Rust actually makes me think a lot about Ada, if you want to program, you need to program correctly.<p>Probably the reason I will not use Rust is the same reason I only look at Ada in a professional context, I usually start projects with something quick and dirty, then gradually refactor it into something better, rather than piece by piece. Being forced to do it right the first time would likely just push me more into doing less programming.
nixpulvisover 10 years ago
In addition to being a great lang, I love all the little things. Like he mentions, the doc tools and compiler are very nice.
评论 #8392590 未加载
ObviousScienceover 10 years ago
I&#x27;ve been very interested in Rust for a while, but put off by the early development status and the fact that it&#x27;s undergone a few major redesigns. I don&#x27;t hold them against the language team in any sense, and actually think more of them for it, since redesigns early are good if you realize something else might be better or one of your original ideas just didn&#x27;t work out.<p>Rather, I&#x27;m just curious when I can expect Rust to settle down and not have frequent breaking changes, major redesigns of language features, etc. I&#x27;ve heard it&#x27;s the aim of the 1.0 release to have this property (which is a reasonable goal in my mind).<p>Does anyone have a timeline on when it would be reasonable to start eyeing Rust if I want more stability (in terms of language features) than it&#x27;s had during its development phase?
评论 #8392656 未加载
评论 #8396277 未加载
评论 #8392708 未加载
bsaulover 10 years ago
I found the python version of the code so much more readable... is putting &quot;unwrap&quot; and &quot;ignore&quot; everywhere becoming idiomatic in Rust ?
评论 #8393441 未加载
评论 #8393412 未加载
评论 #8393428 未加载
adultSwimover 10 years ago
This is a good write-up.<p>I still think some kind of vanilla ML would suit a lot of people very well.
评论 #8392605 未加载
reflexerover 10 years ago
let the hype cycle begin
coolsunglassesover 10 years ago
Annnd if you&#x27;d like to be able to write code as fast as Rust but get it done faster than Python or Ruby, take a look at Haskell.<p>- ex-Python and Clojure user, teach Haskell now.<p><a href="https://github.com/bitemyapp/learnhaskell" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bitemyapp&#x2F;learnhaskell</a>
评论 #8393773 未加载
评论 #8392945 未加载
评论 #8393335 未加载
_pmf_over 10 years ago
Easy cross-compilation, motherfucker! Do you have it?
评论 #8394392 未加载
pekkover 10 years ago
Disappointing how this author&#x27;s hyper-criticism of Python is not applied equally to Rust, presumably because Rust is newer and this author has other bones to pick with Python. If Rust has a problem, he will sell that it is charming (e.g. &quot;it makes you think&quot;, &quot;you just need to think differently&quot;, &quot;needs more love&quot;). The glass will be full any day now! But if any new effort in Python is not absolutely perfect or just not to his personal taste, he will sell that it&#x27;s because Python is a horrible pile of shit because nobody listens to him. The glass isn&#x27;t only half empty, it is also too hard, too brittle, too cold and actually also too warm and it turns out that not even its transparency is a good feature.<p>After several years of this routine, it has become very old. For God&#x27;s sake, if your ex is so bad then just move out of her house already. Don&#x27;t just keep eating the dinners she prepares and complaining about them and saying you&#x27;ll move out. Actually move out and stop talking about her all the time. Yet another article about how you can&#x27;t stand how she clips her nails is not helping anyone.
评论 #8394306 未加载
评论 #8396726 未加载