18
There is almost perfect correlation between climate neurosis and voting Democrat.     (pomf2.lain.la)
submitted by bossman131 to ShowerThoughts 2 weeks ago (+18/-0)
10 comments last comment...
https://pomf2.lain.la/f/8121obqz.png

Challenging emotional response to climate change and other environmental issues. Extensive studies have been done on ecological anxiety since 2007, and various definitions remain in use. The condition is not a medical diagnosis and is regarded as a rational response to the reality of climate change; however, severe instances can have a mental health impact to left of center voters.

32
Covid IQ Test.     (pomf2.lain.la)
submitted by bossman131 to random 2 weeks ago (+32/-0)
34 comments last comment...
28
You dildo holders are famous     (pomf2.lain.la)
submitted by PenisEnvy to whatever 3 weeks ago (+29/-1)
22 comments last comment...
https://pomf2.lain.la/f/4ddhx8aw.jpg

Blue hairs got it blocked! Wtf
-3
My favorite song!     (pomf2.lain.la)
submitted by TOOs_cat to GreatestHits 3 weeks ago (+3/-6)
2 comments last comment...
18
Sneaky ass Bastards always trying to Blend In!     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+18/-0)
0 comments...
13
Wash The Dishes.     (pomf2.lain.la)
submitted by bossman131 to random 3 weeks ago (+13/-0)
1 comments last comment...
9
Winning!     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+10/-1)
1 comments last comment...
8
Now Available for all Models!     (pomf2.lain.la)
submitted by bossman131 to humor 3 weeks ago (+8/-0)
1 comments last comment...
20
Got another chink scammer on the line. I love wasting their time. original content     (pomf2.lain.la)
submitted by SocksOnCats to whatever 3 weeks ago (+20/-0)
23 comments last comment...
22
Zappa     (pomf2.lain.la)
submitted by boekanier to whatever 3 weeks ago (+22/-0)
3 comments last comment...
1
Once a Snake.....Always a Snake#!     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+2/-1)
9 comments last comment...
24
People Could Care Less About these retarded woke sports anymore. America is waking up. SAVE AMERICA     (pomf2.lain.la)
submitted by bossman131 to justice 3 weeks ago (+24/-0)
15 comments last comment...
11
The More You Know, It Just Keeps Getting Better.     (pomf2.lain.la)
submitted by bossman131 to justice 3 weeks ago (+12/-1)
12 comments last comment...
8
Who's your Daddy?!?     (pomf2.lain.la)
submitted by bossman131 to justice 3 weeks ago (+8/-0)
1 comments last comment...
10
What was the meaning behind The Wizard Of OZ?!?     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+10/-0)
6 comments last comment...
9
They Found Out Goyim.     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+10/-1)
2 comments last comment...
5
He Really Cares     (pomf2.lain.la)
submitted by bossman131 to humor 3 weeks ago (+6/-1)
0 comments...
0
What Goes Around, Comes Around! REEEEEEEEE?!     (pomf2.lain.la)
submitted by bossman131 to world 3 weeks ago (+1/-1)
0 comments...
3
music calms you down     (pomf2.lain.la)
submitted by boekanier to NiggerCulture 3 weeks ago (+3/-0)
0 comments...
48
My Stance on the Tarrifs     (pomf2.lain.la)
submitted by bossman131 to random 3 weeks ago (+48/-0)
13 comments last comment...
3
FSB Catches Phone Scammer     (pomf2.lain.la)
submitted by Kozel to Russia 3 weeks ago (+3/-0)
2 comments last comment...
I fucking hate phone scammers they call me every fucking day I tell them to kill themselves.

Telling them to kill themselves is the best method because they get upset and stop calling. Pressing 2 won't opt you out. Asking nicely won't do it either. You gotta get under their skin and piss them off.

The trick is to not engage in conversation, every time they retort just tell them to kill themselves. If they are black, kill yourself nigger. If they are woman, kill yourself fat ugly bitch.

I made some fat bitch so mad she went on for 10 minutes calling me a nazi. My retort? Kill yourself.
4
C++: Using goto sensibly is fine, and don't let anyone tell you otherwise     (pomf2.lain.la)
submitted by SithEmpire to C 3 weeks ago (+4/-0)
5 comments last comment...
https://pomf2.lain.la/f/m66t312.png

The linked image has formatting as intended originally. These are exposing so many different ways things look wrong without an official code markup tag.

The programming world at large has cast goto statements as always bad, but attempting to protect bad programmers from themselves is a cause so lost that it has six seasons and a 12-minute epilogue. Seeing someone write messy code and taking away everyone's goto is like seeing a nigger waving a handgun around and taking away everyone's handgun, failing to identify the problem either way. We don't need common sense goto control.

All programming constructs and mechanisms can be abused, such that singling out goto is pointless. Using goto can be perfectly appropriate and perfectly elegant. C/C++ has at least one case where goto appears absent a better mechanism, but I'll also show some situations where it's as well to use it.

Suppose we iterate pairs of integers i then j, but sometimes want to skip to the next i, ignoring any remaining j and any operations after the j-loop. One way to do this by jumping out and over said operations by placing a label at the end of the i-loop:

