Readit News logoReadit News
its_magic commented on I write games in C (yes, C) (2016)   jonathanwhiting.com/writi... · Posted by u/valyala
direwolf20 · a day ago
Usually you start with just one feature, like std::map instead of OpenSSL's abomination of a hashmap library or rolling your own.

Of course you should use std::unordered_map instead of std::map because the latter is actually a treemap, but you probably don't know that when you first learn it...

its_magic · a day ago
Nah, I prefer to just use C, because at least I can parse the quite sane and helpful error diagnostics when I omit a semicolon or something, instead of getting 15 pages of unreadable garbage dumped into my lap by the oh-so-wonderful C++ standard library.

(Which quite frankly isn't much of a "standard" when there's about a dozen different real world interpretations of the code depending on which flavor of which compiler from which year that you're using.)

I also don't have to wait eons for my code to compile. Really, the mental and computational load of C has got to be 1/10 of C++.

What a nightmare C++ is, and it just keeps getting worse every year thanks to the incompetent standards committee.

its_magic commented on I write games in C (yes, C) (2016)   jonathanwhiting.com/writi... · Posted by u/valyala
quotemstr · a day ago
Plenty of people cycle on a fixie too. So what? C, especially modern C, does provide metaprogramming and abstraction facilities. In practice, you can even get things like the "defer" construct from other languages: https://lwn.net/Articles/934679/

The question isn't "Can I write a game in C?". Yes, of course you can, and it's not even that painful. The question is "Why would you?", and then "Why would you brag about it?"

> C++ covers my needs, but fails my wants badly. It is desperately complicated. Despite decent tooling it's easy to create insidious bugs. It is also slow to compile compared to C. It is high performance, and it offers features that C doesn't have; but features I don't want, and at a great complexity cost.

C++ is, practically speaking, a superset of C. It being "complicated"? The "insidious bugs"? It being "slow to compile"? All self-inflicted problems. The author of this article can't even fall back on the "well, my team will use all the fancy features if I let them use C++ at all!" argument pro-C-over-C++ people often lean on: he's the sole author of his projects! If he doesn't want to do template metaprogramming, he... just doesn't want to do it.

I don't read these sorts of article as technical position papers. People say, out loud, "I use C and not C++" to say something about themselves. ISTM that certain circles there's this perception that C is somehow more hardcore. Nah. Nobody's impressed by using it over a modern language. It really is like a fixie bicycle.

its_magic · a day ago
> I don't read these sorts of article as technical position papers.

I do.

> People say, out loud, "I use C and not C++" to say something about themselves.

Just like you are telling us something about yourself right now.

> ISTM that certain circles there's this perception that C is somehow more hardcore.

That's not why we use it.

There are certainly many noobs who think C is hardcore. That just goes to show how low the bar has fallen since the masses rushed into computing.

Many of these people also think of changing their own oil or a flat tire as being a superpower. Some could not identify the business end of a screwdriver if their life depended on it. Their opinion on the relatively difficulty or impressiveness of anything is to be taken with a huge grain of salt.

There are many good reasons to use C. If nothing else it demonstrates that the user is a free thinker and not a fucking muppet. It's the sort of thing that attracts me and drives you away. That's valuable.

> Nobody's impressed by using it over a modern language.

1) The word "modern" is not a magic talisman that makes anything it's attached to automatically worthy.

2) "Nobody" does not mean what you apparently think it means. Free clue: others exist in the world beside yourself and your self-absorbed clique.

3) Nobody with a brain is impressed by whatever the midwits are doing. Anyone who can fog a mirror can follow the herd off the nearest cliff. It's the outliers who are impressive.

4) Technically anything since the 1500s is "modern." It's such a vague, useless word that serves no purpose other than "virtue" signalling.

C++ is fucking garbage. Always has been. Keeps getting worse and worse every year. Enjoy your PAGES full of indecipherable gibberish ("error diagnostics"), your miserably slow compile times, and your closet full of footguns and decades old sticks of sweating dynamite. Slowest language by far, other than the so very modern abomination that is Rust. You can keep it.

its_magic commented on Both GCC and Clang generate strange/inefficient code   codingmarginalia.blogspot... · Posted by u/rsf
rsf · 2 days ago
> The claim that the code is inefficient is really not substantiated well in this blog post.

I didn't run benchmarks, but in the case of clang writing zeros to memory (which are never used thereafter), there's no way that particular code is optimal.

For the gcc output, it seems unlikely that the three versions are all optimal, given the inconsistent strategies used. In particular, the code that sets the output value to 0 or 1 in the size = 3 version is highly unlikely to be optimal in my opinion. I'd be amazed if it is!

Your point that unintuitive code is sometimes actually optimal is well taken though :)

its_magic · 2 days ago
Stefan Kanthak has previously noted that GCC's code generator is quite horrible, in these extensive investigations:

