Live data from Hacker News

My favorite Rust function

blog.jabid.in

121–130 of 197 posts

Re: My favorite Rust function

#121

Earlier quoted context omitted.

In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum.

> In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum. Or maybe they have just expanded their "knowledge spectrum" and are experiencing an effusive moment?

Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.

Re: My favorite Rust function

#122
post #72
post #62

Earlier quoted context omitted.

> Also, zero-cost abstraction is likely the biggest bullshit I've ever heard, there is a lot of cost and there's also a lot of waiting for compiler if you're using cargo packages. While someone else is right that "zero-cost" refers to runtime cost rather than compilation cost, dependencies are the biggest problem. The program `spotifyd` takes over an hour to compile on my X200 laptop. This is, for reference, the same…

An X200 is also an ancient machine. Do you value your own time so little? Clearly you are annoyed by the compile times? You can get a $200 CPU that will blast through a kernel compile in 3 minutes.

[deleted]

Re: My favorite Rust function

#123
post #90
post #51

Earlier quoted context omitted.

Sure, and my opinion is that this is a very shallow takeaway. My whole comment is just my opinion.

> if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Um, the whole point of Go was to be "opinionated and acceptably crippled". That's why the creators built it the way they did. Go has more than a few things where "Me, but not for thee" rules--the compiler can do X but you cannot. If you find that is an acceptable tradeoff for the other features o…

Minor nit: would've been better if you'd put 'screws and apples'. 'Rusty screws' and 'Go apples!' sound better then when interchanged :P

Re: My favorite Rust function

#124

I get the feeling this doesn't really get into the meat of what "drop" is. It seems you can't really explain why you "love" a function without discussing its purpose. Maybe I'm wrong, I'm only really an outsider looking in when it comes to rust, but it does fascinate me as far as its goals. I would go so far as to say that it will be important for systems programmers to know in the not too distant future (if it's not…

The post isn't talking about the drop method of the Drop trait, which is used to hook into the drop functionally.

It's talking instead about std::mem::drop, a standard library function that drops a value before it would ordinarily go out of scope.

Re: My favorite Rust function

#125
post #92

Gotta admit, that really is a cute example. However, I was a bit surprised when the author described Go as "unacceptably crippled." What is he referring to?

Go is simple to the point where it annoys a lot of programmers, especially programmers who like to do fancy stuff with their programming language (the kind of person that's attracted to Rust, for instance).

Current top comment on /r/rust agrees with you:

> I guess I shouldn't be promoting language-bashing, but +1 for calling Go an unacceptably crippled edifice :)

https://old.reddit.com/r/rust/comments/dh4rcz/my_favorite_ru...

Re: My favorite Rust function

#126
post #22

> or making the language unacceptably crippled like Go Gotta say, I lost a lot of respect for the author at this point. It’s not like I don’t love Rust - quite the contrary - but if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Go has been one of my languages of choice for over half a decade now, and for good reason.

> > or making the language unacceptably crippled like Go > ... if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Perhaps the author used a poor choice of words and instead could have phrased their intent along the lines of: Go lacks the semantic density needed to express solutions in both a concise and consistent manner. Were this the case, it wou…

I think it's a syntax problem. ASCII doesn't have enough bracket characters to simply & clearly represent necessary language features. So it's harder for an intelligent human to sort and categorize these aspects.

Pre-generics Java is about the appropriate amount of language complexity for our current lingua franca

Re: My favorite Rust function

#127
post #55

Gotta admit, that really is a cute example. However, I was a bit surprised when the author described Go as "unacceptably crippled." What is he referring to?

Interesting how developer views can differ. Someone describes Go as "unacceptably crippled" while Uber engineering has 1500 microservices written in Go, making it their primary language. https://news.ycombinator.com/item?id=21226347

Businesses often prefer poor languages with lots of cheap programmers readily available to the opposite, because this lets them easily trade off quality against price. Want it done cheap and fast? Get a freshman intern to write it in PHP or JavaScript; if you later want quality, you can then hire some more expensive seniors to fix it up. If you pick Haskell instead, it may be more reliable upfront, but you also have to pay the full price upfront.

Go was explicitly designed to be a poor language of this sort, as evidenced by the infamous Rob Pike quote:

> The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

In other words: a language that makes programmers fungible. And how did they accomplish this? By omitting features and barely going for the lowest-common denominator of the languages listed, disregarding any reasons other languages may have for their more ‘advanced’ features like generics. Hence, crippled.

(Frankly, I object more to describing Scala as ‘the most complex edifice’.)

Re: My favorite Rust function

#128
post #22

> or making the language unacceptably crippled like Go Gotta say, I lost a lot of respect for the author at this point. It’s not like I don’t love Rust - quite the contrary - but if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Go has been one of my languages of choice for over half a decade now, and for good reason.

Go is crippled. I know you disagree, but I can tell you why you disagree and why you are wrong. Simply put, you do not have enough knowledge to know why GO is crippled. Allow me to elucidate.. Imagine that you never knew about the concept of a negative number. You only knew about natural numbers. And for 5 years that's all you worked with... positive numbers. This does not mean you are inn-effective working with your…

Downvoted because it's almost parody levels of condescension lol.

Re: My favorite Rust function

#129
post #60

Earlier quoted context omitted.

Sorry, I edited right after hitting reply to clarify that I'm assuming the intention was to std::move the unique_ptr in, since it was T&& and not T&. Would that still not work?

It would still not work. All std::move does is cast to T&&, enabling overload resolution to pick a function with T&& as its parameter type.

Thanks for explaining!

Re: My favorite Rust function

#130

Earlier quoted context omitted.

> In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum. Or maybe they have just expanded their "knowledge spectrum" and are experiencing an effusive moment?

Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.

> Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.

Both points you make I agree with. I simply was offering a possible explanation for those whom exhibit overly passionate opinions when they become enlightened.

When people take an epiphany to the point of denigrating those around them, then they likely have issues beyond what any programming philosophy could possibly encode.

Post reply on HN