510 karma · joined May 28, 2014 (12y ago) · 98 submissions
comment 2mo ago · link · parent
> Currently, disabling lazy imports disabled the syntax keyword, which means that you can’t use it for circular imports, type checking, etc.
Imo this is a good thing, laziness shouldn't be semantically important. The ability to force disable laziness while maintaining semantics is important for linting and testing, and more often than not, circular imports are a sign of bad code structure.
comment 2mo ago · link · parent
comment 3mo ago · link · parent
I assume that by this you mean figuring out some kind of dietary restriction?
I also struggle with a lot of those things (also ADHD) plus other inflammation-related issues (ezcema), and noticed a very specific pattern of fatigue during the day that improves at night. It's hard to tell what might be effective or not since keeping stability in my routine is a struggle, but I've mostly came up empty on explanations/solutions so far.
comment 4mo ago · link · parent
comment 5mo ago · link · parent
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.
comment 6mo ago · link · parent
comment 6mo ago · link · parent
comment 6mo ago · link · parent
comment 8mo ago · link · parent
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.
comment 11mo ago · link · parent
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.
comment 11mo ago · link · parent
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.
comment 11mo ago · link · parent
comment 11mo ago · link · parent
comment 11mo ago · link · parent
comment 11mo ago · link · parent
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.
comment 11mo ago · link · parent
#![feature(closure_lifetime_binder)]
fn main() {
let identity = for<'a> |x: &'a i32| -> &'a i32 { x };
}comment 1y ago · link · parent