Readit News logoReadit News
rq1 commented on C3 solved memory lifetimes with scopes   c3-lang.org/blog/forget-b... · Posted by u/lerno
rq1 · a month ago
What core type theory is C3 actually built on?

The blog claims that @pool "solves memory lifetimes with scopes" yet it looks like a classic region/arena allocator that frees everything at the end of a lexical block… a technique that’s been around for decades.

Where do affine or linear guarantees come in?

From the examples I don’t see any restrictions on aliasing or on moving data between pools, so how are use‑after‑free bugs prevented once a pointer escapes its region?

And the line about having "solved memory management" for total functions::: bravo indeed…

Could you show a non‑trivial case where @pool eliminates a leak that an ordinary arena allocator wouldn’t?

Could you show a non‑trivial case, say, a multithreaded game loop where entities span multiple frames, or a high‑throughput server that streams chunked responses, where @pool prevents leaks that a plain arena allocator would not?

rq1 commented on Matt Godbolt sold me on Rust by showing me C++   collabora.com/news-and-bl... · Posted by u/LorenDB
jpc0 · 4 months ago
My point is a Width type is usually not the sound type you are looking for. What probably wanted was a size type which is width and height. Or a dimensions type which is width and height. The problem was maybe not two arguments being confused but in reality a single thing with two elements…
rq1 · 4 months ago
Ah I see, it’s a solution too!
rq1 commented on Matt Godbolt sold me on Rust by showing me C++   collabora.com/news-and-bl... · Posted by u/LorenDB
jpc0 · 4 months ago
Do you really want width and height or do you actually want dimensions or size? Same with transfer, maybe you wanted a transaction that gets executed. Worst case here use a builder with explicit function names.
rq1 · 4 months ago
I don’t really understand your point there.

Sound type systems are equivalent to proof systems.

You can use them to design data structures where their mere eventual existence guarantee the coherence and validity of your program’s state.

The basic example is “Fin n” that carries at compile time the proof that you made the necessary bounds checks at runtime or by construction that you never exceeded some bound.

Some languages allow you to build entire type level state machines! (eg. to represent these transactions and transitions)

rq1 commented on Matt Godbolt sold me on Rust by showing me C++   collabora.com/news-and-bl... · Posted by u/LorenDB
adamc · 4 months ago
Coming from python (or Common Lisp, or...), I wasn't too impressed. In Python I normally make args for any function with more than a couple be keyword arguments, which guarantees that you are aware of how the arguments are being mapped to inputs.

Even Rust's types aren't going to help you if two arguments simply have the same types.

rq1 · 4 months ago
Just create dummy wrappers to make a type level distinction. A Height and a a Width can be two separate types even if they’re only floats basically.

Or another (dummy) example transfer(accountA, accountB). Make two types that wrap the same type but one being a TargetAccount and the other SourceAccount.

Use the type system to help you, don’t fight it.

rq1 commented on Whistleblower: DOGE Siphoned NLRB Case Data   krebsonsecurity.com/2025/... · Posted by u/whalesalad
rq1 · 4 months ago
Another masterclass from the DODGY department.
rq1 commented on What went wrong with the Alan Turing Institute?   chalmermagne.com/p/how-no... · Posted by u/alexicon
rq1 · 5 months ago
The purpose of these institutions is to fund research, which is not necessarily profitable.

I'm pretty sure Rosenblatt was criticized back then for his non-tangible stupid ideas, and why the hell was his research was funded to begin with.

rq1 commented on Record-breaking neutrino is most energetic ever detected   nature.com/articles/d4158... · Posted by u/lnauta
lnauta · 6 months ago
One of the lead researchers in KM3NeT mentioned that the particle was emitting 2 horse power in light during detector transit. A typical body builder expends about 1 horse power while performing, so its 2 body builders in a single particle.
rq1 · 6 months ago
Particle on steroids.
rq1 commented on Weierstrass's Monster   quantamagazine.org/the-ja... · Posted by u/pseudolus
seanhunter · 7 months ago
The Weierstrass function is cool but the undisputed champion of calculus counterexamples has to be the Dirichlet function[1]

f(x) = 1 if x is rational, 0 otherwise.

It is defined over all real numbers but continuous nowhere. Also if you take the Dirichlet function and multiply it by x so you get

g(x) = x if x is rational, 0 otherwise

…then you have something that is continuous at exactly one place (0) and nowhere else, which also is pretty spectacular.

[1] https://mathworld.wolfram.com/DirichletFunction.html

rq1 · 7 months ago
No mention of the Cantor set (and its variants) indicator functions?
rq1 commented on Looking at some claims that quantum computers won't work   blog.cr.yp.to/20250118-fl... · Posted by u/gjvc
peepeepoopoo101 · 7 months ago
There's an awful lot of handwaving in this blog post. I'm sorry, but I'm not convinced. The author mentions how some devices that can seemingly solve exponential time complexity problems also require exponentially high precision, but there doesn't seem to be a strong argument for why that doesn't apply to quantum computers. We haven't experimentally demonstrated quantum computing at sufficient scales to prove that the required number of physical qubits to perform error correction doesn't scale exponentially.
rq1 · 7 months ago
The author is DJB.
rq1 commented on Show HN: I completed shipping my desktop app   pimosa.app/... · Posted by u/anshrathodfr
rq1 · 8 months ago
I’ll try to not be dismissive of the labour, though it’s kind of funny (or actually natural) that the heavy lifting libraries that only a few can actually write are open and free, while the shallow wrappers that everyone can write are paid and closed.

Decades ago we were calling out these software and now it’s the norm.

Another example along the line: I wanted to extract a frame from a video on iOS, it’s impossible with the built-in tools (screenshot aside) and found that someone built a paid app only for that.

I tell you where we’re heading, we’re screwed.

u/rq1

KarmaCake day793November 12, 2016View Original