Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
afdbcreid
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
31.
▲
by
afdbcreid
1mo ago
> Obviously, but that doesn't help me if the complexity in the unsafe parts is made worse, while the safety helps the parts where little help is needed. It's not like the danger in a C program is spread evenly, either. The comp
32.
▲
by
afdbcreid
1mo ago
It's not really defense by obscurity (the JavaScript is public), more like defense by... being different?
33.
▲
by
afdbcreid
1mo ago
So, they can interleave different tokens and get stopless access at normal price? Yes this needs to be tailored for Anubis, but that was the point: the moment it will become popular enough, scrapers will have no problems to bypass it.
34.
▲
by
afdbcreid
1mo ago
But they operate from neither. You can at most sue the one renting them IP addresses. Which will do basically nothing. (Also, blocking a whole country is likely not what you do, but you probably know that).
35.
▲
by
afdbcreid
1mo ago
It seems you misunderstood. It's not an explicit stability guarantee (such things is not possible), it's a debugging helper to crash the program more easily when it happens, requiring you to annotate the code.
36.
▲
by
afdbcreid
1mo ago
> for instance by causing a stack overflow That's not "for instance", that's literally the only place Rust has unfixable UB on embedded (code on OS has other such things, e.g. reading/writing to `/proc/
37.
▲
by
afdbcreid
1mo ago
You can in Rust! You just bundle it with a lifetime. But... This loses the reason people are using indices to begin with: because the borrow checker cannot track what they do.
38.
▲
by
afdbcreid
1mo ago
Yes you need to vet touching safe code. Which is why you keep things private, encapsulate them, and extract them into reusable crates. The most important reason unsafe code is harder to write than C or C++ is that you must keep soundness, s
39.
▲
by
afdbcreid
1mo ago
> With Rust, when I need such control (which is always, otherwise I would use a higher-level language), I need to give up safety, anyway, at which point I have no safety and the complexity of a language that offers safety. This is a very
40.
▲
by
afdbcreid
1mo ago
That is called an index. If you want it to be standalone, you can bundle it with the ArrayList.
41.
▲
by
afdbcreid
1mo ago
It is an allocation bug, it's a use-after-free. It's only a UAF if you actually have a reallocation (something that happens in the given example), but debug allocators don't require you to annotate your code.
42.
▲
by
afdbcreid
1mo ago
They forgot to add (I believe this was not deliberate, maybe their users already infer that) that this only actually performs the check on Debug and ReleaseSafe modes, not on ReleaseFast mode. Which is reasonable I guess because this is a m
43.
▲
by
afdbcreid
1mo ago
No, false based on subjective experience on a sample size of one.
44.
▲
by
afdbcreid
1mo ago
> I can't help to think that the approach of joining several distinct list into a single one in some way undercuts Rust's safety guarantees. Not really. You just need to make the underlying fields private and provide methods to
45.
▲
by
afdbcreid
1mo ago
> In Rust, you can’t even use proper arenas You definitely can and this is done a lot. What you might mean is that you can't use standard library's collections with them (this is getting stabilized soon!) and have to use third-
46.
▲
by
afdbcreid
2mo ago
I agree it's not a good idea, but: > Remember this is the same information that every regular user is able to use. This is not true. The users don't see the HTML, CSS and JavaScript. If they would, even if they're frontend
47.
▲
by
afdbcreid
2mo ago
But when you compare native integers, not something more complicated, right?
48.
▲
by
afdbcreid
2mo ago
Rust Atomics and Locks by Mara Bors ( https://mara.nl/atomics/ ) is a very good book and available for free online. It does require knowing Rust at least in a basic level, but it explains things very well.
49.
▲
by
afdbcreid
2mo ago
r-a has zero filesystem writes (except minor things like copying lockfiles). All the filesystem bloat is from Cargo and rustc.
50.
▲
by
afdbcreid
2mo ago
We're still working on it! The last release had https://github.com/rust-lang/rust-analyzer/pull/23079 which is a significant savings, and I already have more baking (some even have a PR). We're al
51.
▲
by
afdbcreid
2mo ago
Unfortunately that does not work. Consider: // Crate indirect_dep: pub struct Foo; // Crate direct_dep: extern crate indirect_dep; pub use indirect_dep::*; // Crate my_crate:
52.
▲
Scaling Memory Safety: AI-Assisted Rewrites of C/C++ Dependencies to Rust
(bughunters.google.com)
16 points
by
afdbcreid
2mo ago
|
0 comments
53.
▲
Rust – Enabling the next-generation trait solver on nightly
(blog.rust-lang.org)
8 points
by
afdbcreid
2mo ago
|
0 comments
54.
▲
by
afdbcreid
2mo ago
You haven't provided any reason why you want a batteries-included std, while I did include a rebuttal of reasons people commonly claim.
55.
▲
by
afdbcreid
2mo ago
That is true, but this does not require a huge stdlib. And Rust is partially open to that (even adding async traits for IO in std is something they'll likely do in the future), but because std can't make breaking changes, you need
56.
▲
by
afdbcreid
2mo ago
> You can't have something better without changing it. It's a logical contradiction. Sorry, that's a strawman. Of course you cannot have a better version without changing things. You definitely can have a better version wi
57.
▲
by
afdbcreid
2mo ago
> Who said a standard library can't make breaking changes? The std making a breaking change is the language making a breaking change. Most mainstream languages guarantee stability, certainly Rust. > your program is smaller How so
58.
▲
by
afdbcreid
2mo ago
People confuse what they want. They do not want a big stdlib. The downsides are real (the stdlib cannot make breaking changes), and there are no upsides (except, maybe, for faster compilation, since std comes precompiled). They want more
59.
▲
by
afdbcreid
2mo ago
Adding to this, rustc's parser is both correct and fault-tolerant, yet rust-analyzer ended up building its own for different reasons (needing a CST and not an AST).
60.
▲
by
afdbcreid
2mo ago
That's just not true. rust-analyzer does not use tree-sitter. Neither does gopls. Nor Pylance. Or tsc. In fact I don't know if there is a single popular LSP that uses it (but there probably is). Many editors use tree-sitter, but t
More ›