skysight-inc/HackerNews huggingface dataset:
> Exceptions are a transparent and clean way to handle exceptional events.

I'd sum up this argument as: Exceptions are syntax sugar that allow callers of a function to ignore the error cases of something they are calling and depend on something that calls into them to handle the error case.

An example:

void HandleRequest(const Request &request, KV &kv) {
...
kv.set("a", 10);
...
}

In this example KV.set will raise an exception. The programmer implementing HandleRequest isn't directly exposed to this fact and so to them, and the reviewer, and future onlookers this code looks correct. Now lets say kv.set() throws an exception in production under a specific case. Maybe there were two people attempting to set the same value at the same time or a networking issue. Doing this in the context of a webserver might make sense as the webserver might handle exceptions as error codes but that's not the end-all-be-all. Suppose we refactored to something like this

Something CreateSomething(....);

How do you know if this function will throw an exception? How do you find all of the possible exceptions that can be thrown? Statically you can't really. If instead you see

absl::StatusOr<Something> CreateSomething(...);

You can tell for sure that the result has some error that needs to be handled. Your original code:

kv.set("a", 10);

This code no longer compiles in an absl::Status world. Instead you'd need to do something like:

CHECK_OK(kv.set("a", 10)) // this will panic
RETURN_IF_ERROR(kv.set("a", 10)) // Bubble up

From this we get:

1. a stack trace since RETURN_IF_ERROR adds metadata about the call site.

2. Guarantee that code will not compile if errors are not handled.

3. Guarantee that future readers know that some very high level function could probably call into code that can produce an error you need to handle.

This matters much more if things like this are happening:

kv.beginTransaction();
kv.set(...);
kv.endTransaction();

This could be handled by destructors in this case but in other cases:

otherService.startingWork();
kv.set(...);
otherService.doNextStep();

There are cases where destructors do not make sense. You do not always want to call `doNextStep()` as it would be 100% wrong in the case where we cannot set our value in our kv store. Contrived but I've run into these in real life services. If a developer sends me the above code snippet I might LGTM. If the developer instead sends me:

otherService.startingWork();
if (!kv.set(...).ok()) { log("something went wrong"); }
otherService.doNextStep();

I'll be able to point to the exact problem with this code much more easily. Also if there's an outage and I need to read this code I can clearly see why this `something went wrong` in the logs correlates to incorrectly called doNextStep().

I'm not saying that Status is perfect (I'm not 100% sold) but exceptions are a type of control flow in an abstract sense. The problem some people have with it is it's control flow you can't audit.
Also owing consideration is the many advances to those processes that could occur with more substantial investment in nuclear power.

However the primary benefit to nuclear, beyond its acceptable carbon emissions, is that functioning as a base load removes a lot of the difficultly with building enough battery infrastructure to enable solar power to power peak load and through the night. This is particularly the case for service based economies whose peak load is often after dark.
Also has the benefit of discouraging crawlers.
It is particularly foolish to pick up C at this late date. There were reasons 40, even 30 years ago.

Now, unless you are coding for the Linux kernel or Postgres, it is a boat anchor. C++ will remain a sensible choice for at least two decades. Others are a crap shoot.
The factories moved overseas because that was perceived as the route to more payback for the investor class,(true in the short term) ignoring the expense against the people actually producing "stuff" in the US (the longer term result). This effectively moved research and development away from the US because it was more expensive to continue there, and money was the only object.
Correct, "portmaster" and "mergemaster" are widely used.
We've very much built on the shoulders of giants:

- Frontend & API (Rails + jumpstartrails.com)
- Images --> USDZ (Swift Code on a Cloud hosted Mac)
- USDZ --> GLTF (Swift + Custom Ruby)
- CDN (AWS Cloudfront)

Lots of Glue:

