Better HN
topnewbestaskshowjobs
Log inSign up

__david__

6,539 karma · joined Mar 11, 2009 (17y ago) · 2,193 submissions

Submissions

comment 2w ago · link · parent

> That’s why I’ve been harping on C being trash for shared-code API…

Agreed, but I can’t think of any other widespread ABIs that are better. Rust’s is not stable both C++ and Rust have concepts that don’t map into other languages well, so using them wholesale is a no go. So it would probably need to be a subset of those. Honestly just tagged unions would probably be enough. Maybe the solution is to get native tagged unions into C…

comment 2w ago · link · parent

Nothing you said is incorrect, but I believe they meant that there’s no way to force a C program to check the NULL correctly—the compiler will happily compile code that gets a pointer back from a function but doesn’t check for NULL before dereferencing it. In something like Rust the type system won’t let you touch the value until you’ve done something to deal with the error. Even if you just want to ignore it, you are forced to acknowledge that the function is fallible by the type system—it’s a compile error if you don’t.

comment 2w ago · link · parent

Except OpenSSH qould have worked just fine if musl behaved correctly. Instead musl ignored the spec and tried to hack around badly written programs but ended up creating a security hole in a correctly written one!

comment 3w ago · link · parent

The first iteration of the touch bar didn't have a physical escape key. I'm not even a VI user but that was my main complaint. I barely use function keys so I was ok with them being virtual (they showed up when I was in the terminal). But I did love adding a custom screenshot button to it and I loved the way the volume and brightness controls worked.

comment 1mo ago · link · parent

He port forwarded 5900 to his Mac.

comment 1mo ago · link · parent

Does that mean that all the black holes of a particular volume have the same interior? Or does it mean that the black hole state is the case where you can’t tell what the interior is?

comment 2mo ago · link · parent

I don’t think there’s harm is speccing out the arbitrary encoding and then having a different spec that references that spec but puts hard limits on it. Many rfcs are like that.

comment 2mo ago · link · parent

I do too, but with an exception—if I’m going to emphasize the word “actual” I’ll say “thuh ACTual” but with a full stop after the “the” so that I can really chew on that first syllable for the emphasis.

comment 2mo ago · link · parent

I would transcribe the first sound of “unicorn” as “yoo“. It’s almost ee oo but the ee isn’t voiced—it starts right at the transition between those which is what the Y sound is.

comment 2mo ago · link · parent

I just tried AdGuard with safari and got YouTube ads. Do you have to configure something special?

comment 2mo ago · link · parent

I never suggested that you shouldn’t check the commit before merging!

comment 2mo ago · link · parent

Or just pull the pr into your local git, git amend --reset-author, and then push it to master yourself.

comment 3mo ago · link · parent

Perhaps, but I think it depends on where the Go devs are coming from. In my experience the lack of proper dependency management in older versions of Go didn't really lessen dependencies, it just made teams have to deal with annoying $GOSRC issues. But then I worked at a place where the devs used PHP (w/composer) and node before Go was introduced.

Personally I came from a C background so I tended to use deps more sparingly.

In the end it's a bit of a balancing act—lots of dependencies is a larger opportunity for these kind of supply chain attacks to affect you. Copying stuff into your repo protects you from that, but it also makes it way more likely that you'll miss security fixes, unless you're actively looking for them. Re-implementing what you need is also viable but it slows down the dev process.

comment 3mo ago · link · parent

I also wish that it would be the default. Integration tests are fine, but they aren't compile time. Elevating them to compile time and using an LSP enabled editor makes it just underline SQL errors before I've even had a chance to run a manual compile let alone a test...

comment 3mo ago · link · parent

sqlx at least has the (optional) offline mode, where you "cargo sqlx prepare" once (which wants access to a db) and then you can build in offline mode which typechecks your queries against local files.

Although I suppose that's still doing a lot of shenanigans at compile time. It could be sandboxed pretty well (theoretically). I'd hate to give it up completely though, getting a compile time error when SELECT query params or return values have type mismatches is extremely nice.

comment 3mo ago · link · parent

