skysight-inc/HackerNews huggingface dataset:
Perhaps it should be allow to optimize it to:

int main() { while(1) pause(); }

But only if system call optimizations are enabled (otherwise it can't add the call to pause()), and only if you did not specifically disable the optimization for infinite loops, and only if you do not use the -Os option.
Build a CRUD API with PostgreSQL and Node.js with OpenFaaS
> memset(&a, 0, sizeof(char) * 2);

The example is sizeof(char)*2, not sizeof(a). If there is any padding at all the example as given will not guarantee zeroing out everything. Not sure what that has to do with unsigned vs signed.
Do kids care about clunky interfaces? Genuine question, I have zero experience dealing with kids. It's just that I remember that when I was myself a kid I would be attracted by any interface (physical or virtual) with a lot of buttons and toggles to play with.
Indeed, although I’m not sure what the utility of a preparedness plan prepared only after an outbreak has started would be, especially one created at the speed of the Civil Service. You can read more context (including the ethical framework and the individual studies used as evidence to underlie the plan) here:

https://www.gov.uk/guidance/pandemic-flu
This is impossible to know. Just because months after the outbreak China has managed to contain it, doesn't mean that there can't be a second wave of reinfection
Yes, properly handling timeouts and cancellation is the next frontier for programmers to conquer. I was just thinking about this the other day because some program I was using locked up, and of course it worked fine when restarted, and I began to wonder why this happens so frequently. A lot of obscure things can cause hangs, but if every blocking operation has a timeout, the number goes way down.

I think it's unfortunate that even new languages still treat timeouts and cancellation as an afterthought. For example, every Go program I've ever written says:

select {
case <-ctx.Done():
return nil, ctx.Err()
case thing := <-thingICareAboutCh:
return thing, nil
}

Instead of:

return <-thingICareAboutCh, nil

The language designers thought about needing to give up on blocking operations, and then said "meh, let the programmer decide on a case-by-case basis". And that's the state of the art.

(Getting off topic, this is why I avoid mutexes and other concurrency operations that aren't channels; you can't cancel your wait on them. Not being able to cancel something means that if there are any bugs in your program, you'll find out when the program leaks thousands of goroutines that are stuck waiting for something that will never happen and runs out of memory. Even if the thing they're waiting for does happen, the browser that's going to tell someone about it has long been closed, and so you'll just die with a write error when you finally generate a response. If you have a timeout and a cancellation on every blocking task, your program gives up when the user gives up, and will run unattended for a lot longer.)
Labour/scale, indeed. The facilities where these things are usually produced have the capacity to make sure they are sterile. Hospitals cannot sterilise items to the same scale.

You just need to be careless once for it to be a problem. And considering how many sterile items you need to use every day - particularly in an emergency - it is not unlikely that one item went back into the reuse cycle without being sterilised. It's to avoid the question, 'was this item sterilised?' If its wrapper is open, assume it is used. You can only do that safely with single-use items.
I remember reading they expect immunity to last as little as 6 months for Covid-19, found this paper about the SARS outbreak of 2002 which was also a type of corona virus, saying patients had an average immunity of 2 years.

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2851497/
Same exact thought I had.
I basically spend my entire programming life on Israeli Kan classical radio station 24/7 of very versatile classical music: https://www.kan.org.il/radio/player.aspx?stationId=7
Yes, we might differentiate these like that:
Nordu.net was the first created domain name.
Symbolics.com was the first registered domain name.

Symbolics.com was the first domain name after the domain name registration is allowed.
Certainly up there. It's impossible to say at this point. We will only know with the benefit of years of hindsight
This is probably the shittiest reading experience possible. Covered in ad and stitched together of 11 tweets. WTF? Where has rationality been heading that such a medium became the go-to tool to transport important messages?

Oh wait, a red-haired in the corridors of power is using it too..
"maven dependency conflicts" is when a SINGLE project has issues with its own dependencies because of bad configuration.

Multiple unrelated projects can use the same or different version of a library without any issues
Whenever posts like this or BellingCat pop up, they always seem stupidly easy. Is this really some special skill that I didn't realize I had? It feels like it's just a visual aspect to someone's Google-fu ability, with a dash of critical thinking.
Small correction: an attacker needs a password verifier AND the server private key to brute-force an SRP password. Also, I think it's great that there are no known attacks other than brute force - even if it took several iterations to get there. As you said, the more realistic failure modes are data leaks, like passwords getting into the log files, or getting hashed without a salt, or not getting hashed at all. All of which are covered by SRP by design.
Not sure about that. Rednecks, hoarders, botched plastic surgery, fat people failing to lose weight, popping pimples and abscess. This is pretty much 1/3 of Discovery Channel lineup. Rest is pseudo history, alien abductions and gun shows.
Depends on how you measure bigness. It could very well be the biggest world event since WW2 in terms of the number of ordinary people whose daily routines are directly affected.
Where did you get that number? The United Nations thinks that we're going to hit 8 billion by around 2023 and 9 billion by about 2037 [0].

[0] https://population.un.org/wpp/DataQuery/
Entertainment for Devs when Social Distancing
How Can I Automate Data Extraction from Complex Documents?
In this event, the solution will be the creation of a permanent, South Korea and China inspired infrastructure for testing, tracking and constraining infectious citizens by all developed countries. Regardless of the privacy and civil liberty concerns, I think that's where we'll eventually end up, and to your children it will one day seem crazy that a person with an infectious illness was once able to freely walk the streets.
> If the covid-19 pandemic leads to a global economy collapse

Very unlikely it happens. At some point people/countries will decide to take the risk rather than letting their own economies collapse (which is in the interest of absolutely no one, even the patients at risk).
Now do that with a few thousand employees, vacation request ranking/status and three different sets of thousands of pages of union contracts.

The above is something I actually worked on before.. The bitter irony, is they all just traded their vacation weeks as it came up anyway.
https://twitter.com/quiztime also has (probably easier) challenges like this.
It's imperative in order to allow arbitrary control structures instead of bending over backwards with 80% solutions and stupid fragile tricks like you would need with Make.
I wonder if they had chosen to compile to the standard DOM implementation if there would still be a huge performance gain over the current execution speed?

DOM operations, in JavaScript, on Firefox already occur at near assembly speed at billions of operations per second. Comparatively abstractions over the native DOM implementation, in JavaScript, are many orders of magnitude slower. While I understand this is a C++ application compiled to WASM it still begs the question if this application is potentially sacrificing performance for a more popular implementation such as the nonstandard JSX vDOM.
While that looks stupid in isolation (and I agree it's annoyingly hard to check for overflow, although gcc and clang have special builtins nowadays to do it), it turns out there are important reasons for that optimisation.

In general, knowing that 'a+1' is '1 larger than a' allows for lots of optimisations, when writing to an array in order we can vectorise, do things in bigger chunks, all sorts of useful and important optimsiations. If every time those were used the compiler had to check for overflow, it would seriously effect performance.
I don't agree with the conclusion. We can scale down our economies and still maintain production of essentials by ``drumroll`` scaling back shit that nobody needs.

Starting with an overblown healthcare admin system in the US, IMHO, but also including less inflammatory non-essential things like yet another range of plastic toys and luxury perfumes and and and.

Essentially in this scenario, we should take this as an opportunity to prune all Bullshit Jobs [1] and focus on things securing social, mental, and healthcare subsistence.

Oh and maybe just don't move troops all around the planet to fuck up other people's place. It wasn't a good idea before, (both during the 1918 influenza wave and after that) and it's certainly not a good idea now. Save that money and manpower, put it to use for something constructive for a change.

There you go, I guess I just pissed on every holy cow this crowd has. You know where the downvote button is.

[1]: https://en.wikipedia.org/wiki/Bullshit_Jobs
The collapse coin has a flipside: New growth.
This is a Twitter thread summarizer, that stitches together all the separate posts in a thread. You can enjoy the original here[1], with the experience that the platform creators intended.

[1] https://twitter.com/BallouxFrancois/status/12388371580074475...
This does seem cool, but I would also not want to come to your party if you're going to be running facial recognition on me...
>After all, I suspect it is highly unlikely that a virus vaccine would give someone a bacterial disease or a genetic disorder.

A vaccine could compromise one's immune system and indirectly cause that bacterial disease or genetic disorder. That would be its side effect too.
To use control characters as separators, type:

.mode ascii
> The effectiveness of this warning on people who would not already limit their gatherings is questionable. Many people are just in denial or deluded about how serious this pandemic is, and are unlikely to significantly change their behavior until and unless people start dropping dead all around them.

I disagree. People are definitely in denial, and seeing people die around them will "help" in getting them over that denial.

But it's not the only way. The government encouraging or enforcing a quarantine, for example, is also going to get people to take this seriously.

E.g. over here in Israel, we've seen cases go up a bunch but deaths are luckily still not that high. However, while people here still aren't taking this seriously enough IMO, the fact that the government has effectively shut down all restaurants, all educational establishments, etc., is definitely helping to get through to people that this isn't business as usual.
I used to teach middle and high school kids how to code for several years. Two of my students were particularly prodigious programmers who turned their prototype of an idea into a real company making real money thanks to Stripe Atlas. With such an accessible avenue to entrepreneurship we are bound to see many more entrepreneurs.
> tracking and constraining infectious citizens by all developed countries.

That would be ridiculous if you get to millions of people infected, because that would effectively destroy all economic activity. Even during the 1918-1919 epidemic with high mortality rates people did not stop going to work. Our strategy to isolate ourselves is fine if it's short term but it can't continue more than a few months.
> The correlation between per-capita GDP and health (life expectancy) is essentially perfect.

I've seen this said before; this is not considering correlation vs. causation. High per capita GDP correlates exceedingly well with technological and scientific mastery.

A global economic collapse would lead to some lives lost and be very painful, obviously. But if the economic damage is in the tourism industry or entertainment that will be far less damaging than if the food supply lines collapse or the oil stops flowing. One of those is inconvenient, the other would lead to militaries being deployed.
I am 100% in agreement with the author. It’s refreshing to see someone admit how much they don’t know — one of the most annoying things about our social media era, when combined with this current situation, is that everyone thinks they’re an expert and that their course of action is the One True Way to defeat the virus. Fact of the matter is, we’re flying blind, and governmental action is more about crowd control than a real fix.

My advice to the young people for whom this virus is not a major threat is ... Enjoy yourself, enjoy your time with your friends. There’s a chance that this virus could mutate to pose as much of a threat to young, healthy people as old, unhealthy ones (and ironically there’s a chance this whole quarantine thing might be of assistance, as OP carefully alludes to). That’s not a sci-fi disaster scenario, that’s just 1918, baby.

Governments really need to increase the penalties — meaning, jail time, huge fines, etc — on spreading misinformation on social media. That is as big of a problem as any during this time. And so-called “medical experts” on Twitter or Facebook or whatever, trying to validate themselves, are a large component of that. If we don’t get people to stop playing games online about this now, we are going to have a full-scale meltdown if this virus mutates later in the year.
The company, Construction Materials Inc, that supplied Bob's Drywall Supply should accept a delay in payment. In order to ensure payment comes as quickly as possible, an order block (no new orders are accepted from Bob's) or a shipping block (orders are accepted but not shipped) or both are placed on Bob's account.

Now, of course, what of Construction Materials, Inc? Surely they buy the raw materials from someone and ...so on. Everyone does - or should do - the same: don't adjust the terms, simply accept that the past due items are past due and will be paid a bit later than normal.

Eventually it will hit a bank or large financial institution, and they ought to do the same: accept the situation and wait. It's costly when businesses go bankrupt and everyone knows that this situation is affecting everyone else and will blow over in about six weeks.
https://www.biorxiv.org/content/10.1101/2020.03.13.990226v1
Depends how you measure and what you call a "world event".

* Mao Zedong killed 40 to 80 million people during his rule after WW2, but "only" in China.

* 2-5 million died in the Second Congo Civil War between 1998-2003, but to a first approximation only Congo and its immediate neighbors even noticed.

* The US response to 9/11 killed around 500,000 people directly (war violence) and a lot more indirectly (health, economy, etc).

The direct death toll of COVID-19 is unlikely to get anywhere close to this, but the indirect economic impact will clearly be global and massive.
Original source: https://twitter.com/BallouxFrancois/status/12388371580074475...

Threader's version (if you want to read it without ads and fake news recommendations): https://threader.app/thread/1238837158007447558
> ``drumroll`` scaling back shit that nobody needs.

Maybe, but what do you do with people whose livelihood depend on those superfluous bullshit jobs?

Until we have a system that guarantees a right to life even if you do nothing productive, those busyworks are used to justify giving food, shelter and healthcare to those people.
The article kind of lost me at the first example.

struct{
char x
char y;
}a;

memset(&a, 0, sizeof(char) * 2);

What does the compiler know about memset? Why it should? It can be a function called heyLetsFillTheMemoryOverHere(&a, wrongSize); and still it's the programmer's fault.

In fact, it's a good thing that C doesn't care about memset, and doesn't get in between me and my code. And that's I love about C. It minds its own business and does what I tell it to do.

> If I use my compiler to compile a program on my machine, the compiler knows that I’m compiling it to the x64 instruction set

You can be cross-compiling. I do it every day. The C language doesn't need to know about every little platform out there. If a compiler wants to go the extra mile and help about it, that's a compiler-thing and not a C-language-thing.

If there is a MCU that uses 3 bytes words, why should C be aware of it, 40 years before?

Don't blame the specifications, blame the compiler if you want.

Edit: removed a couple of personal opinions.
Yeah. For example, thinking about needles and syringes, they used to be disinfected by boiling water. That's certainly not enough to kill all existing pathogens especially after you used it in a person.

You probably need to autoclave the parts, and then some more to be sure.
Expose a HTTP server with a public IP using OSS
I used h2testw on Windows to do this. It writes a 1-GB files with a special pattern on the disk until it is full (or however many GB you specified before starting it). It then tries to read them all back to see if they have been written correctly.
GitHub Actions – When Fascination Turns into Disappointment
On what basis is anybody predicting a second wave which gets worse? This seems completely backwards from everything we know.

The Spanish Flu accidentally had an inverted forcing function--we sent the worst cases back to their home countries which helped spread the most severe cases rather than the mildest.

For Covid-19, the cases most likely to spread are going to be the mildest. The worse you feel, the more likely you will pull yourself out of circulation. And, if you are obviously unwell, people are going to force you home.
Why hello? This virus has a death rate of less than 0.2% in Germany. They have very good testing there.
Every day 365k babies are born, humanity will be fine!
Coronavirus might be the biggest trend in Google search history
Wouldn’t plunging them in a solution with high concentration of alcohol do the trick? (Not a medical professional, asking out of curiosity).
Heavy testing and aggressive isolation of infected persons and areas seems to be effective.

In the absence of heavy testing, broad quarantine seems to be effective.

The answer at this point seems to be heavy, widespread quarantine until testing infrastructure is sufficient to closely track every active case. Once that testing is in place, most quarantines can be lifted, and any second wave can be managed.

There are numerous promising treatments as well in development. HIV drugs, Ebola drugs, and Malaria drugs are all showing promise in pre-print research. If any of those pan out, it's likely that the mortality rate will go substantially down so long as we can suppress the spread until treatment infrastructure has scaled up.
Imagine a future where you do a swab test every morning while brushing your teeth. If you had any of thousands of infectious diseases, you're required to stay home. The test would take only 5 minutes, and you get fined if you don't do it, and receive sick pay if you test positive.

I imagine that within a few years of rolling this out, common colds might be a thing of the past, and overall worker productivity higher rather than lower.
Looks great. Good luck.
> If its wrapper is open, assume it is used. You can only do that safely with single-use items.

How about putting the re-usable item in a wrapper so that the same rule can apply.
But the countries where almost everyone is participating in the production of essentials, and nobody is doing Bullshit Jobs, are the poorest in the world with the lowest life expectancies.
> You know where the downvote button is.

Don’t do this. It makes for boring reading. https://news.ycombinator.com/newsguidelines.html

Your post was otherwise filled with pretty bog-standard leftist stuff that does just fine on HN.
Are you proposing a centrally planned economy, or how do you intend to ensure that people work only in allowable jobs and produce only acceptable products and services?
Your certainty is as factual as a wish upon a star
> if you want to zero out a struct foo, you should memset sizeof(struct foo), not /* manually calculate what you think the size of foo will turn out to be

Exactly. Any other approach than using sizeof(struct foo) is definitely wrong.

What author tried to do with

sizeof(char) * 2

never worked in C except by accident, and it was so even in 1975 when no modern standard existed and "undefined" wasn't misused.
I'm sure no-one's reading this far back, but for the record I would edit or delete the above if I still could. It was a pretty silly statement for a number of reasons. I never had much cause in the past to read or think much about epidemiology, and now I have .. well I'm thinking quite differently about it all.
Anti-consumerism, anti-militarism and focusing on social security is not as rebel and edgy as you seem to think it is.
If you get downvoted, it's probably more due to the childish tone of your comment rather than for your opinions
I don't think anyone is suggesting that the situation in Italy is 100% accurately "going to replicate in most places". It's only an example to warn us of the kind of human tragedy that could happen if we don't get our sh*t together in the US.

No one cares if the theoretically more accurate number really should be 20K cases and not 50K cases in 10 days. The point is we need to act NOW rather than 10 days later. As Dr. Fauci said, it's probably better for us to be overreacting at this point than under-reacting. [1]

[1] https://thehill.com/homenews/sunday-talk-shows/487639-fauci-...
C99 makes a specific distinction about unsigned char not having any padding in its object representation. It doesn't make this distinction for signed char or plain char (because plain char might be signed char.)

In practice, on all major implementations that I know of, both signed and unsigned char have no padding.

You might have misunderstood what I wrote. I was saying

> memset(&a, 0, sizeof(char) * 2);

can be guaranteed to be OK for reading (in addition to writing) if you check the manual of your implementation. C99 says the relevant padding/alignment rules need to be specified or documented somewhere. Of course, memset(..., sizeof a) will be fine, too, without having to check the manual to see what the padding/alignment rules are.
> scaling back shit that nobody needs.

Do we know what nobody needs, for real? Sure, there might be some low-hanging fruit, but this seems like an area where Chesterton's fence would apply in spades, lest our judgments age as well as Rick Perry talking about the Department of Energy.

And there's also the fact that it's demand for non-essential things that employs the large portion of people who moved out of farming and other necessities because we got good enough at production that they didn't need to be there.

We might be able figure out how to fund productive things that incentives don't automatically align for, but this sounds trickier than it might seem at first glance.
There's an alternative model: that people who do nothing productive don't work at all in producing silly products and services, and they can spend their time doing things they enjoy instead.

https://harpers.org/archive/1932/10/in-praise-of-idleness/
If you can make it fine grained enough so people are only isolated for a few days around their personal most infectious time, productivity losses would be minimal.

The productivity loss only happens when testing is inaccurate and entire communities are told to stay home for months just because it's hard to identify exactly who is coughing out germs each day.