- AWS S3 / Cloudfront
- AWS SQS
If human beings can expand to other worlds, or live in space easily, or even just access enough resources to stabilize at 10B human beings with zero poverty - then we can turn the Earth into an Eden - so conceptually nothing could be more environmentally beneficial. At least that’s how the optimistic vision goes.
Did you live during the Cold War? I struggle to understand why someone would want to live under that constant existential threat of nuclear annihilation.
That's kinda like asking the environmental cost of driving 100 miles. Are you thinking of a big, dirty solid-fueled rocket, or an oxidizer-rich CH4/O2 rocket, or what?
Having used both, I'd rather use the FreeBSD utilities :)
> I think that we have a responsibility to speak out on matters we believe in and ignore negative pushback.

You can try, but new "fact checking" norms will ensure unpopular (especially politically unpopular) opinions get censored on social media before anyone sees them
It’s a very narrow city on the coast and you take off towards the water. It’ll get dark pretty fast.
Sounds good… do we still get to have skylights?

edit: I’m genuinely curious if it’s possible to allow sunlight while blocking harmful radiation, our atmosphere does it, can a thick window do the job?
The sad thing is; the admins here have, for reasons I can’t understand - taken a massive stance on not only allowing paywalled links, but featuring them; which is obviously a lot worse.

There’s a ton of opportunities here to use (paywall), or simply use an alternative link. The admins here don’t, won’t; and sadly, worst off - discourage comments like this.

I will never read a paywalled article on HN, by principle alone. I don’t come here to see information I have to pay for. I don’t think anyone here does.
I don't have a choice but to use the app as I promote my music on social media to connect with people I don't know... Free promotion is getting harder and harder each year.

I have tons of rants concerning Twitter, but foremost, they bury the features that used to block unwanted trends and keywords like mutewords (and still leave the buttons and features up despite their inability to work correctly), they compile a list of what you click on and build a very off target content preference list that limits what you see all the time (even in trending topics), they also send you useless notifications about what others do in order to ping your account if it is dormant, and spam you with emails about that useless activity even when you you disable the setting and click unsubscribe... Twitter also shadowbans and post/follow limits accounts with no warning or explanation (Also for anyone who complains about Twitter or their partner companies), which limits the visibility you have for the life of you account... You end up posting to a brick wall without even knowing it...

It's the baseless and uncreative minds that have led the app/company into the dirt. They killed the real time updates and drove Twitter into a shell of it's former glory and utility. It may not die, but I'm sure there are mostly inactive accounts occupying the space now, and their algorithms are a joke, nowhere near anything intelligently designed, their algorithms now are just applied to make the site look like it is still a dynamic and lively place. That's also why they were stoked that Trump brought attention back to it, and why Jack has resigned long after years without any good company profits.

Someone will probably invent something new that rings Twitter's EOL one day soon, hopefully they don't make the same idiotic and arrogant mistakes...
It depends whether the process is part of the art itself, or just the result. If someone wants to be the excel artist (https://www.spoon-tamago.com/2013/05/28/tatsuo-horiuchi-exce...), that's cool even if other tools would give them more possibilities. But in this case, the 80s development style is neither part of the art, nor is it better in any way at all, so people keep pointing out that this decision is just objectively worse than doing the absolute minimum of modern version control.
Anyway to take a model that was created and get it into CAD / modeling software? I don't know much about VR/AR but I know it is a pain in the bum to replicate an object / create a model for 3d printing.

Thank you.
I don’t doubt that the lack of VC is causing that project’s delayed release. It was announced nearly three years ago.
Might want to rebrand since FreeBSD's "portmaster" has been in use for decades at this point.

https://cgit.freebsd.org/ports/tree/ports-mgmt/portmaster
It seams firefox caches bad basic auth creds. It is so annoying because there are several sites where I can only do a basic auth login from a private window. If I go there in a regular window I just get the invalid authentication error, and no option to enter a new username/password. It isn't clear where this is cached either, so it is very difficult to clear that cache.
> I personally really dislike the degree to which rust and zig force the programmer to worry about error handling. The way I see it, things should not error, if they do, stop everything and print a stack trace, please don't bother me with it.

Then just .unwrap() everything?
Nuclear pollution is scary but coal pollution isn't? I bet coal pollution has killed way more than nuclear pollution per plant.
Thanks. According to Rand[0], the % of households in the middle class has shrunk, primarily because they are moving into the upper class. While technically, yes, the middle class is shrinking, it's not for a negative reason (from the perspective of the middle class themselves).

Overall, American households are increasingly wealthy, class divisions notwithstanding.

[0] https://www.rand.org/blog/2021/05/most-americans-consider-th...
Muscle loss isn't too bad. The real killer is bone loss. You lose 1% of your bone mass per month in space. NASA still hasn't figured out how to fix it. Valeri Polyakov spent 437 days on Mir in 1995. Nobody has come close to that record since then, and nobody will until the problem is fixed.
But we do need more energy.

Energy can fix essentially any problem we have. Need to desalinate water? Energy. Need to heat your Arctic home? Energy.

Being able to use energy in crazy and inefficient ways is a feature, not a bug. Everything you ever do outside of subsistence level agriculture is proof of that.

The ideal state of being would be one in which we have limitless fusion power or similar and we basically just do whatever we wish. If we get that and alchemy we win the Universe.

The problem is in not pricing in externalities. If I have a fusion reactor in my garden then I can use as much of it as I want and it has no negative effect on you.

If we tax carbon heavily then Bitcoin and friends will actually get us to that future more quickly.

That politicians are fucking around with stuff like low emission zones and labels on meat or whatever rather than just taxing carbon is almost genocidal at this point. It's hilariously off the mark.
What if all of the waste was taken out to the middle of the ocean and dumped there, let to naturally dilute itself in all the water?

I'm being entirely serious. The oceans are huge. Would they be enough to dilute it to a level below any observable health risk?
In my limited experience, no-code tools are really great for idea validation & prototyping because you can get to the core of your value proposition faster than starting from scratch. As things scale, maybe you can't rely on V1 as much, but that can be a good problem to have.

One company that started on Bubble is Qoins. https://bubble.io/blog/bubble-app-qoins/

Qoins have raised $2.3m according to Crunchbase https://www.crunchbase.com/organization/qoins/company_financ...
> That aligns more favorably with my point above than your counterpoint here, and the context is people refusing vaccines and other behaviors one would associate with an unclear, propaganda laden body politic.

Oh, people come up with unhealthy fads all the time by themselves. It's consistent with propaganda, but not really any evidence for it.

> Finally, the overall assumption being challenged here is whether to blame the people, and I do continue to reject that idea for it being unproductive and toxic to all of us.

Not sure about blame. The media gives people what they want, and people want drivel.

The whole point of stuff like 'fairness doctrines' etc is paternalism: given people who 'know better' the power to give people media that's supposedly better for them than what they would have chosen by themselves.

See https://slatestarcodex.com/2014/12/17/the-toxoplasma-of-rage... for an exploration of that dynamic. https://slatestarcodex.com/2015/09/11/book-review-manufactur... might also be interesting.
He didn't say he wants it. I think he means that times of renewed rivalry and tension are coming whether we want it or not, and he hopes some good can come from it.
I agree, most content on the internet is either made or moderated by a very small fraction of internet users. This results in a serious selection bias and content that is mostly in line with the creatures' beliefs.
I don't think he's saying "I hope a cold war brews so we can get better space exploration!!"

I think he's saying-- well, at least if geopolitical tensions get worse, maybe it will also at least improve space exploration.
When you consider the other environmental impacts of hydro it’s not as green as people like to think.
Thinking of the number of rockets required to facilitate a “moon rush”.
https://en.wikipedia.org/wiki/Ordinal_number
At a high level: yep, completely agreed. In my experience, not-cleaning the database has consistently lead to more realistic tests, near-trivial parallelism, and fewer errors. The extreme few exceptions (e.g. testing db-wide behavior, like reports) are easy to put in a special folder... and people will quickly grow annoyed with how slow they are to run in comparison, and will avoid adding them. It's a nice self-preserving feedback loop.

My only recommendation / near-requirement for doing this: randomize your test order (prevents cross-test dependencies from leaking in), and consider running them twice in CI. Once with a clean DB (ensures you can bootstrap your test environments - it's easy to lose this unless you have something checking it), and once without cleaning (helps ensure you don't have imprecise tests, and just rerunning is a trivial way to get a decently-strong assertion, without having to resort to truly persistent shared databases). Or just do a weekly test with a clean db or something - bootstrapping problems are usually easy to identify and fix, it's fine if they leak temporarily.

---

If you don't want to do this, or want a magic performance hack for db-bound tests while improving things: throw your test database onto a ramdisk. It's particularly easy with a dockerized DB: just use the ramdisk as the DB's volume.
This would be more useful if it could run in docker with a web client
Ask HN: Where to report Y2K22 Gmail bug?
I ordered something from a major supplier to be delivered in the next few days, expecting January 7th (07/01/22) [DD/MM/YYYY], but Gmail seems to be parsing the delivery date as July 1st in the top info/header block? They know my timezone and region, this isn't an overseas order and the full physical address is in the email body.

If big tech can't even parse dates correctly taking in different context, how can we trust them with harder problems like self-driving vehicles?
I’m not personally doing any such thing. The people who make the rules are ourselves through the democratic process, guided by a set of morals and tenets that we take reasonable measures to protect the weaker and less powerful or capable among us.

Now you may disagree with those tenets, and that’s of course your right; but people should understand why we make such rules based on history and have at least some amount of respect for what came before, imperfect though it may be.

Ideological purity doesn’t serve anyone well, because the world is a messy and complicated place. Every rule has exceptions; there are shades of gray; etc.
Agreed, I had to zoom it to 150% in Chrome to make it readable. Interesting essay though.
> To be specific: the exposure during a day of lunar living would be equivalent to ~2.6 days on the ISS, or ~200 days on Earth's surface

If we do nothing to shield occupants.
USA is one of Emirates key markets, I wonder why they didn’t mandate higher quality pilots for the routes. I’ve flown quite a few times and remember hearing American-sounding pilot names on several occasions so I know they have them on staff.
It is unknown if it will be that easy. For obvious reasons, there have been no long-term studies in partial gravity. If 0.05g stops bone loss, great. If a full 1.0g and nothing less is required, then that's going to be a really onerous design constraint.
Like many others, this was the wakeup call I needed to download go1.18beta1 and start writing some fuzz tests. I unleashed it upon my JSON log viewer, which has the goal of never suppressing a line even in the face of egregious parse errors. (The last thing you need when software goes wrong is your UI hiding stuff from you, after all.)

As expected, within seconds it found that the input `{"": 0}` causes a panic. (This is a weird special case that I handled for other classes of this problem, but not this exact case!) I also got to see what happens when you have more bytes on a line than bufio.MaxScanTokenSize and realized that that is pretty low for an interactive program, especially when all you can do is exit.

The ergonomics are excellent. When the fuzzer finds a failing input, it creates a file that contains the test case. You check this in and future invocations of plain "go test ./..." will use this input. "go test -fuzz=FuzzWhatever what/ever" will cause it to search for more failing inputs. Really well-designed.
Yeah sounds very optimistic.

The nearest star is incomprehensibly far away. It would take tens of thousands of years at least to get there assuming that was even possible.

I don’t see anything positive about living in space or on Mars. What would be so great about living on such a hostile world?
Promotion of sugar in the English-speaking world's diet is a much bigger public-health disaster than, e.g., COVID-19.

Packaged food should have a mandatory "mg fructose-equivalent" labeling requirement.
I mean, wouldn’t the same argument imply that it’s more net-negative to spend the same amount reducing carbon on earth directly?

I’m all for space exploration but found these types of arguments specious
I'd be cautious to take a 20-year project with only a single developer the entire time as an example for other projects that are not that.

But the particular advantages of a single-developer project are worth pointing out; I do think you can "get away" with a lot of... things that would be messiness on a multi-developer project, but aren't on a single developer project when they match whatever predilections of the single developer. There are real "organizational" costs to adding more developers, with the biggest spike at adding a second. There are also obviously disadvantages and limitations to having only one developer. (in this case, not even only one developer "at a time", literally only one developer over the lifetime of a project that's lasted longer than most still-alive software projects!)
>assert db_session.query(User).count() == 1

