Live data from Hacker News

Still in love with Rust

dpc.pw

151–160 of 186 posts

Re: Still in love with Rust

#151
post #129

Earlier quoted context omitted.

> Edit: This place is disappointingly childish... It does not reflect well on Rust, either. You're getting downvoted not because of the alleged childishness of this place, but because you're trying to win a discussion on a complex issue by scoring a simplistic "gotcha".

Hmm, my original comment was not a "gotcha" it is the simple truth. Anyone trying to sell you a tool by claiming that "it will make you a good whatever" is just trying it on. Yes, a good tool can help achieve better results but that's not the same at all. Then, all the replies I received were seemingly defiant but all in fact agreed to the point while trying to sound smart.

>Then, all the replies I received were seemingly defiant but all in fact agreed to the point while trying to sound smart.

And where exactly is the problem? You've received exactly the type of answer you wanted. steveklabnik repeatedly agreed with you by saying that a programming language cannot make you a good programmer.

Remember, your "simple truth" is just a small part of the whole story. The other part is that less strict languages allow you get away with mistakes and be lazy but later on fail catastrophically (e. g. by "losing a thumb"). You're dismissing this very important part as "trying to sound smart" or by calling it childish.

Re: Still in love with Rust

#152

Earlier quoted context omitted.

Yes. Most of the projects now use black https://github.com/ambv/black

The problem that black had last time I saw it on hacker news is that it only inserts whitespace. Unlike braces-and-semicolon languages, that is sometimes not enough to format code well. For example, given the following line: x[1][4] = a[2] + b[4] Black will format like either of these: x[1][ 4] = a[2] + b[4] x[1][4] = a[ 2] + b[4] But not like either of these, unless you insert the brackets yourself: x[1][4] = ( a[2]…

I use yapf and in such cases backslashes work fine:

    x[1][4] =\ 
        a[2] + b[4]

Re: Still in love with Rust

#153
post #139

Earlier quoted context omitted.

The issue with your comment is the dismissive and reductionist point of view, this place isn't childish, it's exactly the opposite: people here don't tolerate so much statements of absoluteness or broken analogies.

This isn't dismissive nor reductionist. This is a simple fact of life. Perhaps experience is needed to grasp this, though, and to understand the analogy. Childish, because I feel that some commenters see posting as a pissing contest. I'm genuinely surprised by the reactions.

Comparing a programming language to a paint brush is reductive. And arguing "this is a simple fact of life", and that those who disagree with you lack experience, is dismissive.

Re: Still in love with Rust

#154
post #68

Earlier quoted context omitted.

> I don't get at all how being forced to do anything could ever be a good thing If you don't prefer tools that can automatically check if you were a good developer or not, it not only does not scale (to trust the software you build), it's that I wouldn't want to work with you as a teammate.

> If you don't prefer tools that can automatically check if you were a good developer or not You are pretending there are no trade offs. > it not only does not scale (to trust the software you build) I think we should all be able to agree that empirically that is nonsense.

I have empirically witnessed that the larger a project gets, the harder it is to trust that the code does the thing you want it to do. It's far from nonsense.

Re: Still in love with Rust

#155
post #10

> Rust will force you to be a good programmer, > [if] you like it or not. This is probably the best in-a-nutshell statement that describes what a good programming language is for me. I had similar moments in the past. Before Python I cared about indention to some degree. But once I got used to the way Python forces you to indent your code, I came to the realization that this is pretty much the way I should format my…

> Rust will force you to be a good programmer, > [if] you like it or not. Perhaps, but I'm convinced that it will at the same time prevent you from becoming a great programmer.

Why?

Re: Still in love with Rust

#156

Earlier quoted context omitted.

Only as good as Rust allows you to be, which is fine for some until they stagnate or grow out of it; but far from the final answer to anything. I don't get at all how being forced to do anything could ever be a good thing. Smells like cognitive dissonance from here. I'm all for powerful tools that enables me to write better code faster; but being forced, really? That's the best thing about Rust? Ew.

So all programming languages at a higher level than ASM are horrible to you? They don't allow you to write everything that pure ASM does. Even C enforces structured programming.

It's all black or white, right. Someone says something less than flattering about your latest ideology and the gloves come off. Consider not identifying so hard with your tools, for all our sake.

There are very few rules in C; same in Forth, Common Lisp and Perl among others; they provide tools, not religions. Python was always borderline.

These days it's like they're in some kind of competition to stuff as many rules as possible down peoples throats and get away with it. And that's not even the weird thing, the weird thing is that users are begging for more.

Re: Still in love with Rust

#157

Earlier quoted context omitted.

> If you don't prefer tools that can automatically check if you were a good developer or not You are pretending there are no trade offs. > it not only does not scale (to trust the software you build) I think we should all be able to agree that empirically that is nonsense.

I have empirically witnessed that the larger a project gets, the harder it is to trust that the code does the thing you want it to do. It's far from nonsense.

True, regardless of language.

Re: Still in love with Rust

#158

Another point against Rust is binary size. If you write the Fibonacci generator in one of the first chapters of the Rust book it will create a 4MB binary. Even stripped it's over 400KB. If you write the same code in Nim it compiles down to 112KB with debug symbols, unstripped. Statically linked against libc (still with debug symbols) it's only 850KB. 850KB statically linked versus ~450KB dynamically linked and stripp…

Does this matter anywhere outside of embedded software nowadays?

Yes: security sensitive applications where being able to inspect or fuzz a binary is strongly dependent on size. Also firmware on servers.

Re: Still in love with Rust

#159
post #60

Another point against Rust is binary size. If you write the Fibonacci generator in one of the first chapters of the Rust book it will create a 4MB binary. Even stripped it's over 400KB. If you write the same code in Nim it compiles down to 112KB with debug symbols, unstripped. Statically linked against libc (still with debug symbols) it's only 850KB. 850KB statically linked versus ~450KB dynamically linked and stripp…

How far does this scale? What are the binary sizes of a 100k loc app in Rust vs Nim?

See reply from kungtotte

Re: Still in love with Rust

#160
post #134

Earlier quoted context omitted.

You can detect whether the script is being piped into sh, so downloading the script via for example FF might produce different results than piping it to shell, making audits useless.

Sure. If you're worried about that, it's easy enough to download it first, and then run it, without the pipe. If you're auditing it, you've already downloaded it, so it's unclear to me why you'd re-download and pipe rather than just running it.

You still have zero guarantee that other people are getting the same code.

Encouraging people to run code from some random URL on the Internet is always bad.

Post reply on HN