@gentoobro@gleasonator.com avatar

gentoobro

@gentoobro@gleasonator.com

https://notabug.org/yzziizzy

C is the best language. Change my mind. (you can't)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

gentoobro, to random
@gentoobro@gleasonator.com avatar

The main problem with this is the author decided that s1, s2, and s3 were good variable names. That happens in every language. It could use some more comments, and some of the sections are written in a somewhat old style (really? not using strndup?), but it's a perfectly normal parser algorithm that is perfectly understandable to anyone who understands basic C.

Anyone who struggles with this code probably doesn't actually understand pointers and memory.

RT: https://shrimpposter.club/objects/fd58d477-cde4-465c-acb5-23501760f329

gentoobro, to random
@gentoobro@gleasonator.com avatar

"AI is totally going to replace developers, guys..."

RT: https://hell.twtr.plus/objects/bfeb3a76-34ad-400e-b8a9-70690e45a9a1

gentoobro, to random
@gentoobro@gleasonator.com avatar

Strategic Veganism: Eating nothing but predator animals for the largest net savings of animal life.

Shadowman311, to random
@Shadowman311@poa.st avatar
gentoobro,
@gentoobro@gleasonator.com avatar

@Shadowman311 Don't use email for anything sensitive

j, to random
@j@bae.st avatar

My work sent out an email letting us know they've joined Purchasing Power and we can now buy from them. I've never heard of it so I decided to check them out thinking it was a place for cheap surplus office furniture and stuff like that. Turns out it's far more dystopian and sinister than that.

>Can't afford the things you want/need?
>Don't have a credit card?
>No problem!
>Just buy now and it'll come out of future paychecks.
>How could it go wrong?
Screenshot_20240508-091804.png

gentoobro,
@gentoobro@gleasonator.com avatar

@j Most Americans need to get used to being Poor (TM). That means not buying all the latest consoomer junk, nor having a big Boomer house filled with nice furniture and decorations.

There are ways the decline could be reversed, but that would be inconvenient to a lot of people so they'll keep marching into the Second World.

PraxisOfEvil, to random
@PraxisOfEvil@poa.st avatar

I don't know if it's funny or sad to see progs come to the realization that voting straight ticket Democrat didn't deliver them from authoritarianism. But I can't judge them too harshly tbh, I thought that a president who shared my political beliefs would actually change things

RT: https://poa.st/objects/5104a9d4-dbdd-41a6-9ae4-c7ac6785cebc

gentoobro,
@gentoobro@gleasonator.com avatar

@PraxisOfEvil @MetastasizedHeroicism The US's particular government design inevitably leads to two parties split 50/50 and practically zero representation of the will of any voter. In many ways the US is a perfect storm scenario for tyranny disguised as democracy.

lamp, to random
@lamp@kitty.haus avatar
const int buttonPins[] = {2,3,4,5,6,7};
int lastBtnState[6] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH};
unsigned long lastBtnTime[6];

void setup() {
  for (int i = 0; i < 6; i++) {
    pinMode(buttonPins[i], INPUT_PULLUP);
  }
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  for (int i = 0; i < 6; i++) {
    int btnState = digitalRead(buttonPins[i]);
    if (btnState != lastBtnState[i]) {
      if (micros() - lastBtnTime[i] > 1000) {
        OnBtnStateChange(i, !btnState);
      }
      lastBtnState[i] = btnState;
      lastBtnTime[i] = micros();
    }
  }
}

void OnBtnStateChange(int btn, bool pressed) {
  Serial.print(btn);
  Serial.println(pressed);
  digitalWrite(LED_BUILTIN, pressed);
}
gentoobro,
@gentoobro@gleasonator.com avatar

@lamp Depending on your hardware you can run out of ram relatively quickly with button debouncing. I use the Nano 168's a lot and they're rather cramped.

A good solution is to use X-Lists (a C macro trick, look it up) for the configuration of the desired button names. Using it, create an enum for the button ordinals, then another that's defined as 1 << by the ordinal of the same button. Now you have bit masks and can write a loop to check button states and debounce them (Have an extra enum member like "BUTTON_MAX_VALUE" to limit your loop).

You also don't need longs for the button times. You only need accumulators that go up to the debounce time. Set the accumulator to zero then increment it by the delta since the last loop. You can easily make them 16 bit unsigned ints, or even 8 bit unsigned chars if you put a divider on the delta-t.

graf, to random
@graf@poa.st avatar

new nitter hardware is live, runs fine for me so i have updated the DNS. will take several hours for it to propagate across the internet but it's done w

gentoobro,
@gentoobro@gleasonator.com avatar

@graf What monitoring program are you using in this screenshot?

splitshockvirus, to random
@splitshockvirus@mstdn.starnix.network avatar

Hey man whatever this is that you're doing can you do that some other time.

gentoobro,
@gentoobro@gleasonator.com avatar

@crunklord420 @splitshockvirus What the fuck is in their shaders that takes so long? Mine compile in a couple seconds. Must be some sort of bloated middleware.