bool avoid(int i, int j);
void process(int i, int j);
void conclude(int i);

for (i=0; i<10; i++)
{
for (j=0; j<10; j++)
{
if (avoid(i, j)) goto next_i;
process(i, j);
}
conclude(i);
next_i: ;
}

This is for lack of labelled break and continue, which has been suggested many times and looks like it could actually be in the next C++ release. Until then, the official C solution is goto, and it is perfectly clear and performant. It is not better to screw around with a flag when you can just jump the flow. Making a separate inner function and returning early can be appropriate though, if it is not too arduous to pass in any local variables needed.

For a different scenario where goto is perfect, suppose we have a system state update function which must consume all the time given to it. Action functions modify the remaining time and return true if they concluded early, potentially having changed the state:

int state;

bool action_1(int✱ time_ms);
bool action_2(int✱ time_ms);
void action_idle();

void update(int time_ms)
{
update_again:
if (state ꞊꞊ 1)
{
if (action_1(&time_ms)) goto update_again;
}
else if (state ꞊꞊ 2)
{
if (action_2(&time_ms)) goto update_again;
}
else action_idle();
}

The goto-avoiding way could be a while loop and incurring an extra test whether any time remains. Probably worse than that is calling itself recursively just for re-entry with a lower amount of time. If the logic is in the position of knowing it needs to consume remaining time, just jump to the top!

Also in the context of state systems, there is nothing wrong with having multiple possible conclusions at the end of a function and a way to jump to the alternative flow, which becomes useful when multiple logic branches use it. Loosely:

{
// Function body with various decisions
// ...
return normal_result;

alt_conclusion:
// Alternative computation
// ...
return alt_result;
}

As with any mechanism, sensible use of it and sensibly-named labels are what makes it pass the readability test. Naming a label "hell" is also funny, everyone should get to do that at least once.
51
Elon: the U.S. Institute of Peace deleted 1TB of financial data linking them to funding Taliban & Iraqi leadership—but DOGE wasn’t fooled. They attempted to scrub the records, but DOGE engineers recovered the entire archive.     (pomf2.lain.la)
submitted by bossman131 to whatever 4 weeks ago (+52/-1)
28 comments last comment...
13
C++: When efficient operations and the language itself are one and the same     (pomf2.lain.la)
submitted by SithEmpire to C 4 weeks ago (+13/-0)
12 comments last comment...
https://pomf2.lain.la/f/819ag2cg.png

The linked image has formatting as intended originally; for the post text I had to use alternative characters to avoid triggering the site formatting, which REALLY needs a proper pre-formatted code feature.

Where most other languages have rules about passing primitive types by value and objects by reference, C/C++ builds subtle control of that into its language. This is no simple quirk; passing by value is also known as copying, and that comes with a real performance cost, such that learning a language which controls it is the nature of achieving good performance in and of itself.

Consider a simple and fairly useless class representing a square with a width and a height, entirely public to ignore encapsulation for now. We store the width and height, and we provide an area calculation and a function to scale its size:

class Square
{
public:
double width;
double height;

double area()
{
return width ✱ height;
}

void scale(double factor)
{
width ✱= factor;
height ✱= factor;
}

};

This works at least, but neither as optimally nor with as much freedom as it could have.

The freedom point is good to address first; consider how that area function. Despite only reading the class variables without changing them, the entire function will be treated as if it can conceivably change the Square object on which it is called. Due to that, the area function will be inaccessible given a const Square object, even though it makes no changes.

The area function should be specified like this:

double area() const
{
return width ✱ height;
}

Shoving const in the function header makes the object fields read-only within the function—in return for being allowed to call the function on a const version of the object. Use of const is both a means of object protection and also a precursor to compiler optimisations such as avoiding copying and reloads.

Now to be more optimal, consider the scale function. It modifies the object and thus cannot be const, but this is about the scale factor parameter. Calling that function will supply it with a copy of the factor, which can be appropriate if it genuinely needs a temporary copy it can modify without affecting the calling code, but clearly it doesn't change the factor. In one sense, it would be better to accept a reference instead:

void scale(double & factor)
{
width ✱= factor;
height ✱= factor;
}

This bypasses the overhead of copying, although now that function cannot be used with a const double, because it could conceivably change the value (even though in practice it doesn't). This applies to calls with literal number as the factor, such as scale(1.5)—that 1.5 is itself a const double.

The scale function should be specified like this:

void scale(const double & factor)
{
width ✱= factor;
height ✱= factor;
}

Introducing that guarantee now allows literal numbers and any named values (const or otherwise), while also avoiding copying anything.

Even though this example involves only a double weighing in at 8 bytes, that is nonetheless both how to talk to the C/C++ compiler and also how to avoid unnecessary copying. It is not an early optimisation mistake; it is a basic part of the language which should be in continual use, it just so happens that the language and the optimisation are one and the same!
8
Coming this Fall, Disney's Aquama'am     (pomf2.lain.la)
submitted by bossman131 to Whichever 4 weeks ago (+8/-0)
4 comments last comment...