skysight-inc/HackerNews huggingface dataset:
Same question in chatgpt

https://chat.openai.com/share/36e9e015-8645-4c07-9131-d8d773...

Alright, let's dive into this. You're looking to modify your function to not use the `auto` keyword with parameter packs but instead use a template parameter. The thing is, when we talk about replacing `auto` with a template parameter in a situation like yours, it gets a bit tricky due to how parameter packs work with templates and concepts.

Your initial function definition is pretty sleek because it uses C++20 concepts (`std::same_as`) alongside `auto` to enforce that all arguments passed to `IsKeyDown` must be of the same type as `KeyCode`. This is cool because it gives you compile-time type checking right off the bat.

However, when you're looking to shift away from `auto` and use a template parameter list directly, you'd typically define a template that applies a concept to a type parameter. Unfortunately, the direct translation you're asking for, using `std::same_as<KeyCode>` directly in a template parameter list for a function, isn't how concepts are applied in template parameter lists. Here's how you can achieve a similar effect:

```cpp
template<typename... Keys>
requires (std::same_as<Keys, KeyCode> && ...)
inline bool IsKeyDown(Keys... keys) {
return (::IsKeyDown(KeyCodeToRaylibKey(keys)) || ...);
}
```

In this version, `template<typename... Keys>` declares that `IsKeyDown` is a function template that accepts a variadic template parameter list named `Keys`. This means you can pass any number of arguments of any types to `IsKeyDown`, as long as they all meet the requirement defined by the `requires` clause that follows.

The `requires` clause here uses a fold-expression over the logical AND operator (`&&`) combined with the `std::same_as` concept to ensure that every type in `Keys` is the same as `KeyCode`. It's a way to say "all types in `Keys` must be `KeyCode`," which aligns with your original intent but doesn't use `auto`.

This approach maintains the compile-time check you wanted, ensuring all arguments to the function are of type `KeyCode`, and it doesn't use `auto` in the parameter list directly. It's a bit more verbose but achieves the goal within the constraints of the language and how templates and concepts interact.

Remember, this approach leverages C++20 features heavily, so make sure your compiler and build environment are up to date to support this syntax.
China had a rash of school attacks with knives in recent decades: https://en.wikipedia.org/wiki/School_attacks_in_China

The deadliest school attack in US history was the Bath bombing, which did involve a gun, but most victims were not from it.

The common factor is mental health, not firearms.
only those with sufficient power enough indifference can ignore the crowd
The authour has already converted the code to using a pointer to value struct for storing in the standard go hash table in Solution 2.

Solution 7 contains the code and description for the custom hash table.

I can see where interleaving/inlining the hash generation of the station name/key with the search for the separator reduces the number of scans of bytes from 2-3x to just 1x.

The second point in Solution 7 was the use of the byte slice to the underlying buffer when the station name is found in the buffer instead of creating a new string. This saves a memory allocation.
Running XP in a VM is really a very different threat model from “I run XP”
If working with number arrays using Float32Array can provide significant improvements to performance.

Never use .forEach(), always use a for loop. Same applies to methods like .map().

Some calculations are just much more expensive to do than others. Exponentiation for example is much more expensive than multiplication. You want to write your code in a way that not only considers the total number of operations, but also minimises expensive operations.

Caching can help if you're doing repetitive computations.

If you're absolutely pushing performance to the max you will probably want to look at doing some clever stuff with WebGL2, WASM or Web Workers. Wherever you can avoid this though I would recommend it because it will make your code much more complicated and won't even necessarily out perform because of overheads.

Edit: Also check out this guy on YT, https://www.youtube.com/watch?v=WLwTlC1R2sY He does some really interesting deep dives into JS performance.
Show HN: Pipedream now has 1800 integrated APIs
Why does it have to use bit test and set and interleave with other threads, though. AIUI you can use a CAS loop to implement any RMW atomically over word-sized (or double word sized, on many platforms) data. That seems like a no-brainer.

