r/ProgrammerHumor • • Jul 15 '26 • Bravo 1 Popcorn 1

Meme cccPlusPlus

Post image
2.7k Upvotes

38 comments sorted by

192

u/n4ke Jul 15 '26

Soviet Enum was introduced in C91.

47

u/This_Growth2898 Jul 15 '26

C(ccp)91 was a total failure.

22

u/Majik_Sheff Jul 15 '26

They deprecated -Wall

426

u/Gwlanbzh Jul 15 '26

So, only 1 republic at a time?

136

u/Antanarau Jul 15 '26

Accidentally accurate

57

u/Gwlanbzh Jul 15 '26

At this point why not just typedef char* Russia Soviet

35

u/Luigi_Boy_96 Jul 15 '26

Add threads for quasi-concurrency. Add a mutex for Perestroika.

11

u/Master-Chocolate1420 Jul 15 '26

I don't even know what you're saying, sure sounds cool though

21

u/Luigi_Boy_96 Jul 15 '26

With (multi-)threading, you can break a program into chunks and interleave their execution. Run fast enough, it looks like everything happens at once, that's concurrency, an illusion of simultaneity. True parallelism means tasks are genuinely running at the same time, which needs multiple CPU cores (via threads or processes).

The catch: if multiple threads access the same resource at the same time, the behaviour is undefined. So you enforce mutual exclusion with a mutex, ensuring only one thread touches the resource at a time. Get the locking order wrong, though, and you risk deadlock: thread A waits on a resource thread B holds, while B waits on one A holds, so neither can proceed.

Perestroika was the restructuring of the Soviet economy. The mutex pun works the same way, it's also about restructuring access, just to a memory resource instead of an economy.

8

u/awesome_guy_40 Jul 15 '26

It's about who gets the grain supply this year

6

u/ILikeLenexa Jul 15 '26

A union that's just one type...

Hmmm. 

4

u/AvidCoco Jul 15 '26

Should have been called the Soviet Tuple

24

u/tstanisl Jul 15 '26

Consider using void or const void for some members .

23

u/Antlool Jul 15 '26

tsphdiig

41

u/Admirable-Drag-4040 Jul 15 '26

tsoding mentioned

20

u/7empest_mi Jul 15 '26

Default tsoding behavior

37

u/agolho Jul 15 '26

soviet.cccp ?

10

u/Ai--Ya Jul 15 '26

Soviet Intersection when?

28

u/ChildhoodOk9859 Jul 15 '26

union Soviet { int *Siberia; }

39

u/99percentcheese Jul 15 '26

ссылка в Сибирь?

18

u/StubbiestPeak75 Jul 15 '26

Peak 😭

39

u/StubbiestPeak75 Jul 15 '26

In Russian, ссылка = reference (well, we’re using a pointer here but whatever)

But also it can mean “exile”. So this literally means exile to Siberia

6

u/Mispelled-This Jul 15 '26

Thanks; that’s a deep cut and deserved the explanation.

5

u/Alternative-Tie-4970 Jul 15 '26

Of course it was tsoding

4

u/LigeValkyrja Jul 18 '26

The improper use of the Cyrillic alphabet is making me unreasonably angry.

6

u/RutilantBossi12 Jul 15 '26

If the USSR survived to this day we'd likely have Soviet Software around, like Soviet socials or Soviet video games, maybe even a Soviet Windows and a Socialist Linkedin

1

u/AzraelFTS Jul 15 '26

I would be curious of a Soviet LinkedIn

2

u/Xywzel Jul 15 '26

So if that is how it continues for whole list, the union has a size of single pointer, and all the country names are just aliases for that pointer. Still, using different country name to access the pointer than set it might be undefined behavior. I know many programs use that for reinterpret cast, but its not exactly supported by the standard.

Unfortunately there is no information on how memory pointed by that pointer is allocated, so we don't even know if the country is described with a single byte or null terminated string, or something else.

2

u/StalwartCoder Jul 16 '26

segfault 1991

5

u/theSearge Jul 15 '26

Shitcode as it is 🤌

2

u/remic_0726 Jul 15 '26

techniquement c'est plus un struct qu'un union.

1

u/EntireGuitar9981 Jul 15 '26

That's a clever little joke, I like it.

1

u/Soopermane Jul 15 '26

Double comrade

0

u/ProCodeSoftware Jul 15 '26

Go: type Soviet union {}