MurphyA/hacker-news huggingface dataset:
by ryao | 2025-05-16 00:08:51+00:00
Meanwhile, GCC will happily implement bsearch() without cmov instructions and the result will be slower than a custom implementation on which it emits cmov instructions. I do not believe anyone has filed a bug report specifically about the inefficient bsearch(), but the bug report I filed a few years ago on inefficient code generation for binary search functions is still open, so I see no point in bothering:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110001

Binary searches on OpenZFS B-Tree nodes are faster in part because we did not wait for the compiler:

https://github.com/openzfs/zfs/commit/677c6f8457943fe5b56d7a...

Eliminating comparator function overhead via inlining is also a part of the improvement, which we would not have had because the OpenZFS code is not built with LTO, so even if the compiler fixes that bug, the patch will still have been useful.
by NoFunPedant | 2025-05-16 00:09:04+00:00
When I was in my late teens, right about the time this article came out, I was an ignorant, naive, first-time computer user. My college had some Canon Cats in the computer lab. I didn't know the first thing about computers, and I didn't understand the difference between the PCs and Macs in the rest of the lab and the Canon Cats. There was never a line to use a Canon Cat, so I tried it. By Raskin's standards, I should have been the perfect Cat user. Being completely ignorant, I had no preconceived ideas about how a computer should operate. I found the Cat utterly incomprehensible. Then someone demonstrated a Macintosh to me, and I immediately understood it. Take that anecdote as you will.
by davemp | 2025-05-16 00:09:41+00:00
What I’m thinking is more like the Gov being able to furnish key designs to organizations that can plausibly iterate on them. So orgs don’t have to make massive investments to catch up to and integrate SotA phased array radars, flight controls, etc. Specific systems would still have single integrators.

There are probably a bunch of problems with this, but it’s certainly better than a specific organization vendor locking the Gov down a multi decade rabbit hole where key capabilities are proprietary designs and the vendor gets to dictate the direction/terms because it would take anyone else 5-10 years to catch up.
by jcelerier | 2025-05-16 00:09:45+00:00
> That may have made sense in the days of < 100 MHz CPUs

you don't know how much C++ code is being written for 100-200MHz CPUs everyday

https://github.com/search?q=esp8266+language%3AC%2B%2B&type=...

I have a codebase that is right now C++23 and soon I hope C++26 targeting from Teensy 3.2 (72 MHz) to ESP32 (240 MHz). Let me tell you, I'm fighting for microseconds every time I work with this.
by palata | 2025-05-16 00:10:01+00:00
> ... And?

And as far as I can see, it is dying.

> If the amount of questions went to zero per day I would still not consider this a problem.

So on the one hand you find it okay to delete old questions, and on the other hand you find it okay to not add new questions. But it's not dying.

> it would become easier to find what you want.

It has never happened to me that I could not find what I wanted on SO because there were too many similar questions. It has happened, though, that I could not find what I wanted because it was not there. And when I added it, I was closed by people who obviously had no understanding of my question (together with its answer).

Again, I am not saying that it should be forbidden to close questions. What I am saying is that SO has become a place where even good questions get closed. By people who know better, like you.
by 3cats-in-a-coat | 2025-05-16 00:10:57+00:00
"State transfer is not state synchronization" is such an obscure point to make.

State sync over REST can be rather trivial by keeping resources immutable (hence also cacheable), and delivering a root resource during the initial endpoint contact. I.e. like an index page linking to static assets. Which is all very familiar to REST design.
by GrantMoyer | 2025-05-16 00:11:55+00:00
The problem is that the initialization semantics are so complex in C++ that almost no programmer is actually empowered to exercise their final say, and no programmer without significant effort.

And that's not just said out of unfamiliarity. I'm a professional C++ developer, and I often find I'm more familiar with C++'s more arcane semantics than many of my professional C++ developer co-workers.
by IG_Semmelweiss | 2025-05-16 00:12:06+00:00
Yes, if you can name 1 example of a failed private transport project that led to

1) the biggest riots in 4 decades. 2) the requested resignation of all cabinet ministers 3) a new (socialist) constitution.