gentoobro,
@gentoobro@gleasonator.com avatar

@crunklord420 @splitshockvirus Things that complicated are seldom truly optimized.

It's insane to have special shaders for each skin. There aren't that many ways you can make light reflect, even with oil-slick effects and such.

gentoobro,
@gentoobro@gleasonator.com avatar

@icedquinn @crunklord420 @splitshockvirus Yeah. I have one for GUI rendering. Whether you swap shader programs or not during rendering is not the point. (In CS they could swap shaders for the guns without much problem. There aren't many guns on screen at any given point in time.) The insane part is that they have special shader code for each skin, or even many skins.

gentoobro,
@gentoobro@gleasonator.com avatar

@icedquinn @crunklord420 @splitshockvirus Draw calls are different. You need to have a shader bound already to issue a draw call. Shader changes go into the graphics queue, yes, but they aren't that scarce, and can be even cheaper if you do it carefully. Swapping the executable code is rather fast; reconfiguring the layout of the cache (uniforms) is the expensive part. In Vulkan you can carefully manage these costs independently. In OpenGL you can do some voodoo and the driver will probably hopefully maybe get it right. (Dunno about DirectX. Fuck Microshaft.)

A modern game might have a dozen shader changes each frame just due to the render pipeline alone. The main thing is to not just change shaders willy-nilly between each model or primitive.

On a side note, draw calls themselves aren't that expensive per-se. There can be some CPU overhead, but the main thing to remember is that the GPU is extremely pipelined and you want to let it crunch on as much data at one time as you can. You also don't want to cross the driver barrier too much with OpenGL, but that's a different story.

gentoobro,
@gentoobro@gleasonator.com avatar

@a1ba @icedquinn @crunklord420 @splitshockvirus Also, annoyingly, some GLSL compilers don't support line continuations, which makes using non-trivial macros difficult.

gentoobro,
@gentoobro@gleasonator.com avatar

@icedquinn @crunklord420 @splitshockvirus @a1ba You still write GLSL. It's a more strict version, but basically the same. You run it through a compiler (glslang) at build time. Maybe one day I'll put my tooling up on notabug. SPIR-V is for shipping, kind of like x86 machine code is for shipping.

Forestofenchantment, to random
@Forestofenchantment@clubcyberia.co avatar

Gonna rent some arcade machines for my place. Thinking of Hydro Thunder and Cruis'n Exotica.

gentoobro,
@gentoobro@gleasonator.com avatar

@PurpCat @Forestofenchantment Start making new ones.

gentoobro,
@gentoobro@gleasonator.com avatar

@PurpCat @Forestofenchantment Put some duck tape over the last 3 zeros.

graf, to random
@graf@poa.st avatar

it's time to cook

gentoobro,
@gentoobro@gleasonator.com avatar

@ExtraSpecialK @Sal_Equis @graf @birdulon Run a lean system and don't use a potato processor. My very old Ryzen 1600 can recompile the whole system overnight, except fucking chromium which takes another 10 by itself.

gentoobro,
@gentoobro@gleasonator.com avatar

@graf @ExtraSpecialK @Sal_Equis @brokenshakles @birdulon Gentoo is the only distro that works reliably. It's also the only one without systemd that actually gets maintained.

graf, to random
@graf@poa.st avatar

@Dan_Hulson your thoughts on this? putting together a quiet, low power mini-pc to connect to 3gbit fiber here. made a poast earlier but people ignored me so i did more research

bout 350 quid after tax and promotions

gentoobro,
@gentoobro@gleasonator.com avatar

@graf @Dan_Hulson @ZMAN1337 Ram uses a fair bit of power. The more you have and the faster it goes the harder it pushes all the circuits that provide power to it.

aeris, to random
@aeris@lab.nyanide.com avatar

Debian is awful for desktop people should stop recommending it to newbies

gentoobro,
@gentoobro@gleasonator.com avatar
sickburnbro, to random
@sickburnbro@poa.st avatar

if you ever wonder "hmm, why is mexico a shit hole", I present to you why:

gentoobro,
@gentoobro@gleasonator.com avatar

@sickburnbro You have no idea... The quality of work in those videos would be a massive upgrade to a lot of buildings around here.

Fortunately, nearly all construction is masonry instead of wood and it's rather hard to make a structurally unsound reinforced concrete building without hiring an engineer to do it. This leads to a more natural state: overbuilt, low-quality structures. The concrete was mixed carelessly in a puddle on the ground with no care given to ingredient ratios, but also there's an 8 inch steel I-beam above the whole wall so who cares.

It's also nice to not have walls made of cardboard from a soundproofing standpoint.

gentoobro, to random
@gentoobro@gleasonator.com avatar

This is completely retarded, especially the top one. There is no excuse for the top one. It's pure technical incompetence in the design.

RustyCrab, to random
@RustyCrab@clubcyberia.co avatar

There's nothing like asking an AI a medical question and you look at its sources and its like UfoHunters dot com

gentoobro,
@gentoobro@gleasonator.com avatar

@RustyCrab Probably still safer than some doc who's getting kickbacks from Big Pharma

18+ icedquinn, to random
@icedquinn@blob.cat avatar

not sure i like this change where 90% of the guns you pick up are "broken"

gentoobro,
@gentoobro@gleasonator.com avatar

@icedquinn @thendrix I honestly think the AAA's are now full of people who don't actually play video games.

gentoobro,
@gentoobro@gleasonator.com avatar

@thendrix @icedquinn Chinese games will all suck too. It's just causing the rise of indie games.

ArmchairEconomist01, to random
@ArmchairEconomist01@poa.st avatar

We have exited 14 years of a Federal Reserve zero rate interest policy.

What does this means for you?
Banks will go bankrupt. Home loans & car loans will default.
Job loses will ensue.

Then the government will respond by sending everyone a $5,000 check to stimulate the economy while the system resets.

Many Americans will start over from scratch. The billionaires & globalists will consolidate more power.

gentoobro,
@gentoobro@gleasonator.com avatar

@vonzeppelin @ArmchairEconomist01- Cut your expenditures to the absolute bare minimum. No eating out, no ordering in, no grilling steaks. Grill chicken or pork and cook up some fresh vegetables. Stop drinking beer; it's expensive per unit of alcohol. Get some cheap but tolerable liquor instead.

  • Get in shape. If you're fat, lose weight. If you're scrawny, gain muscle. Best way to do both is to routinely pick up weights that are near the limit of your strength. There are tons of programs out there, Progressive Overload just to name one.
  • Live as healthy as you can. You want to avoid having to pay for medical care; it will wipe you out. Stop smoking, stop doing drugs, stop getting drunk all the time, stop drinking soda.
  • Make sure you own your vehicle. Life is very hard in the US if your car gets repo'ed. And for fuck's sake don't buy a fancy new car. Drive a cheap reliable-ish beater.
  • Learn how to make stuff and fix stuff. Anything and everything. Not only will it come in handy for your use, but you will be able to make money on the side if (when) you need to.
  • Don't pay for more house/apartment than you need, and be realistic about the word "need".
  • If you already live under a mountain of medical debt it's worth considering just defaulting. Screw your "credit score", it's not worth slaving for 20+ years over because of a fraudulent medical system.
  • Have at least several thousand dollars in physical cash at your home. You don't want to be standing in line at the bank run so you can buy food.
  • Have a full month of food and basic necessities in stock at your house. This isn't a weird prepper thing, it's just to trivially weather panic buying like we saw in 2020. Some big bags of rice and beans, and a bunch of bullion cubes are decent start. Try not to store what amounts to canned water, like canned soup.
  • Have a water purifier. Any old cheap hiking filter will work. You never know when they're going to run out of chlorine or CO2 or whatever at the treatment plant.

And most importantly:

  • GET YOUR PASSPORT
gentoobro, to random
@gentoobro@gleasonator.com avatar

For anyone who hasn't seen it, this is how a GUI should be built internally. Once you use an Immediate Mode GUI system you never want to go back.

https://caseymuratori.com/blog_0001

RT: https://blob.cat/objects/984c391e-17d1-470f-85cf-4669957e2b84

icedquinn, to random
@icedquinn@blob.cat avatar

alright
the coughing is enough
nyquil it is

gentoobro,
@gentoobro@gleasonator.com avatar

@icedquinn I switched to gin a few years ago. It's not quite as effective, but I don't care anymore after a couple shots 😆

gentoobro, to random
@gentoobro@gleasonator.com avatar
gentoobro, to random
@gentoobro@gleasonator.com avatar

How have they not managed to understand that you can't trust the client after all these years? Any anti-cheat software running on the user's machine can and will be compromised. The only unbeatable anti-cheat system runs on the servers and watches everything the client sends very carefully. And even then, the difference between an aimbot and an amazing player is vanishingly thin.

The solution to online cheating, I think, is to let players blacklist being matched with other specific players. Publish the stats of how many (but not necessarily which) players every player has blocked and been blocked by. Let players set a minimums or maximums blocking, being blocked, or ratios thereof for who they are willing to match with by default. The cheaters will all end up in their own little cheater bubble, gleefully aimbotting each other.

RT: https://ligma.pro/users/r000t/statuses/112114373606415529

RustyCrab, to random
@RustyCrab@clubcyberia.co avatar

"Garbage in, garbage out" is not a justification for not sanitizing your fucking inputs

gentoobro,
@gentoobro@gleasonator.com avatar

@RustyCrab Segfaults are a just punishment laid down upon wicked users for not reading the man page.

binkle, to random
@binkle@clubcyberia.co avatar

the frontier of the internet must remain bizarre, uncouth, and completely hostile to any normal and decent person, for their own good as well as ours

gentoobro,
@gentoobro@gleasonator.com avatar

@binkle It must also not be too easy to find or access.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines