HNHacker News
TopNewBestAskShowJobs

Expurple

302 karma · joined March 24, 2023

https://home.expurple.me
submissionscomments
Expurple··on In the long run, GPL code becomes irrelevant (2015)
Indeed, that's a very important thing to foster! In fact, I published a post about this just two days ago: https://home.expurple.me/posts/non-profit-foss-solves-the-co...
Expurple··on In the long run, GPL code becomes irrelevant (2015)
Your argument is in terms of "fairness". But most users don't care about fairness. They care about better software. I'll use a permissively-licensed project if it's better. Most people will use a proprietary project if it's better.

The article makes a point that permissively-licenced projects have the best survival characteristics, and that's why most (quality) software will eventually be permissively-licensed, while GPL will fade into obscurity and will be used only by enthusiasts why care about fairness more than they care about the actual quality of the software that they use.

Expurple··on In the long run, GPL code becomes irrelevant (2015)
> The fact that very large corporations are willing to spend tens and hundreds of millions of dollars to replicate software is exactly why the GPL is not irrelevant.

No, it's the opposite. The premise of copyleft is forcing the dependents to contribute back to the community. If the corporations are writing proprietary replacements instead of contributing, copyleft has failed to deliver on its premise.

In practice, permissively-licensed projects get more contributions back and benefit the community more. Simple as that.

Expurple··on In the long run, GPL code becomes irrelevant (2015)
Most other "flagships" of the Rust ecosystem (including rustc itself and ripgrep) are permissively-licensed, and still haven't been "hijacked" by a proprietary fork. Or by a copyleft fork, for that matter. Permissive licenses simply have better survival characteristics in the long run
Expurple··on In the long run, GPL code becomes irrelevant (2015)
> you're doomed

You're making a big stretch here. Sure, you can be left in the dust behind their proprietary fork, that's true: https://hypercritical.co/2013/04/12/code-hard-or-go-home

But your habitual workflow isn't "doomed". You can always fork and keep using the same open version of the project that you've always used. If the project is popular enough, there's usually a community that keeps maintaining that fork.

That's the deal that you get. Free software was never about "free upgrades forever". It's about the freedom to fork.

Expurple··on In the long run, GPL code becomes irrelevant (2015)
Yes, but what's the better alternative? The article makes the point that you're not even getting table scraps back into your GPL project. In most cases, the companies prefer a proprietary rewrite. Now you're just stuck with a less-developed project, while the world around you uses more-developed proprietary alternatives and pushes you to do the same. But I guess, that somehow makes you feel better because you don't let the corporations "feed off your work" and instead just waste everyone's time on infinite rewrites?
Expurple··on In the long run, GPL code becomes irrelevant (2015)
The same could be said about non-corporate contributions. "People only contribute as long as they have a personal itch to scratch. The moment they get what they want, you're on your own again".

That's always been the deal. Open source is not a guarantee of free support forever! It's a guarantee that you can always fork and keep using the project (or even developing it further)

Expurple··on In the long run, GPL code becomes irrelevant (2015)
From a developer/business point of view, there's no reason to use a more restrictive GPL dependency if it's not clearly "superior" to a permissively-licensed one.

The article makes a case that this will eventually push GPL out of the mainstream. No one will use GPL because they "have to" (which is the whole premise of copyleft!). It will only be used by enthusiasts

Expurple··on In the long run, GPL code becomes irrelevant (2015)
Yeah, copyleft has always been just a hack to cope with the current legal framework
Expurple··on In the long run, GPL code becomes irrelevant (2015)
True, but the article makes a point that it's very hard and unlikely to maintain technological superiority over a coproration that's determined enough. A corporation simply has much more resources. See also: https://hypercritical.co/2013/04/12/code-hard-or-go-home
Expurple··on In the long run, GPL code becomes irrelevant (2015)
The point of the article is that:

1. In most areas, they eventually will!

2. If there is a permissively-licensed project in that area, at least there's a decent chance that the "reimplementation" will be a fork of that project. At that fork has a decent chance of staying open or even being merged back into the upstream. That benefits the community more than a proprietary from-scratch rewrite (which would follow from a GPL-only open-source scene)

Expurple··on A Rust shaped hole
> one thing that apparently I haven't gotten across is that they don't cover semantic changes, only grammar ones for the most part.

You have gotten it across just fine.

We're trying to get across that no one is ever going to do "global" incompatible semantic changes in editions. That's been understood from the start. Exactly because of the problems that you describe.

Although, it's still possible to "sneak in" surprisingly useful semantic changes if they are local to the function body: https://doc.rust-lang.org/stable/edition-guide/rust-2024/tem...

Expurple··on A Rust shaped hole
> The idea that one needs Rust to write reliable software is not only ridiculous at a logical level

I never said that. I said that it's more appropriate and productive.

> If it were really “preferable for writing such production software”, more people would be using it.

There are many valid reasons for not using it, even in new projects. Such as human preferences, lack of specific libraries, and simply not having time to learn yet another language for a non-10x benefit.

> the compiler does not carry the burden for you. It puts the burden of writing code in a way that satisfies the Rust lifetime management design on you, and that’s what you’ll be doing forever.

It carries a different burden for me. In exchange for the burden that you mention, I don't worry about mutable aliasing bugs (including data races), breaking the code by refactoring it, manually unit-testing basic properties that could be types, debugging non-obvious non-local effects (such as exceptions and null values invisibly propagating through the layers of the app), micro-optimizing the performance manually, and so on. The benefits are known. I've almost forgot how to use a debugger at this point.

It's a tradeoff. I find it more comfortable and less cognitively-taxing to work this way, once the initial learning curve is behind. Less unpredictable problems to distract you from solving the problem. The borrow checker problems largely go away as you get more comfortable with it. And it's a skill that's instantly transferrable between all Rust projects, unlike project-specific defensive practices in other languages (the "manual hardening" needed to get decent quality). It's a long-term investment that automates a small, but not insignificant part of your work.

> There zero proof that Rust software is higher quality than equivalent e.g. Swift or Java.

The Google's director of engineering gave a talk saying that their Rust teams are just as productive as their Go teams, while also enjoying "a decreased defect rate over time": https://www.reddit.com/r/rust/comments/1bpwmud/media_lars_be...

> The memory-safety trick only works against C and C++.

That's absolutely true, and that's an important thing to keep in mind when framing discussions about Rust.

Expurple··on A Rust shaped hole
Yeah, the historical reason for standardizing C is the reason to "reconcile" a bunch of already existing compiler implementations
Expurple··on A Rust shaped hole
The machine code will always be generated from "something". A one-line informal prompt isn't enough. There will always be people who write specs. Even the current languages are already far from "machine code" and could be considered "specs", albeit low-level
Expurple··on A Rust shaped hole
Editions will look like band-aids that don't fully solve the cruft accumulated over the 50 years. That's not hard to predict. It's still a very useful mechanism that slows down the accumulation of said cruft. I'm yet to see a language that has a better stability/evolution story
Expurple··on A Rust shaped hole
I don't have any negative experience with that one, but I remember having to manually install various versions of the Windows C++ runtimes to get an app working
Expurple··on A Rust shaped hole
As the other commenter responded there, your example isn't about editions at all. It's about mixing ABIs and mixing multiple versions of the language runtime. Those are entirely separate issues.

You're correct that the possible changes in editions are very limited. But editions don't hinder interoperability in any way. They are designed not to. Today, there are no interoperability problems caused by editions specifically.

> compromises will be required, specially regarding possible incompatible semantic differences across editions.

That's just an assumption in your head. 4 editions later, it still hasn't manifested in any way.

Expurple··on A Rust shaped hole
> the Golang/Python/Java teams have already released to customers.

...have already released a broken prototype that appears to be working for now.

I'm yet to see a case where manually "hardening" your software is faster than writing a "similarly-good" program in Rust. That's just anti-automation. Why repeat the same work in every project and bloat your codebase, when the compiler can carry that burden for you? In my experience, Rust makes you write production-grade software faster than when using other languages.

> But selling this approach as a general solution is disingenuous.

I agree! There are legitimate cases where releasing a broken prototype as quickly as possible is important. There's room for that.

But I agrue that it's not the case for most "serious" production software that would be maintained for any period of time. And that Rust is the preferable option for writing such production software.

Expurple··on A Rust shaped hole
You're being pedantic and trying to argue as if I misunderstand language runtimes and am speaking against language runtimes in general. That's not true. I qualified "the language runtime that's installed on that OS" from the beginning.
Expurple··on A Rust shaped hole
Rust doesn't need a formal document so badly, because (in safe code) the punishment for not following the rules is much more clear and small. It's either a logic bug that doesn't lead to memory-related vulnerabilities, or a readable compiler error. Of course, if your compiler doesn't catch and explain your errors to you, you need a separate book to help you with that!
Expurple··on A Rust shaped hole
Copy by default wouldn't be so bad if the move was destructive
Expurple··on A Rust shaped hole
I meant a runtime that has to be installed separately. It's possible to statically link a C runtime if you use musl, for example
Expurple··on A Rust shaped hole
> Not really, because the crates they depend on cannot expose APIs with semantic changes across versions.

Not sure what you're talking about. Any specific examples?

> Also it requires everything to be compiled with the same compiler, from source code.

It's not related to editions at all. It's related to not having an implicit stable ABI.

It's possible have a dynamic Rust library that exposes a repr(C) interface, compile it into an .so using one version of the compiler, and then compile the dependent "pure Rust" crates using another compiler that's just going to read the metadata ("headers") of that library and link the final binary together. Same as in C and C++. You just can't compile any Rust code into a stable dynamic library, by defalut. (You can still always compile into a dylib that needs a specific compiler version)

Expurple··on A Rust shaped hole
Go is "straightforward" at the cost of making your codebase not straightforward: https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-... . Programming is complex. That complexity has to live somewhere.

Python is absolutely not straighforward, it's a huge language with many moving parts and gotchas.

Although, I admit, both are very easy to start programming in and to start shipping broken projects that appear working at first. They are good for learning programming, but terrible for production.

> Rust didn’t really solve memory safety, it just pushed all the complexity into the type system.

Yes, that's what it did, and that's the right tradeoff in most cases. Where the compiler can't make a reasonable default choice, it should force the programmer to make a choice, and then sanity-check it.

> If one was struggling with memory errors in C++ that’s nice. If one was using Java, that still sucks.

It's nice for those struggling with uncaught exceptions, null pointer bugs, mutithreading bugs, and confusing stateful object graphs in Java.

Expurple··on A Rust shaped hole
They are all fragile for different reasons: dynamic typing (that always leaks through bolted-on type hints anyway), implementation inheritance, null, exceptions, uncontrolled mutation, abuse of reflection and downcasts, weak leaky interfaces that the compiler doesn't check, no help with issues in multithreaded code, insecure defaults, poor semver practices in the ecosystem, poor tooling, fragile runtime dependencies.

I use Rust. From what I've read, Swift seems better than the others, with Typescript and Go following closely. All four happen to be widely praised in this thread.

To clarify, I don't have "professional experience" with every popular language, including Swift and Typescript too.

Expurple··on A Rust shaped hole
Idk, I'm not familiar enough with Zig to say
Expurple··on A Rust shaped hole
I'll put it like this. Rust causes you to refactor more often and do a full refactoring at once (because the interfaces are so rigid), but it makes it easy to do a full (and correct) refactoring very quickly. Think of it as docs being part of the interface and the compiler forcing you to always update the docs. That's an amazing property
Expurple··on A Rust shaped hole
> There's so many good high-level languages to choose from

We have many popular high-level languages, but I disagree that they are good. Most of them are fragile piles of crap unsuitable for writing anything larger than a throwaway script.

(In my subjective and biased assessment, which is hovewer based on professional experience)

Expurple··on A Rust shaped hole
> in the end, you can write Option just fine it C.

No, you can't. In the sense that the compiler doesn't have exhaustiveness checks and can't stop you from accessing the wrong variant of a union. An Option in C would be the same as manually written documentation that doesn't guarantee anything.

std::optional in C++ is the same too. Used operator* or operator-> on a null value? Too bad, instant UB for you. It's laughably bad, given that C++ has tools to express tagged unions in a more reliable way.

> And then, also Rust can not express everything in the type system. (And finally, there are things C can express but Rust can't).

That's true, but nobody claims otherwise. It's just that, in practice, checked tagged unions are a single simple feature that allows you to express most things that you care about. There's no excuse for not having those in a modern language.

And part of the problem is that tagged unions are very hard to retrofit into legacy languages that have null, exceptions, uninitialized memory, and so on. And wouldn't provide the full benefit even if they could be retrofitted without changing these things.

← PreviousPage 3 of 7Next →