skysight-inc/HackerNews huggingface dataset:
> [Things I avoid] parking_lot: More compact and efficient implementations of the standard synchronization primitives. [goes on about efficiency...]

lol, really? No, like, not at all.

Parking lot has 1 killer feature, and 1 killer feature only, and this feature makes using the standard synchronization primitives _almost always_ the wrong choice for almost all applications:

DEADLOCK DETECTION

That's right, if you ever need a Mutex, chances are that your program might run into a deadlock at some point. Do your future self a huge favor and don't use the standard library's std::Mutex. Instead, use parking_lot::Mutex, turn on deadlock detection at compile-time, and save your future self potentially hours of trying to figure out what your program is doing, why is it deadlocking, and how to fix it.

parking_lot::Mutex panics if your program deadlocks, printing out the backtrace of each thread involved in the deadlock. This makes discovering, understanding, and fixing dead-locks a 5 minute issue, that's easily and quickly discovered during development in the minutes after introducing a deadlock bug.

I mean, you are completely right that, on top of that, parking_lot synchronization primitives are much much faster than those in the standard library. But that's only the cherry on top.

---

FWIW, nice post, I agree with all your judgements there. If you are looking for an async runtime that's smaller than tokio, check out the `smol` crate. For a thread-pool, i either just use rayon's (you can just push tasks onto its thread pool), or the futures's simple thread pool from the futures crate.
You’re absolutely correct that, while one may spend time in the a higher percentile, they may then fall back to a lower percentile for the remainder of their life.

Nevertheless, it’s an important analysis because if the majority of people really do spend a few years in affluence, it suggests the uncomfortable reality that there is a higher degree of personal responsibility involved than we may be letting on.
I'm very skeptical whether it makes any sense to use hydrogen on a train.

We know since many decades how to run trains on electricity. It's an established technology. It seems hydrogen trains are a cheap excuse for places where infrastructure is lacking and train tracks haven't been electrified. Except it's not cheap, because physics dictates using hydrogen will always be much less efficient compared to direct electricity use, as it includes an additional conversion step.

I think developing hydrogen infrastructure is important for sectors where no other alternatives are available. For sectors were established technologies for electrifiation already exist - not so much.
Yup.

> "The color of a star, as determined by the most intense frequency of the visible light, depends on the temperature of the star's outer layers, including its photosphere."

https://en.wikipedia.org/wiki/Star#Radiation
Petgraph is the big graph crate.

Linked lists get efficiently implemented with unsafe, but they're just not used by Rust folks a lot because they're a pretty niche data structure.
Note that hydrogen-powered trains have been in regular passenger service in Germany for a couple of years now: https://www.theguardian.com/environment/2018/sep/17/germany-...

A bunch of the questions I saw asked about hydrogen on the UK rail network was the comparatively large size of the hydrogen tanks needed, and whether packaging of tanks of sufficient size was going to practical.
I think there’s a lot of culture “we have to do it this way because the real world is frightening and complex and therefore you have to be dodgy to succeed”.

We need real conservatives today. With a strong outlook for the future. Not the 60-year-old pant-shitters given up on the ideas our society was built upon.
Where do pro-virtuous traditions come from, and why are they absent from the Global South?
So over-fitting can be solved by :

1) Using cross validation/validation set.
2) Regularisation .
3) Finding statistically significant features (e.g. chi square).

Why cant this be done automatically? I.e. what is the human advantage ?
The HTTPS cert for this website points to redis.io . Don't know what's up with that...
I recently started atomoxetine for my ADHD and had to completely stop it. Side effects were killing me.

After I stopped, I was more hyperactive and less focused... Yet the hyperactivity compensated for the "less focused" part, and I finished a week's work in a day.

That's my experience with meds so far. They completely eliminate my anxiety and make me feel in control of my emotions. Yet they make me less productive than when I'm in a hyperactive rush (even if my focus is reduced).