My point was not "you will die every time you play russian roulette" .

Because that's not the point. My point is, Santiago was playing it safe for many decades. Then they switched to russian roulette. Bad idea, and it showed in less than 1 decade (9 years, to be exact)
by rsfern | 2025-05-16 00:12:41+00:00
Same - I’ve been using einops and jaxtyping together pretty extensively recently and it helps a lot for reading/writing multidimensional array code. Also array_api_compat, the API coverage isn’t perfect but it’s pretty satisfying to write code that works for both PyTorch and numpy arrays

https://docs.kidger.site/jaxtyping/

https://data-apis.org/array-api-compat/
by osigurdson | 2025-05-16 00:13:11+00:00
Here is a marketing campaign for you to prove that secure enclaves work.

Host a machine on the internet. Allow competitors to sign up to receive root ssh credentials. Offer a $10K prize if they are able to determine plaintext inputs and outputs over a given time period (say one month).

A bit of a strawman, but a competition like this might help build confidence.
by Mawr | 2025-05-16 00:13:29+00:00
Now think real carefully why you had to jump all the way over to Japan in order to be able to make your point at all. Cherry picking at its finest. Japan is very culturally different from the West and such issues are tightly tied to that culture.

> What about bikes? I thought they were great too, until someone was careless with their dog and left me bleeding and weighing the probabilities of serious disease.

You know you can trip, fall, hit your head and die on the spot anytime you walk anywhere right? A piano can randomly fall on your head too. Nothing is 100% safe; it's unfortunate you had an accident, but that's just anecdotal evidence, which is worthless.
by dragonwriter | 2025-05-16 00:13:38+00:00
> Is this true?

It is true that products of purely a prompt passed through an AI and returned cannot be copyrighted in the US currently, whether a particular body of code that involves AI generation but has a more involved workflow can be copyrighted is a case by case question (for copyright registration you need to document the actual human and AI process and present it to the copyright office and they will make a decision; if you didn't do this at the time, you've probably accidentally rendered it unprotectable even if would have been were the facts documented. Technically, copyright exists at creation without registration, but since you can't sue for infringement without registration, if you make it so you can't register the copyright, you've basically made it unenforceable even if it might abstractly exist.)

> I anal

IANAL should really be kept together and capitalized.

> but I have a publicly available GitHub repo which shall go unnamed where most of the heavy lifting is by Claude and Gemini. If I can't copyright this code, does that mean I can't license it under AGPL?

Absolutely. AGPL is a copyright license. If you have no copyright, you can't enforce any licensing restrictions. You can obviously include uncopyrightable-because-of-how-it-was-generated (and therefore public domain, unless it is violating someone else's copyright) code along with other code that is AGPL licensed, but you can't enforce the AGPL terms on the code you don't have a copyright too, because the copyright is what gives you permission to prohibit uses of the exclusive rights of copyright (copying, derivative works, etc.) that you haven't licensed.

> If someone copied some code from my repo, does that somehow now taint their code as well?

No, if they copied legally-unprotected code from your repo, it has no adverse effect on their repo. They, too, cannot enforce any licensing restrictions on the unprotected code, because neither you nor they have a copyright on it to enforce, but it doesn't adversely impact their ability to enforce their license on any of the code they have that is protected by a copyright.
by Karrot_Kream | 2025-05-16 00:13:42+00:00
The "good" thing is, they're back to 2009 levels of postings. Now obviously that's what the mods let through but my guess is that traffic to the site is down precipitously as well. They can roll back their bureaucracy and head back to a lean path that worked for them in the past.

But I don't really think that's the problem. Reading zahlman's responses in this thread makes me think that the mods fell into the age old trap that's happened since Usenet, IRC, and still happens to this day wherever there's mods: they got tired of doing unpaid labor and instead of deciding to quit decided to become meaner and stricter. The age old mod trip.
by cheema33 | 2025-05-16 00:14:05+00:00
> Why would a company rewrite a codebase that has decades of error free functionality? What do they get?

