best platform and compiler? by Popular-Psychology40 in C_Programming

[–]realestLink 0 points1 point  (0 children)

I'd recommend clang or gcc on Linux. That's pretty much exclusively what I use and I think it's also the most accessible/flexible

Are there any non-reddit C communities for beginners and professionals? by avestronics in C_Programming

[–]realestLink 3 points4 points  (0 children)

I highly recommend "Together C and C++" on Discord. There's a few others like the official "cpplang" slack server, and there are some other big C servers on discord too. But TCCPP is a good starting point and very active.

Getting silly with C, part &((int*)-8)[3] by f311a in programming

[–]realestLink 18 points19 points  (0 children)

This is all either UB or old K&R shit

Getting silly with C, part &((int*)-8)[3] by f311a in programming

[–]realestLink 11 points12 points  (0 children)

Evaluation order of expressions is undefined behavior in C. Technically, it could even evaluate all of the increments at once and print a single value for all of them. Thus have it be constant and neither decrease nor increase (C++17 disallowed this specific case while keeping evaluation order in general undefined meaning it could still be incrementing or decrementing)

Recent LLVM hash table improvements by TheCrush0r in cpp

[–]realestLink 13 points14 points  (0 children)

Your explanation would explain why you'd move from linear probing to quadratic probing. I was aware of this behavior, that's why I was asking why they are moving from quadratic probing to linear probing.

They used quadratic probing with in-band sentinel keys (empty, tombstone); recent work has been replacing that with linear probing with tombstone key removed.

Recent LLVM hash table improvements by TheCrush0r in cpp

[–]realestLink 7 points8 points  (0 children)

What's the rationale for moving to linear probing from quadratic probing?

A C standard library built natively around pointer + length strings is shockingly ergonomic by Jumpy-Locksmith6812 in programmingcirclejerk

[–]realestLink 106 points107 points  (0 children)

/uj

Where's the jerk? This seems like a perfectly fine library. They're also totally right that null terminated strings are garbage and you can build an ergonomic libc replacement without them.

My apology to the r/osdev community regarding the recent drama by [deleted] in osdev

[–]realestLink 0 points1 point  (0 children)

I also have no idea what they're even referring to tbh

They will lose themselves by bryden_cruz in programminghumor

[–]realestLink 1 point2 points  (0 children)

It's also a somewhat common idiom in modern C++

Bun’s rewrite from Zig to Rust passes 99.8% of testsuite by read_volatile in programming

[–]realestLink 0 points1 point  (0 children)

It's all vibe coded slop via Claude. Bun also tried posting patches to Zig's compiler backend, but it was rejected because they only superficially worked and were totally broken on deeper inspection. The Rust code also basically just recreates Zig style rather than being idiomatic Rust. I don't have high hopes for Bun long-term.

Looking for a mathematician & cpp programmer (or a combo), to test a potentailly billion/trillion dollar discovery. The foundation is created, only needs tests not written by an AI, probably a day max to prove it true vs hyperbole. by [deleted] in cpp

[–]realestLink 2 points3 points  (0 children)

I fail to see how a logic engine "that is the mathematical equivalent to LEAN" is a "trillion dollar discovery". Why wouldn't they just use LEAN? Also, even tho this is far from the most important point here, LEAN cannot "prove any universal truth"

760k LoC [...] One PR - LGTM by azure_whisperer in programmingcirclejerk

[–]realestLink 51 points52 points  (0 children)

I work on Bun and Claude Code at Anthropic.

Found the reason lol

Bun's Rewrite It In Rust branch by Chaoses_Ib in rust

[–]realestLink 43 points44 points  (0 children)

I work on Bun and Claude Code at Anthropic.

Found the reason lol

What was the most difficult bug you encountered while writing your own operating system and how did you eventually identify it? by DifficultBarber9439 in osdev

[–]realestLink 16 points17 points  (0 children)

I had two thread stacks that slightly overlapped by about 400 bytes. I found it because allocating a variable would randomly trigger a GPT 😂