[-] edinbruh@feddit.it 1 points 12 hours ago* (last edited 12 hours ago)

That's also slower than most of the stuff you could come up with, it is so slow that there is no hyperoperation fast enough to describe it. There were other approaches that were almost worse though, like "the function is a switch-case that returns false by default. As complaint tickets are opened, more cases get added to the switch-case"

[-] edinbruh@feddit.it 1 points 12 hours ago

Please don't do that, I was stupid when I wrote that. But still, in very dynamic languages like python or js everything is an object, including functions, so you can just do object stuff on them.

[-] edinbruh@feddit.it 18 points 2 days ago* (last edited 2 days ago)

The implementation is not very exciting, I capture a variable in python. It could have been done more cleanly.

1000041934

The proof is this. But, I could have made mistakes, it was many years ago.

1000041935

Note that in python you'll never be able to run is_even(5) the stack cannot handle it

Edit: daaaamn, that variable is ugly as hell. I would never do things like that now.

[-] edinbruh@feddit.it 40 points 2 days ago

For a time on Reddit (some years ago when I still used it) there was a trend of finding the worst way of implementing is_even(x: int) -> bool. My contribution to that was a function that ran Ackerman(x,x) flipping a Boolean at every iteration, and check if it was true or false at the end.

It works btw, I will find the proof later

[-] edinbruh@feddit.it 5 points 2 days ago

my cheap ass salvaged speakers. I got them from a friend who got them from her father who got them from a school janitor who got them from a school that was throwing them out. Each of those step did some "repair", until they got to me and my roommate, and we undid every previous "repair". we are still using them

[-] edinbruh@feddit.it 4 points 4 days ago

What did it say originally?

[-] edinbruh@feddit.it 0 points 4 days ago
47
submitted 2 weeks ago by edinbruh@feddit.it to c/linux@lemmy.ml

So, some times ago I had this question https://feddit.it/post/22496010 about how to manage my system configuration, storing it on a repository or something.

Many people recommended using ansible to manage the system as a whole, but my system was already up and running, what I wanted instead was something to move around files while fixing up their permissions, so I build a python script for that.

The script grew more refined as time went on, and so now I'm publishing it so anyone can use it.

p.s.: this script is purely python and has no external dependencies!

1
OMG! Trumps! (feddit.it)
1

cross-posted from: https://feddit.it/post/23350094

what are your experiences using game controllers with linux, I'm especially interested in the xbox series s controller because it's the one I have, but I'm also interested in other controllers. From my experience the latency is disappointing, but I have no way of proving it.

So, I primarily use this controller in bluetooth mode using xpadneo. There's definitely noticeable latency, but in most games it's fine, I played through a lot of games without bother... until I played Conker: Live and Reloaded. On the infamous race level, it took me like two days to pass it, and I only made some progress when i connected the cable and dropped BT. Even that was fine though, It was just one old game and just one level, there could be a number of things to blame for that. Come hollow knight, as the game got harder after beating Hornet, it quickly became apparent that I couldn't get far without the cable, save for traversing the world, still, not that bad... until I got to fight radiance. It has been extremely frustrating, I tried it for days and eventually I started just doing a few attempts every few days, without any improvement, finding it hard to get to the second phase. Today I visited my parents and in the late evening decided to try it on a windows computer I left here, mind you, the last time I played was more than a week ago. So, I start the game, plug the same controller in, with the same cable, I beat Radiance on the fucking first try, with half health bar left...

It literally happened 10 minutes ago, I'm still riled up, this doesn't make sense, this has to be latency, there is no way I got that better just like that, It is literally impossible.

So, after all that, I need to unfuck the latency of my controller someway... Ok, it's fine on most games, but this situation is... frustrating

12
submitted 1 month ago* (last edited 1 month ago) by edinbruh@feddit.it to c/linux@lemmy.ml

what are your experiences using game controllers with linux, I'm especially interested in the xbox series s controller because it's the one I have, but I'm also interested in other controllers. From my experience the latency is disappointing, but I have no way of proving it.

So, I primarily use this controller in bluetooth mode using xpadneo. There's definitely noticeable latency, but in most games it's fine, I played through a lot of games without bother... until I played Conker: Live and Reloaded. On the infamous race level, it took me like two days to pass it, and I only made some progress when i connected the cable and dropped BT. Even that was fine though, It was just one old game and just one level, there could be a number of things to blame for that. Come hollow knight, as the game got harder after beating Hornet, it quickly became apparent that I couldn't get far without the cable, save for traversing the world, still, not that bad... until I got to fight radiance. It has been extremely frustrating, I tried it for days and eventually I started just doing a few attempts every few days, without any improvement, finding it hard to get to the second phase. Today I visited my parents and in the late evening decided to try it on a windows computer I left here, mind you, the last time I played was more than a week ago. So, I start the game, plug the same controller in, with the same cable, I beat Radiance on the fucking first try, with half health bar left...

