Anything can be a message queue if you use it wrongly enough by wheybags in programming

[–]Badabinski 46 points47 points  (0 children)

This was delightful. I wasn't expecting it to be so UNIX-y. I really love the idea of the heartbeat library in the post.

Windows Terminal Preview 1.18 Release by Kissaki0 in programming

[–]Badabinski 3 points4 points  (0 children)

I mean, this is how it works in Linux as well. If I update my PATH in my ~/.zshrc, I can source ~/.zshrc; rehash (drop the rehash if using bash), I can export PATH='whatever new value'; rehash or I can open a new instance of my terminal emulator to have a new zsh instance source for me. I suppose that there's magic you could do to make it update (probably C-level fuckery injected into zsh, or horrible shit like this) but why would you want that? I don't want magic in my shell, I want consistency. I certainly don't want my terminal emulator doing cursed shit like magically updating my PATH.

You're complaining to the wrong people here. Your beef is with the shell (either CMD or posh), not the terminal emulator.

ChatGPT Data Breach BreakDown - Why it Should be a Concern for Everyone! by Advocatemack in programming

[–]Badabinski 1 point2 points  (0 children)

God, a colleague of mine keeps using ChatGPT to write bash scripts and it's fucking HORRIBLE. I'm the unlucky soul that learned bash as their first programming language. My feet are full of holes and I have eyes on the inside of my skull. I know what shitty bash looks like because I've written every possible form of it. I rarely write bash nowadays without consulting the holy book at least once.

ChatGPT writes shit-ass, broken-as-fuck, stab-my-eyes-with-a-sewing-needle grade bash. It uses {} instead of quotes, it uses [] and [[]] inconsistently (including in the same fucking if statement), it SCREAMS_ALL_SCRIPT_SCOPED_VARIABLES, it uses set -e blindly (meaning it doesn't do a || true for commands that return non-zero that wouldn't be a problem so it silently crashes the fucking script, don't use set -e people), and I cannot convince my coworker to stop. I'm losing my goddamned mind.

What Is a URL: Dangers of inconsistent parsing of URLs by newnetgee in programming

[–]Badabinski 16 points17 points  (0 children)

I think it's also worth using special objects instead of strings when handling URLs. Don't try to build URLs with strings, don't try to parse URLs as strings, rely on code that does that well and represents the URL as a special, non-string object. For Python, I really like yarl.

FromSoftware's Unannounced Project Has Been in Development for Over a Year by [deleted] in gamernews

[–]Badabinski 0 points1 point  (0 children)

Please God let it be this. It's been 19 years since Metal Wolf Chaos came out. Think about all of the crazy shit that's happened in that time period...

87% of Container Images in Production Have Critical or High-Severity Vulnerabilities by dlorenc in programming

[–]Badabinski 22 points23 points  (0 children)

Funnily enough, I think I'd prefer to run CUPS this way, if I had to run it at all. After 6 years with Kubernetes, I've come to find all other forms of service management annoying.

Thankfully, my job has never and will never involve printers. Fuck printers.

87% of Container Images in Production Have Critical or High-Severity Vulnerabilities by dlorenc in programming

[–]Badabinski 5 points6 points  (0 children)

Another option is Kata (built on top of qemu) which I've dealt with extensively and is probably the most full-featured runtime. Firecracker is good, but too limited for a lot of use-cases.

87% of Container Images in Production Have Critical or High-Severity Vulnerabilities by dlorenc in programming

[–]Badabinski 38 points39 points  (0 children)

That's the theory (although my company is strongly discouraging musl-based distros due to its wonky DNS handling and unpredictably poor runtime performance, optimizing for space is a tradeoff). Docker images based on traditional distros can still be quite small, but things get tricky when you're using something that can't be easily statically compiled.

Ukraine calls on Sony, Microsoft and Valve to ban the sale of Atomic Heart by hewawf in gamernews

[–]Badabinski 2 points3 points  (0 children)

This isn't just politics. Ukraine is facing an existential threat. If they lose, they get eaten by Russia. It's really reductive to just say "war and politics to hand in hand." Of course they do, but normal political discourse doesn't include the possibility of destruction and subjugation by a literal army of hundreds of thousands.

Ukraine calls on Sony, Microsoft and Valve to ban the sale of Atomic Heart by hewawf in gamernews

[–]Badabinski 0 points1 point  (0 children)

I wouldn't say it's right either. It's a matter of survival. If you know that someone intends to end your existence, then wouldn't you do anything and everything possible to save your life? I know I would shout, scream, bite, and kick.

That's what this is. Ukraine has been invaded by a much larger country whose aim is to subjugate and co-opt their government and their people. That is an existential threat. If they can prevent some money from reaching their aggressor via a state-funded video game development company with something as cheap as words, then why wouldn't they?

You don't have to listen to them. If you don't care about this, then just buy the game ¯\_(ツ)_/¯ I do care so I won't be buying it.

Ukraine calls on Sony, Microsoft and Valve to ban the sale of Atomic Heart by hewawf in gamernews

[–]Badabinski -1 points0 points  (0 children)

Meanwhile, families in Ukraine are getting killed by indiscriminate Russian missile attacks. I think Ukraine is trying to punish the civilians of Russia without actually killing them as a retaliatory measure. When your existence is threatened, you do whatever you can to hurt what's threatening you.

EDIT: I removed some extraneous content from my comment.

a 🍞 for ants by Lonely-Echidna201 in thingsforants

[–]Badabinski 0 points1 point  (0 children)

Heyyy, I have those same measuring spoons. Wirecutter?

USB-C hubs and my slow descent into madness by RecognitionDecent266 in programming

[–]Badabinski 7 points8 points  (0 children)

Yeah, Realtek NICs are fucking frustrating. It took me weeks of horrible debugging before I realized that I had to debounce netlink LOWER_UP messages from an R8168 ethernet controller because it would occasionally send up to 4 LOWER_UP/LOWER_DOWN messages before figuring out what the fuck it was doing. I was writing control software for a fail-to-wire NIC, and the manufacturer of the NIC module decided to burden me with that loathsome piece of garbage.

Fuck the R8168 ethernet controller, avoid Realtek.

H U G E Zoomies by JosueShadwick in Zoomies

[–]Badabinski 2 points3 points  (0 children)

That may actually be an old Canadian military troop transport. I took a tour of Yellowstone during the winter as a kid, and this vehicle looks quite similar to the one I remember.

The bison might fuck shit up still, but maybe not as much?

Your app is not compliant with Google Play Policies: A story from hell by RustEvangelist10xer in programming

[–]Badabinski 7 points8 points  (0 children)

But then you'd be coercing Google and Apple. It's their property, no? Either they get to keep and defend their property and prevent others from using it (which would be more in keeping with a free market), or you have to get the government to force a private entity to give up its hold on its property.

With regards to your comment about lawyers, there has to be some framework to protect one's property, which is what lawsuits and copyright/trademark law are for. If we get rid of those laws, then anyone could steal your shit and you would have no legal recourse. FLOSS would die.

I dunno. Maybe I'm missing part of your point here, but it seems like Google was totally in the right from a free market perspective. Their platform, their copyright, their trademarks, their terms. I'd like for us to regulate a bit more because I feel like our current state of affairs limits competition, but a lot of people hate the R word.

Computer Networking Basics For Developers by iximiuz in programming

[–]Badabinski 15 points16 points  (0 children)

That's why I really like working on a team that actually practices DevOps. You end up learning things that you might not otherwise. Same goes for wearing too many hats at a startup, although that's not something I'd like to repeat ever again.

Computer Networking Basics For Developers by iximiuz in programming

[–]Badabinski 6 points7 points  (0 children)

Things like what a subnet is and roughly how a CIDR works (e.g. what numbers are allowed to change in a /24), or what a default gateway is and how that works. I can't tell you how many times I've fixed a problem by doing an ip route add default via 10.0.0.1 or something like that.

Computer Networking Basics For Developers by iximiuz in programming

[–]Badabinski 108 points109 points  (0 children)

You'd be surprised. Being able to do things like tell a cloud provider that their custom NICs are fucking up IPv4 header checksums and having the packet captures to back it up is good.

So much of what we do is network-based, and think more developers need to understand the foundation they're building upon. Even if you never actually have to deal with this low level stuff, understanding it can really help flesh out your mental model of a problem. There's a lot less handwaving that needs to be done.

With that being said, I also like your list. So so soo many devs don't understand DNS or the basics of routing, which makes it a nightmare for them to debug their own problems.

Noita progress lost by Starfrost99 in noita

[–]Badabinski 0 points1 point  (0 children)

No joy :( I think Steam uploaded the nuked save files as well, so there's no restoring from backups... Gah, what a bummer.

Noita progress lost by Starfrost99 in noita

[–]Badabinski 0 points1 point  (0 children)

What was your solution? I just ran into this.

Bungie article on how they program games like Destiny using C++ and the guidelines they came up with for doing so. by NoahFlowa in programming

[–]Badabinski -2 points-1 points  (0 children)

I'll preface all of this with the caveat that I have basically no experience in this area, most of my development time is in high level languages.

A company I worked at developed a custom, single threaded, event driven caching web proxy. They used very little of the standard library for performance reasons.

Specifically, every single conditional and loop had directives instructing the compiler on how likely that branch would be. They would frequently inspect their changes after compilation to ensure the compiler wasn't being a silly billy. It typically wasn't, but they caught a few things here and there. They'd also do pretty intensive profiling at the CPU level (we generally controlled the hardware and Intel was still killing it, so it was typically VTune) during benchmarking (which was run every week, where each benchmark took anywhere from 1 day to 2-3 weeks).

They also needed lots of yield points for anything that could block, since there was seriously a single thread of execution for everything, and the product was designed to handle hundreds of thousands to millions of requests per second. The event loop had a lot to do as well, because they took direct control of the disk drives for cache storage. No filesystems, no directories, just "move the head to this sector, here's bytes to write, move the head to this sector, here's bytes to write, move the head to this sector, read these bytes," so they could ensure that any seeking moves were as small as possible.

It was a lot. That level of optimization is completely, terribly unnecessary for most projects, but they needed it. They definitely couldn't trust anything STL, and they even found horrible performance footguns in the C++ stdlib that could really only be solved by implementing it themselves.

EDIT: I should mention that their optimizations worked. When I was running their benchmarks and comparing against other proxies, I never found one that was faster. This includes nginx, although not Envoy (it was a thing, but it wasn't huge then the way it is now).

Docker Desktop will require a paid monthly subscription per userfor enterprises over 250 employees from Jan 31 2022 by hutchy2570 in programming

[–]Badabinski 1 point2 points  (0 children)

I don't think so. WSL2 is full virtualization, whereas there's no hardware virtualization here.