HackerTrans
TopNewTrendsCommentsPastAskShowJobs

yuriks

no profile record

comments

yuriks
·в прошлом месяце·discuss
I think more to the point, if 0 doesn't represent 0.0, and 255 doesn't represent 1.0, congratulations you've just lost your additive and multiplicative identities and most of the math used in colors falls apart.

The argument for 0-256 feels compelling when thinking about the physical display, but it seems like a very poor fit for any digital image processing or rendering.
yuriks
·в прошлом месяце·discuss
Both types have the `From` conversion traits implemented between each other, so in most cases interoperating with APIs using the old type should be as simple as doing `(1...4).into()`. And, probably because of the warts of the old types, I haven't seen them used much in APIs, so even that I don't think will happen very often.
yuriks
·2 месяца назад·discuss
That's part of the error enum.

  enum AllocError {
    SizeTooLarge { size: usize },
    // etc.
  }
This enum has a known size and doesn't require any dynamic allocations.
yuriks
·2 месяца назад·discuss
I mean, yeah, that was the point of my original reply: health care, education and housing have been getting less accessible in general, not just that poster's country. (Or wherever they're from. I checked the comment history and it seems to be 90% talking back to people criticizing capitalism/markets. Wouldn't be my preferred hobby of choice, personally.)
yuriks
·2 месяца назад·discuss
I don't have concrete metrics/sources to give right now, but my general perception from reading the news is that there's been staffing issues pushing healthcare systems in the US towards increasing workloads in individual providers, leading to less time/attention given to individual patients, lower availability of appointment slots, and offloading of patients onto alternative app-based telehealth platforms, which have been trending up alongside aquisition/consolidation of independent private practices.
yuriks
·2 месяца назад·discuss
Health care, education and housing have been getting worse and more expensive in the US over the decade also. Must be all that nationalization.
yuriks
·2 месяца назад·discuss
In what ways do version pining/lockfiles not solve this problem?
yuriks
·2 месяца назад·discuss
I love corruption!
yuriks
·4 месяца назад·discuss
No, they're implying that you need a lot of coins to pay for parking.

If you need $6 to pay for parking, and the largest commonly available coin is a quarter, that means you need 24 coins to pay. If the value of currency was such that the parking only costed $3, or if dollar coins were more common, you'd need less coins to pay.
yuriks
·6 месяцев назад·discuss
Games are not fungible.
yuriks
·7 месяцев назад·discuss
> Is this actually useful in practice?

It's required to do any intialization, particularly for compound futures (e.g. a "join" or "select" type of combinator), since you need to be able to move the future from where it's created to where it's eventually used/polled. I assume some of those cases could be subsumed by &uninit if that existed yeah.
yuriks
·7 месяцев назад·discuss
For 1, I think it's hard to make a distinction between swapping an object, vs. swapping/mutating all of its fields such that it becomes equivalent to a different object.

For 3, some objects only need to be pinned under certain circumstances, e.g. futures only need to be pinned after they're polled for the first time, but not before. So it's convenient to separate the pinnability property to allow them to be moved freely beforehand.

I don't quite understand the usecase you have in mind for 4.
yuriks
·7 месяцев назад·discuss
People aren't complaining about that. What you do in the privacy of your own computer is only your problem. The issue is people pouring a whole "arduous" 2 hours into vibecoding a project, then advertising it and posting to communities everywhere as a revolutionary bullet-proof high-quality project asking for visibility and contributions.
yuriks
·7 месяцев назад·discuss
This post mirrors my sentiment and the reasons I dislike these sorts of "projects" much more closely than the main site does, deserved to be the main submission, in retrospect.
yuriks
·7 месяцев назад·discuss
The author of the patch does mention that the better thing to do in the long run is to replace the data structure with one that is possible to better encapsulate: https://lore.kernel.org/all/20251111-binder-fix-list-remove-...
yuriks
·7 месяцев назад·discuss
I thought that the implication was that the shader compiler produces a second shader from the same source that went through a dead code elimination pass which maintains only the code necessary to calculate the position, ignoring other attributes.
yuriks
·7 месяцев назад·discuss
I was lost when it suddenly jumped from a long retrospective on GPUs to abruptly talking about "my allocator API" on the next paragraph with no segue or justification.
yuriks
·7 месяцев назад·discuss
A 'static lifetime does not live for the rest of the program. It rather is guaranteed to live for as long as anyone is able to observe it. Data allocated in an Rc for example, lives as long as there are references to it. The ref count will keep it alive, but it will in fact still be deallocated once all references are gone (and it cannot be observed anymore).
yuriks
·7 месяцев назад·discuss
That is not a memory leak though! That's using/exposing an uninitialized buffer, which can happen even if you allocate and free your allocations correctly. Leaking the buffer would prevent the memory region from being allocated by another application, and would in fact prevent that from happening.

This is also something that Rust does protect against in safe code, by requiring initialization of all memory before use, or using MaybeUninit for buffers that aren't, where reading the buffer or asserting that it has been initialized is an unsafe operation.
yuriks
·7 месяцев назад·discuss
...yes?