There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

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

ornery_chemist , in I don't believe Auto Save feature in any software

<esc> <esc> <esc> <esc> <esc> <esc> :wa! <cr>

Stupidmanager ,

The old school programmer right here! All we’re missing is someone typing git commit -am “updates and stuff”

intensely_human ,

Basically a Jackie Chan fight scene, complete with somebody rolling a carriage at him and him kicking it back to pin them against the wall

NigelFrobisher , in Every Family Dinner Now

Any gains from LLM now would barely offset the complexity bloat introduced in enterprise applications in the last decade alone. And that’s not even taking into account the sins of the past that are only hidden behind the topsoil lair of cargo cult architecture.

sheogorath ,

After the report that codes made by the assistance of copilot are actually shittier than code written manually I’m feeling safe until the next breakthrough in AI development. Meanwhile I’m saving up gold for the eventuality.

Hotzilla , in 4 billion if statements

Could be easily made 50% space saving by only iffin all odds and return even on else. Maybe one if before to handle overflow to avoid wrong even if over the last if.

Deebster ,
@Deebster@programming.dev avatar

Well yeah, if you allow cheating!

bjorney ,

Yeah but then ALL even numbers would be slow to compute because you would have to chain through every odd before you know that 2 is even.

Depends on the expected distribution of input values

coloredgrayscale ,

Heuristic: keep it until 512, afterwards powers of 2, and numbers like 1000, 2000,…, 10000, 20000,… (regex: [0-9]000+)

expr , in no.. just no

Not only is this really gross, it’s also straight up wrong. It’s missing a from clause, and it makes no sense for a where clause to be nested under the select. The select list selects columns from rows that have already been filtered by the where clause. Same for the limit.

Also just gonna go ahead and assume the JSX parser will happily allow SQL injection attacks…

nephs ,

Booooo

CanadaPlus ,

I like the format, though.

criticalimpact , in GitHub Desktop or Git CLI?

CLI
Though I will admit it took me a while to get there
git add -i is where the true magic begins

stepanzak ,

TIL!

FiskFisk33 ,

git log --graph --oneline --all

hakunawazo ,

Also part of the Cli magic is a pretty git log tree like that:
https://lemmy.world/pictrs/image/3302d15a-1370-4f02-bc0d-5ec00c0c20f6.png
stackoverflow.com/questions/1838873/…/34467298#34…

And a proper diff tool like vim:

git config --global diff.tool vimdiff git config --global difftool.prompt false

(Current diff could be closed with :qa. All diffs could be closed with :cq).

cupcakezealot , in It's that time of the year again!
@cupcakezealot@lemmy.blahaj.zone avatar

dammit bobby tables is on the naughty list again

Aceticon , in Need a rust version too.

You use Assembly.

You describe each and every leg movement and each and every step to the castle and over the castle bridge and inside the castle.

You somehow end up in the castle kitchen.

sunbeam60 ,

Or more precisely. You end up in a dark room. You’re not sure it’s in the castle.

nilloc ,

And the only way back is by counting every step you took on the way in, and if you miss one, the castle buries you.

mindbleach ,

But if you’re right, you have the princess and return home before the guards are done drawing their swords.

NoneYa , in I'll just be a quick 3h

I hate these requests so fucking much. I’ve learned a lot of SQL because of it but I’m sick of it. Especially sick of the users who ask for the same data over and over again.

One guy asked me to run a report every first of the month and then he wouldn’t respond when I would send it so I stopped sending it. Additionally because he would request it AGAIN later in the month after I already sent it at the beginning of the month.

Guess it’s too much to search your fucking emails before requesting a new report to be run. A report that I’ve told you countless times will slow down everything for everyone else who’s using the system.

But tHis iS uRgENt aSAp to run a report asking for all data for the last 3 years.

dan ,
@dan@upvote.au avatar

Especially sick of the users who ask for the same data over and over again.

Use something like Apache Airflow to automate it :)

pomodoro_longbreak ,
@pomodoro_longbreak@sh.itjust.works avatar

If it’s regular, I recommend cron + mailutils. Have the cron job call a script with a variable sleep in it if you want to make it look more manual.

FauxPseudo , in Yes
@FauxPseudo@lemmy.world avatar

I’m currently trying to relearn all my advanced bash in python.

aes ,

i already learned how to use my operating system, now you’re telling me I have to learn 30 new libraries that do the exact same shit?

bort ,

no, you’ll also have to learns each libraries special quirks on your OS

tdawg ,

Just for fun or do you have a specific thing you feel would be better in python?

FauxPseudo ,
@FauxPseudo@lemmy.world avatar

