skysight-inc/HackerNews huggingface dataset:
We are in a time of crisis and the first instinct is to close ourselves but I think we should not throw away what the “free”(almost in some cases) movement of people made possible:

Cheap good food => more people can afford to buy it => less hunger/suffering in the world.

Here is another example:

Cheap technology => more people have access to computers => more innovations are possible => more cheap technology => better life quality.
ComputeDRAM: In-Memory Compute Using Off-the-Shelf DRAMs (2019) [pdf]
Kind of tangential, but even here on HN you can see how awkward people get with naming their projects/products. Either "stealing" an already established name from a completely different field or something so generic it's hardly searchable on the interwebs.
> We had nationalized telecommunications for over 70 years

No.

Until 1982 AT&T in the United States was a legal monopoly, not a nationalized telecom.

The book, The Idea Factory about Bell Labs has most of the history including why the the defense work Bell Labs did during WWII and beyond helped them justify a nationwide monopoly on telecom.
This is a bad faith question.

The real question is, “Why were the airlines so poorly equipped to handle a cataclysmic event when the last one was only 19 years ago?”

The answer is short term profitability.

And the follow up question is, “Why would ANYONE bail any for-profit company out to the benefit of the shareholders only, ever?”
And they gotta let everyone know they REALLY don’t like it when you put dog poop bags in their trash cans.
If we let the airlines go under, I wonder how much funding so called bullet trains and Hyperloop, etc would get in the USofA. We depend on Airlines way too much.

Edit: Maybe not "go under", but at least try and bail themselves out. We need to fund alternatives.
Well, I learned a couple of things about Emacs. I am known as "M-x Tips" on Twitter¹. But Emacs skills are not "hireable", interviewers rarely (if ever) care about the choice of your favorite IDE.

Sadly, industry's established hiring practices are inadequate - being a skilled interviewee (most of the time) has very little to do with someone's ability to solve real problems on the field.

It's like if you are an outstanding chef, but to get a job you have to be able to perform an elaborate dance. And if you can't dance at all, then even your Michelin stars won't help.

---

¹ Not a shameless plug, since I hope you may see some helpful tips: https://twitter.com/ilemming
> Disclaimer: I don't have any relevant expertise, and comment on forums because I'm bored in virus lockdown...

Lol. This should be a Surgeon General warning required to be attached to every online comment. To wit:

SURGEON GENERAL'S WARNING: The overwhelming majority of users making online comments likely do not have any relevant expertise and comment on forums because they derive personal satisfaction from commenting on forums.
Probably not, no. Obviously if you want a machine as slick as the leading brands then yes, but nobody is requiring that.
"using the compiler the code is written in as part of the compile-edit-debug cycle, rather than having static analysis as an extra tool “on the side” (perhaps proprietary)"

Mmmm... and why not have an external tool, part of the GCC family but with a proper API, to allow to use ANY TOOL instead of bloating GCC with one more tool that won't be usable on other compilers and will need specific maintainers, althought this field is already really complex and need a lot of different knowledges ?

For example, it could be based on intermediate code so better than just source-code or machine-code analysis...
Nationalised companies like USPS and local utilities turn a profit for the customers and externalities to promote the general welfare, as it should be.
As opposed to the monopolies which have contributed innovations such as quotas, pay for play internet and snooping.
Didn’t the US Government get stock in GM when they bailed it out in 2008? They ended up breaking even as the claim goes
I understand this as phenomenon as the new grad and the senior developer are optimizing for different things. The new grad is focused solely on the asymptotic complexity of the code. It doesn't matter how slow or how complicated it is in practice, they are solely focused on using the fastest data structure asymptotically.

The senior developer optimizes a different set of criteria:

1) How hard is it to understand the code and make sure it's correct.
2) How fast the algorithm in practice.

There are several different reasons why the performance of the algorithm in practice is different than the performance in theory. The most obvious reason is big-O notation does not capture lots of details that matter in practice. An L1 cache read and a disk IOP are both treated the same in theory.

A second reason is the implementation of a complex algorithm is more likely to be incorrect. In some cases this leads to bugs which you can find with good testing. In other cases, it leads to a performance degradation that you'll only find if you run a profiler.

I one time saw a case where a function for finding the right shard for a given id was too slow. The code needed to find from a list of id ranges, which one a given id fell into. The implementation would sort the id ranges once ahead of time and then run a binary search of the ranges to find the right shard for the id. One engineer took a look at this, realized that we were doing the shard lookups sequentially, and decided to perform the shard lookups in parallel. This made the code faster, but we still would have needed to double the size of our servers in order to provide enough additional CPU to make the code fast enough.

