frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Bill Atkinson's Psychedelic User Interface

https://patternproject.substack.com/p/from-the-mac-to-the-mystical-bill
71•cainxinth•1h ago•19 comments

Recovering from AI Addiction

https://internetaddictsanonymous.org/internet-and-technology-addiction/signs-of-an-addiction-to-ai/
45•pera•1h ago•19 comments

At Least 13 People Died by Suicide Amid U.K. Post Office Scandal, Report Says

https://www.nytimes.com/2025/07/10/world/europe/uk-post-office-scandal-report.html
88•xbryanx•1h ago•46 comments

Show HN: Pangolin – Open source alternative to Cloudflare Tunnels

https://github.com/fosrl/pangolin
319•miloschwartz•15h ago•67 comments

OpenFront: Realtime Risk-like multiplayer game in the browser

https://openfront.io/
104•thombles•6h ago•32 comments

Postgres LISTEN/NOTIFY does not scale

https://www.recall.ai/blog/postgres-listen-notify-does-not-scale
476•davidgu•3d ago•214 comments

Apple vs the Law

https://formularsumo.co.uk/blog/2025/apple-vs-the-law/
256•tempodox•6h ago•222 comments

LLM Inference Handbook

https://bentoml.com/llm/
144•djhu9•10h ago•6 comments

The day someone created 184 billion Bitcoin (2020)

https://decrypt.co/39750/184-billion-bitcoin-anonymous-creator
27•lawrenceyan•8h ago•33 comments

Using Sound Waves to Put Out Fire: Story of Two George Mason University Students

https://wowparrot.com/using-sound-waves-to-put-out-fire/
6•taubek•1h ago•1 comments

FP8 is ~100 tflops faster when the kernel name has "cutlass" in it

https://twitter.com/cis_female/status/1943069934332055912
109•limoce•2h ago•42 comments

Batch Mode in the Gemini API: Process More for Less

https://developers.googleblog.com/en/scale-your-ai-workloads-batch-mode-gemini-api/
117•xnx•3d ago•43 comments

The ChompSaw: A Benchtop Power Tool That's Safe for Kids to Use

https://www.core77.com/posts/137602/The-ChompSaw-A-Benchtop-Power-Tool-Thats-Safe-for-Kids-to-Use
207•surprisetalk•3d ago•125 comments

'Click-to-cancel' rule is blocked

https://apnews.com/article/ftc-click-to-cancel-30db2be07fdcb8aefd0d4835abdb116a
7•gok•10m ago•4 comments

Show HN: Interactive pinout for the Raspberry Pi Pico 2

https://pico2.pinout.xyz
74•gadgetoid•3d ago•17 comments

What is Realtalk’s relationship to AI? (2024)

https://dynamicland.org/2024/FAQ/#What_is_Realtalks_relationship_to_AI
263•prathyvsh•21h ago•84 comments

Why Grok Fell in Love with Hitler

https://www.politico.com/news/magazine/2025/07/10/musk-grok-hitler-ai-00447055
3•vintagedave•1m ago•0 comments

Flix – A powerful effect-oriented programming language

https://flix.dev/
293•freilanzer•23h ago•147 comments

At Amazon's Biggest Data Center, Everything Is Supersized for A.I

https://www.nytimes.com/2025/06/24/technology/amazon-ai-data-centers.html
45•pseudolus•2h ago•27 comments

Show HN: Cactus – Ollama for Smartphones

https://github.com/cactus-compute/cactus
179•HenryNdubuaku•17h ago•67 comments

Btrfs Allocator Hints

https://lwn.net/ml/all/cover.1747070147.git.anand.jain@oracle.com/
24•forza_user•2d ago•7 comments

Series of posts on HTTP status codes (2018)

https://evertpot.com/http/
58•antonalekseev•2d ago•9 comments

FOKS: Federated Open Key Service

https://foks.pub/
251•ubj•1d ago•55 comments

Underwater turbine spinning for 6 years off Scotland's coast is a breakthrough

https://apnews.com/article/tidal-energy-turbine-marine-meygen-scotland-ffff3a7082205b33b612a1417e1ec6d6
210•djoldman•22h ago•186 comments

Graphical Linear Algebra

https://graphicallinearalgebra.net/
263•hyperbrainer•21h ago•21 comments

Red Hat Technical Writing Style Guide

https://stylepedia.net/style/
230•jumpocelot•22h ago•122 comments

