• 8 Posts
  • 162 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlJava Bros
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 hours ago

    Eh, I’d argue that Java and C# are in the niche of having few features. While I don’t like this niche, Java having even less features makes it stand out more in this niche. If you’re looking for a language with more features than that, then there’s so many more feature-rich choices than C# that I just don’t feel like you’d choose C#, unless you want Java with integration into the Microsoft ecosystem.



  • Hmm, which distro did you try it with? I believe, KDE should support auto-rotating the screen in the newer versions¹. If you tried it with Kubuntu LTS, for example, that would’ve still been an older version, which does not use Wayland by default.

    ¹) More precisely: it should support it when it’s being run under Wayland, which is the default since KDE Plasma 6.




  • Yeah, that is a very good question. It’s one of the last commands in the script and initially I thought they had set up the script so that it would abort, if any of the commands before it would fail.

    But then a colleague pointed out that it’s actually the opposite. So, you can tell the shell to abort execution on error by running set -e. But what they had written at the top was set +e, which explicitly turns that off (even though it should be off by default).
    The last command in the script is also exit 0, so it always indicates success.
    So, yeah, they seem to have knowingly made it so that if the script fails, then it doesn’t retry or anything. It tries to plough through as many of the commands as it can manage (ignoring any that fail on the way) and then it always deletes itself.

    I guess, it’s not as egregious of an assumption, because it only runs on a fresh OS. That’s a pretty controlled environment to be executing in, so the chance of something going wrong is rather low.
    Well, and the other question is what else would you do? If the script fails and you don’t delete it, it’s going to re-run on the next boot. What’s going to be different on the next boot to make it succeed then? Might as well do as much as you can and then quit…


  • Ephera@lemmy.mltoLinux@lemmy.mlHow I use Kate Editor
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    2 days ago

    renaming symbols, presenting documentation, formatting files,

    Yes, these are supported via the Language Server Protocol (LSP). I’ve mostly been using it with the Rust LSP server (rust-analyzer) and well, it typically works, but sometimes you have to tell it to restart the LSP server and stuff (which isn’t a huge ordeal, but don’t expect everything to always work as well as in a full-fledged IDE).
    I believe, for formatting, there’s also some non-LSP support.

    showing code diagnostics beyond syntax errors (for example code smells or so),

    This is supported in principle via LSP, too, but it depends on the specific LSP server, how much info it provides. The Rust compiler gives out relatively much on its own, which is passed on by the LSP server, but you can apparently also configure it to use the linter on save.

    have AI integration (explain this, rewrite this, replace this with prompt output, …),

    Not out of the box. There’s a way to define “External Tools”, which basically allows you to run commands and pass arguments to them and then use their output. For example, you should be able to define an External Tool, where you can select some text, then press your keyboard shortcut for that tool, so it sends the selected text to that tool and then it takes the command output and inserts it instead of the selected text.
    While this is a powerful concept, I don’t know, if you hit limitations at some point.

    specific framework integrations (reactjs, django, actix, …),

    Nope, except where this might be covered by LSP. But there’s no obvious way to just install additional plugins, for example. You get about thirty built-in plugins and that’s it.

    and stuff like expanding macros in C/C++ and Rust?

    Well, expanding macros is also possible with the Rust LSP server. Don’t know about other languages.







  • Yeah, I’m building more-or-less an alternative to make. Major difference is that I’m not using shell commands, but rather users will define their build code in Rust …because it’s intended to be a build tool for Rust applications (beyond what cargo does).

    Thanks for the comment, though. So far, I haven’t limited inputs to just be files, so I don’t actually assume to have a last-modified timestamp. Rather, my assumption is that I can get some value which changes when the input changes. In the case of a file, that’s the last-modified timestamp, but theoretically, it could also be a hash. But that means I have to store these values to be able to detect a change. Being able to just say that one thing is newer than the other without storing anything, that is pretty cool and might be worth changing my assumption for.




  • openSUSE is now one big btrfs partition. They dropped the separate xfs for the home partition maybe two years ago or so. It makes it less likely to run into a situation where the snapshots fill up the root partition (which is really ugly to recover from, because users will try to uninstall packages, which doesn’t help, since the files are still contained in a previous snapshot)…


  • To be more precise, you don’t really want to use the snapshotting in the home-directory. You can still use btrfs itself and for example, openSUSE sets it up so the home-directory is in a btrfs subvolume that’s excluded from snapshots.
    At the very least, you’d want the snapshots in the home-directory to be independent from the rest of the OS, so that you don’t end up rolling back what you’ve worked on when you want to roll back a faulty OS update.

    Well, and you also just want proper backups of your home-directory, so the snapshots are not as useful…