Another engineer hooked the code up into a profiler and made a surprising discovery. It turns out the implementation of the function was subtlety incorrect and it was sorting the id ranges on every call. This happened because the code sorted the id ranges inside of a Scala mapValues function. It turns out that mapValues does not actually map a function over the values of a hash table. It instead returns an object that when you look up a key, it will look up the value in the original hash table, then apply the function[0]. This results in the function being called on every read.

The solution was to replace mapValues with map. This dramatically improved the performance of the system and basically brought the CPU usage of the system down to zero. Notably, it would have been impossible to discover this issue without either knowing the difference between map and mapValues, or by using a profiler.

[0] https://blog.bruchez.name/2013/02/mapmap-vs-mapmapvalues.htm...
isn't the aid mostly low or zero percent loans? That's what the discussions were anyway.

As long as that's the case, what are you hurting if you take it? It's just free money to help your business along, and businesses like yours are what drive the economy and pay people's salaries.
In real life, you will always start with simple working implementation and go with it.
Then if things are slow, you profile your code with a good profiler while running for some kind of real life scenario and spot the slow parts (also keep in mind that profiling may affect the program's behaviour).
After that you may want to consider alternatives with less asymptotic complexity iff that's the part causing slowness.

Once I was asked to look for one project to see that if there is any room for improvement to speed up the program.
After I profiled the program with the test data, I saw that program was severely affected by a "size" method call on a lock-free concurrent list. Since the data structure is lock free, size method is not a constant time operation and calling it in a large list takes too much time. It was just there to print some kind of statistics, I changed the code so that it is called only necessary not every time some operation occurs. This immediately made program 2-3 times faster.

There were also some parts I changed with some algorithms with less algorithmic complexith to make it faster.
Overall, I made the program 6x faster. So sometimes you need to use fancy algorithms, sometimes you just need to change one line of code after profiling.
> Transitioning a culture from private ownership to public is highly value destroying

You know what else is value-destroying? Giving money to failed companies for free. Everyone's a capitalist until something bad happens, then they go running to Free Money Center to pick up their welfare check.

> And putting electeds in charge of companies goes about as one would expect in terms of venality and competence.

Yes, failing companies are a paragon of competence.
> by a flat array for small n (hundreds, low thousands)

Some of us are working in, say, Python. A flat array can outperform at small n, yes, but people overestimate where the tradeoff point is. It's at <5 items:

# A list of [0, 1, 2, 3, 4]
In [10]: linear = list(range(5))

# A hash set, same thing.
In [11]: hashing = set(range(5))

# 44ns / linear search
In [12]: %timeit 3 in linear
44.2 ns ± 0.412 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)

# 25ns / hash search!
In [13]: %timeit 3 in hashing
25 ns ± 0.6 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)

The hash set outperforms the linear search by nearly 2x, on a list of size 5! (The performance is similar for other common types that end up in hashes, like strings.)

"It's Python!", you say. "Too much chasing of pointers to PyObjects destroy the cache!" And yes, they do; but many people are working in high-level languages like Python or Ruby.

But, for those that aren't, if we repeat the above exercise in Rust, yes the tradeoff will move up, but only to ~60 items, not hundreds or low thousands:

test tests::bench_hash_int ... bench: 14 ns/iter (+/- 1)
test tests::bench_linear_int ... bench: 19 ns/iter (+/- 3)

If you're thinking that somehow accessing the middle item each time bestows an unfair advantage to the hash table, randomizing the desired item doesn't help, either:

test tests::bench_rng_hash_int ... bench: 19 ns/iter (+/- 2)
test tests::bench_rng_linear_int ... bench: 24 ns/iter (+/- 2)

