Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
View attachment 6202565
It is much faster to read/write data for one, for another, it does clean up your code on the use end quite a bit. Also, what little 'reflective' capability C has does somewhat necessitate this approach.
I don't recall whether uintn_t in particular has weird rules about padding and aliasing, but I'm still pretty sure this is undefined behavior due to possible struct padding. Even if it was merely implementation-defined behavior, in any real little endian implementation, these two functions also do different things.

E: I forgot to update the thread before posting so I'm late and gay, but whatever.
 
  • Like
Reactions: Marvin
I can't name any OOP language in particular or else you will throw the same autistic shitfit about how it's too mainstream and too good and tell everyone to disregard my opinion based on specific inCel made C memes for that language, so I beat you in advance by just saying the word OOP. Basically, OOP is being used as a byword for "something made this millennium". And I know it pisses you the fuck off, so I keep doing it.

C++ is the same shit, too low level and too autistic to do anything except dick around making hello worlds. There are no libraries, packages, etc, and you can't do anything with it, so it's a toy lang.

Writing shit by hand and thinking you're a total badass for writing your own string data structure class gets really old when you've done it for the 50th time just to "prove you are a C badass and know it by heart" and poof, suddenly 15 years have passed and you've pissed away the prime of your life to pretend to passingly psuedo-impress other losers on the internet who hate you because they think they are getting less attention since other people pretend to flex with C. All these threads are is just inCels jumping back and forth purity testing each other and racing to their grave.
 
Thinking about getting started in C++, having learned core precepts in Java. Hopefully it won't be too hard to unlearn. I will say some of the choices for the keywords are insane to me. I much preferred C's. (I mean printf, scanf, et al).
 
  • Thunk-Provoking
Reactions: Napoleon III
Bait or profound retardation. Call it.
It doesn't matter because I'm having fun!

I will say some of the choices for the keywords are insane to me. I much preferred C's.
the virgin
C++:
std::stupid::fucking::painfully::long::colon::cancer::name<std::stupid::another_fucking_template<std::enjoy_nesting_stalker<std::more_angle_brackets_because<std::fuck_you>>>> a(4).do_the_needful(); // FUCK THIS
vs the chad
C:
rhgvsbnvstr(4); // who needs vowels in their procedure names lol

Yes, I see you posted a meme to continue to filter yourself from the private sector. Mission accomplished.
:tomlinson: You just fell for his trick. He is not a C or C++ shill as you naively seem to think, little one. If you could read you could have seen the user title saying "Rust shill". Last time I checked, Rust was not C or C++. I'm sorry you're so stupid, child.

Also C++ has loads of OOP because of the C++ standards committee's strange practice of adding absolutely whatever the fuck will fit into the language because why not. Virtual abstract interface whatever the fuck Liskov something or other with the interfaces with 2 #45s, one with cheese, and a large multiple inheritance.

I think your opinions would be tolerated far better were they not so clearly motivated by insecurity
hes just mad that his printf("Hello, %s!\n", user_name) program segfaulted because he didnt have a garbage collector and bounds checked index operator firmly inserted in his asshole at all times
 
What if instead, we had a keyword that did this automatically?
C:
foo_t foo: __expose__((bar)), __expose__((baz));
This would be far superior to the prior method, because the prior method relies on you manually organizing and padding the members you want to expose.
I think accessing the other members of a union is UB. That's probably why there's nothing like this in the standard.
 
  • Like
Reactions: SneedLurker2988
I think your opinions would be tolerated far better were they not so clearly motivated by insecurity

It doesn't matter because I'm having fun!


the virgin
C++:
std::stupid::fucking::painfully::long::colon::cancer::name<std::stupid::another_fucking_template<std::enjoy_nesting_stalker<std::more_angle_brackets_because<std::fuck_you>>>> a(4).do_the_needful(); // FUCK THIS
vs the chad
C:
rhgvsbnvstr(4); // who needs vowels in their procedure names lol


:tomlinson: You just fell for his trick. He is not a C or C++ shill as you naively seem to think, little one. If you could read you could have seen the user title saying "Rust shill". Last time I checked, Rust was not C or C++. I'm sorry you're so stupid, child.

Also C++ has loads of OOP because of the C++ standards committee's strange practice of adding absolutely whatever the fuck will fit into the language because why not. Virtual abstract interface whatever the fuck Liskov something or other with the interfaces with 2 #45s, one with cheese, and a large multiple inheritance.


hes just mad that his printf("Hello, %s!\n", user_name) program segfaulted because he didnt have a garbage collector and bounds checked index operator firmly inserted in his asshole at all times
Racing to your graves
 
