HNHacker News
TopNewBestAskShowJobs

dwattttt

2,300 karma · joined December 14, 2020

submissionscomments
dwattttt··on Rust Style Guide
> Rust is not a production language

Your argument was that the only Rust projects there are are little developer tools, so Rust isn't a production language. When pointed out there are large projects that every day users rely on that use Rust, and not just in corners of the codebase, code that's exercised by approximately all users, you insist it's still not production?

dwattttt··on Rust Style Guide
You.. doubt that people use Firefox, Chrome, Windows, or Android? That it must be "attention" that's the reason those projects have Rust in them now?
dwattttt··on Rust Style Guide
Rust is in use in more places than you may expect. Does the hypothetical grandma use Windows' kernel? Android? Firefox? Chrome?
dwattttt··on macOS 15.8.2 Breaks OpenGL
> Apple's ecosystem depends on every middle-class person around the globe

I have terrible news about the distribution of iPhones and the middle class globally.

dwattttt··on Tell HN: Remember to migrate away from .name domain
Fair? No, not at all. Even eminent domain specifies that the seizure be for public use, and the owner be fairly compensated.
dwattttt··on Types of types: Haskell's Kind system
You don't. Or less snarky, I imagine you'd have to use macros to generate wrapper functions, in order to generate a new function of a user provided type.
dwattttt··on C++26: The New Debugging Header
An INT 3 isn't even always one byte; there's a one byte encoding, but I believe it's also legal to issue a two byte encoded INT N, where N is 3.
dwattttt··on C++26: The New Debugging Header
Agreed, and just to make it shorter and clearer; when you resume a debugger, it resumes at that next address. If it's outside a basic block, it's because in the absence of a debug break, it was about to go off the rails anyway, nothing to do with the break.
dwattttt··on Show HN: How random are you?
I'm not sure what your point is. A collection of samples were taken from humans, and they did not form a uniform distribution. Samples from an unbiased RNG are much closer to uniform.

Are you saying we should ignore the distribution we observe from humans and predict them as uniform anyway?

dwattttt··on Banks are now trying to offload the AI data center debt they just underwrote
Only if you can hold the debt until someone is willing to pay the price you're asking to make it profitable.
dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
It looks like you're right, my memory is wrong re. trait bounds. My guess then is that it only works for lifetimes because they involve subtyping, and impl Drop for all T means that it's valid for more constrained lifetimes.

That said I was wrong earlier.

dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
They didn't special case this (in this way at least). You only need to specify the bounds relevant to this impl at this point.

It doesn't even have to be less constrained than the containing types definition. You can provide an impl with more constraints; for example, a type Q<T: Read + Write>, but impl Seek for Q<T: Read + Seek>

dwattttt··on Show HN: How random are you?
The strings are equally likely if they're being purely randomly selected, but not if they're being selected by people with a poor understanding of random. In the latter case, people are more likely to select HTHTHT.
dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
Sorry, yes. I mean that Drop isn't implemented for all Q<T>, just all Q<T> where T meet the bounds of legally constructing Q. I note the difference because you can write a Drop impl with no bounds on T, and I believe it would not be able to trigger the bug.
dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
Even if the bounds are the same on the struct and the impl, it's still true that placing bounds on the Drop impl means it's not implemented for all T (just all T that also satisfy Q).

You also don't have to place those bounds on the Drop impl just because they're on Q, that's not an error.

dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
This code, from the bug submission?

  impl<T: 'static + Send> Drop for Q<T> {
      fn drop(&mut self) { if let Some(t) = self.0.take() { KEPT.lock().unwrap().push(Box::new(t)); } }
  }
