Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)E
Posts
112
Comments
5165
Joined
6 yr. ago

  • Cool, I'm hoping this makes various webpages more performant, which use this kind of layout. The JavaScript monstrosities never felt particularly smooth.

  • Ah, cool that you were able to fix it! 🙂

    1. ß isnt used when you have a pair of s letters next to each other. Its most commonly used if you have long vowels beforehand. See “Trasse” vs “Straße”.

    Perhaps worth adding that we had a spelling reform in 1996, which kind of put this rule in place.If you learned German before then or had a teacher who learned it before then, it's possible that you got taught it the old way...

  • Man kommt sich eben vor als hätte das Management einen Vorschlaghammer gefunden, sich gedacht mit Hämmern kann man doch Nägel reinhauen, und meine eigentliche Aufgabe ist es ein Rad auszuwuchten...

    Es kommt eben wirklich zusammen, dass sie eine Lösung gefunden haben für die sie Probleme suchen, die sich damit lösen lassen, und dann auch noch keine Ahnung haben, was für Probleme ich in meinem Job lösen muss.

  • Usually, the desktop environment devs come together and standardize on something. But yeah, someone has to drive that effort. Open-source isn't really something you plan, you just need someone to push for it.

  • Oh yeah, I'm not saying this is what makes Rust special. Rust's strength in comparison to Bash is that it's a lot more competent at control flow and structuring programs. But yeah, virtually any programming language is at least better at that than Bash, so whichever one you're most comfortable with, is probably the best choice. This trick just allows you to make use of Bash's biggest strengths, which is easily running commands and piping between commands, while also having the competent control flow and structuring of your programming language of choice.

  • "I think proc macros are a really big superpower for Rust."

    Yeah, been working on a framework and proc-macros are really useful to simplify the API.

    For example, previously I needed users to define a struct and then an impl block with a function inside. Well, and they need to do that a lot, so it was genuinely a bit of a pain to write out, but it also made the code feel more complex than it really was.

    Now I've got an annotation, which you can slap onto a function and then it generates the struct from the function parameters and puts the function into the impl block.And while you do need to be aware that the function parameters will be put into a struct and therefore you want owned parameters, all-in-all it still feels really nice to just delete dozens of boilerplate lines and an indentation level in the codebases where I've introduced it.

  • One of the simplest tricks is that you can throw down a function, which you can call with a command like e.g. this: run("cat /etc/os-release | grep NAME")by constructing a Command like so:

     rust
        
    Command::new("sh")
        .arg("-c")
        .arg(command) //the string passed as parameter
    
      

    There's proper libraries to make running commands even easier and more robust, but if you don't want to pull in a library, that's really easy to write out ad-hoc and gets you 95% of the way there, with shell piping and everything.

  • Ich denke, das ist der Unterschied, verstehen vs. auswendig lernen.Also bin bei dir, algorithmisches Denken darf gerne geübt werden, und auch grundsätzlich fand ich es immer angenehm zumindest einmal gesehen zu haben, dass/wie sowas auch ohne Taschenrechner berechenbar ist.Aber ja, das zum Erbrechen zu üben, nur dass man dann wenig später, das immer mit Taschenrechner macht, halte ich jetzt auch nur begrenzt für hilfreich.

  • Jo, einfach der krampfhafte Versuch etwas zu hypen, wo es nichts gab, was irgendwie geil wäre. Das ganze Konzept gab es schonmal mit besserer Grafik in Second Life in 2003. Und da musste man sich auch nicht irgendwie eine VR-Brille umschnallen, um das benutzen zu können.

  • Luanti Meisterrennen

  • Also requires a plugin, so probably not your thing, but KDE with the Krohnkite KWinScript also works decently well.

  • I have a big collection of Creative Commons songs. And I wrote a little web music player to stream from my home-server, which I use for listening when I'm working from home, since I didn't want to install a music player on my work laptop..

  • Originally, it was not even a structured programming language, so it did not have if/else or loops. Everything was done with go to, from what I understand...

  • :l

  • I really don't agree with saving keypresses being a useful metric, since auto-completion is a thing and code is read significantly more often than it is written. I am also a staunch opponent of abbreviations being used for variable names.

    But I will say that I don't mind abbreviations in keywords, since well, you need to learn the meaning either way.And yeah, I've come to somewhat like them being used for keywords, since it reduces visual noise where it really isn't useful, and it distinguishes keywords from actual code.Ultimately, keywords are just syntax where letters were used instead of a symbol. You do read them like a symbol, so if they don't look like a real word, that seems to work quite well for my brain.

  • Well, you'd typically put the loops into a function and then do an explicit return to jump out of there. I believe, there's some use-cases where this isn't possible, which is why I'm cool with loop labels existing, but I've been coding Rust for seven years and have not needed them once...

  • I'm not sure, what you mean by "Chekhov's footgun", but well, it isn't a footgun, so you won't accidentally return a wrong value from the function, if that's what you're thinking.

    It's not a Rust invention, most functional programming languages have implicit returns, but basically think less of them as a function return and more just as the value that a scope evaluates to.

    So, here's a simple example:

     rust
        
    let sum = {
        let x = 5 + 9;
        3 * x
    };
    
    
      

    Obviously, this is an extremely contrived example, but yeah, as you can see, it does not even have to involve a function. The implicit return makes it so that sum is set to the result from 3 * x.And the scope-braces are nice here, because you can do intermediate steps without having x in scope for the rest of your function.

    In practice, if you see scope-braces and the line at the end does not have a semicolon, then that's the value that the whole scope evaluates to. Those scope-braces can also be the braces of a function, but then you need to annotate what the function is going to return, too, so it's practically impossible to return a wrong value.

    Well, and I would actually argue that explicit returns are a footgun in comparison.Because someone might introduce clean-up code at the end of the function and not realize that an explicit return skips that clean-up code, somewhere further up in the function.The implicit return always has to be at the end of the scope, so it's not possible to accidentally skip code.

  • Rust Programming @lemmy.ml

    When I have an Option<Result<T, E>> but need a Result<Option<T>, E>

  • Rust Programming @lemmy.ml

    Announcing Rust 1.85.0 and Rust 2024

    blog.rust-lang.org /2025/02/20/Rust-1.85.0.html
  • Luanti community @lemmy.ml

    Luanti 5.11.0 released!

    blog.luanti.org /2025/02/14/5.11.0-released/
  • ich_iel @feddit.org

    ich🥬iel

  • Dungeon Crawl Stone Soup @lemmy.ml

    Offense is the best defense?

  • ich_iel @feddit.org

    ich🤹🏽iel

  • Dungeon Crawl Stone Soup @lemmy.ml

    The game really doesn't want me in that volcano

  • Programmer Humor @lemmy.ml

    IEEE 754

  • Famose Worte @feddit.org

    Strahlenbüschel

    de.wikipedia.org /wiki/Strahlenb%C3%BCschel
  • Dungeon Crawl Stone Soup @lemmy.ml

    New PB for quickest death

  • Programmer Humor @lemmy.ml

    Still wild to me that we built webpages like this

  • Programmer Humor @lemmy.ml

    Valid LilyPond syntax

  • Tan Eggs @lemmy.ca

    Camouflaged

  • ich_iel @feddit.org

    ich🥄iel

  • Dad Jokes @lemmy.world

    Cyanide and Door Business

  • Linux @lemmy.ml

    Have the patents for H.264 MPEG-4 AVC expired yet?

    meta.wikimedia.org /wiki/Have_the_patents_for_H.264_MPEG-4_AVC_expired_yet%3F
  • ich_iel @feddit.org

    ich🖨️iel

  • Programmer Humor @lemmy.ml

    When you're asked to sprinkle software engineering onto data science projects ✨

  • ich_iel @feddit.org

    ich🚮iel

  • Programmer Humor @lemmy.ml

    When you're supposed to use Rust, but you only know Python...

    crates.io /crates/inline-python