I think Go ends up with fewer dependencies mostly because there is more friction in finding them. With rust (and npm) you just "cargo search xxx", then "cargo add xxx". Go makes you web search and poke around github looking for something. It's not onerous or anything, but just that extra step slows things down just a bit. C projects tend to have the least because it's even more annoying to add them and you have to create build commands that deal with slightly different distributions (and learn makefile+pkg-config or cmake, or autoconf).

Certainly having a larger stdlib helps Go projects keep their deps down, but I don't think it's the real reason.

comment 3mo ago · link · parent

I liked it, but it felt like 1/10th of a game. On the other hand they only charged about 1/10th of a game ($5). I played it for about 10 hours so I feel like I easily got my monies worth.

comment 3mo ago · link · parent

They obviously did not mean not literal USB, just a standardized connector across DRAM versions/speeds.

comment 5mo ago · link · parent

Only if your personal projects make you money. I have a million hobby projects but none generate income.

comment 5mo ago · link · parent

Having fd 4 mean something specific is no weirder than having fds 0,1, and 2 mean something specific, which is probably never going to change. At some point you just gotta embrace the Unix.

comment 5mo ago · link · parent

I agree. I think the current way is very nice to use (in c). I think the best way would be to have something similar to vfork() but not bound by posix rules. Then make the normal posix apis (close, setuid, etc.) act like the Rust “builder” pattern. Possibly giving them a prefix for explicitness. That way the “fill out a giant structure” people could have their wish and the people that just want a faster posix experience don’t have to learn an entirely new concept and api surface. It would be future extensible that way, too (just add more prefixed calls to the builder).

comment 5mo ago · link · parent

That’s only fairly recently at my Costco. For years and years it was only American Express and debit.

comment 6mo ago · link · parent

No one is saying to pretend you memorized everything. They’re saying they’d rather have an “I don’t know” than a half-assed ai response (or stack overflow cut and paste).

Or, if you get nerd-sniped by the question and spend some time figuring it out, that’s fine too.

But if you want to be helpful but don’t want to take the time to figure it out yourself, don’t just forward the question to AI or send me a link to the first result in Google because I could have done that myself(and may have done it already). Just say you don’t know, which is a paradoxically more useful response.

comment 6mo ago · link · parent

From his 2006 speech/routine at the White House Correspondents' Dinner, speaking to then president George Bush:

> Now, I know there are some polls out there saying this man has a 32 percent approval rating. But guys like us, we don't pay attention to the polls. We know that polls are just a collection of statistics that reflect what people are thinking in reality. And reality has a well-known liberal bias...

His whole thing was phenomenal: https://www.youtube.com/watch?v=IJ-a2KeyCAY

comment 6mo ago · link · parent

On the plus side, it's a chemical that was discovered more than a century ago so scientists have accumulated a lot of knowledge about it. So far no studies were able to link it to cancer. It also doesn't significantly build up in the body over time (like heavy metals do). It's 3x heavier than air so it shouldn't spread too far away. The main issue is they want to try to keep it from getting into storm drains or into the ground water.

I've heard from others that it's readily absorbed by water. That's bad in the ground water case, but it seems it might be a positive when trying to clean up a (contained) spill.

It appears to me to have a relatively high lethal dosage (my back of the napkin calculations are saying a 200 pound human would have to orally ingest almost a liter of it to reach the LD50 dosage--but again don't quote me on that number because I am not an expert and could have very easily messed up the math or the concept of a lethal dose).

So, while I agree there might be unknown long term issues, it does appear to be a relatively low probability of that since it seems to be on the less pernicious side.

comment 6mo ago · link · parent

> What a disaster and complete failure on the local government in the way they handled this situation.

Can you expand on that? It seems like there wasn't a lot they could do once the tank started leaking.

comment 6mo ago · link · parent

I understand what you’re saying but in this case notice they don’t even mention terminal or command lines. You have to already understand enough context to know what they mean and at that point you should be able to interpret the command itself.

comment 6mo ago · link · parent

In addition to possible ignition through the sparks, it's apparently stored under high pressure, so you can't make a hole without completely compromising the structural integrity which is pretty much guaranteed to kill the driller.

comment 6mo ago · link · parent

is not bad for that. Not precise, but in the ballpark.

comment 7mo ago · link · parent

That’s also not great if you’re trying to make a 10 gigabyte file. In that case, use bs=1M and count=SizeInMB.
12345
74