It literally happened 10 minutes ago, I'm still riled up, this doesn't make sense, this has to be latency, there is no way I got that better just like that, It is literally impossible.

So, after all that, I need to unfuck the latency of my controller someway... Ok, it's fine on most games, but this situation is... frustrating

edit: I think it was steam input. The game was running natively, but I had to use steam input because the controller were broken. I solved by running the game in proton, so I wouldn't need steam input anymore.

19
submitted 2 months ago* (last edited 2 weeks ago) by edinbruh@feddit.it to c/linux@lemmy.ml

I'm trying to find a better solution to manage configuration files, both user's dotfiles and system files in /etc. I'm running an ubuntu server where I have a bunch services with custom configurations, and systemd drop-in files, but on top of that I also have some scripts and user dotfiles that I need to track.

What I'm doing right now is that I have a folder full of symlinks in the admin user's directory (poor username choice, btw) and I'm using bindfs to mount this directory inside a git repository, this way git won't see them as symlinks, and will version them as regular files. The problem with doing this is that as git deletes and rewrites files, bindfs fails to track the changes and converts the symlink to regular files.

I looked into chezmoi, but that is only meant to track user dotfiles and will refuse to add a file from /etc, that is unless doing some extra work. But even so, chezmoi will not track the user:group of files, so I would still have to manage that manually.

I also looked into GNU Stow, and that would not complain about files from /etc or anywhere, but it similarly will not track permissions and I would have to manage that manually.

I see that some people are using ansible to manage dotfiles, but at that point, it would make sense to just migrate to ansible, except I don't want to rebuild my server from scratch to use ansible. Also it looks like a lot to learn.

Is there a better solution I'm not seeing? Maybe something using git hooks?

Edit:

I ended up using pre-commit and post-merge git hooks to launch a python script. The python script reads from a yaml file where I annotate the file paths and permissions, and then copies to or from the file location to the git repository.

I used the sudoers file to allow the admin user to run this specific script with specific arguments as root without password (because the git commands are run from VS Code and not manually), which is dangerous, be careful when doing that. I have taken special care to make this secure:

  • I used absolute paths for everything, to avoid allowing running from a different pwd as a way to copy different files
  • The script itself is installed in a root-owned location, so an unprevileged user cannot edit it
  • The configuration yaml is root-owned, so an unprevileged user cannot modify which files are copied or their permissions
  • Configuration files that can grant permission are not managed by this script (the yaml, /etc/passwd, /etc/groups, polkit rules, the sudoers file, ...)

Edit 2: you can find the python script here

80
submitted 5 months ago by edinbruh@feddit.it to c/linuxmemes@lemmy.world
10

Reposting my question here to cast a wider net

141
His man.go (feddit.it)
155
His man.go (feddit.it)
submitted 7 months ago by edinbruh@feddit.it to c/linuxmemes@lemmy.world
[-] edinbruh@feddit.it 113 points 9 months ago

They die. Full stop.

Not even Microsoft had the strength to maintain a browser engine, that's why they moved Edge to Chromium, they gave up.

1075
submitted 1 year ago by edinbruh@feddit.it to c/memes@lemmy.world
28
submitted 1 year ago* (last edited 1 year ago) by edinbruh@feddit.it to c/linux@lemmy.ml

I'm using sunshine for remote gaming on my Linux PC. Because I use Wayland and don't have an Nvidia I use kmsgrab for capture (under the hood sunshine uses ffmpeg).

I have noticed that I can enter tty and kmsgrab will capture it as well. If it just captured after logging in my user I wouldn't be surprised, but it also captures the login screen.

I autostart it at login using my systemd user configuration (not systemwide) so it should just have my user's permission level. I get the same results if I put it in KDE's autostart section, so it's not a systemd thing.

Why does that work? Shouldn't you need special privileges to capture everything?

The installation instructions tells you to do sudo setcap -r $(readlink -f $(which sunshine)) is this the reason why it works? What does the command do exactly?

2

SOTTR can now run in proton-experimental (it used to crash due to a missing vulkan feature), but how does it compare to the native version?

Normally I would just use the native version, but got the game from epic, which doesn't provide the native build. So if I wanted to run native I would have to acquire the game from other sources (keep in mind that I own the game on epic), which is less than ideal. But I wouldn't do it if there's no advantage.

[-] edinbruh@feddit.it 92 points 2 years ago

AI upscaling, I think

[-] edinbruh@feddit.it 92 points 2 years ago

I am a computer scientist after all

[-] edinbruh@feddit.it 106 points 2 years ago

If I get back to 2005 I can easily get more than 10 millions by the time it's 2024 again. Plus all the other perks of restarting your life

[-] edinbruh@feddit.it 78 points 2 years ago

Dude what are you talking about, it was still here less than 15 years ago. The Nintendo Wii literally had an ATI GPU

view more: next ›

edinbruh

joined 2 years ago