All well and good if it is something you do not have to modify/maintain on a regular basis. But, if you do, then the ROI on replacing it might be high, depending on how much pain it is to keep maintaining it.

We have an old web app written in asp.net web forms. It mostly works. But we have to maintain it and add functionality to it. And that is where the pain is. We've been doing it for a few years but the amount of pain it is to work on it is quite high. So we are slowly replacing it. One page at a time.
by andy_ppp | 2025-05-16 00:14:21+00:00
Companies should seriously consider implementing GDPR even in the US, it certainly made taking data dumps of customer data a lot harder and certainly private images like Government IDs were encrypted on disk. I’m surprised at the lack of security if I’m honest, at Yahoo! almost nobody had access to prod user data.

Essentially you cannot trust Coinbase IMO, might move the few hundred dollars of BTC out of there :-)
by tomhow | 2025-05-16 00:14:28+00:00
> Please, either stop using that low parameter LLM, go for the standup gig, or get treatment.

This is not an acceptable comment on Hacker News, and along with other comments in this thread, you've broken several guidelines. Please take a moment to read the guidelines and make an effort to use the site as intended in future.

https://news.ycombinator.com/newsguidelines.html
by vjvjvjvjghv | 2025-05-16 00:15:26+00:00
The dev should have the option to turn it off but I think that removing a lot of undefined and non deterministic behavior would be a good thing. When I did C++ I initialized everything and when there was a bug it could usually be reproduced. There are a few cases where it makes sense performance wise to not initialize but those cases are very small compared to most other code where undefined behavior causes a ton of intermittent bugs.
by yxhuvud | 2025-05-16 00:15:29+00:00
The discussion about what should be the default behavior and of what should be the opt-in behavior is very different from what should be possible. It is definitely clear that in c++, it must be possible to not initialize variables.

Would it really be that unreasonable to have initialisation be opt-out instead of opt-in? You'd still have just as much control, but it would be harder to shoot yourself in the foot by mistake. Instead it would be slightly more easy to get programs that can be optimised.
Ask HN: Sites Sharing Setting Files, for Apps Like Open Shell, etc.?
by MollyRealized | 2025-05-16 00:17:25+00:00
Are there places on the Internet that collect configuration files for popular software that lets you "import settings"?

For example, I'm interested in seeing what people have done for their Open Shell setups. I found one person's XML file. But there's got to be more of these things, I hope.
by Clubber | 2025-05-16 00:18:18+00:00
>But you have to remember every time to flip it before a meeting starts and after it ends.

Agree, but it's an easy habit to pick up.

>If you don’t then it will start being ignored because its never accurate.

Yes, that pavlovian response works both ways. If people keep interrupting my meetings, I'll remember to put up the thing. Remembering to take it down when the meeting is over is more problematic though.

>It also doesn’t work if you get an impromptu call or meeting you weren’t planning for.

It does. I've never had a meeting where it didn't take me a few rings to get my AirPods in anyway.

I totally agree with most of what you said and I appreciate the technical solution presented. Like I said my mind is just into finding simple, non-tech solutions right now. Also another benefit of the simple solution is it costs probably a buck or two, cheaper if I made the tag myself with scissors, part of a cardboard box and a marker.

The problem with both solutions is it doesn't work for dogs who typically can't read. An even simpler solution just occurred to me. Shut the door when I'm in a meeting.
by bdbenton5255 | 2025-05-16 00:18:24+00:00
Woke up this morning to start on a new project.

Started with a math visualizer for machine learning, saw an HN post for this soon after and scrapped it. It was better done by someone else.

Started on an LLM app that looped outputs, saw this post soon after and scrapped it. It was better done by someone else.

It is like every single original notion I have is immediately done by someone else at the exact same time.

I think I will just move on to rudimentary systems programming stuff and avoid creative and original thinking, just need basic and low profile employment.
by ryao | 2025-05-16 00:18:24+00:00
Here is a short list:

https://graphics.stanford.edu/~seander/bithacks.html

