49
Can't be unseen. LOL     (files.catbox.moe)
submitted by ProudRebel to funny 12 hours ago (+49/-0)
8 comments last comment...
13
Val Kilmer, Star of ‘Batman Forever,’ ‘Tombstone,’ 'Real Genius' Dies at 65     (variety.com)
submitted by iSnark to RIP 4 hours ago (+13/-0)
9 comments last comment...
19
Spain Now Has Groups Dedicated To Evicting Illegal Occupants     (files.catbox.moe)
submitted by Kozel to Diversity 7 hours ago (+20/-1)
7 comments last comment...
Property owners can now contact such groups to quickly and effectively evict illegal occupants from their properties.
12
Tesla Destroyer      (pomf.lain.la)
submitted by boekanier to whatever 4 hours ago (+12/-0)
2 comments last comment...
13
In Nazi Germany, there wasn't a property tax on the Germans' homes.     (TellUpgoat)
submitted by Sleazy to TellUpgoat 5 hours ago (+13/-0)
4 comments last comment...
26
Welcome Home     (files.catbox.moe)
submitted by Kozel to VIBE 11 hours ago (+26/-0)
10 comments last comment...
43
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 14 hours ago (+44/-1)
18 comments last comment...
20
Leave a thumb's up     (files.catbox.moe)
submitted by kammmmak to whatever 10 hours ago (+20/-0)
18 comments last comment...
10
Italian government slams judiciary after latest court ruling demands compensation for illegal [negroid] migrants      (whatever)
submitted by Flanders to whatever 6 hours ago (+10/-0)
1 comments last comment...
America is not the only country with Leftist, Globalist-led and jewish-minded judges who cater to imported dregs, and slap the faces of the countrymen in whose land they reside.

"The Italian government has been ordered to compensate migrants from the 2018 Diciotti ship standoff, a ruling that has sparked political backlash ....

As a result of this decision, the government will have to compensate — with the money of honest Italian citizens who pay taxes — people who have attempted to enter Italy illegally, that is, by violating the law of the Italian state,” Meloni said in a post on X." [MORE]:

https://rmx.news/article/italian-government-slams-judiciary-after-latest-court-ruling-demands-compensation-for-illegal-migrants/
13
C++: When efficient operations and the language itself are one and the same     (pomf2.lain.la)
submitted by SithEmpire to C 8 hours ago (+13/-0)
6 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!
13
Woke Gay Agenda     (files.catbox.moe)
submitted by Trope to ShitpostLitterBox 8 hours ago (+13/-0)
5 comments last comment...
7
how it works     (pomf.lain.la)
submitted by boekanier to whatever 4 hours ago (+7/-0)
3 comments last comment...
25
The CLASSIC wahmen moment     (files.catbox.moe)
submitted by big_fat_dangus to cringe 12 hours ago (+25/-0)
18 comments last comment...
16
Grandpa, why did all your friends die in car accidents?     (files.catbox.moe)
submitted by crackhead to whatever 10 hours ago (+16/-0)
13 comments last comment...
8
Ukraine has secret nuclear doomsday plan, according to former Zelensky adviser     (whatever)
submitted by Flanders to whatever 6 hours ago (+8/-0)
2 comments last comment...

"Ukraine's leadership would rather destroy the entire country and the Russians with it than accept defeat, he claims

Ukraine has a secret last-ditch “scorched earth” plan to render its entire territory uninhabitable in the event of a Russian victory in the war – and perhaps the rest of Europe with it."
-----------
Moreover, the Chernobyl disaster required the combined resources of the Soviet Union, as well as the assistance it received from other countries, to contain it. In a scenario where several nuclear plants were destroyed simultaneously, it would likely exceed the ability of any nation to bring it under control. The resulting casualties and damage to the environment would therefore be many times worse than what happened in 1986.

Nor would this catastrophe be limited to Ukraine and Russia: Harmful radioactivity would undoubtedly be carried by the atmosphere and spread over the rest of Europe as well. [MORE]:

https://rmx.news/article/ukraine-has-secret-nuclear-doomsday-plan-according-to-former-zelensky-adviser/
38
Easy, it was called paying attention      (files.catbox.moe)
submitted by kammmmak to whatever 15 hours ago (+38/-0)
35 comments last comment...
7
Jewish Slave Owners     (whatever)
submitted by NuckFiggers to whatever 6 hours ago (+7/-0)
5 comments last comment...
Where are the stats that show the number of kikes that owned slaves?

2
Susan Crawford wins Wisconsin Supreme Court race, defying Elon Musk     (www.nbcnews.com)
submitted by Sal_180 to UpliftingNews 1 hour ago (+2/-0)
1 comments last comment...
8
true story from 11 days ago     (TellUpgoat)
submitted by con77 to TellUpgoat 8 hours ago (+8/-0)
13 comments last comment...
I volunteer for a veterans charity on the weekend. I was in front of a wally world in west central florida. 2 saturdays ago.

A guy comes out. In his sixties. Wearing a track suit. As hes getting on his expensive bicycle he says to me "You want to help me? Have Elon Musk stop stealing my social security and medicare!".

Now I have become very good at ignoring the assholes, and there are plenty of them, but this was just too stupid to let slide.

And NO ONE EVER mentions juuz! You keyboard warriors are too scared to say it in public!

I reply "You cannot possibly believe that!". I repeat it " You cannot possibly believe that. MORON!" He's unlocking his bike with his head down.

I tell him " Congress and the Senate have been stealing your social security and sending it overseas!".

He waits till he's on his bike pedaling to say "Keep drinking the Kool-Aid"!
THAT made me mad! I shouted after him "keep slurping propaganda!".

There are a lot of stupid people in the world.
22
Florida - Hooded NIGGER Sheriff hits TACO-NIGGLET with police vehicle, and tackles him. - Will the ((( Media ))) report it?     (theworldwatch.com)
submitted by KosherHiveKicker to whatever 14 hours ago (+22/-0)
14 comments last comment...
14
🧹👃🌒 [Cackles]     (files.catbox.moe)
submitted by UncleDoug to Jewdar 11 hours ago (+14/-0)
1 comments last comment...
1
Victoria passes new anti-vilification laws      (archive.md)
submitted by dulcima to Australia 6 minutes ago (+1/-0)
0 comments...
0
JFK's quote 7 days before his death     (files.catbox.moe)
submitted by Conspirologist to Quotes 2 hours ago (+2/-2)
0 comments...
0
Mexico bans junk food in schools     (ncdalliance.org)
submitted by Conspirologist to Health 2 hours ago (+2/-2)
0 comments...
2
lol what the fuck is this about?      (gab.com)
submitted by SumerBreeze to InterestingAsFuck 2 hours ago (+2/-0)
1 comments last comment...