So for now I'm just going to embrace my inconsistency (in terms of emotions, energy, and focus) because I think I'm way worse without it. Establishing a routine helps me cope much better - I feel waking up early and having a good morning dictates how productive my day will be.

On meds, I finally felt in control of my life and energy. But it also felt bland, boring. I didn't feel anything. I had no anxiety to push me to go the extra mile. My personality & cheeriness were nonexistent. And I was, overall, simply less productive.

Not doing that again.
I usually ignore syntax highlighting. I can't see it well because it's tiny, and because the "designers" usually chose colors that are tough to distinguish, and sometimes very difficult to see at all.

For instance, the default console colors in Ubuntu are TERRIBLE (maybe for everyone). The output of 'ls' uses blue letters on a black background for some type of file, and I literally cannot see those. Ditto for some errors in Emacs (e.g., trying to exit w/o saving a file). That output is invisible.

If you are an engineer and decide to do something with color in your UI, please get some designer help and listen.
If access to the Chinese market is a significant portion of revenue, then these (large) minority shareholders ultimately control the company.
That makes sense in English, however "rest mess" is also a technical and mathematical term, and in that terminology it has the value zero for photons.
Free as in free speech. The Gab app does not violate the four essential freedoms [1] or F-Droid's inclusion policy [2]. They even host Hentai apps where you can access lolicon pornography [3] and simply state that users should "be aware of any applicable local laws and regulations".

[1] https://www.gnu.org/philosophy/free-sw.html

[2] https://f-droid.org/en/docs/Inclusion_Policy/

[3] https://f-droid.org/en/packages/moe.feng.nhentai/
The Futility of Rolling Stone’s Best-Albums List
That's pretty misleading. BeOS moved from a trashy single-threaded userspace network stack that was bodged on to a much better implementation that happened to be in the kernel.
Subscribing to search queries really makes sense (will work on it)

Also, will try to change the title (if its allowed,still new to HN)
I didn't post a flamewar comment. I responded to a sexist flamewar comment. I tried to bring objectivity to the conversation.

If someone wrote, "as a man, an awful lot of women are list of stereotypical anti-women comments", I would have responded in kind. I would have called him out for being a sexist and point out that men also misbehave.

In what world is saying men and women are equal human beings who can equally be horrific be a flamewar comment.

> and it wrecks what it is for.

This doesn't? Is this what hacker news is for?

"If you are a woman, an awful lot of men treat you like you are nothing but a pussy to fuck and their entire interaction boils down to deciding if they would like to fuck you in specific or not and whether they want to fuck you or not, it's all downside for the woman. If they want to fuck you, they will be using you and mistreating you. If they don't want to fuck you, you will not be treated like a human being. You will be ignored, at best, or treated with open hostility.

I've spent a lot of years trying to "just be a human being" on the internet and, just like off the internet, the vast majority of men I run into find out I am a woman, wonder to themselves if they would like to sleep with me and regardless of the answer, the outcome is I will never, ever, ever, ever be treated like a human being. I will be treated only like a walking, talking sex object who utterly doesn't matter and has nothing whatsoever of value to add other than maybe sex and doesn't deserve any respect, any intellectual outlets, any friends, any money, etc. unless I am sleeping with some man who has an adequate income.

No, I am not exaggerating."

So if I wrote a highly exaggerated politically biased statement starting with "a lot blacks do X", "a lot of chinese do Y", "a lot of muslims are Z", etc and claim it isn't an exaggeration, that would be okay?

I'm more than willing to admit my mistakes, but I didn't here and if you want to stop flamewars, go speak to the OP.
I am not color blind and I've never noticed star colors. They just look white or yellow to me. It must be very subtle.
Is it obvious to everyone else? Do colored dots stand out in the sky? Or is it a subtle thing?
> I'd say they do not

so you're disagreeing that the following sentence establishes freedom of movement and capital?

> the free inhabitants of each of these states, paupers, vagabonds and fugitives from Justice excepted, shall be entitled to all privileges and immunities of free citizens in the several states; and the people of each state shall have free ingress and regress to and from any other state, and shall enjoy therein all the privileges of trade and commerce, subject to the same duties, impositions and restrictions as the inhabitants thereof respectively

