r/programming • • Jan 17 '20

A sad day for Rust

https://words.steveklabnik.com/a-sad-day-for-rust
1.1k Upvotes

609 comments sorted by

View all comments

254

u/[deleted] Jan 17 '20

[removed] — view removed comment

99

u/timmyotc Jan 17 '20

Find the person that wants to take ownership of the project and tell them that.

125

u/[deleted] Jan 17 '20

That would require more work than just dropping a patch.

75

u/SirClueless Jan 17 '20

Also, if the perceived problem is that the Rust ecosystem is worse off for the amount of unsafe code in actix-web then forking isn't a rational solution.

Unsafe code in a popular library might be a bad thing for the ecosystem. Unsafe code in a popular library plus a warring fork is not likely to be any better.

55

u/UtherII Jan 17 '20

Unsafe code is not the core of the problem, the language was designed with this feature for a reason. Even the standard library use unsafe, so nearly every Rust program contain parts of unsafe code.

The point is the unsafe code should be carefully used in safe abstractions to reduce the use to the maximum and the abstraction used by the actix maintainer were leaking.

28

u/ericonr Jan 17 '20

Even the standard library use unsafe

It kind of has to, because someone has to interact with the OS and libc, and that can't be done in safe Rust. So it doesn't work as an example of the validity of unsafe code.

From what I've read, it seems a lot of the unsafe stuff that people use in Rust tend to be related more to performance than to actually being impossible in safe Rust.

12

u/UtherII Jan 18 '20

Unsafe is used in a lot of places of the standard library for performance too.

6

u/Minimum_Fuel Jan 18 '20

Unsafe rust is not only used for interacting outside of rust. It is used all over the place for performance reasons that safe rust can’t know are actually fine. There’s over 1600 hits to unsafe in rust. FAR from all of those are interacting with the OS.

→ More replies (2)

4

u/hayesgm Jan 18 '20

It’s slightly strange to me that rust doesn’t percolate up “unsafe” to the type so that the call sites know they are using unsafe code and all higher up functions know it as well. This would be similar in spirit to the IO monad from Haskell. I feel this could lead people to have a gauge on how much code they depend on is unsafe and in which circumstances.

6

u/MEaster Jan 18 '20

Because then literally everything would be unsafe. At some point you have to have some unsafe code in order to interact with the system because the compiler cannot prove that the system will do as advertised.

2

u/PM_ME_UR_OBSIDIAN Jan 27 '20

Sorry for the late reply: the point of an unsafe block is to say "this is the correct level of abstraction at which to reason to prove that this operation is safe". It's not in the type because it wouldn't be composable; the idea is to build safe abstractions from unsafe operations. Once the safe abstraction is built you treat it as such.

11

u/[deleted] Jan 17 '20

[removed] — view removed comment

15

u/not_perfect_yet Jan 17 '20

Do you want a fix or not?

Also, if the perceived problem is that the Rust ecosystem is worse off for the amount of unsafe code in actix-web then forking isn't a rational solution.

I think people who submit PRs and patches want the code, but also the author, to "better" from the submitter's perspective. Rejecting PRs is very fundamental form of disagreement I'm not sure most developers are equipped to handle.

So maybe wanting that fix is kind of undermining some of the freedom open source usually aims for. And the result may be that the freedom to reject PRs is more valuable than a single PR. And then you would not want the fix.

12

u/PM_ME_UR_OBSIDIAN Jan 17 '20

Security-minded people aren't investing their time and efforts into actix-web because of how deep in its DNA this anti-security mindset goes. From this point of view, actix-web is best understood as an attractive nuisance that could come to taint the wider Rust ecosystem by association.

→ More replies (25)

6

u/jpl75 Jan 18 '20

Would seem to me it's still less effort than harassing the original author to a point he deletes the project.

→ More replies (3)

37

u/[deleted] Jan 17 '20
  1. You would have to be consistent enough and work extra hard for people to notice your fork. Which also means, marketing it.

  2. Maintaining a project you didn't create and you don't know extremely well is tough to say the least.

  3. People won't just "trust" an unknown fork

  4. Creates confusion to the project's community. People will start asking "so which one should I use" and people will start giving all shorts of different answers.

So at this point, either a big company would have to fork it, or better the project to be deprecated all together, unless someone competent enough takes over.

19

u/[deleted] Jan 17 '20

Maintaining a fork is more work than taking over maintainership of a project or starting a new one, and creates extra confusion. Look at what happened to libav.

42

u/[deleted] Jan 17 '20

[removed] — view removed comment

28

u/glonq Jan 17 '20

Also, it's not that this hasn't happened before. The original maintainer doesn't owe you anything. No explanation, no fix, no nothing. This is Open Source. Understand the implications.

Exactly. You get what you pay for.

→ More replies (1)
→ More replies (47)

10

u/kankyo Jan 17 '20

The problem is that there is no good way on Github to get to the currently active fork of a project. As an example Google gitx and try to find the active fork. Now tell me which it is and I'll tell you if you got it right. (I'm pretty sure you'll get it wrong!)

6

u/bhaak Jan 17 '20

gitx/gitx is not the active fork?

If it's not and it is on GitHub, I will be seriously disturbed.

4

u/kankyo Jan 18 '20

Yey! You got it!

Hmm... The Google rankings have improved a lot since last I looked though. Gitx/gitx wasn't on pages 1 to 5 of the search results last time.

2

u/bhaak Jan 18 '20

But you are of course right. Googling can be really misleading. It takes time for a fork to overtake a popular but abandoned version.

At least on GitHub you can look at the network graph to get a good hint what might be an active fork.

→ More replies (1)
→ More replies (15)