skysight-inc/HackerNews huggingface dataset:
I was unclear, sorry: I didn't mean to say that the extra braces make it uglier, I meant to point out that something that was described as beautiful was actually flawed.

The flaw was minor in this case because the identifier names and lack of body make the intention clear, but my point is that there are a lot of minor things in C that can come and bite you at any time.

Edit: You are right, I don't see a way this could have been implemented more readable without sacrificing some performance.

First thing I thought of was:

void cp(const char* from, char* to) {
while (*from) {
*to = *from;
to++;
from++;
}
}

But that does not reduce to the original case.
Let's see you apply that same logic in this thread:

https://news.ycombinator.com/item?id=34715890
Apple people think that. They rarely leave their walled garden.
Perhaps it’s machine translation.
A game series with an imagination, scenery and music unlike anything else. I had great time playing Myst and Riven.
I do a watered down version of this and have still seen great results. I try to eat only in a 11-12 hour window each days, which for me means only between 8am-7pm. More energy, less food craving, better sleep.

I started this after reading a book The Circadian Code which describes all the science behind this (written by a real scientist). Having a deep understanding of the mechanism was the boost I need to give this a fair try. The book explains why study participants who ate the same food, but in restricted hours, had better results. A broader discussion of circadian rhythms explains why eating during all waking hours negatively impacts sleep and energy levels.
With imperfect eye sight, I find it much easier to read text with higher DPI. For me 11-12” is the limit for 1080p. At 16” I’d want at least 1440p. Even 4K starts getting blocky above 24” or so, 27” is barely ok.
Today there is also a third possibility: your account is shadow-banned.
I’ve found the science behind fasting to not be compelling, or to be conflicting, however, fasting is working well for me at the moment.

This is largely because I love to feel very full and to eat a lot, and also because I work much better with black and white rules than with shades of grey that rely on willpower.

I currently do 20:4 fasting: I started eating each day around 12:30, have a huge meal, take a siesta, and then eat some more, stopping usually by 15:30. Sometimes I eat more at the first meal, and that’s the only meal of the day.

I’m losing weight (by calorie counting), but in contrast to previous diets I don’t feel like I’m going without, I don’t feel so hungry, and most importantly, I don’t find myself at 7-8pm thinking “I wonder if I could justify going over my calories just sliiiightly” because I’ve started the fasting app on my phone.

Getting to 16:8 was hard. Going to 18:6 from that was easier. 20:4 was pretty easy, and then going to one meal a day (or 23:1) wasn’t any effort at all, other than it’s uncomfortable to ingest 2,300 calories in one sitting unless you significantly amp up the fat you’re eating.

I’m only really hungry each day from about 10:30 to 12:30, which is the time I use to exercise and then go for a long walk, so it’s very manageable. Not at all hungry in the evenings, and I don’t wake up hungry either. As someone who thinks of themselves as ALWAYS HUNGRY this has been interesting.
We allow people to drive. We allow burning of fossil fuels and use of tires.

These things kill people. Life is not infinitely valuable, a higher quality of life for years can be worth a few life hour reduction in life expectancy.

In the domain of public policy, money is lives. Spending more money on nuclear safety means less money on cancer detection or rare disease research, which costs lives. Spending money inefficiently costs lives.

> It also has no explanatory power over all of the corruption and willful negligence pre-1979 or the spiralling costs elsewhere.

By the latter, are you referring to Cost Disease?
I tried to get chat.openai.com to generate something interesting for the transcript linked to in another comment and it failed rather spectacularly. The transcript contains error for Rust (which becomes rest) and coreutils (which becomes corridors) making the output of the LLM useless. The LLM also seems to completely misinterpret the author when he speaks about working for Mozilla, omitting the part where he explicitly mentions that he's only saying this so that you wont associate this work with Mozilla. It also repeatedly gets confused about what the author is talking about, likely due to a small context size.