ok
It sounds like the OP was talking about stroke. The way it was written ("started") it's a little unclear whether the OP was in fear of experiencing a stroke because of other side effects (elevated BP or something), or actually experienced a stroke, which is an extremely rare side effect.
Yep, and it's even worse if enough people complain and your tax dollars are used to build a sound barrier.
The stdlib is where libraries guaranteed to work across all platforms that the language targets also exist.
It doesn’t inspire much confidence in a candidate’s ability to write software of even moderate complexity if their reasoning for using sort instead of a 5-liner was that their 5-liner could contain bugs.
There's plenty of train lines in the world that see very few trains, maybe only one an hour, where the business case for electrification is much weaker. Many of these lines are already questionable from a business case point of view which can deter anything that would increase infrastructure costs, and if hydrogen trains can approach the operational cost of electric trains then there's a clear business case for them.
We can actually measure the mass of photons.

If you shine light on an object, the light pushes on the object and the object is accelerated. If the object absorbs the light, there's a certain amount of pressure, and if the object reflects the light, there's even more pressure.

This has practical applications. Optical tweezers are made of light's force acting on small objects. "Optical tweezers are used in biology and medicine (for example to grab and hold a single bacterium or cell like a sperm cell, blood cell or DNA), nanoengineering and nanochemistry (to study and build materials from single molecules), quantum optics and quantum optomechanics (to study the interaction of single particles with light)" (Wikipedia).

Conservation of momentum means the light has mass by definition, and this photon mass can be measured by multiplying the mass and acceleration of the object.

Not only does this mean photons have gravity in the theory of GR, because all mass/energy does, it means they attract each other in a vacuum. In theory, you can make photons orbit each other due to their gravity.
My default in Yelp and Amazon is to sort by number or reviews rather than average rating because at small scale ratings can be games and if a restaurant is getting 6,000 reviews at 3.5 stars they are probably doing something right.
> However very few customers would buy it because it would be missing many of the features they expect.

There is a glaringly large hole in that claim: Despite Googles best efforts the Amazon Kindle exists and people used it. I even explicitly mentioned that Amazon had issues finding a manufacturer to produce it.
They added support in the last year or so on iOS an CarPlay if you say “Play something on Spotify”, but it will not be default. They gave themselves an advantage there for years.

Here’s a timeline on Spotify and Apple https://www.timetoplayfair.com/timeline/
It reminds me of the time that a "committee" of Vikings decided to name Iceland "Iceland" even though Greenland is much icier. Damn near got 'em!
Thinking about that incident, I realised that lightweight self-help posts is probably the only category of content for which that kind of stunt could work, partly because the copy of such articles is so generic that it can be (somewhat plausibly) machine-generated, but also because all you need is a sufficiently baity headline, and a whole lot of people will react to it and write comments about their reactions, without even reading the article.

That was an important but mostly-overlooked aspect of that event; the title wasn't machine generated, and for many or even most of the commenters, the title was evidently all they read.

Seems like a good reason to keep such posts of HN.
Science never in fact required ontic naturalism. The only real assumption is that "there exists something as opposed to nothing", i.e. that there are some phenomena independent of the subject doing science.
It is a tenable position to argue that the theory of general relativity (or quantum mechanics, or anything else) is not what the world is, but merely a model of the world, that we accept because it's useful and provides correct (or "correct enough") predictions.
Regardless of whether one agrees or not with that perspective, it's entirely possible to discuss a scientific theory with no consideration of its ontological status; one may at the same time disagree with the interpretation and agree with the mathematical account.
It doesn't seem to me like any kind of 'naturalistic' assumption is required for science to work.
The story is that egregiously bad science was published in a Nature journal.
Please, I would love for you to explain in excruciating detail how Quantum Mechanics invalidates the first two points.

Hint: you can't.
At least we get a choice whether we want our privacy violated by CCP, silicon-NSA complex, or Indian aristocracy
Great feedback! Product marketing is hard ;)