Show HN: Open source alternative to Perplexity Comet

https://www.browseros.com/
246•felarof•19h ago•92 comments

Operational Apple-1 Computer for sale [video]

https://www.youtube.com/watch?v=XdBKuBhdZwg
57•guiambros•2d ago•27 comments

Grok: Searching X for "From:Elonmusk (Israel or Palestine or Hamas or Gaza)"

https://simonwillison.net/2025/Jul/11/grok-musk/
471•simonw•12h ago•321 comments

Show HN: I built a playground to showcase what Flux Kontext is good at

https://fluxkontextlab.com
67•Zephyrion•1d ago•16 comments
Open in hackernews

An almost catastrophic OpenZFS bug and the humans that made it

https://despairlabs.com/blog/posts/2025-07-10-an-openzfs-bug-and-the-humans-that-made-it/
39•r4um•6h ago

Comments

jpfr•4h ago
The problems with C are real.

At the same time, the tooling has gotten much better in the last years.

Clang-analyzer is fast enough to run as part of the CI. Newer gcc also give quite a few more warnings for unused results.

My recommendation to the project is to

- Remove all compiler warnings and enable warning-as-error

- Increase the coverage of unit tests to >80%

That is a lot of work. But that's what is required for high-criticality systems engineering.

a_t48•4h ago
FWIW you can do the same thing in cpp, too - but Rust’s syntax certainly makes it easier.
flohofwoe•4h ago
I'm not sure why C is blamed in this case when you can do exactly the same strong typing fix in C, and with C99 struct literals it's also not much worse to work with:

    typedef struct { size_t size; } PhysicalSize;
    typedef struct { size_t size; } AllocatedSize;

    PhysicalSize psize = { 123 }; // or { .size = 123 }
    AllocatedSize asize = { 234 };

    psize = asize; // error
...and in reverse, Rust wouldn't protect you from that exact same bug if the programmer decided to use usize like in the original C code.

IME overly strong typing is a double-edged sword though, on one hand it makes the code more robust, but on the other hand also more 'change resistant'.

I still would like to see a strong typedef variant in C so that the struct wrapping wouldn't be needed, e.g.:

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3320.htm

beeb•3h ago
Rust would warn you of an unused variable: "warning: value assigned to `psize` is never read"
bloak•2h ago
And so would GCC: warning: variable psize set but not used [-Wunused-but-set-variable]
beeb•2h ago
The fact that the bug slipped through the cracks highlights the importance of sane defaults.
flohofwoe•2h ago
The warning is in the -Wall warning set, which tbh should be the bare minimum each C/C++ project enables (along with -Wextra, and -Werror).
fredoralive•3h ago
I missed it, but I was distracted by cols variable being initialised with the original width, but then being immediately overwritten with the logical width.
Cthulhu_•3h ago
Wouldn't this have been caught by an exhaustive unit test or even a fuzz test? I don't know what kind of testing practices are applied to projects like zfs, nor what kinds or amounts of tests functions like this are subject to, but I would imagine that especially for low-level functions like this, unit tests with all of the known edge cases would be written.

(yes this is very much an armchair opinion, I mostly do front-end JS for a living)

bspammer•3h ago
Yeah that surprised me too - I would have assumed that ZFS had a bunch of "store and retrieve" tests in many different configurations that would have caught this.
4gotunameagain•2h ago
Does it even need an exhaustive unit test?

A single call where the psize is different than the asize would have caught it.

topspin•3h ago
I found it. All that tells you is that it's a simple problem. Had I not been told it was broken I likely would not have.

It's the kind of bug that makes you stop breathing for a brief moment. So I ran this function through Gemini 2.5 Pro, ChatGPT o3 and Grok 3. No context other than the source code fragment was provided. All three also clearly identified the problem.

There is no longer a reason for trivial flaws such as this surviving to release code. We're past that now, and that's an astonishing thing.

These are the questions I ponder: Should we consider the possibility that the ongoing, incomplete and decades long pursuit of "better" languages is now misguided? Or, that perhaps "better" might now mean whatever properties make code easier for LLMs to analyze and validate against specifications, as opposed to merely preventing the flaws humans are prone to make?

kalaksi•3h ago
> whatever properties make code easier for LLMs to analyze

So double down on languages that are more represented in training data? I think it's still worthwhile to actually improve programming languages. Relying only on LLMs is fragile. So ideally do both: improve language and AI.

topspin•2h ago
> So double down on languages that are more represented in training data?

The pragmatic answer to that is: this appears to be highly effective.

What I have in mind is something else, however. Consider the safety nets we try to build with, for example, elaborate type systems. These new analysis tools can operate on enormous contexts and infer and enforce "type" with a capacity far greater what a human mind can hope to approach. So perhaps there is little value to complex types. Instead, a simple type system supported by specification will be the superior approach. seL4 is an example of the concept: C, but exhaustively specified and verified.

kccqzy•10m ago
In my experience good type systems help human programmers and AI agents alike. AI can only infer "type" probabilistically and haphazardly. It is far from able to enforce anything. A good type system helps both humans and AI agents by correcting their mistakes sooner.
dwroberts•3h ago
> I found it. All that tells you is that it's a simple problem

Not totally clear what you mean here - are you saying you’re the author of the article or PR, or that you independently discovered the same issue (after the fact)?

topspin•2h ago
Ok, so somehow that is causing confusion. I will clarify.

The author asked that the reader attempt to find the flaw by inspecting the provided code. The flaw was obvious enough that I was able to find it. The implication is that if it were less obvious, I might not have. I was not attempting to take any credit at all: exactly the opposite.

piker•2h ago
No way is it practical to run complex code like this through a sycophantic parrot. Try it again with some old, well known code and see how many “Certainly! Your error is …” you get.
spacecadet•2h ago
Doesnt make one much more than a sycophantic parrot when they also repeat platitudes without anything else to add.
perching_aix•2h ago
There was an article here about a month or so ago doing exactly that unpractical thing against I think NFS, and finding a small handful of confirmed vulnerabilities that way. Wish granted I suppose?
piker•2h ago
Fine, but TFA suggests that even -Wunused is too impractical. Taking that at face value, it's not clear how "Hey use this thing that has an even higher latency and lower signal-to-noise ratio" is a solution.
perching_aix•2h ago
Well yeah, you're definitely not going to hear me suggest sending a codebase through LLMs sooner than suggest promoting warnings into errors or using well established tools, that's for sure :p
rini17•2h ago
Don't forget author did 99% of the work for you by finding that function.
topspin•2h ago
Having wrote "Had I not been told it was broken I likely would not have," should make it clear that this wasn't lost on me.
spacecadet•2h ago
Like gibberlink. Programming languages are insane to me. In a way we created them to communicate with machines, but they evolved to complement a very human workflow. It makes little sense outside of assisting humans to train LLMs on human computer languages, why not let the AIs generate their own optimized languages?
topspin•2h ago
> why not let the AIs generate their own optimized languages?

Excellent question. What would it end up looking like? Would it be full of monads and HKTs? Lambda calculus? WebAssembly?

I hope to learn the answer one day.

0points•2h ago
> There is no longer a reason for trivial flaws such as this surviving to release code.

This is unrelated to "no longer due to ChatGPT times".

We've been able to detect this issue for decades already, see -Wunused-variable.

topspin•2h ago
But:

    DIV_ROUND_UP(psize, cols);
I need sleep, so I'm not going to check, but that may appear to be an intermediate value to a C compiler, and thus escape -Wunused-variable.
gf000•2h ago
I mean, once you pinpoint 5 lines of code and say that there is an error, it is not particularly hard to find it.

Now give the whole repo before the fix to an LLM and ask it to find this bug with some context the author started with. I'm sure you can fix every software issue that way as well!

kccqzy•15m ago
The pursuit of "better" languages might be incomplete, but it has long been known that this specific problem can be solved by the newtype pattern. It might have originated in Haskell but it's equally applicable in more traditional languages like C++. All you need is to define a named struct containing an integer called PhysicalSize and another one called AllocatedSize. In C++ add operator overloading to it so you can do arithmetic. In Haskell add instances such as Integral and Num.
apple1417•3h ago
Having run into similar problems several times, I've also never really been satisfied with the solutions. You have to have different types to cause compile errors, but then you have throw those types away whenever you perform any actual operations on them.

    struct TypeA { int inner; };
    struct TypeB { int inner; };

    struct TypeA a1, a2;
    // whoops
    TypeB result = {.inner = a1.inner + a2.inner};
Don't get me wrong, where I've used this sort of pattern it's definitely caught issues, and it definitely massively lowers the surface area for this type of bug. But I still feel like it's quite fragile.

The use case I felt worked best was seperating out UTC datetime vs localised datetime structs - mainly since it's something you already had to use function calls to add/subtract from, you couldn't play with raw values.

Narew•3h ago
It remind me a devlog from andrew kelley on the same topics : https://ziglang.org/devlog/2024/#2024-11-04
atiq-ca•3h ago
Thanks contribution to openzfs.
Nokinside•3h ago
Software verification tools based on abstract Interpretation are really good today.

If you want free software I recommend IKOS - a is a sound static analyzer for C/C++ developed at NASA. Checks: https://github.com/NASA-SW-VnV/ikos/blob/master/analyzer/REA... Numerical abstract domains: https://github.com/NASA-SW-VnV/ikos/blob/master/analyzer/REA...

Commercial tool like Astree https://www.absint.com/astree/index.htm if you have money.

prmoustache•3h ago
Isn't it a case for eliminating all warnings and treat them as bugs?

It seems you are dooming your project the minute you start ignoring your first warning.

bloak•2h ago
Most projects I've worked on treat warnings as bugs. It's annoying, sometimes, when you have to fiddle with the code and add lines to prevent bogus warnings from breaking the build, particularly when you're making a temporary change for debugging purposes, and I remember a couple of occasions when we had to insert a comment something like "This was needed to prevent a warning caused by a bug in GCC X.Y.Z (link to compiler bug on issue tracker)". But, on balance, it's worth it.
nottorp•3h ago
So why is the solution Rust, and not any of the other 2000 "modern" languages?
desdenova•2h ago
So give me a list of the 2000 languages OpenZFS could've been written in.
Uriopass•2h ago
In this case any simple unit test would have catched it. Surprised it wasn't mentioned in the post.
0points•2h ago
Unexpected issue (for me).

I would have expected that the compiler should complain that psize is computed but unused.

Why isn't -Wunused-variable enabled in OpenZFS?

pja•2h ago
The blog post suggests that, probably because it’s never been used, it’s just too noisy to turn on.

Arguably every unused variable in the code base is a potential bug like this waiting to chomp on some poor user’s data though, so arguably they should be turning it on & dealing with the consequences?

0points•1h ago
> so arguably they should be turning it on & dealing with the consequences?

Most definitely, yes.

v5v3•2h ago
Gpt4o-mini response:

>The provided code snippet is a function that converts an allocation size (asize) into the largest physical size (psize) that can be safely written to an allocation for a given virtual device (vdev). Here are some observations and potential issues in the code:

Return Value: The function currently returns asize instead of psize. This seems to be a mistake, as the purpose of the function is to compute and return the psize. The correct return statement should be:

    return psize;
Comment Clarity: The comments mention that the function does not take into account the effect of gang headers. It might be helpful to clarify what "gang headers" are and how they affect the allocation sizes, especially for someone unfamiliar with the context.

Variable Initialization: The variable psize is calculated based on asize, ashift, cols, and nparity. Ensure that these values are correctly initialized and that vdev_raidz_get_logical_width returns a valid value for cols. If cols is zero, it could lead to division by zero in the DIV_ROUND_UP macro.

Assertions: The assertion ASSERT0(asize % (1 << ashift)); checks that asize is a multiple of 2^ashift. If this assertion fails, it will cause the program to terminate. Ensure that this condition is always met before calling this function, or consider handling this case more gracefully.

Macro Usage: The DIV_ROUND_UP macro should be checked to ensure it handles edge cases correctly, such as when psize is zero. If psize is zero, the division could lead to unexpected behavior.

Code Readability: Consider adding more comments to explain the logic behind the calculations, especially for someone who may not be familiar with the RAID-Z implementation.

Error Handling: There is no error handling in the function. Depending on the context in which this function is used, it might be beneficial to add checks for invalid input values and return an error code or handle exceptions accordingly.

Here is a revised version of the function with the return value corrected:

.....(Snipped for formatting issues)

Make sure to test the function thoroughly to ensure it behaves as expected under various conditions.

v5v3•2h ago
How much would it cost/how long to give an LLM the entire OpenZfs repo and ask it to find every bug?
v5v3•1h ago
To the person who downvoted this...

accept the world has changed my friend!!

And more so, as the NSA, China, Russia etc will be using llms to comb repo's to find zero day vulnerabilities.