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

help-circle
    1. Cargo is truly great, but it’s a mystery to me right now how I’m going to get it to work with certain packaging systems.

    Yeah, Cargo itself doesn’t deal with any of the bundling after the executable is built.

    For that stuff, the efforts are certainly still ongoing. There’s no grand unified tool yet.

    If you just want e.g. a DEB file, then you probably want this: https://crates.io/crates/cargo-deb

    But if you want to do more in CI, then there’s kind of three popular options that I’m aware of.

    • just: More or less a shell script runner, and kind of like make.
    • cargo-make: A lot of effort has been put into this, it’s certainly got a good amount of features, but personally not a fan, since it makes you write a custom TOML format and then ideally you should be writing a custom script language, DuckScript. You can also use Rust scripts with it, which we tried, but there was just no way of passing parameters between tasks.
    • cargo-xtask: This is not a tool, it’s a pattern, basically just build your own build tool. It does have its downfalls, you’re not going to build good caching into your own build tool, for example. But in principle I find this quite workable, as you get to write your CI code in Rust. There’s also more and more community-made libraries to aid with that.








  • I mean, that is more obvious and more readable.

    But what I really don’t like about it, is that it’s less clear to what it applies. For example:

    not list.isEmpty() and x > 3
    

    Is that not (a and b) or (not a) and b?
    Obviously, you can define precedence rules, like there also is for !, but that’s again just additional things to learn.
    I’m definitely not generally opposed to special characters. I do also hate significant whitespace, because I find that less readable than braces.



  • For me, it’s pretty much the opposite. With the exclamation mark, I’ll see the inversion, then I’ll read the actual condition and try to make sense of it, and then I’ll remember that this thing was supposed to be inverted. Or I won’t remember, that’s unfortunately also a possibility.

    Might just be what we’re used to, though. I have been working in a codebase with mostly .not() for the past year.


  • Ephera@lemmy.mltoProgrammer Humor@programming.devNot
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 days ago

    Oh, I know where it came from. That’s also why we have all kinds of maths operators in the syntax of virtually any programming language. Because back when we didn’t yet know where this programming thing was going, we just threw in the conventions of maths and theoretical logic.

    What I’m saying is that we have our own conventions now, i.e. objects and methods, so I think, it’s worth reconsidering whether we still want to have these old conventions that are special cases in the syntax.




  • 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.



  • I don’t think, there’s a special trick to making them. You can look at existing kaomoji lists and pick out individual symbols to create the shape that you want.

    Or you can combine kamojis. For example, maybe you want a cat handing over a flower, but you want it to look sad, like an apology.

    Then you find a sad cat kaomoji:

    /ᐠ • ˕ •マ
    

    And combine it with the kaomoji you posted:

    ⠀/\__/\
     (• ˕ •)    
    / >🌷< \
    

    Well, could be better, but just as an example. Combining different faces and arm shapes and such is relatively easy.

    As for managing them, I usually see tags assigned to them. On the webpage that you posted, it’s the little text boxes below the kaomoji.
    But in its simplest form, you could have a text document and just write a few words above each kaomoji, like e.g. “sad cat flower”. Then if you search the text document with Ctrl+F for “cat”, this will be one of the results.