Basically, we abstract away the complexity of networking security for application developers. Let's say you are building an application that has 2 parts: A weather sensor in a field and a InfluxDB instance in AWS. The application logic is simple. Every 60 secs send a reading to the DB. Most developers could write that logic. However if you want to end-to-end encrypt it across multiple network hops, you need to go find a networking security team with expertise in cryptography. That's hard. OR you simply add some Ockam code to each endpoint and voila you have e2e channels.

To put it another way. Stripe lets an app dev process payments without understanding payment networks. Ockam lets you secure edge to cloud applications without understanding network security.
Count me in your second group. I've seen several David Lynch movies, never enjoyed a single one of them. There's something about his film aesthetic but also about his view of what the world really is that just doesn't sit right with me. When I do see them it's because one or more film nerds I respect has raved about it, and I think I should give it a chance. But ... nope, same film aesthetic, same worldview that I just can't enjoy.
* You can use all the device APIs, not just the ones that have been exposed as web APIs.

* They're way faster and less janky.

* You don't to use endless workarounds to disable typical web behaviour when you don't want it.

PWAs are probably suitable for basic apps that just display information, e.g. an app for an event, or a pub or whatever. You would be insane to try and make a "real" app like Snapchat or Google Maps as a PWA though.
Yes. Exactly why the Epic store is not a monopoly. There are alternative stores available. There is no alternative to the App Store on iOS so one cannot go sell in another store.
On a homestead.com domain no less! Incredible
20 kg of hydrogen is about 2400 Mj. The Class 319 has 1 MW of motors. So the hydrogen fuel will run the train for 40 minutes at max power. Maybe 3 or 4 hours in typical use?

20 kg may not seem like a lot, but hydrogen has three times the energy content of diesel.
How to get more subscribers using Telegram For your Newsletter
The GDPR does not allow the processing of personal data at all without out a legal basis, and the prevention of unlawful data processing does not require that you submit any identifying details at all!

A company may verify the identify of a person making a deletion request for data processed under a valid legal basis, which seems unlikely to be the case here.
Is there any objective definition to what is a mistake and what is not a mistake?

Just anything that makes one unhappy?

Facing Consequences doesn't seem a likely definition as whistleblowers are routinely punished for reporting corruption.

This article needs to be a little more rigorous in laying out the foundation of its premise.
High-Frequency Trading and Exchange Technology
I love this article.

>If N=16,000, then the entire dataset fits in the L1 cache of the CPU, assuming the CPU was made in this decade. This means the CPU can scan the data so fast it will make your hair flip. If N=64,000, then the data will fit in a modern L2 cache, and your hair may still do interesting things. If the computer wasn't made in this decade, I would recommend that my friend reconsider working for this company.

Great stuff.

So much of it speaks directly to how I see my own development process. It's understanding not only what you are doing, but why you are doing it. It's the difference between solving the bridge you're building and fixing the highway system to route the traffic more efficiently. It's seeing the trees, the forest, and all the birds and bats flying around.

There are a million ways to skin the cat, and the difference between ok engineers and great ones is knowing which method to use, and when the cat is good enough with the skin on.
https://dev.to/abhiprojectz/new-update-on-motionia-js-animat... ggg
Pandemics and inequality
As someone who has ADHD and is also a heavy marijuana user, I've found the marijuana mostly helps me with the frustration of the ADHD experience. It makes it difficult for the frustration to reach a boiling point and that's what actually makes me productive. Adderall has been WAY more effective at this, though.
I watched a youtube video where a color blind guy in his 50s was given a pair of EnChroma glasses for color blindness, put them on, and had a strong emotional reaction, like a deaf person hearing for the first time.