>assert db_session.query(User).get(user.user_id) is not None

These aren't testing the same thing. Wind database clearing you are observing count going from 0 to 1, but without clearing the database you way still pass if it goes from 1 to 1 instead of 1 to 2.

If you don't clear your database your database state will be considered an input to the test and it may be needed to reproduce a test.
And no one knows how much gravity you need to fix this. That's one reason a moon base would be beneficial.

Does 16% gravity let you do exercises that let you keep most bone density? Is it pretty much the same as microgravity? Or is it somewhere between-- just slightly less bad than orbit.

I have some hope that 16% + an aggressive exercise program could be OK.
> The aspect of rust about which I am most deeply dubious is the heavy use of macros: they are a herald of rust's pedantry ("If you don't use these macros you are going to have to write a shit-ton of boilerplate code.")

The most-used, most-loved macros in Rust have nothing to do with Rust's "pedantry", but rather the programmatic derivation of business logic that would have been annoying to write.

Serde's Serialize and Deserialize macros are amazing for creating complex and correct logic for shuffling data into and out of various serialization formats.

Structopt's (and now clap's) macros for command line argument parsing make writing CLIs a piece of cake. Arguably this is just another form of deserialization. Still great, and unrelated to the fact that Rust is verbose and explicit.

I guess you could argue that something like the PartialEq derivation macro is only necessary because Rust forces you to explicitly declare how user-defined types compare to each other (<, >, =, etc.) But I think this is super reasonable, and if you accept that, then the macro just provides a shortcut to opt-into the code that most people might want, which is that structs will compare using the comparison functions of their inner fields.
It’s not ok to call gas “green”. Period. If gas is necessary then build it, but don’t claim it is green.
Would be pretty easy to make a browser extension that does this, based on a list of known pay wall sites. Could even have a "create archive.is link" button for submitting the URL to archive.is if you wanted to leave it as a comment, as many people already do.
This article is a good counterpoint: https://newrepublic.com/article/164688/viral-lab-leak-theory...

