News for hackers. Stuff that matters.
Re:Rust is Software's Salvation by cbrewster on Thursday December 29, 2016 @05:51PM (#13280901)
Not sure why marketing Rust implies that the community is trying to defend it. Honestly, I enjoy sharing with my experience with Rust because I personally enjoy writing in code with Rust and want to share that with others! Nobody is saying Rust is perfect or doesn't have tradeoffs.
Re:Rust is Software's Salvation by falcolas on Thursday December 29, 2016 @06:01PM (#13280981)
> Nobody is saying Rust is perfect

Err, the title of this article is "Rust is Software's Salvation". The previous one was "Rust is mostly safety". No discussion of trade offs, no negatives to be found. From the original article: "[Rust is] Technology from the past come to save the future from itself"

> Not sure why marketing Rust implies that the community is trying to defend it

The original article was a call for marketing material, because they don't feel enough people are using it. Those people are, to paraphrase the sentiment from the comments in the first article, wrong for thinking they write safe C or C++ code.

Re:Rust is Software's Salvation by verletx64 on Thursday December 29, 2016 @06:18PM (#13281090)
Hang on.

The original article that kicked off the 'Rust is mostly safety' article was a call for a change in the marketing material[1], away from the 'Rust is safe' narrative. It's not an attractive narrative (IMO) and the point that Klabnik was making was that Rust is more than 'just' safety.

'Rust is mostly Safety' was written in a sense disagreeing (depends on your interpretation) with Klabnik's article that Rust is much more than safety. Now, yes, these posts (namely the 'Rust is more than safety' and 'Rust is mostly safety' are not discussing the negatives of rust, absolutely, but it's not the scope of the posts to do so, it's not what that particular discussion is about and they should be exempted from this broad brush.

You've taken a quote from the Klabnik post, which is itself quoted from an initial release announcement, which is basically guaranteed to be a spot of marketing. As always, there is a time and a place for the discussion of trade offs and negatives.

A release announcement is not the place for this.

Nor is a discussion of changing the tone of the marketing of the language.

Now, finally turning my attention to the article in the post...well, that strikes me as a place to discuss some negatives. I am not super comfortable with basically listing all the cons of C and well, not even discussing the pros of Rust but presenting it as a panacea.

I think it doesn't quite hit the point of Klabnik's article which to me was more about stopping marketing based on what Rust stops you from doing and marketing Rust more on what it lets you do.

[1] http://words.steveklabnik.com/rust-is-more-than-safety

Re:Rust is Software's Salvation by steveklabnik on Thursday December 29, 2016 @06:29PM (#13281161)
> The original article was a call for marketing material, because they don't feel enough people are using it.

This is absolutely not true. I would love for Rust to have more users, but that's because I love Rust, and want to share that with people. But really, just like we try to make software better, I'm interested in how to make our pitch better.

You would think Hacker News, of all places, would understand that.

Re:Rust is Software's Salvation by jdright on Thursday December 29, 2016 @06:24PM (#13281120)
And this is getting nauseating even to these wanting to give it a try. I'm in the step of walking away and forget about it until the dirt settles down (and it becomes at least as fast as C/C++ or... even Go)
Re:Rust is Software's Salvation by steveklabnik on Thursday December 29, 2016 @06:31PM (#13281168)
In general, if Rust is significantly slower than equivalent C or C++, that's a bug. We track them. Please file them.

Rust should be roughly the same, speed-wise.

Re:Rust is Software's Salvation by mmstick on Thursday December 29, 2016 @10:05PM (#13282202)
I was competing against some C and C++ software developers in Advent of Code with efficient solutions, and my Rust solutions came out faster each time. Might want to check your facts.
Re:Rust is Software's Salvation by jdright on Friday December 30, 2016 @06:13PM (#13288343)
That doesnt mean anything. Try a little real software for instance.
Re:Rust is Software's Salvation by mmstick on Saturday December 31, 2016 @01:27AM (#13289825)
Re:Rust is Software's Salvation by jdright on Saturday December 31, 2016 @11:00AM (#13291538)
No, like: crypto, math, compression, encoding/decoding. Any example?
Re:Rust is Software's Salvation by burntsushi on Saturday December 31, 2016 @01:04PM (#13292211)
Re:Rust is Software's Salvation by jdright on Saturday December 31, 2016 @01:24PM (#13292320)
Very good example in fact. Seems roughly the same.
Re:Rust is Software's Salvation by burntsushi on Friday December 30, 2016 @10:28PM (#13289279)
Like ripgrep?
Re:Rust is Software's Salvation by jdright on Saturday December 31, 2016 @10:53AM (#13291496)
Question, grep is multi-threaded?
Re:Rust is Software's Salvation by burntsushi on Saturday December 31, 2016 @01:04PM (#13292205)
GNU grep is not multi-threaded.

Since you chose to be cute, I'm going to take a guess that you think this means the comparison between the tools is unfair. If that's an accurate interpretation, then I will say that your question is irrelevant because ripgrep is faster or as fast as GNU grep on benchmarks using a single thread too. In fact, that's the whole point! It says so right in the project's README.

http://blog.burntsushi.net/ripgrep/#single-file-benchmarks

Re:Rust is Software's Salvation by jdright on Saturday December 31, 2016 @01:22PM (#13292307)
Ok, interesting analysis. I will look more on Rust and maybe try something myself. But by reading your other posts about optimizing Rust to do search, it seems to require a lot of experience to tune Rust code.
Re:Rust is Software's Salvation by burntsushi on Saturday December 31, 2016 @01:33PM (#13292368)
Building ripgrep did require a lot of experience, indeed, but it had almost nothing to do with Rust. The experience is in text search specifically, which you'll need regardless of the language you're using. If you look at the regex crate for example, there's basically no use of unsafe at all. The only use is to elide bounds checks in some very carefully crafted tight loops. But again, most of that work was done irrespective of Rust and just figuring out the right way to unroll the DFA loop(s).

Optimization tricks in Rust are the same as you'll find in C++. It might be worth you comparing the C++ implementation of Snappy with my Rust implementation, for example. You'll see the same kinds of tricks employed in C++ as in Rust (avoiding memcpy in favor of unaligned loads/stores).