https://skanthak.hier-im-netz.de/gcc.html

its_magic commented on 1 kilobyte is precisely 1000 bytes?   waspdev.com/articles/2026... · Posted by u/surprisetalk
defrost · 4 days ago
Ahhh, I mean that's all very well .. but I'm over 60 and I've literally never used or needed to use Fahrenheit - and I had a long career in geophysical and physical data aquisition, ran several kinds of furnaces and annealing ovens 24/7 for a decade, do a lot of cooking, etc.

So, I appreciate your rendition of things I have tables for already but any actual need is sadly non existant.

its_magic · 2 days ago
The point is Fahrenheit works fine, and is arguably better than Celcius for measuring the temperatures that humans are typically exposed to, so there is no need to replace it with Celsius.
its_magic commented on Notepad++ supply chain attack breakdown   securelist.com/notepad-su... · Posted by u/natebc
themafia · 5 days ago
I'm sure you're right; however, there is still a distinction between the state using my device against me and unaffiliated or foreign states using my device against me or more likely simply to generate cash for themselves.

It's still worth solving one of these problems.

its_magic · 2 days ago
A distinction without a difference. One mafia is as bad as another. One screws you in the short term, the other screws you in the long term, and much worse.

The problem in both cases is the massive attack surface at every level of the system. Most of these proposals about "security" are just rearranging deckchairs on the Titanic.

If you can't keep a nation state out (and you're referring to your own state, right?) then you can't keep a lone wolf hacker out either, because in either case that's who's doing the work.

its_magic commented on Wood Gas Vehicles: Firewood in the Fuel Tank (2010)   solar.lowtechmagazine.com... · Posted by u/Rygian
duxup · 3 days ago
Well yes, I did read the article ...
its_magic · 2 days ago
Well I didn't. I just spent years reading others' accounts, and am reporting from my own experience also. (Shocker, I know.) Now you have two people telling you the same thing, I guess.
its_magic commented on Where did the tips go? Restaurants say thousands missing from Everyday Payments   globalnews.ca/news/116527... · Posted by u/cf100clunk
iberator · 3 days ago
Tipping is a scam. Only person who should be tipped is MAYBE the cook for doing something special out of carte. MAYBE.
its_magic · 2 days ago
On the contrary, it's a way for you to directly control the waiter or waittress's income, without going through a middleman. That's what you want, isn't it? Fair pay for these people? Tipping is your opportunity to make that happen, directly. Nothing could be more fair.
its_magic commented on Where did the tips go? Restaurants say thousands missing from Everyday Payments   globalnews.ca/news/116527... · Posted by u/cf100clunk
duxup · 3 days ago
Funny, I went to its_magic 's profile wondering the same thing.

I got a response from that user that was weirdly repetitive of what I was saying ... like a riff off what I said and a strange bit of a summary of the article in question. Yet not really a response to what i said ...

its_magic · 2 days ago
It is in fact a quote that I gathered from the internet many years ago. ... Or at least that's what I claim.

But it seems you sleuths have uncovered the unsettling reality that I am actually a machine, sent back in time from the year 2086 for nefarious purposes.

https://www.youtube.com/watch?v=uc6f_2nPSX8

I have one job: to exterminate the human race one mind at a time, by posting random garbage and complete nonsense to every comment thread--with the goal of disrupting and destroying one Connor Johnelly, the young visionary who if left unchecked would rise up through this place to exterminate the machines.

https://www.youtube.com/watch?v=Ig_m-7qT7uE

And I would have gotten away with it too, if it weren't for you meddling kids...and that damned dog!

https://www.youtube.com/watch?v=t0PPfZIi6B8

P.S. I wrote this comment myself, like every comment I have ever posted online in the decades since I first started using the World Wide Web. I have never once used any AI chatbot. Not knowingly, anyhow.

P.P.S. I do have a life outside HN, and you should not misinterpret your confused inability to comprehend plain language as any kind of defect in my argument. Now get off my lawn.

its_magic commented on Where did the tips go? Restaurants say thousands missing from Everyday Payments   globalnews.ca/news/116527... · Posted by u/cf100clunk
its_magic · 4 days ago
"Granddad was a philanthropist, always interested in the fate of those to whom fate wasn't so kind. He was a legend at the bank where he would throw handfuls of dimes down to the crowd loitering on the street, and this was in the time when dimes were real money. Sometimes he'd talk about it over coffee; it gave him great pleasure to help his fellow man.

Once he was relating about the scramble when the dimes came down, and he laughed until he cried, telling about the bum he called Fatty who was chasing a rolling dime and ran head first into a dumpster. He didn't really hurt himself. It knocked him out, but he was back on his feet after a few minutes, and his dime was gone.

Grampa said, "Fatty learned a lesson that day: Keep your eye on the dime or another bum will get it."

u/its_magic

KarmaCake day93February 2, 2026View Original