Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kibwen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
421.
▲
by
kibwen
6mo ago
Indeed, editions are brilliant for making relatively large changes in a way that fully preserves backwards compatibility for codebases in the wild, but the existence of editions doesn't mean that Rust is exempt from sometimes desiring
422.
▲
by
kibwen
6mo ago
Yes, the care that Rust goes through to ensure that niches work properly, especially when composing arbitrary types from arbitrary sources, shows why you absolutely don't want to be implementing these optimizations by hand.
423.
▲
by
kibwen
6mo ago
Note that Java makes breaking changes all the time, which is why it publishes a compatibility guide with each major release. These are usually judged to be minor breakages, but if you have a codebase on the order of millions of lines, there
424.
▲
by
kibwen
6mo ago
Clippy doesn't even run on unit tests by default. Honestly it doesn't seem very useful to have it do so for ordinary development, but maybe you'd want to run Clippy on your unit tests in CI just to be extra safe, in which ca
425.
▲
by
kibwen
6mo ago
Or... the NSA wants you to think that the NSA wants you to think that the NSA believes that Rust is a memory-safe language, so that everyone who distrusts the NSA keeps using C.
426.
▲
by
kibwen
6mo ago
> why the standard library fs primitives don't use `at` functions under the hood In this case it wouldn't seem to make sense to use `at` functions to back the standard file opening interface that Rust presents, because it req
427.
▲
by
kibwen
6mo ago
No, GPL and MIT have significantly different compliance requirements. You cannot suddenly begin shipping code with stricter compliance requirements to downstream users without potentially exposing them to legal liability.
428.
▲
by
kibwen
6mo ago
I'm comfortable saying that "annoying path & string encoding" is encompassed by "inertia for historical behaviors". :P
429.
▲
by
kibwen
6mo ago
But the documentation I'm using claims that it applies to Windows 10, which stopped being supported last year.
430.
▲
by
kibwen
6mo ago
> I'm not sure which docs you mean I was looking at these: https://learn.microsoft.com/en-us/windows/security/identity-... > the winapi crate has been effectively unmaintained Shows how much of
431.
▲
by
kibwen
6mo ago
> And how is this feasible for a systems language? Rust becomes too impotent for its main use case if you only use safe rust. No, this is completely incorrect, and one of the most interesting and surprising results of Rust as an experi
432.
▲
by
kibwen
6mo ago
"We cannot accept it without issuing a breaking change to the project by significantly changing the license terms."
433.
▲
by
kibwen
6mo ago
The irony here being that GNU's coreutils themselves originated as rewrites, from back when BSD's copyright status was still legally unclear.
434.
▲
by
kibwen
6mo ago
No, once you have an MIT-licensed codebase without a copyright assignment scheme, you no longer have the freedom to relicense it at will. You could attempt to have a mixed-license codebase, which is supported by the GPL, and specify that al
435.
▲
by
kibwen
6mo ago
Rust does not hate GNU, and I'm not sure why anyone would have that misconception. It would be like saying that C hates GNU because the BSDs aren't GNU. The fact that there is less GNU-licensed Rust software than MIT-licensed Rust
436.
▲
by
kibwen
6mo ago
doas and sudo-rs occupy different niches, specifically doas aims for extreme minimalism and deliberately sacrifices even more compatibility than sudo-rs, which represents a middle ground.
437.
▲
by
kibwen
6mo ago
As far as I can tell from Microsoft's documentation, WinAPI access for ACLs was added in Windows 10, which Rust 1.0 predates. And std::fs attempts to provide both minimalist and cross-platform APIs, which in practice means (for better
438.
▲
by
kibwen
6mo ago
No, this is mistaken. Rust provides `unsafe` functions for operations where memory-safety invariants must be manually upheld, and then forces callers to use `unsafe` blocks in order to call those functions, and then provides tooling for aud
439.
▲
by
kibwen
6mo ago
> But those are all unsafe, taking raw strings. The parent was asking for access to the C syscall, and C syscalls are unsafe, including in C. You can wrap that syscall in a safe interface if you like, and many have. And to reiterate, I
440.
▲
by
kibwen
6mo ago
The correct comparison to someone asking for first-party access to a C syscall is to the first-party crate that provides direct bindings to C syscalls. If you're willing to go further afield to third-party crates, you might as well ski
441.
▲
by
kibwen
6mo ago
If you don't want Canonical's packages, you should probably just be using Debian rather than Ubuntu. It's not 2008 anymore, stock Debian is quite user-friendly.
442.
▲
by
kibwen
6mo ago
Canonical's usage of uutils is likely for marketing. But the codebase itself was developed for fun, as an excuse for people to have a hands-on way to learn Rust back before Rust was even released, with a minor justification as being cr
443.
▲
by
kibwen
6mo ago
As other people have mentioned, the goal of uutils was not "let's reduce bugs in coreutils by rewriting it in Rust", it was "it's 2013 and here's a pre-1.0 language that looks neat and claims to be a credible r
444.
▲
by
kibwen
6mo ago
They're not missing, Rust just ships them (including openat) as part of the first-party libc crate rather than exposing them directly from libstd. You'll find all the other libc syscalls there as well: https://docs.rs&#
445.
▲
by
kibwen
6mo ago
Indeed, and it doesn't need to be deprecated, because it's an API explicitly designed to give you low-level control where you need it, and because it is appropriately defined as an `unsafe` function with documented safety invarian
446.
▲
by
kibwen
6mo ago
> By mid century, worldwide fossil fuel usage will be higher than it is today. Even if this turns out to be true, it would be irrelevant. The reason that oil occupies the geopolitical role it does today is because of its potential to r
447.
▲
by
kibwen
6mo ago
> Which to me sounds like a good thing for the rest of the world? It probably isn't a bad thing, but let's not overestimate the beneficial effects. The reason oil prices are high right now isn't because of cartel fuckery
448.
▲
by
kibwen
6mo ago
Let's stop beating around the bush. Companies don't produce better products unless incentives are aligned to force them to produce better products. Are incentives aligned in a way to cause Apple to produce better software? If no
449.
▲
by
kibwen
6mo ago
> Well, if you exclude all the bad code people have wrote Nobody is doing this. Please read my comment again.
450.
▲
by
kibwen
6mo ago
I'm going to thoughtfully disagree here. The more I use Rust, the more I feel like we got it wrong all the way back in the mists of ALGOL, and that copy-by-default (which, in (non-immutable) managed languages, translates to multi-owner
More ›