Then I read the wikipedia article (https://en.wikipedia.org/wiki/EnChroma) that says "they do not restore normal color vision, and claims in excess of this by the manufacturer have been characterized as marketing hype ... They are simply a very expensive pair of hunting glasses ... How could they possibly work? The answer is that they can't."

I liked the video and now my feed has dozens of similar ones with similar strong reactions. If they don't work why the reactions? Am I missing the videos where they just say "meh"? Is it a placebo effect or maybe they're just playing it up for the gift givers? I guess the test is whether they continue to wear the glasses for long.
Okay, so let's say some people can't afford to buy digital goods. How does that, by itself, explain a general belief that the few who do that are stupid because they "don't realize" that they are available for "free"?

Now, you or I might say that they aren't really available for free (they're stolen/pirated), but any thoughts of that kind just don't appear in many people (amoral, not immoral).
Funny that. I bought heavy-duty shelf sliders for $15 for a pair:

https://www.homedepot.com/p/Everbilt-18-in-Full-Extension-Si...

They're rated for loads up to 100lbs, and they're plenty tough enough to hold up a full-sized MIDI controller. They're stiff enough too.

If you're worried, though, you can double them up (two on each side). Now, you're at $30. Typically, when you double up, the load-baring capacity more than doubles.

I have a planer, but I didn't use it at all in this project.

Might be regional. US has a ton of land and resources, so maybe wood is cheaper here. You're pricing in Euros, and Europe is a bit more densely populated.
Agreed. We got two this year. Never received a spam PR before.
I noticed a missing feature in an OSS product I use. I pointed out the general mechanism of how it might be implemented. 3 hours later it was implemented, and the maintainer thanked me.

I was all "WTF are you thanking me for? You just made my life better for free at my slightest whim"
Why is he discarding compsci literally in the introduction? Does he really think "big O" is all there is, presumably because those ivory tower compsci people have no clue about computers?

There are some good bits of advice in the article, too, though.

> I conducted some simple benchmarks in Go to find how much data can be processed in 200 ms. A linear search can scan 13 million elements in less than 200 ms on a three-year-old MacBook laptop, and 13 million is no small feat.

It's funny how slow languages have shifted perceptions. Scanning 13 million elements to find the biggest element among 32 bit ints in 200 ms is slow. That's 250 MB/s, or about 50 clock cycles per element. Even the most naive and portable C three-liner is almost 100x faster (there is a difference in single-threaded performance, if you assume a very generous 50 % difference, it'd still be 50x faster).

maximum = INT_MIN;
for(int i = 0; i < N; i++)
maximum = elems[i] > maximum ? elems[i] : maximum;

So, when you are using C/C++, "small" for this problem is a billion elements.

Computers are super-fast. Next time you wait two seconds for some application to compute something, ask yourself: is this problem really eight-billion clock cycles hard?
I first learned about it like twenty years ago. Some of them really need a second or third viewing to click.

When I was younger, it seemed obvious to me that Grand Illusion is the greatest Renoir film, easy. Rules of the Game was a head scratcher. I never understood why it was so highly regarded. It seemed more dated and slow. But now that I’m a little older I can see what’s great about it a little more clearly.

The list does seem a little too top heavy with B&W films from the 40s but most days I find myself agreeing with that era being best.
Yah know, this is what it's like for a lot of businesses. A friend of mine runs a coffee shop. He only gets paid when a customer comes in the door-- and spends. If they look, he gets nothing.

There was a time when corporations were so flush with cash that they offered long term stability. That day is kind of over.
Nah, for example Google/Alphabet is a continuous offender ever since GDPR become enforceable and was already fined 3 times according to https://www.enforcementtracker.com/
If you need deadlock detection, probably your high level design is problematic. But I agree this is extremely often the case, so that's extremely often an interesting and valuable tool.
The writing was as good and generic as this article.
My son just turned 3. I’ve downloaded and will give it a shot. Thank you!
Please tell me they rescued the hardware and backup reels they found.
And for C++? :)
Yep, or don't know how to use it, or messed up in combining api keys.

Not immediate bugs or useful feedback... but I find these worthwhile after playing the "5 why's game". user error -> poor error message -> bad example docs and wonky API for that area -> underserved use case. that's useful feedback!