Live data from Hacker News

The Safety Boat: Kubernetes and Rust

msrc-blog.microsoft.com

31–40 of 102 posts

Re: The Safety Boat: Kubernetes and Rust

#31
post #26

I don't believe for one second that it takes just a couple of weeks to an average SE to be proficient in Rust.

Depends on your definition of average: I found that to be the case with significant programming experience with traditional languages (notably not something like Haskell) so I think it’s plausible since the compiler, editor, and documentation are rather above average for newcomers. In particular, Cargo providing a lot of easy tools and the compiler providing really helpful error messages seemed to be useful for the time to write a real first program which does something useful.

Edit: one other big factor - presumably in their environment you have coworkers to get advice from. That’s huge when you’re first starting.

Re: The Safety Boat: Kubernetes and Rust

#32
The bug they caught [1] is one of the reasons some languages require you to explicitly name your captured variables. You still could have typed that code in, especially if you started with a for loop and then made it parallel (fwiw, perform should have been named something clearly suggesting it was parallel), but you'd at least be confronted with "oh, you went from serial, local state to a capture. Still think it's okay to explicitly borrow that state from this scope?". Then again, that's the point of Rust here :).

Fwiw, it's too bad the commit message didn't say something like "Since we're doing delete on many resources in parallel, we need to hold a lock while updating errs/res.Deleted". The reviewer was also obviously confused at first.

[1] https://github.com/helm/helm/pull/7820/commits/edb2b7511bcb9...

Re: The Safety Boat: Kubernetes and Rust

#33

Earlier quoted context omitted.

Kubernetes is an ecosystem. It doesn’t need to be written in Rust for Rust components to play a part. Helm is not Kubernetes, for example, though your comment seems to blur the two. There are folks writing stuff to interact with the broader ecosystem in Rust. That’s one of the interesting bits of networked systems! You can be heterogeneous with languages more easily when the network/api is the boundary.

Doesn’t microsoft own helm now? Nothing is stopping them rewriting it in rust since it can easily interact with kubernetes via rest api

No. Helm is owned by the CNCF.

Re: The Safety Boat: Kubernetes and Rust

#34
post #27

“For comparison, last week we caught a significant race condition in another Kubernetes-related project we maintain called Helm (written in Go) that has been there for a year or more, and which passed the race checker for Go. That error would never have escaped the Rust compiler, preventing the bug from ever existing in the first place.” I’ve heard people brag that Haskell is a great language because it’s supposedly…

Yes. The common blurb is: In safe rust the borrow checker encourages 'fearless concurrency' by statically preventing all data races.

Re: The Safety Boat: Kubernetes and Rust

#35
post #30
post #27

“For comparison, last week we caught a significant race condition in another Kubernetes-related project we maintain called Helm (written in Go) that has been there for a year or more, and which passed the race checker for Go. That error would never have escaped the Rust compiler, preventing the bug from ever existing in the first place.” I’ve heard people brag that Haskell is a great language because it’s supposedly…

I think the common saying is that once your Haskell code compiles, it's usually correct. The fine print is that nobody claimed it's easy to write Haskell code that compiles.

https://youtu.be/DdR9q69se-I?t=1329

Re: The Safety Boat: Kubernetes and Rust

#36
post #26

I don't believe for one second that it takes just a couple of weeks to an average SE to be proficient in Rust.

It really depends on so many factors it’s extremely hard to tell. We’ve brought folks at Cloudflare up to speed roughly that fast. “average” and “proficient” are both very variable in that statement, imho.

They started with >1 Klabnik units and every person you bring up, it creates a larger pool of folks to lean on for support.

Re: The Safety Boat: Kubernetes and Rust

#38
post #31
post #26

I don't believe for one second that it takes just a couple of weeks to an average SE to be proficient in Rust.

Depends on your definition of average: I found that to be the case with significant programming experience with traditional languages (notably not something like Haskell) so I think it’s plausible since the compiler, editor, and documentation are rather above average for newcomers. In particular, Cargo providing a lot of easy tools and the compiler providing really helpful error messages seemed to be useful for the t…

And your definition of “proficient”!

Re: The Safety Boat: Kubernetes and Rust

#39
post #36

Earlier quoted context omitted.

It really depends on so many factors it’s extremely hard to tell. We’ve brought folks at Cloudflare up to speed roughly that fast. “average” and “proficient” are both very variable in that statement, imho.

They started with >1 Klabnik units and every person you bring up, it creates a larger pool of folks to lean on for support.

I can’t take credit here, while I am around to answer questions, getting folks going is not my job.

It is true that we have a chat room with a bunch of folks, of which I’m part.

Re: The Safety Boat: Kubernetes and Rust

#40
> we caught a significant race condition

It is a data race, not a race condition.

> and which passed the race checker for Go

No, it is not. https://github.com/helm/helm/pull/7820#issuecomment-60436062...

There is a comment by issue author which is literally a go data race detector warning. Like "WARNING: DATA RACE".

Post reply on HN