It would be a very low quality blog-spam level blog post.
Design thinking was supposed to fix the world. Where did it go wrong?
In general, how far removed is a coreboot computer from a fully open-hardware computer? Is there any promise that the latter will be available at some point?
> The alternative here (which would make your example work) is that dictionary lookups return some falsy sentinel value when the key does not exist, just like in javascript. In javascript, this has made a lot of people very angry and been widely regarded as a bad move.

You get that behavior by using dict.get(): answers.get("I exist") returns None, which is falsy.
My threat model accounts for leaked passwords, even if you are able to identify the system I use, you would have to iterate through ~8! possiblities minimum per account. There's no underlying patterns that allow for shortcuts. There's nothing wrong with a system as long as you can't guess the system by comparing multiple leaked passwords. I don't see how it could weaken security significantly if your system includes randomness in some sense. For example, the order in which you might place words and special characters or the letter placements which you substitute.

It's absolutely possible to have a system without weakning security. But that might fundamentally have the same considerations that rolling your own crypto solution would. I was thinking about those very same mistakes when making my system. I expected that a technical crowd like HN would care about stricter privacy, but I continue to be surprised.

The threat model I assume is the reason why I would never use passkeys. From the responses I have gotten, my threat model seems stricter than average. Using a manager generated password feels like security through obscurity. As does using a single point of failure piece of hardware where I can't backup the secret. I don't want to use a "virtual" passkey that is attached to a MS or Google or Apple login, especially for replacing passwords. A secret I don't control isn't my secret, similar to the idea of not your keys not your wallet when dealing with cryptocurrency. In this case, there's a very real price of privacy to pay for convenience.
Reminds of nope
It does happen, in certain locations and under certain circumstances. And I really can't blame them, when toilet-only visitors start outnumbering paying customers by a considerable margin. When all your anecdotal data is from Oktoberfest surroundings and the like you might come to certain conclusions.
Replace what “S3” with “S3-compatible object storage”.
The conclusion is clear: add more swearing to your comments, or preferably: your identifiers. That'll improve the code quality greatly. Your manager will count them during the next performance review.

More seriously: I get that people upvote this for fun, but all these studies are so bad. What's the fracking prior, may I ask, especially the one that relates the article's measure of swearing to the measure of code quality?
I hit this problem for my project. On every launch of my lib, it would grab a patches file from the main github repo. I was seeing people having to wait 5 minutes+ and multiple restarts to get the latest pushed file. The solution was to run a custom BunnyCDN instance where I can easily invalidate the caches via a basic API request which happens on a github push of that file.

I was surprised to see that sometimes that file was being requested millions of times a day due to attempts to loading it too early. With some optimizations I was able to greatly reduce that by 99%.

Having seen all those requests, I understand why github aggressively caches these files.

I agree that repo owners should be allowed to invalidate those caches upon an API request - or it should happen automatically on every change.
Dual Inheritance Theory
> It removes redundancy, because the function name should already be in the call stack.