For comparison, the Rust implementation for lightweight RWLocks on futex-capable *nix platforms is here: https://doc.rust-lang.org/stable/src/std/sys/unix/locks/fute... It sets the "reader counter" in the underlying atomic to a special value to signal that the lock is set for exclusive access. So a reader thread acquiring the lock as shared can never result in this kind of bug. Bits are used to signal whether readers or writers are currently waiting on a lock, but this just cannot turn a lock that's acquired for shared access into exclusive, or vice versa.
That's not so far off from how silicon valley really worked in the halcyon days.

Read "What the Door mouse said."

https://en.m.wikipedia.org/wiki/What_the_Dormouse_Said
No, that can't explain his result showing the witch gene going extinct despite, by stipulation, zero fitness impact on individuals but 100% transmission. Because the human population did grow over that time, so every deadend must have been balanced out by even more children by the non-deadends. And since he starts at hefty fractions like '1% of the entire population' (and goes up to 20%), we should be well beyond any issues of very small number effects or gambler's ruin.

There has to be something wrong with either the data or code. (It almost looks like a sign error!)
Yes, it does. To be fair I wouldn’t really trust some old version of VirtualBox that runs on XP (it probably has bugs of its own) but it’s way better than sharing a kernel that is known to be full of bugs.
Yes. Because it’s impossible to write a malicious program in Rust, Python and Java, or pick up bad programming habits in any of the above languages /s
As someone that has had those titles for many years in the past: I'm only going to object to the one that's paying less at the time.

A good sysadmin was always doing the same thing as a good SRE.
>> AI is in the solution-space, not the problem-space,

this feels like an oversimplification. Its like saying the internet was in the solution space, companies were still selling things and now they needed to use the internet as well.

I think there's a ton of new scenarios that open up some are already underway like self driving cars and others further down like home robots that function like butlers.

Also companies that leverage AI in the best possible way for a domain will differentiate and that does open up the possibility of disrupting incumbents. It may get to be that to set up a business you pay for Data and the Model until you have critical mass to generate your own data.
"Patience you must have, my young Padawan. Have patience and all will be revealed"
The Delphi Method
Science is also about finding new/different ways to understand the world from existing data (e.g., new theories might describe existing data better).
Yep, totally get that possibility. We've seen it with the 08 financial crisis, COVID (esp. wrt money printing), and even down to more mundane things like nimbyism + pension underfunding (traps that many/most other developed nations have fallen into).

Still it makes me squeamish and makes me want to point out that just because we can't conceive of a threat unique to our particular position doesn't mean that one doesn't exist! But a lot of what drives me to think that is almost certainly just my own risk intolerant disposition, which again comes down to opinion.
Normal reddit link, for those on mobile or just don't like 00s web design:

https://reddit.com/r/AskReddit/comments/2s9u0s/what_do_insan...
not all bosses are like you
From all the modern C++ features, concepts are imho the least offensive, though. I never heard anyone calling them dangerous or anything the like, which wouldn't make sense, since they are a compile time feature.
Rachel and I are well aware of the promise of AI as a research tool. I created the first company that focussed on deep learning in medicine. Rachel has a PhD in math and is now doing a masters in immunology, and is trying to help figure out to bring AI to medical research.

The point of the article is that AI as a research tool is insufficient to result in improvements to patient outcomes on its own. The article includes, for instance, the example that better MRI interpretation doesn't help those people that are being refused an MRI.

Rachel and I quit our jobs and spent years, entirely for free, helping make AI more accessible to more people. We did that because we think AI is great! Pointing out that helping patients requires more than just AI is not anti-tech, it's pro-human.

We can care about both the technology and the context in which it operates.
Sampling: What Nyquist didn't say, and what to do about it (2018) [pdf]
chatGPT and dall-e
> The US decimated Iraq (literally) because Bush wanted to put thousands of angry teenagers and 20-somethings onto a battlefield for revenge for 9/11 when it was the Saudis all along.

