14,622 karma · joined Jan 27, 2009 (17y ago) · 2,278 submissions
comment 4y ago · link · parent
For example, I find it very hard to figure out what the type of public_dependencies is in this declaration: https://github.com/rust-lang/cargo/blob/8fbc8459d59f3acecdb6...
This is the same kind of thing that makes JavaScript challenging to read. It requires a lot of discipline on the author’s part to make it clear what is going on, and even the best of us lack discipline at scale.
comment 4y ago · link · parent
The section you linked does explain it, btw.
IfStmt = "if" [ SimpleStmt ";" ] Expression Block [ "else" ( IfStmt | Block ) ] .
Note there is no newline or semicolon between Block and the optional “else” clause, and a Block is thusly defined: Block = "{" StatementList "}" .
So that being the case I’m not sure why you’d assume it’s valid to put a newline after the trailing “}” of the Block, before the “else”.The other factor at play here is the treatment of semicolons: https://go.dev/ref/spec#Semicolons
All of this is quite natural once you use the language. in fact, it was designed this way in response to the way it was being used.
It is not appropriate for the spec to constantly reiterate concepts that have already been introduced, but rather it should precisely define each concept once. If you want to learn a language from its spec then it behooves you to consider the document as a whole. That requires a lot of mental overhead and I think most people are better off learning from examples and tutorials rather than reading a language spec.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
This is actually a great analogy now, because Apple (or whoever) regularly issue “recalls” for their known-insecure software in the form of software updates. If you follow the discussion in the info sec community surrounding these updates, often the vulnerabilities that are patched are being actively exploited.
One recent iOS update that comes to mind is one that patched an issue where a PDF sent via iMessage could give remote code execution with no user interaction or visibility. (Actively exploited.)
So yeah, you can drive around with your faulty airbag if the possibility of getting your face mangled doesn’t bother you. Or you can just follow the recall procedure, which is a bit inconvenient but it seems much less inconvenient than facial reconstruction.
And if you don’t care about your data being compromised and sold to bad actors, who may then steal your identity and cause a LOT of trouble for you, then by all means run known-insecure software. That seems like very poor risk assessment to me.
comment 4y ago · link · parent
When I’ve been using Linux in other contexts lately it’s been awesome being able to fully understand exactly what each process is and why it’s running (and to be able to remove it if I want to). On my macOS (and windows) boxes I end up trusting Apple and Microsoft a lot more than I would actively choose to.
comment 4y ago · link · parent
The difference between gaming at 4K and 1440p or even 1080p however is not that significant imo. Competitive (and many casual) gamers prefer a high frame rate to high resolution.
But as display technology improves people will just come to expect their games should run in native 4k resolution.
comment 4y ago · link · parent
You say I’m a lunatic, but my experience and the scientific community research shows that drivers often don’t view cyclists as humans, nor do they accurately assess the risk of driving too close to (or even ramming or side swiping) cyclists. (You can find several papers on this, or just ask any cyclist.)
By the way, even if it’s only 1 in 100 drivers who hold this attitude, a cyclist encounters hundreds of drivers during a typical trip. Those are not good odds.
comment 4y ago · link · parent
If the cyclist is not occupying an actual lane to themselves then they are constantly being passed too close by fast moving vehicles, and in danger of running into the suddenly-opening doors of parked cars or surprise pedestrians.
Seriously, if you go somewhere where drivers are respectful of cyclists you’ll see it’s just so easy for it all to work smoothly and safely. The impatience of drivers, at the expense of others safety, is astounding to me.
Also it should be noted that motorists give each other space for selfish reasons; they may damage their car or themselves if they collide with another car. If they hit a cyclist chances are they’ll kill or permanently maim the cyclist, but do little damage to their car, and so they have little reason to care. (!!!!!!)