I agree, as long as there is 1 methot to test per file containing the tests. Otherwise, I put the tested method name first (if it's a unit test) and adhere to the pattern [method]_[should]_[condition]_[result], e.g. Divide_Int_ByZero_FailsWithException()
asyncio.Task is part of the asyncio event loop framework. So any event loop implementation that conforms to that framework will have to have one (including the default event loop implementation that ships with asyncio). So for example, uvloop, which is an alternative event loop implementation that works with the asyncio event loop framework, also uses asyncio Tasks.

Other event loop frameworks can do whatever they want, and presumably, wouldn't be importing from asyncio. Whether they have a similar abstraction is completely up to the framework itself. Trio, for example, doesn't have a concept of a task object at all, because it enforces a strict tree structure for tasks.
> like they did with cigarettes.

THEY ABSOLUTELY ARE NOT THE SAME THING!

Animals enjoy alcohol too, it's a beverage, it's a natural substance, there's no way that alcohol it's gonna be like cigarettes!

Hotdogs are bad for your health, do you think hotdogs and cigarettes are the same thing?

Do you really believe that alcohol is a modern addiction, like tobacco industry?

Have you ever heard that Christians drink wine because it's the blood of Jesus Christ? (who turned the water into wine BTW!)

Do you know that radical Islam prohibits alcohol because it can induce a loss of self-control?

Do you believe that radical Islam is the way to go for the future?

I really don't.

Alcohol is rooted in our ancestry, it's part of who we are, stop blaming substances, this is truly a modern take: it's the never ending bullshit of the war on drugs that started with prohibionism, it's the USA that promote the puritan way of life, while destroying the planet
more than everybody else combined and indulging in the worst possible lifestyle (eating garbage, drinking like there's no tomorrow, working to death, healthcare considered a luxury etc.), it's the same old story of Americans not understanding that their problems are absolutely not everyone's problems

The oldest verifiable brewery has been found in a prehistoric burial site in a cave near Haifa in modern-day Israel. Researchers have found residue of 13,000-year-old beer that they think might have been used for ritual feasts to honor the dead

Those who believe alcohol is a fad are simply delusional.
I actually tried to make that happen, but was unsuccessful on GCC and Clang (I've seen this in the past for mempcy() though).
It is like yelling in public sometimes you need to do that so you get point across but if do it constantly you are just weird.
Crap, I am in the market for laptop now. I can stomach 4-5months waiting time

Meanwhile lots of brands are spitting 15"+ laptops with FHD dispalys like it is 2010s. eWaste :(
How will you or anyone ever be able to know this… just because you cannot perceive it, you assume it cannot exist?
A curated list of resources on Behringer 2600 / ARP 2600 synthesizers
Three Body Language Written in Rust
I don't doubt that you may be true, but HN was full of comments explaining how FTX/Alameda is not a scam, but how they use deep knowledge, domain information, how they are ruthless and efficient, how they are scientific and disciplined, how they are "real sharks", etc.

EDIT: here is a relevant thread:
https://news.ycombinator.com/item?id=30503820
The argument is that layoffs tend to incur follow-on decisions to depart being made by people who were not laid off.

I don't necessarily have an opinion about that - I've seen exoduses, but not (yet?) for that reason - but my inbox at least corroborates a sharp increase in the rate of headhunting lately.
This is also related to the Client Server model supported by Docker versus the Fork/Exec Model supported by Podman.

Podman works closely with the HPC (High Performance Computing) world. Checkout the article about how the fastest computers in the world in the most secure facilities in the world are using Podman.

https://www.nersc.gov/assets/Uploads/06-Containers-for-HPC-S...

https://opensource.com/article/23/1/hpc-containers-scale-usi...
Roy osherove's naming convention served me well over the years:

UnitOfWork_StateUnderTest_ExpectedBehavior

https://osherove.com/blog/2005/4/3/naming-standards-for-unit...
>If China never sent that large balloon.. they could have sent a dozen more small ones and no one would have cared.. just like we never cared about the 3 during the previous administration.

But we certainly _should_ have cared. People want to turn this in a purely objective moral game. "Well we've spied on China, so therefore this is fine." If you think of it more in terms of war, you'd never draw such an equivalence: "Well, we've shot down their planes so it's fine that they shoot down ours." The advantages that China can take against us matter, and it's important not to be reflexively passive.
The article describes an 18 year old girl without any money getting her breasts removed and regretting it immediately.

You are saying this is impossible, or that she was on the waiting list for years (as a minor).
And the corollary of this is how to do layoffs right (allegedly Toyota does this):

1. Cut out whatever else you can first, like executive bonuses and salaries.

2. Calculate the bare minimum staff you need, through good times and bad times.

3. Lay off the rest.

4. Tell those that got stuck behind that it was an extraordinary event and that they have tenure for life should they want it.

5. Stick to your promise.
Any suggestions how to get started building a cross rootfs with gentoo? My experience is limited to half a year of gentoo on my laptop in highschool, but I hate yocto with passion and would love to move to gentoo.
To add to this, Thonny has a variable explorer that shows object attributes.
I've added a couple of examples trying to find a more readable version, which actually isn't trivial. Sorry for the 'post-edit' :)

As for performance: I don't think such details matter much, first, compilers are pretty good to turn "readable but inefficient" code into the same optimal output (aka "zero cost abstraction").

And a really performance-oriented strcpy() wouldn't simply copy byte by byte anyway, but try to move data in bigger chunks (like 64-bit or even SIMD registers). Whether this is then actually faster also depends on the CPU though.
Used a small python script to download the webm files from https://fosdem.org/2023/schedule/events/

Used a small bash script to run `whisper $f --output_format json --language en | tee $f.txt` over every file.

Ran a small python script to make the HTML. All totally trivial, it just required some GPU-hours.
Well, Raptor Lake processors released recently are quite good, and it seems that Intel's EUV manufacturing processes will be ready this year. I think Intel has a chance to catch up with, or even surpass TSMC in the next couple years.
Do you have IPv6 AAAA records in DNS? Or does this happen also for A records?
- "Note there's no doxxing here,"

How on Earth could a customer looking up a vendor's business information be construed doxxing? Do you guys -- I'm asking sincerely, I'm feeling extraordinarily confused and out-of-touch -- think there's some of genuine privacy interest here that you'd wish to respect? Some sort of "right to anonymous business", where you can hide all your sketchiness behind a shell company and people need to *morally* respect your wishes?

Because, if I heard someone "doxxed" a company's ownership and financial documents non-consensually, all I'd have to say to them is "good on you, Wall Street Journal".
It also encourages a doom loop where people using smaller cars feel less safe because of the massive cars around them, so when it comes to buying their next car, they buy a massive car as well, making those still in smaller cars feel even more unsafe.
Podman can actually quite easily run host environments in containers with systemd running as PID1, giving you very similar features as LXC.

Checkout `podman run --rootfs`
As an anecdote, I just started a masters in data analytics and I've been having a lot of fun asking ChatGPT for help detecting overfitting and useful terms like the mean squared error (MSE).
That's not a laptop.
Can you elaborate? Isn't the c++ exception system built on top of setjmp/longjmp?

For setjmp to have a measurable performance impact, you have to be calling it an awful lot. It is just a handful of mov instructions without dependencies.
https://de.starlabs.systems/pages/starfighter-specification

1.4 kg, so considerably heavier than the LG gram 16 (that unfortunately isn't available in 32G+) but also far from being an outlier in the other direction
The "tragedy of layoffs" is not that the top talent won't find other work. It's more about the people who will be unjustly affected. Those that are let go through no fault of their own, those whose morale and work satisfaction is destroyed, those who were hopeful for and dedicated to projects now being canned, those who will have visa uncertainty, those who have to go through the stress of a job change, and others put in similar circumstances. Top talent is not excluded from this. But they will find work.
> Same reason people aren't interested in objectively discussing the 'harms and benefits' the USSR brought to Poland

Because it's politically useful to demonize their enemies, got it. In any case, if someone openly isn't interested in an objective view of history, then by definition they've confessed to wanting only propaganda.
Huh? The GNU compiler collection contains a Fortran frontend, and GCC can target nearly every architecture under the sun, inluding Aarch64.
Could we try to keep the topic on the article itself instead of complaints about C? It sucks to come and read the comments about this very nice article and have to scroll and scroll until I finally get to comments written by people who actually have something to say. This is a great blog, and the author puts a ton of effort into their posts. It’s hard for me not to view comments like this as being a bit thoughtless and inconsiderate.
Warm-bloodedness is thought to have evolved in mammals and birds as a means of defence against fungal diseases.
My uni friend is a CTO in large consultancy. He attended meetings with Razer laptop.

You've got it wrong.

Yes, I imagine some prehistoric corporations might have a problem with non corpo laptop.

Luckily the rest of the world has moved on.
What's wrong with it, then?
Curiosity, and research about certain algorithms. It's quite good at describing how technical projects work.
"...These tests, combined with our visual analysis of the data yielded the result that repositories containing swearwords exhibit a statistically significant higher average code-quality (5.87) compared to our general population (5.41)..."

The swearing is a proxy for caring? Not that non swearing don't care but the ones that swear are putting their soul and bones into the caring?

Other proxies the researches could have used:

- Hours extra in the office and code quality.

- Professional industry certifications and code quality.

- Attendance of Software conferences and code quality.

- Consumption of coffee versus tea and code quality...
> This post seems to support my hypothesis about TDD: it is for the poor programmers

If there’s one thing I’ve learned after decades in the industry, it’s that we are all poor programmers. Our squishy wet human brains are simply not a good match for what computers do, and as such, we should take all the help we can get :)
Mango: A JavaScript framework that supports IE5
It seems to me that there ought to be a principle of "opacity entails responsibility".

An open-source project and its developers can easily claim to have no liability because it's possible for downstream users to fully inspect the source code. However, it's harder to argue the same thing for a closed-source product or service.

If a company claims to provide a closed-source service according to certain specifications, and then fails to, then they're liable for that failure. In other words, if you want to fence your code off to more effectively generate profit from it, OK -- but now you are liable for any disasters caused by it.

It becomes particularly interesting if and when a closed-source project depends on open-source dependencies upstream, especially if these dependencies are not declared. Can the downstream company then deflect responsibility? It seems that not.

Of course, it's not a black and white thing. A developer that deliberately inserts malicious code into an open-source codebase should still be held liable for this. I'm sure one could craft a similar argument for limitations on liability of even closed-sourced codebases.
“Everyone leaves and goes to Google. What happens if Google decides to pay less? They go off to Microsoft or Amazon.”

Problem is that Google, Amazon and Microsoft aren’t hiring right now.
I don't know how companies like Grammarly will survive this AI summer.
Platforms. A new emerging trend for database services?
The whole point is that if you can't sustain your company or even meet the baseline of it's operational costs then either you've grossly overextended your expenses or you don't have a viable business on your hands.
This machine looks amazing! We now need a nix configuration for it! Congratulations on the launch
Why would I buy this instead of a Tuxedo or Slimbook?

I don't mind paying more for a laptop from an independent company with linux support, but the price is excessive and I don't even know if what I'm buying is actually good.
It seems to me like a plan to overwhelm the public by the US defense department.

Is it hard to puncture a balloon and examine something forced to descend or is finding something harmless a worse result than a bunch of debris?
I actually do. It is dirt cheap to do (on the scale of national budgets) and can provide extra intel.
It is also against the law in my city (Cincinnati, OH) as well as several states.

These laws are terrible.
No, but those are not the only companies top talent is going to. I can see at least three streams of "top talent migration" after a layoff in my tech company that happened a few years back - other big tech (Fortune 500 and similar companies), start-ups (including own), outside of big tech (gaming, space, medical, civil infrastructure, etc).

A lot of companies are hiring aggressively and don't plan on layoffs. From my anecdotal experience, the FAANG layoffs are a bit of a joke in some CEO circles. A lot of tech does not agree with what FAANG is doing.
AI: An effective productivity tool is more important than ever
Previously discussed here: https://news.ycombinator.com/item?id=34712640
Sure but to me, and I am obviously biased, if I want to run a container on my system I don't want to fire up multiple daemons in my homedir and then have them sitting out there using resources, when all I want to do is run a containerized application.

One beautiful thing about Podman is it can fire up, pull the image from the container registry, start the container and then go away. Leaving you with only the containerized application running in rootless mode.

To do this with Docker, you fire up the entire Docker infrastructure, then launch the docker client, once the application is up and running, you still need to shut down the docker infrastructure.

Even if you run with podman socket activated server, the podman service will not be running until someone connects to the service, once the connection to the service goes away, the podman service shuts down no longer using system resources.