This is the reasoning that they openly gave for invading Iraq. Taking it as the "history" is just accepting propaganda. The US knew full well that Iraq had nothing to do with 9/11. We immediately knew who was responsible, and in the aftermath went out of our way to protect our relationship with Saudi Arabia and to defend them to the US public.

Also, countries don't do things out of "revenge," that's a soap opera view of international politics. Administrations might take advantage of mean girl style narratives in order to sell something they want to do to parts of the public, but you can't mistake emotional propaganda for material causes.
Where is the money going?

Round down to ~ 3 Billion https://lao.ca.gov/Publications/Report/4808

181,399 round up to 250,000 https://calmatters.org/housing/homelessness/2024/01/californ...

Simple math = 12000 USD per person - food, shelter, clothing, treatment, burial, etc

State actor and industry takes a slice of the profit: https://youtu.be/z6iW1poC-0c?si=EFrK07ew2vaX_yMD

Iterate across the country.

Almost like historical payback: https://youtu.be/u1dbOf63roI?si=q8fV1fya60abnceX
I honestly couldn't tell you, it's gob-smacking to me, has been for so long and I'm so darn curious...I assumed they _certainly_ would have figured it out after setting up a year-long sprint.

riffing out loud:

In 2021 I would talk about "products not papers ", because the gap seemed to be that OpenAI had the ability to iterate on feedback starting 18 months earlier. I don't think that's the case, in that, Google of all companies should have enough from Bard to improve Gemini.

The only thing I can think of left is that it genuinely was a horrible idea for Sundar to coming swinging in, in a rush, in December/Jan, to kneecap Brain (who owned the real grunt work of LLM work) and crown the always-distant always-academic DeepMind.

Like in retrospect, it seems obviously stupid. The first thing you do to prepare for this exisential calvary battle is swap out the people with experience riding horses day to day.

And that would also explain why we're still seeing the same generally bad performance so much later, we're looking at people getting their first opportunity to train at scale for chat, and maybe Bard and Gemini were completely separate groups, so Gemini didn't have the ability to really leverage Bard feedback. (classic Google, one thing is deprecated, the other isn't ready yet)

It really makes me wonder about some of the #s they'd publish in papers and how cherry-picked they were, it was nigh-impossible to replicate the results even with a boatload of curiosity and gumption to try anything - I mean, I didn't systematically try to do a full eval, but...it never, ever, ever, worked even close to consistently the way the papers would make you think it did.

Last thought: I'm kinda shocked they got Gemini out at all, the stuff it was saying in September was horribly off-topic and laughable about 20% of the time.
From unicorn to bust: Inside the fall of Seattle online retailer Zulily
yeah, it goes to show you that Electron based apps can be done in a reasonably performant way but it does require extra care/attention as Obsidian is an electron app as well.

I have about 13,000 notes (with embedded media PNGs, MP4s, etc) across 50 folders/subfolders on my Mac M1 and searching across all notes in Obsidian is for all intents and purposes instantaneous (less than a second).
All of these articles seem to miss the point that it isn't what AI is today that is scary. It is the doubling period of their abilities. 10 years ago we had cleverbot. Think about it, in the same year Guardians of the Galaxy came out, our best chatbot incessantly asked you if you were a computer.
Communications Decency Act. They're legally responsible for what the AI says, but not what their users say.
I installed Joplin once but the icon in my dock was so garish that I immediately uninstalled it.
The current price difference on Amazon is $5. But the 7700X doesn't include a cooler. If you're not planning to use the AMD cooler, may as well pay an extra $5 and get a processor that binned better (probably), not have the extra cooler, and you can fiddle with voltage and TDP/power limits from there.

Depending on your cooling, having a 100Mhz higher max clock could be worth $5.
What's interesting is non of the things they seem to spend their money on have the least appeal to me. Honestly, if I was super rich I'd create businesses doing all the things I want to pursue. I'd pour millions and millions into speculative attempts to solve climate change or whatever project interests me (generally projects that are about improving the world in various ways). I'm not short of ideas. I'm short of money or time to make those ideas happen.
Don't skip the tutorial this time!
I find fascinating how each of these instances ends up a PR nightmare. The price you pay for mysticizing a product, selling a mere text prediction model as Artificial Intelligence
I tried both, my Joplin experience is a few years ago so grain of salt and all.

