Recent submissions

Comment · 4 months ago
It's a nice idea but the C portion expects an array of unknown size, no bounds checking possible at all and it's also not returned how large the PNM image is. I also don't understand why glib is needed here to get the array to work. It's also missing the stdint.h include to be able to use uint8_t.
Comment · 4 months ago
Which ones?
Comment · 5 months ago
You're missing the point. Volatile forces two loads of a value that may have changed in the middle. So the value of "x" may depend on the time/order of load.
Comment · 5 months ago
Wow, this is awful
Comment · 7 months ago
Open source and free software isn't the same thing. Nobody made a claim on Java either, until someone did. I just distinctly remember explicitly not exploring D for that reason. Also this way way before LLVM and I also don't think GNU had a D compiler back then. There was only the (and I really believe it was closed source) Digital Mars compiler.
Comment · 7 months ago
Yeah dude but you've really marketed D poorly. I remember looking at D what must be 15 years back or so? And I loved the language and was blown away by its beauty and cool features. But having no FOSS compiler and the looming threat of someone claiming a patent (back then it was unclear that Mono/C# was "legal" and even Java hung in the balance) was too scary for me to touch it.

Now I'm old and I believe D has missed its opportunity. Kinda sad.

Comment · 7 months ago
My point is, in your exact example both reinterpret_cast and C-style casts have the exact same behavior, making the example bad. If you want to showcase a deficiency of C++, it would make sense to pick something where the difference between cast types actually matters.
Comment · 7 months ago
I'm not sure what you're getting at but

const bool z = (const bool)((int8_t)2);

Is perfectly valid C++.

Comment · 7 months ago
> The Core Idea

> Enter X

> How It Works (Without the PhD)

> Why Y Should Care

...and an incredibly handwavy shallow explanation of why this actually works ("Through a clever sequence of oblivious transfers and what’s called multiplicative-to-additive share conversion, they each compute a partial signature.")

I don't get it. If you want a blog, write a blog. If you don't want a blog, don't write a blog. But why use an LLM to create a slopblog? It just wastes EVERYONE's time and energy. How disappointing.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton