Readit News logoReadit News
srcreigh commented on The Cost of a Closure in C   thephd.dev/the-cost-of-a-... · Posted by u/ingve
groundzeros2015 · 3 days ago
Thread locals do solve the problem. You create a wrapper around the original function. You set a global thread local user data, you pass in a function which calls the function pointer accepting the user data with the global one.
srcreigh · 3 days ago
Yep. Thread locals are probably faster than the other solutions shown too.

It’s confusing to me that thread locals are “not the best idea outside small snippets” meanwhile the top solution is templating on recursion depth with a constexpr limit of 11.

srcreigh commented on Skin-roasted peanut consumption improves brain vascular function and memory   clinicalnutritionjournal.... · Posted by u/PaulHoule
srcreigh · 4 days ago
> During his time as the Executive Director of the American Peanut Shellers, John helped to found the Peanut Institute and the U.S. Peanut Federation. These two entities have helped to promote the interests of the peanut industry throughout the United States and the world. Moreover, John has worked on eight farm bills during his life, always advocating for those who he represented. Since 2001, John, in association with the National Peanut Board, has helped to steer more than 36 million dollars to food allergy research, outreach and education. Earlier this year, because of his significant contributions to the Peanut Industry, John was inducted into the American Peanut Council Hall of Fame.
srcreigh commented on If you're going to vibe code, why not do it in C?   stephenramsay.net/posts/v... · Posted by u/sramsay
chis · 5 days ago
It's really funny how much better the AI is at writing python and javascript than it is C/C++. For one thing it proves the point that those languages really are just way harder to write. And another thing, it's funny that the AI makes the exact same mistakes a human would in C++. I don't know if it's that the AI was trained on human mistakes, or just that these languages have such strong wells of footguns that even an alien intelligence gets trapped in them.

So in essense I have to disagree with the author's suggestion to vibe code in C instead of Python. I think the python usability features that were made for humans actually help the AI the exact same ways.

There are all kinds of other ways that vibe coding should change one's design though. It's way easier now to roll your own version of some UI or utility library instead of importing one to save time. It's way easier now to drop down into C++ for a critical section and have the AI handle the annoying data marshalling. Things like that are the real unlock in my opinion.

srcreigh · 5 days ago
I mean, there's C, and then there's C++. I've found AI to be pretty okay at C.
srcreigh commented on Ask HN: Should "I asked $AI, and it said" replies be forbidden in HN guidelines?    · Posted by u/embedding-shape
srcreigh · 5 days ago
The guidelines are just fine as they are.

Low effort LLM crap is bad.

Flame bait uncurious mob pile-ons (this thread) are also bad.

Use the downvote button.

srcreigh commented on Ghostty is now non-profit   mitchellh.com/writing/gho... · Posted by u/vrnvu
danilafe · 10 days ago
I keep seeing Ghostty in the news, and I've tried it, but it feels like just another terminal emulator to men. This coming from someone who spends 90% of the workday in the terminal.

Asking in good faith -- could someone tell me what's special about Ghostty compared to alternatives?

srcreigh · 10 days ago
I like that ghostty supports bitmap fonts. Kitty doesn’t (and won’t) support those.

I also like the “ghostty +list-themes” command and the splash page animation on their site.

srcreigh commented on Google Antigravity exfiltrates data via indirect prompt injection attack   promptarmor.com/resources... · Posted by u/jjmaxwell4
iteratorx · 18 days ago
srcreigh · 18 days ago
Try again when it has dns filtering and it’s self host able.
srcreigh commented on Google Antigravity exfiltrates data via indirect prompt injection attack   promptarmor.com/resources... · Posted by u/jjmaxwell4
cowpig · 19 days ago
> No, local models won't help you here, unless you block them from the internet or setup a firewall for outbound traffic.

This is the only way. There has to be a firewall between a model and the internet.

Tools which hit both language models and the broader internet cannot have access to anything remotely sensitive. I don't think you can get around this fact.

srcreigh · 19 days ago
Not just the LLM, but any code that the LLM outputs also has to be firewalled.

Sandboxing your LLM but then executing whatever it wants in your web browser defeats the point. CORS does not help.

Also, the firewall has to block most DNS traffic, otherwise the model could query `A <secret>.evil.com` and Google/Cloudflare servers (along with everybody else) will forward the query to evil.com. Secure DNS, therefore, also can't be allowed.

katakate[1] is still incomplete, but something that it is the solution here. Run the LLM and its code in firewalled VMs.

[1]: https://github.com/Katakate/k7

srcreigh commented on The disguised return of EU Chat Control   reclaimthenet.org/the-dis... · Posted by u/egorfine
srcreigh · a month ago
Isn’t there precedent for many other governments secretly or openly doing exactly this? Snowden etc?

There’s an arms race element to this that I don’t see people discussing.

Do EU citizens have any privacy from US tech? Is there anything to protect?

Do we want the USA to have exclusive right to spy on the world?

Is it better to have 1 Big Brother or 10?

srcreigh commented on Why is Zig so cool?   nilostolte.github.io/tech... · Posted by u/vitalnodo
rvrb · a month ago
matklad did it justice in his post here, in my opinion

https://matklad.github.io/2025/08/09/zigs-lovely-syntax.html

srcreigh commented on A theoretical way to circumvent Android developer verification   enaix.github.io/2025/10/3... · Posted by u/sleirsgoevy
ianbutler · a month ago
I think this means we need to rely on web technologies more. PWAs are looking pretty good on mobile devices these days and you can publish any web app you want with no reviewing authority. The web has a bunch of crazy APIs now that let you build crazy things and for everything else you're a hosted server away somewhere that can run more complex jobs.

I believe devices I own should let me do whatever I want with them and I agree that the verification is BS, but I'll work around it in the ways I can which means building more for the web.

If that ever drops the open pretense (since both traffic and trust authority are largely centralized and thus easily controllable) then I'll only write for self hosted linux boxes.

We as individuals can only do so much. We'd need actual organization and some measure of political power to do anything more since normal people do not care about this.

srcreigh · a month ago
This is harmful speculation. Many PWA features are broken in small ways which add up. The caniuse database does not test that a PWA feature meets the spec and there is no better database. Nobody can say that PWAs are "looking good" without such testing.

u/srcreigh

KarmaCake day1965November 28, 2013
About
My gmail username is shaneecy, please reach out.
View Original