Joplin is open source, doesn't really have a plugin ecosystem, has a custom storage format for its data and is _really_ easy and reliable to sync with WebDav (I had mine set up with Fastmail's webdav while sipping my morning coffee)

Obsidian (my current system for going on 2 years) on the other hand is the closest I've gotten to org-mode with a modern tool, with all the pluses and minuses.

The plugin ecosystem is completely crazy, you can find a plugin for pretty much everything. And you'll lose days of actual work progress bikeshedding the plugin system =)

Data is stored as regular standard files (Canvases are the exception, but there really isn't a standard for stuff like that).

Syncing with third party tools is ... workable if you don't switch platforms quickly - basically if you make a note on your phone and immediately switch to desktop, the note might appear or might not, depends on the phase of the moon. iCloud takes a while to sync and sometimes just freezes, works fine if you let it work. Dropbox, OneDrive etc aren't officially supported and tend to have conflicts.

I actually ended up paying for their sync service and it Just Works - even though it's not the cheapest option, but _for_me_ it's worth it because I regularly use multiple devices in short succession on the same notes.
This "Boring" testimonial collection platform makes $33K/year
This "Boring" testimonial collection platform makes $33K/year

- Launched in 2020

- Solo Founder

- Revenue: $2.700 MRR

- Monetization: Subscriptions

- Category: SaaS
"I'm sorry Dave, I'm afraid I can't [let you] do that."
This is only partially true from my experience as a Chinese grew up in Northern China. I think a greater factor is deliberately causing pain or embarrassment.

Like the initiation rites for fraternities or sororities, the pain is the point. The reason behind this is that a commonly shared embarrassing experience creates intimacy and loyalty.

I'm more inclined to accept this theory over others including the one from the article, because it can explain many rules observable in the drinking culture (at least in Northern China).

1. It's rude to reject an invitation to drink together from a person with higher status.

2. When many people drink together, the more you drink, the greater respect you show to others.

3. As a consequence, the person with higher status can choose to drink less than others, or they can choose to drink the same to show greater respect.

4. People with lower status should proactively invite people with higher status to drink, in the order of their status.

Therefore, in a typical drinking party (饭局), the people with lower status usually drink the most, often to the point of being unconscious or causing a scene, and that would show their loyalty.

This was part of the job for government officials and those who work with them. And people could genuinely get pretty sick from alcohol consumption. Death from drinking is not uncommon. There was even a debate on how to divy up the legal punishment to the people at the same table when this occurred. And it's not a theoretical sophistication at all.

Luckily, Xi has banned this as part of his anti-corruption campaign (八项规定, the Eight Rules), so it's less of an issue now.

Furthermore, young people in China have moved passed the drinking culture as well. Back in the university, one can choose whether to drink or not, and when one drinks, any amount to their personal preference is acceptable.

I should add that I don't drink at all, but I was often in a situation where I was supposed to drink and got asked a lot. That's why I sought an explanation for the drinking culture and I suspect that many people who participate in this culture can't explain it explicitly.
That argument only works for people who care how they’ll live in their 60s/70s. There’s a morbid reality check in my circles (late 20s/30s) that the way our parents are living right now will never be obtainable for us (this includes friends with children as well). So might as well squeeze out life right now, at least have stories to tell to each other when we’re “dying of hunger in our 70s”. It’s not a scientific data point or anything, just bunch of friends shooting the shit and talking at the bar kind of stuff.

I’m not saying it’s all doom and gloom in the future, but it’s simply a risk assessment. The usual semi-paradox of “if others don’t care about it, why should I”, but apply that to everyone in the world.
> Now we have a company "trying" to be more responsible when they are releasing a new technology and they are having hilariously terrible results.

We need to be open to the idea that the computer might mock us. What's a Venn diagram of "good artists" and "people who'd only draw pictures of Nazis sarcastically" look like?
Byte was great. I've the discussion of the NEC 7220 here.

It was widely available here in the UK and in a pre-world wide web age it was one of the most important ways of knowing what was going in the US market. Well for a young me anyway.

I loved it. I remember the issue detail the NeXT Cube particularly.
The hollow struts are interesting, I've worked with lattices but that's not something I saw before. I guess they are stronger than solid struts with a smaller diameter so they have the same amount of material.
>> reading nothing but effusive praise for the cleverness and elegance of C and Unix

It isnt that these are GOOD ideas, it's just that no one has come up with better ones.
The first thing I noticed was that your idle temperatures are exceedingly high, especially for an AIO. My air-cooled ryzen 5 idles at around 35c with nearly zero fan speed on a $30 air cooler.

Most AIOs need servicing after a few years- find instructions on how to disassemble yours, clean the water block, flush the radiator, and refill with a deionized-water/glycol mix.
Ok recent example we had a bunch of 0 days targeting Android where attackers sidestepped basically all of Chrome’s security features because of bugs in Mail GPU drivers. A fully-patched Chrome can only assume that these were written correctly and dutifully calls into them as appropriate (from userspace, of course). If these legitimate calls end up triggering the bug then you have attack surface that is exposed to web content.
I support your app so much I would pay a monthly fee instead of a one-time purchase. My notes are as valuable as my life. I don't mind the app being proprietary if it gets the love it deserves. If you can accomplish the goals you set out, like providing good functionality and performance, then I'm cheering you on. My needs are very basic, just the minimum to accomplish Zettelkasten.
The SRE book is a little more advertisement of Google's internal systems than real actionable advice outside of Google for SREs.

There is some generally useful stuff in there, but it probably fits in a few pages vs a full book.
Cash use is very limited. Once you go over a certain amount, you have to get banked. That's why money laundering is such a successful business.
I'm building an HN clone, and underpinning is a set reconciliation protocol.
https://kiwinews.xyz
> Now we have a company "trying" to be more responsible when they are releasing a new technology and they are having hilariously terrible results...

I think the huge point that in my opinion all of these AI companies forget is that what is considered "responsible" depends a lot on the culture, country, or often even sub-culture that the user is in. It might sound a little bit postmodern, but I think that there are only few somewhat universally accepted opinions on things thhat are "responsible" vs "not responsible".

Just watch basically any debate on a topic where both sides have strong opinions on it, and analyze which cultural or moral traits each side has that lead it to its opinion.

Does my answer offer a "solution" for this problem? I don't think so. But I do think that including this thought into the design of making the AI "responsible" might reduce "outcries" (or shitstorms ;-) ) that come up because the "morality" that the AI uses to act "responsibly" is very different from the moral standards of some group of users.
Piggy-backing on my other comment[1], and I know everyone's on the anti-Google bandwaggon, but OpenAI also fails miserably here: https://imgur.com/a/r0BXX9G

[1] https://news.ycombinator.com/item?id=39583473#39584055
" "Opposites charges attract; like charges repel" is a long-held fundamental principle of physics that you might have heard at school, but your teacher may have been wrong.".

Actually there are assumptions left undiscussed for simplicity in communicating the concept. such as, -between point charges in vacuum

the article talks about what amounts to caging of anions in solvent.
Very easy when you subscribe to “if it’s too good to be true it probably is” belief.
Only England was stupid enough to depart from the European Union. Catalonian separatists were actually expecting support from the EU, they had zero intention of not being an EU member state.
I think we all get that. The problem is the lying.
The only practical way to do such a thing would be with a giant mirror. There is no reason why earth cannot radiate energy back into space. A mirror is a good way to do that for the optical wavelengths. Most of the energy received by earth each day is in the optical spectrum and secondarily from the gravitational interaction of the earth-moon system. The moon we can't really do much about. But sunlight absolutely can be reflected.

A mirror would also be much more effective if part of some ring like structure orbiting the earth, as most of the energy would never enter encounter earth's atmosphere in the first place.
Pre-groupthink cartels.