[-] edinbruh@feddit.it 1 points 13 hours ago* (last edited 13 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 13 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 2 points 1 day ago

25 with the necktie

[-] 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 1 points 3 days ago

How I understood it was: at the beginning of the movie the guy says that he likes to remember things his way, not how they actually happened, that suggests that his story is unreliable. He kills is wife because she was cheating and gets caught and sentenced to death. He then hallucinates a delusion where he actually is an entirely different guy (he turns into another person while in the cell and gets released) with some parallels with the true story. This guy is cooler, a prodigy mechanic, a womanizer, and his rival is an insane mobster. In his delusion he kills a pimp who worked for the mobster and that's how the police find him and chase after him. In the final scene he is running away driving in the night, but from his point of view we see the sparks from the electric chair, suggesting he never left the cell.

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

There's also Control 2 though 🥺

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

I watched lost highways at movie night a couple of weeks ago. It was my first Lynch movie.

I despise it when the plot twist in a movie is that the guy imagined everything. And the movie was comically slow. I'm one who enjoys the process of cobbling together self referential details to get to the broader picture. And yet the disappointment of finding out it was all a delusion ruined the entire thing.

I didn't like it, wouldn't recommend. Sooner or later I'll watch another Lynch movie, maybe I'll change my mind.

I just wanted to vent

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

Also considering that the movie does actually explain how things work

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

What did it say originally?

[-] edinbruh@feddit.it 2 points 4 days ago
45
43
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!

126
submitted 1 month ago by edinbruh@feddit.it to c/egg_irl
2
submitted 1 month ago by edinbruh@feddit.it to c/meshtastic@lemmy.ml

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

I'm curious about trying meshtastic, and I was planning to buy the Wio L1 Tracker once aliexpress sales start. Though, I have read that the antenna isn't quite great, so I was thinking about buying a better one. Also, I'm buying the pro one instead of the oled kit because for 15 extra euros I get both the battery and the assembled case.

The meshtastic website recommends the gizont 10dbi whip antenna for 868 mhz (I'm in europe). The problem is that the antenna comes in sma-male or in rp-sma-male, and I have no idea what connector the tracker has. I know I could just buy an extra ipex connector, but I'd rather keep the original one, rather than spending extra money, considering I'm not even sure to catch any node in my area.

Another question I have is if it's reasonable to use a 10dbi antenna or if it's too high gain, as I see people use ~6dbi antennas for base stations. I'm in an urban area most of the times, but I also plan on using it for hiking, a couple of time in the summer. I know nothing about radios, so I have no idea of how impactful are these numbers.

16
submitted 1 month ago by edinbruh@feddit.it to c/meshtastic@mander.xyz

I'm curious about trying meshtastic, and I was planning to buy the Wio L1 Tracker once aliexpress sales start. Though, I have read that the antenna isn't quite great, so I was thinking about buying a better one. Also, I'm buying the pro one instead of the oled kit because for 15 extra euros I get both the battery and the assembled case.

The meshtastic website recommends the gizont 10dbi whip antenna for 868 mhz (I'm in europe). The problem is that the antenna comes in sma-male or in rp-sma-male, and I have no idea what connector the tracker has. I know I could just buy an extra ipex connector, but I'd rather keep the original one, rather than spending extra money, considering I'm not even sure to catch any node in my area.

Another question I have is if it's reasonable to use a 10dbi antenna or if it's too high gain, as I see people use ~6dbi antennas for base stations. I'm in an urban area most of the times, but I also plan on using it for hiking, a couple of time in the summer. I know nothing about radios, so I have no idea of how impactful are these numbers.

31
OMG! Trumps! (feddit.it)
14

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

10
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.

18
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

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

Reposting my question here to cast a wider net

139
His man.go (feddit.it)
view more: next ›

edinbruh

joined 2 years ago