And looking for an item not in the list is definitely not favorable to the linear search. (It's the worst case.)

In my experience, it's almost always easiest to pay mild attention to big O concerns, and just use the appropriate data structure for the problem at hand. Cache effects mattering is either rare (you're writing a RESTful microserving to push cat pictures, a cache isn't going to matter once we hit this mobile devices 20 second network latency!) or highly context dependent (your line of work is always low-level, and these crop up more often, and you're consequently on the lookout for it; I don't think this applies to most of us, however).

The code used, in case you wish to find fault with it: https://github.com/thanatos/hash-vs-linear
?
everybody who can stays at home in my country, no matter sick or not sick. it has been now 2 weeks since I didn't go out.

a side question is how a guy living alone, ordering deliveries, managing to get a cold... it must have been the deliveries.
A greater evil than religion, against science
Oh wow I spent all that time reading with the assumption that this was a novel and relevant investigation over that year of being focused on the specific problem of software inteviews. Interview articles are the hot-button clickbait of Hacker News. Not necessarily the author’s fault, but this topic has a tendency to trend above the contribution of its content.
The other day I was looking for a computer terminal symbol. There is none.
From my experience actual good reusable code are very small and usually relatively simple great specialized task. As the component get more features, and when you use it, you are in a trade off situation where this works, but it doesn’t fully do exactly what the requirement needs orbit does way more than it needs
A private company has to comply with all governmental laws and regulations. If the government wants something banned, they can just create a law that lets them do that. They've already demonstrated that they can easily do that with the patriot act.
Boids are my favourite hello world for 3D simulation environments. For the last few weeks, I've been using boids to update my GPU programming skills and knowledge of related algorithms in Unity and Unreal.

Yesterday I got 0.5 million boids simulating in Unreal Engine at 45 fps on a GTX 1080 [0]. The bottle neck is rendering so many instanced cone meshes, the simulation without rendering can do 1 million boids at 120 fps. I'm borrowing a common data structure used in GPU fluid simulations, the dynamic hashed grid, to calculate the neighbourhood of each boid (cool tutorial here with full source code [1]). We need the neighbourhoods to calculate their urges. My code is a mess at the moment, but if there is interest I can post it to GitHub (Unity and Unreal).

Boids are an example of agent-based modelling and swarm systems. I used agent-based modelling in my PhD thesis to construct and simulate realtime, interactive 3D biomolecular models of mitochondria and neuromuscular synapses [2,3]. Now that I'm free (graduated), I'm building an iPad app to teach and communicate structural and molecular biology with immersive, and realtime simulations. Our vision is to make molecular and structural biology immersive and fun. It's not a textbook, it's a little more like Neil Stephenson's young lady's illustrated primer! :D

[0]: https://twitter.com/timd_ca/status/1243941167005192192?s=20

[1]: https://wickedengine.net/2018/05/21/scalabe-gpu-fluid-simula...

[2]: https://prism.ucalgary.ca/handle/1880/111493

[3]: https://youtu.be/6CsxADBpal0
Why do you get a chuckle? Can you explain?
> Farmers generally aren't the ones getting rich though are they?

Yes.

I mean, not the decreasingly relevant to reality American mythical archetype (always invoked in political context as if it were the mainstay of American Life) of the independent yeoman farmer class, but the actual corporate agribusiness industry which has long displaced it in owning and operating farmland.
Bitcoin Plays a Key Role in Protecting Human Rights
I think this makes perfect sense. Competition fundamentally doesn't work when it comes to infrastructure like this. I don't hear anyone saying that we need more privatized competition in our sewer systems. Why? Because it's incredibly costly to build and having private companies build two, three, or more sewer systems in one city/town would be insane. The costs per user of each one of those systems would rise dramatically because you would have far fewer people paying into each system. Same goes for our internet connections. Creating multiple competing networks in this case raises prices for everyone and we needlessly duplicate the amount of infrastructure required to serve everyone. That is why we make services like sewer, water, and electricity regulated monopolies. I don't see how internet, in this day in age, is any different. Just like everyone needs electricity, everyone needs internet. That being said, we do need competent government officials that can balance costs with public good. If we elect incompetent people, we get incompetent results.
I'd like to invite all the proposers for carbonate-dominant diet to live above 55°N for a few days in January while eating minimum amount of fats.
Coworkers in Shenzhen are already saying that more fancier foods are already getting scarcer in the inland China, and prices are going up by day.

China has done a massive livestock slaughter campaign when the quarantine was declared. That has actually depressed the food prices quite a bit for the first months, but after that, the prices have shot up. This is how they got that much meat: https://mustsharenews.com/wp-content/uploads/2020/03/Wuhan-R...

The scariest part of it is that China relies ENORMOUSLY on the imported food, despite accounting for more than 20% of global food production.

The government has expected to shut everything down, including food production, and weather the crisis by relying on the remaining food in the supply chain. China has spent a big portion of its national food reserve too: https://pbs.twimg.com/ext_tw_video_thumb/1220714156753653760...

They planned to restock quickly with overseas imports after the lockdown was to be lifted. Now that overseas supply is a big question mark...

I heard the same is going in much of the world. Agricultural business is facing shutdown, and they are cashing out their livestock, seedstock, and trying to get an early harvest done before the lockdowns hit their countries.

And people were saying that we will never see a famine in Asia in the 21st century. That optimism was premature...
You Can Make Money Without Doing Nothing?
Simulating an Epidemic
The government is failing badly at every level. That's more clear now than ever. Serious question: Why would you want to give them more to fail at?
no authoritarian state has ever had enough police and military to come close to outnumbering the citizenry. numerical equivalency is not a necessary condition for the exertion of power and coercion.

we must remain vigilant in protecting our rights and maintaining the dispersion of power while we get through this pandemic.

part of that is keeping fear responses in check by putting our rational powers to use discerning facts, accepting uncertainty, rejecting falsehoods, and collectively yielding the time needed to compile valuable information, rather than getting frothed up by the frenzy.
How could an airline company possibly be equipped to handle this kind of situation?

If you want to be competitive on the market you need to lower costs and cut down on margins. You can't just have a big pile of money lying around "in case all flight is halted for a few weeks/months"
Lucky for you, this crisis is going to last until the next administration (which might be the same as this one, depending on election results).

So far we've got $1200 checks going to all the little guys and $500 to their little children.
Anyone have links to play online?

Some sites I can think of that support other variants:

https://lichess.org/ ( https://github.com/ornicar/lila/ )

And some crazier variants:

https://www.pychess.org/ ( https://github.com/gbtami/pychess-variants )

https://chessvariants.training/
And because young people are less physically fit than they used to be, so they don't have the muscle and stamina required by such jobs.

But the reasons why are almost irrelevant. The pertinent detail is that employers can't fill these jobs without immigrant labor. Most Americans don't want them at any pay rate.
Equinor (formerly Statoil) does fairly well for Norway.
I have no CS degree or STEM degree.

Recently I worked on the same type of project as someone with 10 yrs of experience & a CS degree from Stanford.

A few months later, I created a project, and had a manager with a CS degree. However, when I left, that manager was unable to pickup where I left off, and he ended up leaving soon after.

I have less years of experience, but to me, what matters more is the time within that experience which was put into a relevant business model, product built, or past projects. I.e. a Senior Dev with a CS degree, vs. a New Grad with a Business Background & SWE Experience. It's apples to oranges in many cases.

Also, I'd echo another comment here:

>"daxfohl 1 hour ago [-]

> As a senior dev, I wish that I could say I always knew more than my interns, and that all the code that's there is because it was carefully planned to be that way.

>But more often than not, I don't, and it's not. "
UK government bailed out Rolls-Royce by nationalising it, turned it into a successful company, and then privatised it again 18 years later(there's a common argument made that perhaps it was nationalised for too long, but the effect was certainly positive).
Just to be more specific: why not use the "UNIX philosophy" with a compiler to compile (translate to Intermediate Representation), an optimizer to optimize, an assembler to produce machine code from IR (with allocation registry) and so on...?
I see it differently. Knowledge =/= understanding. There are plenty of ppl who know a lot but have little understanding.

Put another way, knowledge is the nodes. Understanding is grasping the connections. Understanding is the higher power. Understanding is where the magic happens.

Wisdom? Wisdom is next level understanding. It's the maturity of developing connection within the connections.
The whole idea that switching from coal to gas is bad for the environment because of methane emissions always smelt a bit dubious for exactly this reason: coal mining emits lots of methane.
https://www.youtube.com/watch?v=F-X4SLhorvw&feature=share
I was using an extreme example to illustrate. I definitely agree.
I'm also curious about how remote dismissals are returning company laptops.
It'll be a common area people can share. We'll just need to avoid any sort of tragedy.
So basically you are advocating that someone else (the taxpayers) picks up you internet connection bill?

Have you considered to move somewhere else with a better internet rather than complain about everything and everyone?
Or, legislation could be used to ensure everyone has to have that big pile of money / mitigation strategies present, so that they won't get cut out by competitive pressure.

(And then the hard trick is ensuring the next folks in office won't dismantle that legislation to make some cash on the side.)
GM and AIG are two examples from the last financial crisis. Both went back into private hands.
I tend to agree. Development for Photo also has slowed down after a burst of new features after release. I am definitely wondering how they are doing financially.
That, or the name is some trainwreck of letters that vaguely resembles a word
>The government is failing badly at every level.

Just the executive branch, which was elected by a certain segment of our society.

Thankfully (hopefully) it only lasts 4 years, and not 20.
First part is good. Second part of "needs to be made clear" is where you will run into issues.

We have this need to get everyone to agree with our views. But firstly it's not important to get things done and secondly it's not possible because of the variety of different needs and personality traits in the population.

It's a possible approach only on Putin or Xi planet . But it breaksdown in democracies (esp given the propaganda these days) people just harden their positions(they hear your view as an ultimatum or a demand), get defensive, react, attack etc. Trust breaksdown and then there is no hope for anything nuanced.

Better option is to give people something else to focus on, something to do etc while doing everything you doing well in your first para.
Doesn't Norway own the majority of their oil company?
How about the 3.5" floppy icon meaning "save" in so many applications?

The meaning of the symbol outlives the technology that begat the symbol.
I’d be interested to know which company (if you’re free to say). IIUC, this is very different from the way Coverity (the biggest commercial player I’m aware of in this space) operates.
Shockingly,

InStr(<this page of 100+ comments>, "docum") = 0

I'm a dev with some grey hair who feels it would have been useful for all that fantastic domain knowledge from Paterson to get documented in a code comment.

I'd love to hear if either of them ever went back and did that?