While certainly more plausible than 9/11 conspiracy theories, the lab-leak proponents have the same tendency to put forth several mutually incompatible theories, while believing each has a strong amount of evidence for it.
It works in principle, but it's a very big engineering task, and an enormous expense to boot. To avoid noticeably different acceleration between head and foot,* it's going to have to be substantially larger than any spacecraft we've ever built, and the biggest spacecraft we've ever built cost over $100bn. It's also going to have to withstand stresses larger than anything we've done before.

There's no reason to doubt we could do it, but it's a very big step from where we are now.

* And if we don't do that, then we stray into the realm of untested biological issues. We have no idea if people can live safely and comfortably like that.
Apple Rankings – The definitive list of good and bad apples
Agreed on the hope that the new cold war spurs more scientific achievements (just hopefully fewer Manhattan Projects).

However, I don't grok the point of human-staffed moonbases. I'm just a casual layman, but asteroid mining's the only thing I know of with a clear ROI in space. Or is the idea a moonbase would be like the ISS/Antarctica, an international scientific outpost?
I'm assuming you're using a stateful packet filter when you're talking about this? Otherwise you'll break all kinds of stuff.

CISO's care about security but you'll find that most developers/users do not at all and its like pulling teeth to get anything done. It'd likely be better to get all developers basic security training and automated code vulnerability scanning tools.
But not adjusted for overall health. This seems to be the same thing we see with flu vaccines where the vaccination rate is higher in healthy people. Otherwise what's the mechanism of action that would cause covid vaccines to decrease non-covid mortality?