Certain things I want to do will be easier in python and will be more portable. But bash is my home.

tdawg ,

Fair enough. The line for me has always been whether or not I expect to use it for more than just glue or a one off run

abbadon420 , in I mean it could be right

The third one is just (x=x+1), because the middle bit is just always false and can be ignored.

Hotzilla ,

What if int overflows? Is it still false?

rhpp ,

Still false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you’re using unsigned int or a programming language which strictly defines integer overflow, possibly as an error)

P.S.: Assuming this is C/C++

chellomere ,

No, because it’s UB, the compiler is free to do whatever, like making demons fly out of your nose

1984 , (edited ) in classic configure neovim experience
@1984@lemmy.today avatar

It is like this in the beginning but you come out the other end actually knowing how to change your editor to be what you want.

To me, neovim made it really fun to edit code again, and I spent months with it, learning lua from scratch, even wrote plugins for it that got popular.

The shortcuts makes it really easy to jump around in code fast and all the different plugins feels like getting constant upgrades. :)

drew_belloc ,
@drew_belloc@programming.dev avatar

I really want to go back to neovim just to create “my editor” on top of it from scratch, maybe by the end of the year

muleunchangedstarved OP ,

sorry I will not be tricked again into this bs editor, life is too short to configure vim

dukk ,

IDK honestly hacked together a config over the weekend and have been using it for a couple months now. Definitely not perfect but it works pretty nicely. Occasionally use Helix as my backup editor, but eventually I just learned to live with my “good enough” config.

(Seriously, a lot of configs are pretty bloated. Not every little thing really needs to be optimized…)

mercury , in Microsoft Edge could use a win

Windows put a full page ad for windows 11 before my computer started, I’m never upgrading. Hope to God Linux gaming gets better by 2025

phuntis ,
@phuntis@sopuli.xyz avatar

linux gaming is basically there at this point proton can run most games flawlessly unless you wanna play games with hyper aggressive drm or anticheat it mostly “just works”

bleuthoot , (edited )
@bleuthoot@lemmy.world avatar

I still have many issues regarding VR games. Mostly related to the view being delayed from what I am actually doing, making me nauseous.

For me, that’s one of the biggest issues holding me back from switching. I don’t want to bother to dual-boot OSes just for a few VR games.

phuntis ,
@phuntis@sopuli.xyz avatar

ah haven’t tried vr too expensive for me and not enough space really wanna try it in future though alyx and beat saber look really cool hopefully that’ll improve soon with all the rumours of valves deckard headset and them dedicating so much to linux I mean deckard will probably still be tethered to a pc so it’s not a guarantee since most people will be on windows then but maybe it’ll come with improvements to vr on linux

Tlaloc_Temporal ,

As a linux noob, I’d say it 90% there. I got a new computer recently, decided to only install linux to see if I could dump windows entirely, expecting to dualboot eventually. The only problems I’ve had so far are Curseforge, MC realms, and One Shot. I’ve got Modded Skyrim and modded Hollow Knight working, I’m incredibly happy with linux gaming.

phuntis ,
@phuntis@sopuli.xyz avatar

yeah I’m also quite a noob with linux I’ve only been using it for about a year and also dual boot my pc for the few games I have to for me it’s actually bethesda games mostly due to no mod managers on linux and I know there’s the workaround for MO2 which is what I use anyway but fomods didn’t work :/ I’m also actually playing through hollow knight on my deck at the moment though vanilla and that’s been working flawlessly as for curseforge dunno what you’re modding but if it’s mc I used prism launcher and that worked flawlessly way better than curseforge on even windows with that being full of bloat

Tlaloc_Temporal ,

Prism is life, I agree. My friends don’t, so I need a curseforge pack to distribute server updates with. The stupid part is curseforge has a working linux version, but it only does WoW.

The other one is playing on a realm. The desktop solution is supposed to be the Win10 version, but screw that. I’d love to see a mod that lets java join bedrock servers, but they all run the other way. The solution is running the android version with a third-party launcher.

Jabbermuggel ,

As Phuntis said, curseforge is easily solved with prism launcher. They have a nice GUI to browse modpacks and set up everything automatically. For mods that don’t allow direct downloads over the API, they give you a browser link you can open and automatically pull the downloaded files from your download folder.

The launcher also has integration into modrinth and a bunch of other useful features. IMO the better launcher compared to the official one, even if you don’t play modded.

Tlaloc_Temporal ,

Love Prism, love Modrinth, still can’t make modpack updates curseforge clients can use. Since everyone else on the server uses CF, I need to build the modpack on CF then import to Prism for myself.

I did see that making a CF modpack file might be possible soon though.

isles ,

Man, I just tried for a few weeks and just had no luck on the games I was trying. It maybe is there for most people, but I still ended up in the “google for commands that might resolve these weird crashes / errors” and building random packages from source. However, I tried on a gaming laptop, which have notoriously had worse support than standard discrete cards. I wonder if my experience would have been different with a standard PC. I also recognize that Steam is the answer for a lot of people, but I just don’t have that many Steam games.

ILikeBoobies ,

What games/distro?

isles ,

I was on Mint and primarily using Lutris, but tried many different WINE runners. I would have tried Ubuntu, which I think is a little closer to upstream updates, but I only had a 4gb USB stick to install from. For games, I tried Horizon: Zero Dawn (which I finally got to open, but it was running 0-3 FPS), Deus Ex: Mankind Divided, and Baldur’s Gate II (which seemed to work). I’m not giving up forever, my next gaming tower will likely run linux of some type. I do lots of self-hosting on a Ubuntu PC, so I’m pro-Linux. Just ran out of patience with the laptop!

IronTalon ,

Interesting. Got Horizon Zero Dawn to work out of the box myself but I’m using Garuda. Any chance you’re using an nVidia GPU? They tend to be a lot more fussy with Linux than AMD

isles ,

Yep, sure enough nVidia 1650 laptop GPU. I tried the proprietary drivers, forced so many versions of VKD3D and DXVK to try for better performance. Oh well, my next box will have an AMD GPU.

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

I hope gaming on GNU/Linux were bad, so I wouldn’t have wasted hours of my life :')

ILikeBoobies , (edited )

It needs a larger user base before companies will make the native version for it

By not switching you play into a self fulfilling prophecy

MJBrune ,

In 2016 you had 2 or 3 AAA games releasing Linux native versions. Now you are lucky if you get a working proton version. Linux has moved backwards. Honestly I think people tried it and hit a lot of problems with it then left. 2016 was the year of the Linux desktop but it failed to capture the market.

One of the biggest problems with Linux is simply additional hard drives. If you fill up your / drive you are basically screwed of you don’t know how to use the command line. Even the easiest Linux distros suffer from this problem. With windows I just reinstall programs to a different drive. With Linux you have to learn about symlinks, create then in the right spot and even then it doesn’t help unless you have a bigger drive. Alternatively you can learn about lvm and combine your drives in to one large monolith but this is even far more work for what’s it’s in Linux literally at worst a 10 minute fix and 0 second if you just install stuff to the right drives.

Cihta ,
@Cihta@lemmy.world avatar

Honest question - what is the current problem(s) in Linux gaming? And I don’t mean that the way it sounds, I just haven’t done it in a long long time. I mean back then it had to have a linux specific version and you had to deal with X11 mouse input.

Now with Wayland and things like steamdeck existing I’m surprised it’s not more viable.

I’m sure it’s a long list but what are the main factors? Just a curiosity. Unfortunately I just don’t get to play games these days. Still GPU and sound driver issues? Publishers refusing to take the extra steps to make a multi platform engine work on it? Too many unknowns based on flavor of Linux installed?

bitsplease ,

I’m not the guy you asked but I can answer for myself - it’s still not nearly as effortless to use for gaming as windows. I work with computers all day, so when I sit down to game at night I absolutely refuse to debug shit. For Starfield as an example, it works via proton, but the protondb page is full of “to get around X issue use the following workaround”, and I just can’t be bothered.

I use Linux for work and hobby software development, but for me to switch my gaming pc over would require it to not just be “viable”, but effortless

Cihta ,
@Cihta@lemmy.world avatar

Thank you, that’s the perspective I was looking for.

And while i understand, it’s certainly not limited to games or Linux. I too just want things to work and it’s become a struggle for one reason or another. I can find a common thread on that but probably not the place for that.

I am optimistic though that gaming will continue to get better and that will be helpful. Despite all the faults it’s at least going in the right direction.

IronTalon ,

I will say this - nowadays I have to figure out maybe 5% of games I play on Linux, and often times those games have issues with certain windows setups too

Cihta ,
@Cihta@lemmy.world avatar

That’s actually pretty positive. Probably a multitude of reasons but in my very limited experience with recent games they are pushed out with tons of problems on any platform. Sometimes the game was just rushed out and this is what turned me off of games for the most part. “It’s online, we can just patch it later!”

Also not a fan of paying for the privilege of being a beta tester. Open betas used to be fun times.

That said, based on yours and others replies i think it seems worth it to dig up an old ssd and try some of my games out on Linux on my main. Honestly it seems way better than what it was years ago so I should go see for myself. Thanks!

IronTalon ,

Absolutely. It’s honestly the older titles that tend to work better as well, perfect for an older setup. A nice static target for the conversion layer. Proton was pretty good 3 years ago, now it’s amazing.

Lots of Devs I’ve noticed tend to be happy to tweak things on their end to get something to work better with Proton as well, or if we’re lucky they just use Vulkan out of the gate and make it a very straightforward job.

A good benchmark is seeing how steam deck users get along with that game. If they don’t hit any snags it’s a very good chance you won’t either

Cihta ,
@Cihta@lemmy.world avatar

Great info, thanks. Most of my hardware is old. But that’s actually a good thing I think. I have a Lenovo ideacentre i plucked back from a friend as it was gathering dust. I upgraded the ram and SSD and installed neon on a whim and it’s amazing.

That’s what sorta started tracking me back… have continued using Linux for servers but i was impressed at that desktop. Now I know neon is a bit bleeding edge so any recommendations on a distro? I started with freebsd back in the day, then gentoo for desktop, then Ubuntu minimal for servers if that helps. Not afraid to get my hands dirty but prefer simplicity.

I found a 256GB SSD that should be enough for some testing. I need to grab some files off it but then it’s ready to go. Distro advice appreciated. Remember i just want to test :) TIA

BaardFigur ,

deleted_by_author

  • Loading...
  • bitsplease ,

    Definitely more work to set things up the first time, though

    This is ultimately my point - looking through protondb, it looks like all the games I play today work, but a good few require some workarounds, hacks, or just have crashes reported while playing

    Gaming is my escape from my day job of working on software, fiddling with configs and whatnot is really the last thing I want to do when I have free time to play.

    Don’t get me wrong, I’m stoked that gaming on Linux is improving so much, and I deeply look forward to the day that I can ditch Windows for good on my gaming PC, but for now its just the best tool for my requirements

    Gale ,

    Only reason I don’t switch to linux is because of both riot games and easy anti cheat(you can kinda play league of legends most of the time)

    but valorant’s vanguard is just straight up built for windows so you can’t cheat in their game, so you can’t even open that game in linux

    And 99% of games that use easy anti cheat are also unplayable (except elden ring somehow)

    Tbh I haven’t really played their any games that fall into this category lately, but I don’t want to have to install windows every time I get a urge to play league and tilt myself

    and I know that dual boot exists but I have a very limited storage right now (I’m only on a 480gb ssd since my hdd broke)

    Cihta ,
    @Cihta@lemmy.world avatar

    An interesting point… i didn’t even think about the anti-cheat engines nor considered they’d be bound to windows but yeah i get it, i deal with that on licensing services.

    I feel your pain on storage. It’s cheaper now but it’s all relative. I’ll save your UN and hit you up if i stumble into something that may help.

    Barbarian ,
    @Barbarian@sh.itjust.works avatar

    A lot of EAC games work just fine on proton now. For any game released and/or updated since September 2021 enabling EAC on proton for the devs is as easy as ticking a checkbox.

    mercury ,

    My main issue is a lack of support from games like DCS, which will never get Linux support, and not having trackIR support, but I suppose that just needs someone who is experienced.

    Also I can’t play fortnite/cod and that’s what my friends play.

    Cihta ,
    @Cihta@lemmy.world avatar

    Hah I had to look some of that up. I bet I could guess your age within a couple years. :)

    DCS seems like a cash grab and travkir thing seems quite the gimmick. But i understand you wanting to play with your friends and so do they and they aren’t going to bring Linux support despite it’s likely built on it.

    Windows is essentially free anyway these days so you’ll just have to suck it up for now. You can disable things like realtime scanning for a performance boost. If you can’t make your own DNS try quadr9 to block a majority of the telemetry and shit.

    Being able to play with your friends is more important really. Just dual boot or use a VM to get your nix skills. I’m sure many won’t agree with me and that’s cool. There is nothing Linux can’t do, yet there are apps (or games) that will simply require windows to participate. Sucks, but that’s reality.

    mercury ,

    U didn’t have to be so condescending lmao

    Cihta ,
    @Cihta@lemmy.world avatar

    Sorry yo, wasn’t intended that way I promise! I don’t have great people skills text based or otherwise. And actually I’m the one that sounds like an idiot anyway haha In my defense I’m quite tired and seeking excuses to not be working so yeah, my bad, no offense intended

    mercury ,

    I get that for sure! I’m also a bit uh, trigger-happy with people online. I definitely get that feeling, though.

    Cihta ,
    @Cihta@lemmy.world avatar

    Appreciate that but now I don’t know how to reply without sounding condescending… dammit! :) but you know, if you go back to 1995 bad boys that was how i communicated. Years later i relocated and nearly got killed for pointing out a funny and quite justified slight at a certain NFL team.

    I’m not sure I have a point beyond stay trigger happy and call fuckers like me out! We all make mistakes and I have no problem being called out.

    Shit, i still sound condescending don’t I? It’s just hard not to after a while. I don’t know if it’ll be Linux worthy but hit me up if you decide to try out borderlands 4. We’d be happy to have a new player in the group.

    mercury ,

    Nah, nah. I think it was just the “I bet I can guess your age” then the rest shifted in my mind. Sorry about the confusion

    Cihta ,
    @Cihta@lemmy.world avatar

    Yeah I got you… that was a stupid thing to say. I never meant it like that. I mean hell at the end of the day you got me to look up a couple things.

    It was a good lesson. And I’m usually banging heads with friends because they are judging and then i did it. Thanks for checking me.

    utopiah ,

    Genuinely no idea how Linux gaming could be better. I’ve been playing on desktop and Steam Deck for years, both “flat” games and VR games and it just works. Sure I don’t try literally everything but with ProtonDB I’m confident it will work, or not, and decide accordingly. Obviously not all games work on Linux but definitely more quality games that I have time for. For me it just works, I spend at least 99% of my time gaming on Linux actually gaming, in fact I can’t even remember when is the last time I tinkered. I don’t even have problems with GPU drivers despite tinkering with containers with machine learning. I’m not trying to say nobody has problems or dismiss problems people do have, just sharing my experience.

    YaBoyMax ,

    I think this is overselling it a little. I still run into issues with Proton from time to time that require sigkilling it and its children, and some games (especially EA titles) are finnicky and can take a few tries to launch properly.

    As for VR, SteamVR on Linux outright sucks. It virtually never works the first time I launch it and requires some combination of reconnecting hardware and restarting software and the computer, and it’s plagued with bugs (most recently the UI rendering upside down in the new beta).

    Don’t get me wrong, Linux has been my primary platform for some 5 years and my only one for the last few and I’d never dream of going back to Windows, and gaming on Linux has progressed unbelievably in the time I’ve been daily-driving it. But it still isn’t totally painless and there’s definitely more room for improvement in the coming years.

    CeeBee ,

    Linux gaming is even better than Windows in many ways now

    mapleseedfall ,

    How so?

    CeeBee ,

    Well, Elden Ring had a bug in it that killed performance, Proton was able to fix it without touching the game itself and resulted in Linux performance being markedly better.

    Then with Starfield it performs about 30% faster than windows consistently.

    I can force AMD FSR on any game (and I have an Nvidia card) to get a significant performance boost with no visually detectable loss in quality.

    The list goes on.

    checksout ,

    My game still does not support proton. Fuck that game.

    Honytawk ,

    Linux is still only compatible with 10000 games on Steams 70000 games store.

    Windows is compatible with all of em.

    CeeBee ,

    It’s 12,000 and those are rated as “playable”. The majority of games on Steam would be playable out of the box, but Valve is being cautious with their verified program.

    ProtonDB has over 18,000 user submissions for playable games.

    There are many games in my library that aren’t listed as Steam Deck verified or even on ProtonDB and they just work.

    IronTalon ,

    I switched back in 2019. It was pretty good then and it’s almost seamless now. Hell EAC works now and I can play Squad without any hiccups

    mercury ,

    I am glad squad works, haha

    Still , in What came first, the programmer or the code?
    @Still@programming.dev avatar

    well using someone’s code properly licensed isn’t plagiarism

    a fair few of my uni classes were like take this guys code and make it do this, which were like 4 lines changes

    rtxn ,

    “Here’s this header file that implements 99% of the mathematics, because I’m not paid to teach mathematics.”

    Ironically I learned a lot more about linear algebra from that header file than from my actual teacher.

    intelati ,

    I just saw a “faster linear algebra” package scroll by on pacman. I almost pulled up the source/documentation.

    The only thing that stopped me was that I have about 199 things more relevant to my usage than linear algebra.

    TheGiantKorean , in Programming Languages as Essays
    @TheGiantKorean@lemmy.world avatar

    Perl: this essay is just one long run on sentence.

    akincisor ,

    He just kept talking in one long incredibly unbroken sentence moving from topic to topic so that no one had a chance to interrupt, it was really quite hypnotic.

    nyan ,

    With some very odd random punctuation. (I love Perl, but some of the built-in variables . . .)

    TheGiantKorean ,
    @TheGiantKorean@lemmy.world avatar

    Lol yes. Like… How is $_ intuitive?

    Colour_me_triggered , in Imagine

    DELET THIS

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines