• 1 Post
  • 371 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Presumably you’re using an IDE or smart text editor to run your code. Otherwise you’d be running e.g. cargo build and cargo test from the command-line quite often.

    The difference to Pip is that Cargo detects changes in the Cargo.toml and will automatically install all the necessary dependencies, when you run cargo build or cargo test (or other similar commands). And since your IDE / editor runs these for you, it looks to you like you’re just editing a text file.

    It should also be said that Pip has a somewhat unusual workflow in that you pip install everything, which would normally install it globally into your operating system. And then with venv, you kind intercept that to install it into the .venv/ folder in your repo instead.
    This workflow doesn’t make a ton of sense, if you always have a repo folder where the dependencies can be installed into, so Rust just doesn’t do it that way.
    (In particular, installing dependencies globally quickly causes issues when different projects have different version requirements for the same library.)

    There is a cargo install command, but it’s only for installing applications, not libraries.



  • Ephera@lemmy.mltoGames@lemmy.worldStop killing games
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 hours ago

    All the initiatives I’ve read so far, did have pretty concrete suggestions for how laws should be changed. In my experience, law makers will gladly consider a suggestion, because making laws is hard. Yes, that means lobbying is rather easily possible, but consumers are the group that does the least amount of lobbying.


  • Yeah, I had to figure out what it really is from Wikipedia and my two reactions were:

    • Ubisoft has a ‘universe’? Huh, I guess, they do have a few franchises there.
    • That actually sounds reasonably interesting. At least it’s not just yet another uninspired shooter.

    And like, yeah, lacklustre marketing puts it quite well. I had heard of XDefiant before, but all I got from that was that it’s a shooter, which made me fall asleep immediately.
    Had they sold it as “You ever wanted to pit the Splinter Cell guy against the Far Cry bandits?”, I would have at least remembered it.

    But to be fair, a lot of games are currently coming out. It is difficult to be seen for pretty much all titles…


  • I feel like there’s just too many different programming workflows, to try to pre-install them.

    Here on openSUSE, there’s ‘patterns’ you can install, which are basically just groups of packages, and they’ve got some pre-defined patterns for programming:

    I feel like that kind of goes in a more useful direction, although it’s still partially questionable what those contain. For example, the Java development pattern comes with Ant as the build system, when Maven and Gradle are more popular, I believe.

    I also have to say that I often prefer installing programming tooling in distro-independent ways, and ideally automated in the project repo, to avoid works-on-my-machine situations.
    Of course, something like Git, Docker, VMs etc. tend to be stable across versions, and I might not care for having the newest versions, but even with those, I think it’s good to install them on demand, rather than having them pre-installed. If the distro simply makes it a breeze to install them, that’s ideal IMHO.





  • As others have already said, Kate should work as text editor. I think, the only thing that’s not built-in is base64 en-/decoding, but you can set that up like this:

    That’s for decoding. For encoding, just change the name to “base64 encode” (exact name doesn’t matter) and remove the “–decode” from the Arguments-field.
    This relies on a CLI utility called base64, which is going to be pre-installed on most distros.
    It’s not entirely perfect, because it’ll always insert a newline, as that’s part of the base64 output. If you do want to get rid of that, you could write a tiny script and then call that script instead, but obviously, you don’t have to.

    You can also install Kate on Windows, if you want to give it a test-ride: https://kate-editor.org/
    (The base64 CLI won’t be available on Windows, though.)


  • My workplace preinstalls Ubuntu, personally I’m using openSUSE. I don’t even think that Ubuntu is particularly bad, I’m mainly frustrated with it, because it’s just slightly worse than openSUSE (and other distros) in pretty much every way.
    It’s less stable, less up-to-date, less resilient to breakages. And it’s got more quirky behaviour and more things that are broken out-of-the-box. And it doesn’t even have a unique selling point. It’s just extremely mid, and bad at it.






  • I’ve been telling all the juniors we have, that they’re free to use a GUI tool, but they do not get around learning the CLI. If you fuck up or Git breaks, you’ll need to look up how to unfuck it and that’s where the only help you find is for the CLI.

    In particular, it’s also been my experience that you rapidly come into a situation where suddenly you’re the Git expert and need to help others. If you only know one specific GUI, you can only help others who use that GUI. If you know the CLI, you can help anyone.

    It also happens that you need to interact with Git repos on a server where you simply won’t have a GUI.

    And yeah, given that whole opinion, personally I seriously do not care to learn a GUI in addition to the CLI.



  • It talks about the experience black people with autism have. In particular, it talks about someone with a hyperfixation on deejaying and how the video author relates to those experiences. The video author has a hyperfixation on writing.

    Two notable points that stuck with me:

    • Black autists may not get diagnosed, because they’re less likely to visit psychologists for depression and such. As apparently the family of his put it: Mental health issues are for white people.
    • Autistic behavior quirks themselves got interpreted as white people behavior.

  • The guy keeps on picking on Go, which is infamous for having terrible error handling, and then he has the nerve to even pick on the UNIX process return convention, which was designed in the 70s.
    The few times he mentions Rust, for whatever reason he keeps on assuming that .unwrap() is the only choice, which’s use is decidedly discouraged in production code.

    I do think there is room for debate here. But error handling is a hellishly complex topic, with different needs between among others:

    • short- vs. long-running processes
    • API vs. user-facing
    • small vs. big codebase
    • library vs. application code
    • prototyping vs. production phase

    And even if you pick out a specific field, the two concepts are not clearly separated.
    Error values in Rust usually have backtraces these days, for example (unless you’re doing embedded where this isn’t possible).
    Or Java makes you list exceptions in your function signature (except for unchecked exceptions), so you actually can’t just start throwing new exceptions in your little corner without the rest of the codebase knowing.
    I find it quite difficult to properly define the differences between the two.