The bound on T in the Drop impl means Drop is not implemented for all T, only where T: 'static + Send. Q<T> also having the same bound doesn't make a difference to the Drop impl.
dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
You're claiming that this bug that reproduces back to Rust 1.4 (2015) is a sign they're adding too many features to make sure they don't introduce bugs? Or do you have bugs that are due to these recent features?
dwattttt··on 11 year old unsoundness bugs found in Rust borrow checker
How many of them only conditionally implement Drop, based on a generic param lifetime?
dwattttt··on Codex CLI installs a persistent, self-updating background daemon by default
Are you referring to something built into VS Code, or an extension? It looks you're talking about https://github.com/redhat-developer/vscode-java, which is RedHat's doing.
dwattttt··on No portable way to detect string-to-float conversion errors in standard C
I'd argue it's as much a mentality as language barrier; high assurance code would typically always return an error code, and use out parameters rather than return values. This has been possible for as long as C has existed (I imagine), it's just not common practice.

I have a pet theory that new languages benefit at least as much from an opportunity to reset "common practice" / defaults as they do syntax/semantic improvements.

dwattttt··on C for Rust programmers
I learned programming from a tradition without overcommit; even though one failure mode is reported synchronously, I can't trust a success to mean I won't fail later.

"It's hard to handle correctly for beginners" is a reason for beginners to ignore a return value. It's not a reason for the system to (by default) not do the bookkeeping to know this will (likely) fail.

Sparse mapping & reserving address space then deliberately faulting in pages is a good & advanced technique, but it shouldn't share interface with the beginner/default API.

dwattttt··on C for Rust programmers
I'll offer a thought, which amounts to rephrasing "front loaded with a myriad of compiler gymnastics you need to think through." from sibling.

There's a _lot_ of utility in things that aren't represented by a literal difference in the compiled code. It's not unusual to make a type in Rust that's just a single field; you're not making a struct to gather related data together, you're giving it a different name because the same data means something different.

It's a little like the difference between a uintptr_t and a uint16_t*. They're represented the same in the machine, the difference only exists in the source language.

Rust derives a lot of value from things that only mean something at compile time. I think you'd "unlearn" what C (commonly) teaches when you don't find a C struct with one member "weird".

dwattttt··on C for Rust programmers
> How is it then that my stock KUbuntu system won't let me allocate 50,000,000,000 bytes?

I can't speak to the specific implementations, however servicing an allocation request has multiple fallible steps: reserve address space, then confirm/acquire/defer the physical memory backing the allocation.

My understanding is that overcommit allows deferring assigning physical memory to the allocation, however it could still fail to find a chunk of address space to service the allocation request.

dwattttt··on Reducing undefined behavior in the C language
It's a safe/stable operation to derive a more limited capability (pointer) from a more capable one. An example would be an arena allocator having a pointer valid for the whole arena, but then only handing out a derived pointer that's valid for the size requested.

You can also limit access permissions IIUC; I'm only going by old memory here, but you'd be able to hand out a read-only pointer derived from an RWX pointer.

dwattttt··on Port of the TypeScript compiler, checker and lsp to Rust, by LLM
You may have missed the project history, this _was_ implemented in JS previously. I don't think they were interested in porting it back to a language it was originally written in.
dwattttt··on OpenAI Withdraws 3 Math Papers
Yes. A researcher who achieves a reputation of making mistakes carries that reputation.
dwattttt··on OpenAI withdraws three mathematical results
... they're not? Why would you think mathematicians are happy about sketchy or bad submissions.
dwattttt··on Port of the TypeScript compiler, checker and lsp to Rust, by LLM
No one. Quoting sibling, it would have been about $7 usage of a $200/month subscription.
dwattttt··on Port of the TypeScript compiler, checker and lsp to Rust, by LLM
I'm suggesting that JS is not good for every possible use. And that is ok.

I would not want a core internet router or a kernel to be implemented in JS. But I am happy it is used elsewhere.

dwattttt··on Port of the TypeScript compiler, checker and lsp to Rust, by LLM
It's ok for a language (JS in this instance) to be good in a domain but not good in all domains. Pulling a language in every direction forces it to make compromises that hurt its applicability in specific areas.
← PreviousPage 2 of 34Next →