Should I Rust or should I Go?
UlrikHD @ UlrikHD @programming.dev Posts 9Comments 182Joined 2 yr. ago

How many ~hours per week is expected for the role, and are there any particular day(s) when most of the activity is happening.
I'd be happy to help out.I live in Norway with active hours ~05-22 CEST. For more personal information, feel free to DM. My discord username is the same as this username if you prefer that.
That honestly makes me curious, what issues have you encountered when upgrading your python(3) version?
I get the point the author is coming from. When I was teaching first year engineering students programming, the one on the left is how everyone would write, it's simply how human intuitively think about a process.
However, the one on the right feels more robust to me. For non trivial processes with multiple branches, it can ugly real quick if you haven't isolated functionalities into smaller functions. The issue is never when you are first writing the function, but when you're debugging or coming back to make changes.
What if you're told the new Italian chef wants to have 15 different toppings, not just 2. He also got 3 new steps that must be done to prepare the dough before you can bake the pizza, and the heat of the oven will now depend on the different dough used. My first instinct if my code was the one on the left, would be to refactor it to make room for the new functionality. With the one on the right, the framework is already set and you can easily add new functions for preparing the dough and make a few changes to addToppings()
and bake()
If I feel too lazy to write "proper" code and just make one big function for a process, I often end up regretting it and refactoring it into smaller, more manageable functions once I get back to the project the next day. It's simply easier to wrap your head around
heatOven()
bakePizza() box() than reading the entire function and look for comments to mark each important step. The pizza got burned? Better take a look at `bakePizza()` then.
All it took for me to switch to GitLab was a larger free lfs quota which I wanted for a project. The superior webpage UI made me migrate every old project to it too.
As others have suggested, ffmpeg is a great cli tool. If you aren't comfortable with the terminal you can do it via python like this:
import os import sys import subprocess def crop_media(file_name: str, w: int, h: int, x: int, y: int, new_dir: str) -> None: try: subprocess.run(f'ffmpeg -i "{file_name}" -vf "crop={w}:{h}:{x}:{y}" temp.gif -y', shell=True, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) os.rename('temp.gif', os.path.join(new_dir, file_name)) # Print the error and continue with other gifs, remove try block if you want a complete stop except subprocess.CalledProcessError as e: print(e) except KeyboardInterrupt: print('KeyboardInterrupt, cleaning up files...') os.remove('temp.gif') sys.exit(0) def crop_directory(directory: str, w: int, h: int, x: int, y: int, new_dir: str) -> None: for root, _, files in directory: for file in files: if not file.endswith('.gif'): continue if os.path.isfile(os.path.join(new_dir, file)): print(f'{file} already exists in {new_dir}, skipping...') continue file_path = os.path.normpath(os.path.join(root, file)) crop_media(file_path, w, h, x, y, new_dir) if __name__ == '__main__': width = 0 height = 0 x_offset = 0 y_offset = 0 gif_directory = '' new_directory = '' crop_directory(gif_directory, width, height, x_offset, y_offset, new_directory)
This should go through every file in the directory and subdirectories and call the ffmpeg command on each .gif. With new_directory
you can set a directory to store every cropped .gif. The ffmpeg command is based on johnpiers suggestion.
The script assumes unique filenames for each gif and should work with spaces in the filenames. If they aren't unique, you can just remove the new_directory
part, but you will then lose the original gif that you cropped.
The good news is that hopefully less developers will use that engine for future games. Not sure if it's unique for pathfinder, but the performance is abysmal considering the graphical fidelity it offers.
But I think that both are useless because you can put what you want in a list in python.
You can say that about all type hinting, but assuming you actually adhere to the type hints, it's a great tool to make python projects manageable.
Got a few minutes into the context video before I head to close it. Do people actually enjoy YouTubers presenting stuff in this manner?
The game has just launched and the mod had been released and cracked already. This isn't about making bread, it's clearly a trivial hack for him to do, not something that requires full time job maintenence.
People spend hundreds of hours modding free of charge, what he does is a joke in comparison if we are talking about lost time that could have been spent earning money. The groundwork was made by Bethesda, AMD and Nvidia.
Hexbear is/was the main reason I really wanted a per-user instance blocklist. Even though I never interacted with them, it was annoying to see them flood posts with awful takes. Glad to hear they banned us.
Not all that interested in defederation of the mentioned instance, but I'm curious about the DMCA justification. Do they have active requests they are ignoring, or is it just theoretical scenario for now?
What is the implication of this for future potential defederations. I don't expect instances in Russia and similar countries to care much for western DMCA requests.
Tabs work fine, you aren't allowed to mix, indentation must be consistent.
How you would like to implement, whether by hover with a delay or by clicking on a "preview" wouldn't really make a difference, though I think a button would be better for allowing actions such as scrolling and replying to comments. The idea is to essentially show the same thing as if you were to open up the post on a new page, just that you would still technically stay where you are so that you can continue scrolling. The alternative is to open up a new tab for every post you want to read.
4 spaces, although I'll die on the hill that tabs should always be used instead of space for indentation. Not just in python.
Python are fine with whatever number of spaces you want to use. You can use 8 spaces which forces you carefully consider each nest, you can use 1 if you're a monster, or you can use tabs if you're enlightened, python only demands consistency.
Depends on the file, very simple files may only warrant npp, but VSCode for more complex stuff where live preview may come in handy.
VSCode uses electron so it's not exactly a lightweight text editor, way overkill if you just want to read a simple .txt. Add on the fact if you got way too many extension, it will be even heavier.
Looks nice, dark enough to not Dark Reader enabled too, great work.
Got a question/request though, when clicking on the comments will it take it to the post page, or will it show up as an overlay without redirecting? Would be a nice QoL if it just popped up a window showing the post with comments while still staying on your page.
U.S. commercial reactors have generated about 90,000 metric tons of spent fuel since the 1950s. If all of it were able to be stacked together, it could fit on a single football field at a depth of less than 10 yards. Nuclear waste is solid, it's not that difficult to store it. We get more nuclear waste leaked into our nature from coal plants.
As a reference, here is the room that Switzerland stores their nuclear waste.
Those doesn't break backwards compatibility though. Naturally you can't use match with a python 3.7 interpreter, but what scripts written for python 3.7 wouldn't work with a 3.11 interpreter?
I haven't encountered that issue before, so I'm curious what those problems OP have encountered looks like.