Skip Navigation

Posts
16
Comments
396
Joined
3 yr. ago

  • You mean alignment of arguments or multiline strings in example? If they are not on their own line, then it does not matter to me. If they start on their own line, then mixing spaces and tabs isn't a good idea to me. In example for function calls with a bit more complex calls and multiple arguments, I put them in their own line each. They are indented and therefore indentation level plays. If they are on the same line, I never align them and if I would, it would be spaces. In general:

     
        
    function() {
    ....var = 1
    ....another_var = 2
    ....indented(arg, arg2, arg3)
    ....indented(arg, 
    .............arg2, 
    .............arg3)
    }
    
      
  • BTW, my personal note about the tabstops for indentation is, I wish everyone would use it over spaces. Because it would make it much easier to display the file differently without changing it. Also parsing it would make it easier too probably. But since spaces are the standard, I exclusively use space for indentation.

  • (update: just added a new link)

    The way you describe and show it, is called foldmethod "marker". The advantage of markers are, that they are built into the file. The disadvantage is, its built into the file. I rather like having the source independent from folding markers. The good news is, you can change the foldingmethod in Neovim and ignore the marker comments and instead use your own method.

    A simple one is just "manual", where you set what is foldable and not. There are some automatic ones, like based on indentation and such. I was never a folding guy anyway, so don't really know all the differences when to use and how they differ. Neovim has following foldmethod: manual, indent, expr, syntax, diff, marker. The "expr" method even allows you a custom code and logic.

  • But this can lead to over engineering simple stuff. Which makes the code harder to read and maintain and more error prone. Especially if you don't need all the other stuff for the class. Worse, if you define a class then you also tend to add more stuff you don't use, just in case it might be useful.

    A simple variable name is sometimes the better solution. But it depends on the situation off course. Sometimes a new class make things more clear, as it abstracts some complexity away. Yeah, we need to find a balance and that is different for every program.

  • My rule of thumb is, use short names if the context makes it clear. But do not make names too long and complicated (especially with Python :D). For me having unique names is also important, so I don't get confused. So not only too similar names are bad, especially if they all start like "path_aaa", "path_bbb" and such, then the eye can't distinguish them quickly and clearly. And searching (and maybe replace) without an IDE is easier with unique and descriptive names.

    Sometimes its better to come up with a new name, instead adding a modification and make the name longer. This could be in a for loop, where inner loops edit variables and create a variation of it. Instead adding something like "_modified", try to find what the modification is and change from "date" to "now" instead "date_current".

  • Lemmy is a far better platform for discussions than Discourse in my opinion. The tree like sub-reply threads in each post (the Reddit concept) is preferable over a single thread of replies. You don't need to cross quote and for readers no need to read the quote to see who and to what the reply is about. I don't like Discourse discussion platforms at all.

    However, Discourse has a few features that fits well for a discussion platform. I like the tags and Trust system of it.

  • this as a way for them to say it’s safer to use, somehow.

    And it probably is, because they use a lot of Ai for code generation too. And having Rust is a bit safer I assume, because its way stricter and the error message also way more helpful. Having not programmed in TypeScript, this is just an assumption and I just realized it gives you even right here. Oh the irony. :D

  • PS patterns offer vendor lock-in. ;-)

  • Does it? Is is native or is it a plugin maybe, you forgot that its a plugin. Or if this is true, maybe the importing was removed in v3 until the re-implemented it? Official announcement part is here: https://www.gimp.org/news/2025/06/23/gimp-3-1-2-released/#photoshop-patterns I am sure if it was already supported, they would have said anything about it.

    Looking through the documentation for legacy version 2.10, I found following part: https://docs.gimp.org/2.10/en/gimp-concepts-patterns.html

    Caution

    Do not confuse GIMP-generated .pat files with files created by other programs (e.g. Photoshop) – after all, .pat is just a part of an (arbitrary) file name.

    (However, GIMP does support Photoshop .pat files until a certain version.)

    Looks like v2.10 did not support Photoshop Pattern officially. But it supported it in prior versions (not sure when they stopped).

  • I remember MNG and never understood why APNG wasn't officially recognized. I didn't know it was widely supported already. Why do people still create and use GIF in the internet, if there is a superior format?

  • The first thing that comes to my mind is, it might be a scam. Confirm the mail is from Github. Can't help otherwise, but this is what I think first.

    • get a dock
    • attach keyboard and mouse on the dock and connect the dock to a monitor
    • go into desktop mode on your Steam Deck
    • open up Discover and install applications

    Basically a full fledged PC. There are some limitations, but for the most part you are able to code on it. You can write text and source code files, edit videos, edit images, browse the web with regular Firefox and so on. I can't say if the Steam Deck works well creating games with Godot, but technically it shouldn't stop you from trying.

  • Oh now this looks so obvious! Thank you and it works. Man Python might has its shortcomings, but it can be so elegant and easy to do so complex stuff in short time.

    Just as a side note, after I created this topic, was curious to ask a local programming LLM Ai model. I usually don't use Ai, but was curious to if it could help here finding the solution. I provided the entire post and it gave me the correct answer, basically the same as yours. Just a curiosity.

  • While it actually works, there are truly some missing features obviously. The hope is, when lot of major distributions and desktop environments stop supporting X11, then application developers and Wayland developers have to find a solution quicker. This will accelerate development of Wayland, at least the remaining issues.

    One area where Wayland needs to improve is support for various accessibility features.

  • Docker is not needed. You can run a subshell like ZSH directly in a shell from Bash in example. And you get set the executable path of each script like #!/usr/bin/env zsh. I don't get why a Docker is needed for this.

    Edit: I should read more before commenting nonsense like this... It's already a topic in the article. My bad. I leave the comment here, so nobody else makes the same mistake.

  • I'm worried. Why? Because most people buy Windows 11, which is worse for them.

  • I started with RetroPie long time ago too. :-) RetroPie is an operating system that is build to be a Gaming distribution basically. It uses RetroArch on its backend for the emulators and Emulation Station for the UI. When you select and run a game in Emulation Station (the UI on operating system level), then it runs RetroArch with a core and a game. While ingame, you can open the RetroArch menu as well.

    In short: RetroPie is an operating system setup to use RetroArch for the emulation.

  • They did that for Ubuntu. I mean it makes sense on Ubuntu. For everything else you can install it through Flatpak, your distributions own package manager (but that is often not the newest one) or AppImage, through Steam or many other methods. Its amazing how many ways you can install this and where it is available on!