Nobody gives a shit about your little C++ programs, while OOP runs the entire world and pays for your welfare
The thing is I don't mind OOP in a few places when it is used for something it applies for. Webdev is a bloated shitty mess of bad software but a hypothetical good website would use some OOP.

I don't object to OOP I object to being forced to use it all the damn time. That is the main thing I hate about most software is being forced to do X thing Y way.

I'm also not even a software developer, I'm an actual engineer.
 
The thing is I don't mind OOP in a few places when it is used for something it applies for. Webdev is a bloated shitty mess of bad software but a hypothetical good website would use some OOP.

I don't object to OOP I object to being forced to use it all the damn time. That is the main thing I hate about most software is being forced to do X thing Y way.

I'm also not even a software developer, I'm an actual engineer.
Can you (or anyone) name one thing that functional (or whatever you want to call non-OOP) and especially low level is appropriate for after 2005 when you can get gigabytes of ram for dollars

Fantasizing about an embedded job that you have a 0.000001% chance of getting (and you would just shit it up and gatekeep for fake job security, much like a pajeet) doesn't count

There's one use case for it and it is: Pretending to flex on other losers via fake purity tests and jump back and forth spending 3 decades squawking like a retard thinking you're smart

Source: See the last 230 pages of this thread
 
I think accessing the other members of a union is UB. That's probably why there's nothing like this in the standard.
Yeah, a C union is technically for the ability to store a value of multiple possible types without fucking with as much void* casting spaghetti shit. Like if you're making a dynamic language interpreter you'll have some struct called variable_t with a member union with many possible types and a typeid field to make sure shit doesn't get mixed up. If you assign type A to your union and then access that as type B, you fucked up. You have to overwrite it with some type B value before you can read it is a type B. In practice however, the behavior of unions is oddly predictable which is why people will often use unions to split a uint32_t into 4 uint8_ts.
Can you (or anyone) name one thing that functional (or whatever you want to call non-OOP) and especially low level is appropriate for after 2005 when you can get gigabytes of ram for dollars
Instead of designing a stupid niggerlicious unnecessarily abstract UML spaghetti diagram then developing 60 separate abstractvirtualinterfacefactorycontrollerpoolfactorywatcher classes to do 1 simple thing you can just be imperative for a tiny bit and have a much easier time and produce easy-to-understand programs. Have you ever actually tried this shit or have you just always been using full OOP for everything, even things that don't mean the greatest amount of sense, since your first Hindi-language Java tutorial and you just never knew anything else?
 
*wordswordswords!!!! something gay probably*
I bet you can't even comprehend how fast a modern CPU is because your conception of "fast" is limited by whatever runtime or VM your POOPlang runs on. Forever disadvantaged by lack of knowing. Everything you know about POOP design patterns is something I know about OS internals, everything you know about the latest JS babby frameworks is something I know about CPU cache efficiency. Every gay little 4cuck quip you have is something I know about compiler internals. Man up and learn malloc and free, pussy. I bet you don't even know how your faggot programming language works internally, do you even know how inheritance works under the hood? Probably not, faggot. I'm gonna dependency inject a little brother into your mom so you have to call me your daddy, bitch.
 
I bet you can't even comprehend how fast a modern CPU is because your conception of "fast" is limited by whatever runtime or VM your POOPlang runs on.
adding 2 numbers in his shitscript language takes 20 processor instructions even with full jit enabled due to how "dynamic" and "powerful" the language is and he thinks that's completely fine as he copes by saying "dude it's $CURRENT_YEAR just shut up and buy a better computer they are really cheap these days" even though his soy calculator app can't even hit 60fps on a 32 core gaming pc with 256g of ram
 
The main issue I have with OOP is that several aspects of it are deceptive. Inevitably overcoming these deceptions requires a new paradigm altogether.

For example, one of the major benefits advertised in OOP is encapsulation, that Objects are self contained and their values controlled internally. Over time this became more and more difficult to maintain when shared resources were involved between classes and objects. Specifically with the concept of threading on modern day operating systems. It became necessary to create objects/classes which handled ACID transactions on databases and share them between multiple classes. This results in the creation of a defacto global scope which is one of the concepts OOP was designed to avoid.

Sure OOP is still useful today, but its scalability outside of just spinning up more instances is becoming more of an issue. Irregardless of your disdain for functional programming, the industry is leaving you behind. Compact serverless functions executed on messenger queues are an industry standard now, and sure the systems which execute them are written using OOP, but writing those are going to become 0.000001% of jobs. Kind of like getting a good embedded job.

@llllIllIllIIIIllI

Edit:
It's not just cloud providers either. Onprem lambda is a thing now with K8s
 
Last edited:
Back