• 22 Posts
  • 1.01K Comments
Joined 6 years ago
cake
Cake day: May 31st, 2020

help-circle


  • Most developers I’ve looked at would happily just paste the curl|bash thing into the terminal.

    I mean, I typically see it used for installing applications, and so long as TLS is used for the download, I’m still not aware of a good reason why you should check the Bash script in particular in that case, since the application itself could just as well be malware.

    Of course, it’s better to check the Bash script than to not check it, but at that point we should also advise to download the source code for the application, review it and then compile it yourself.
    At some point, you just have to bite the bullet and I have not yet seen a good argument why the Bash script deserves special treatment here…

    Having said that, for cases where you’re not installing an application, yeah, reviewing the script allows you to use it, without having to trust the source to the same degree as you do for installing an application.


  • One thing that will become important pretty quick if you continue making these scripts is that it’s almost always better to wrap your variables in quotes - so it becomes yt-dlp -x “$a.

    Oh man, this reminds me of the joke that any program that’s more complex than Hello World has bugs – and folks still don’t even agree how to spell “Hello, World!”.

    Of course, Bash is a particular minefield in this regard…




  • Ephera@lemmy.mltoLinux@lemmy.mlKDE Plasma 6.6 released
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    Yeah, I’ve done that occasionally, too, but it adds a load of friction for moving windows between screens, in particular also when un-/replugging the screen, so it’s still painful enough that I don’t bother with a second screen.

    I guess, it also plays a role that I do use lots of workspaces, so it’s 1) extra painful and 2) I don’t have as big of a need for a second screen, since I can just switch out what first screen displays very quickly.


  • Ephera@lemmy.mltoLinux@lemmy.mlKDE Plasma 6.6 released
    link
    fedilink
    English
    arrow-up
    6
    ·
    6 days ago

    Oh boy, feature freeze for Ubuntu 26.04 is on Thursday. Hopefully, they still include this update.

    My work laptop unfortunately comes with Kubuntu LTS and I desperately want the virtual-desktops-only-on-the-primary-screen feature on there. Currently, I’m the guy that actively disables all but one screen, because my workflow does not work at all with the secondary screen switching in sync with the primary screen.


  • Ephera@lemmy.mltoLinux@lemmy.mlKDE Plasma 6.6 released
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    I still wouldn’t assume it to actually go further than that. It’s a limitation of the EWMH standard, which is used for controlling the placement of windows.

    I don’t have in-depth knowledge of the standard, but I assume, it can only represent 1 desktop as the active desktop and stuff like that.
    Maybe you could try to be clever by e.g. always reporting the active desktop of the active screen and stuff like that, but yeah, no idea if you can do that for all aspects of the standard, and whether applications will still behave as expected.









  • Huh, so if you don’t opt for these more specific number types, then your program will explode sooner or later, depending on the architecture it’s being run on…?

    I guess, times were different back when C got created, with register size still much more in flux. But yeah, from today’s perspective, that seems terrifying. 😅


  • What really frustrates me about that, is that someone put in a lot of effort to be able to write these things out using proper words, but it still isn’t really more readable.

    Like, sure, unsigned is very obvious. But short, int, long and long long don’t really tell you anything except “this can fit more or less data”. That same concept can be expressed with a growing number, i.e. i16, i32 and i64.

    And when someone actually needs to know how much data fits into each type, well, then the latter approach is just better, because it tells you right on the tin.