It is not on the list, but #define CMP(X, Y) (((X) > (Y)) - ((X) < (Y))) is an efficient way to do generic comparisons for things that want UNIX-style comparators. If you compare the output against 0 to check for some form of greater than, less than or equality, the compiler should automatically simplify it. For example, CMP(X, Y) > 0 is simplified to (X > Y) by a compiler.

The signum(x) function that is equivalent to CMP(X, 0) can be done in 3 or 4 instructions depending on your architecture without any comparison operations:

https://www.cs.cornell.edu/courses/cs6120/2022sp/blog/supero...

It is such a famous example, that compilers probably optimize CMP(X, 0) to that, but I have not checked. Coincidentally, the expansion of CMP(X, 0) is on the bit hacks list.

There are a few more superoptimized mathematical operations listed here:

https://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Reso...

Note that the assembly code appears to be for the Motorola 68000 processor and it makes use of flags that are set in edge cases to work.

Finally, there is a list of helpful macros for bit operations that originated in OpenSolaris (as far as I know) here:

https://github.com/freebsd/freebsd-src/blob/master/sys/cddl/...

There used to be an Open Solaris blog post on them, but Oracle has taken it down.

Enjoy!
by pdimitar | 2025-05-16 00:18:34+00:00
Oh yeah. That. :/

Well, there's a solution for that as well: execs should be liable for a number of years even after they move on. Para-troopers that swoop in, reap rewards they never worked for, and parachute away with the gold is something that must be legislated against, hard and aggressive. People should go to jail.

But... these are the people who make the rules so not happening, right?

Oh well, better luck to us in the next life I guess.
by danielodievich | 2025-05-16 00:18:36+00:00
When my second son was born and was just so very tiny some genetic test came out questionable. We were very strongly encouraged to go to Childrens hospital ASAP to get more tests. He handled it well, being just a few weeks old. The tests came with "he's a carrier of something obscure but nothing to worry about", so it's all forgotten.

Three interesting thing come out of it from me. First, I was on Microsoft insurance which was quite gold plated at a time, a blessing only obvious in rear-view mirror, because Childrens was quite excited to continue any number of tests. Second, the technology of all this is absolutely amazing and I am so happy that it was available to me, and it has likely gotten better. Three, I want that tech to continue to expand and current destruction up there is going to hand this torch to someone else, which makes me sad.
by kragen | 2025-05-16 00:18:59+00:00
It's true that this code was optimized from 2.6ns down to 0.9ns, a saving of 1.7ns, while an L2 cache miss might be 80ns. But 1.7ns is still about 2% of the 80ns, and it's about 70% of the 2.6ns. You don't want to start optimizing by reducing things that are 2% of your cost, but 2% isn't insignificant.

The bigger issue is that probably you don't need to do leap-year checks very often so probably your leap-year check isn't the place to focus unless it's, like, sending a SQL query across a data center or something.
by dragonwriter | 2025-05-16 00:19:01+00:00
> If you never tell anyone its AI created it doesn't matter

If you try to register the copyright (which you legally must to sue over copyright infringement), you must state whether it was AI generated and, if it was AI generated, provide the information that supports it being copyrightable for the Copyright Office to evaluate. Falsifying this information is a crime.

If it ever goes to court and the code did not provably exist before AI coding became common, you will be probably be questioned about it, and failing to respond truthfully is, again, a crime. So, when talking about the ability to claim and enforce legal rights, "if you never tell anyone about it", means, "if you are willing to actively and criminally lie".

> Until then you should follow the Terms and Conditions of the tool you use, it probably assigns you all applicable rights to the generated code.

It probably explicitly doesn't claim such rights (because the tool owner has no basis for claiming them, especially since they may not even exist), but it can't "assign" you anything the party offering the T&C's doesn't have in the first place, and even if it tried to that assignment would have no effect.
by alisonatwork | 2025-05-16 00:19:16+00:00
This program doesn't look top down to me, it seems like the main sequencing interface is piano roll, although the sample editing looks tracker-inspired. It'll be interesting to see what people do with it. Maybe fans of piano roll will find a lightweight way to get their ideas down that feels simpler than a full Ableton setup?

For me I still find piano roll awkward to read. I can't visualize what the music is going to sound like the way I can with a tracker pattern. Perhaps it's because my eyes need to scan left and right and up and down too much to see what each note is? Let's not even get into the problem of having effects configured on a totally different screen. When I transitioned from tracker to hardware and later to Ableton I felt like I wasn't really writing music any more, I was just rearranging sounds till they eventually turned into music. It made for perhaps more surprising and interesting results, but I never really got back the feeling of control and finesse that I had with trackers.
by D13Fd | 2025-05-16 00:19:40+00:00
Same. I've never been a huge StackOverflow user, but it is so irritating to search and find your exact question on StackOverflow, often as the top result, only to see that it was instantly shut down two years ago as a duplicate of some other question in another context with inapplicable and useless answers.

It is frustrating not only because you can't get instant help, but also because it shows the futility of even trying to post on there.
by zahlman | 2025-05-16 00:20:30+00:00
> I don't hear people who have been around for 10 years or so complaining because they can't answer to low-quality questions.

Because they usually can. There aren't enough curators paying attention. Stopping them generally requires three curators to find the same question and act on it before an answer is posted. And the person writing the answer also gets a grace period for in-flight answers.

Then when they finally get inconvenienced, they come to the meta site and make perhaps their first attempt in over 10 years to even find out what the policy is. Often they have a bad experience with this, loudly complaining as if they already know the policy while never having made any attempt to learn it, and being surprised to find out they're wrong. Sometimes they even try to make a meta post on the main site.
by Thebroser | 2025-05-16 00:20:44+00:00
Add gene has a great guide as to what goes on at the molecular level: https://www.addgene.org/guides/crispr/

Essentially you can design an rna molecular that contains a 20 nucleotide long sequence that can target your region of interest, with the caveat that there is a standard recognition sequence proximal to your sequence of interest (PAM sequence)
by Karrot_Kream | 2025-05-16 00:22:27+00:00
My experience has been that generating structured output with zero, one, and few-shot prompts works quite well. We've used it at $WORK for zero-shot stuff and it's been good enough. I've done few-shot prompting for some personal projects and it's been solid. JSON Schema based enforcement of responses with temperature 0 settings works quite well. Sometimes LLMs hallucinate their responses but if you keep output formats fairly constrained (e.g. structured dicts of booleans) it decreases hallucinations and even when they do hallucinate, at temperature 0 it seems to stay within < 0.1% of responses even with zero-shot prompting. (At least with datasets and prompts I've considered.)

(Though yes, keep in mind that 0.1% hallucination = 99.9% correctness which is really not that high when we're talking about high reliability things. With zero-shot that far exceeded my expectations though.)
by rerdavies | 2025-05-16 00:23:48+00:00
How could somebody who has actually used coding assistants be asking for evidence of open source projects that had been 100% written by an AI? That's not what the tools are used for.

Here: https://rerdavies.github.io/ About (at least) 30% of the NEW code in my open source repos are currently written by AI (older code is not). I don't think this is extraordinary. This is the new normal. This is what AI-generated source code looks like. I don't imagine anyone could actually point to a specific AI-generated chunk of code in this codebase and say with certainty that it had been written by an AI.

I can’t help feeling that people who make these sorts of complaints have not used coding assistants. Or perhaps have not used coding assistants recently. Are non-professional programmers writing about AI coding assistants they have never used really any better than non-programmers submitting AI generated pull requests? I think not.
by h4kunamata | 2025-05-16 00:23:49+00:00
I have mixed feeling about this.

It has helped me in the past but yet, I could not reply nor post anything back to help others when I knew the solution because of the way how it works.

To make matters worse while working in IT, I worked with a guy that didn't know anything, if there was no SO post about the problem, the guy couldn't fix the problem.

I have been using Perplexity AI and it has been awesome, and it does provide all the sources it used making it easy to cross check the answers. It has helped me to speed my python learning curve, I am not using search engine anymore, and SO has the problems mentioned above so I have zero interest in using it.

Also, the website layout is a mess, I have to use uBlock Origin with a ton of element picker to stop loading half of its crappy.