Skip Navigation

User banner
Posts
2
Comments
55
Joined
2 yr. ago

  • Hulk looks like he’s about to release a sick new Eurodance song.

  • I drive an Auris station wagon Hybrid (aka, the US Corolla iM with bigger boot). I had a chance to drive multiple Yaris generations and honestly I am always surprised by how roomy it is inside. They made a perfect use of space - way better than VW did with Polo (smaller Golf), that’s for sure…

  • Two reasons for me, but they’re mainly because of the MagSafe:

    1. In the car, I just plop my phone onto the charger, and it holds it and charges it.
    2. At home, I also use iOS 17 Beta, so I can use the StandBy.

    Of course it has its drawbacks, but this assumes that I need to use my phone all the time (no), I can’t spare even 5 minutes to not charge, or that I need to top up from 10% to 100% in 5 minutes for some reason, which I don’t. If I do, then sure, I use the cable. Through the past year, I needed to charge my phone through the cable maybe twice.

  • No, you just update the number whenever you make any changes to how many apples you have.

  • First method does not store the number itself anywhere. Let's assume that you store apples. I come and ask you "How many apples do you have?". To answer, you go and count every single apple one by one and return me the number. It's very easy if you have a small number of apples, but if you have, let's say, 5000 apples - you can see how long it may take.

    Second option is you keeping a track of how many apples you have in stock by having it written down somewhere. If I ask you "How many apples do you have?" you just pull out your notepad and tell me the number. If you give me an apple, you just adjust the number you have written down already.

  • Getting the total number of all comments may be very resource heavy if there is a lot of comments.

    If it's just 5 comments, then the computer can quickly get them all from database and count how many of them are there. Now imagine if there is 50 000 comments and suddenly, you me and entire website ask "how many comments are there for this post?"

    Suddenly the computer is overwhelmed by the request and you may end up crashing it due to amount of tasks it has to do.

    It's way faster if instead of all of that, the computer kept track of a number of all comments and simply adjust it when comment is added or removed. It does not have to get all the comments and count how many are there, just simply return the number and you are done.

    But in the essence, you sacriface potential accuracy for speed. You may accidentally "desynchronize" the counter - if an user requests a removal of the same comment twice, and you don't check if that comment was not removed. Or, in theory, if two separate users add or remove a comment at the same time. This is called "race condition", which is common in multi-threaded computing.

  • Ok, so basically, there is multiple ways one could comment count. The most obvious option is to count the actual number of comments under the post. This might be in practice slow, as you must load all comments under the post. An alternative approach is to have a count variable for post, which is increased or decreased by 1 if post is added/removed. It's way faster to retrieve that variable, instead of getting all comments and counting the number of them. The problem starts if some anomaly happens that is not accounted for, so for example, if I request the same comment to be deleted multiple times. So that counter can be decreased more than once for the same comment. This could be fixed pretty easily:

     
        
    if comment_to_delete is deleted {
        // Do not do anything
        return
    }
    
    post.comment_count -= 1
    delete_comment(comment_to_delete)
    
      

    And yeah, I thought so too, but ever since I stumbled upon this bug, I think the way the comment count is stored is through the counter variable.

  • I accidentally made a post that has -3 comments.

    This happens because Lemmy does not count the actual number of comments that there are under the post, but instead there is a counter per post. This is not necessarily a bad thing, but it does not seem like the counter is every synced with the actual count of comments.

  • My only gripe that makes me stay with Mlem is lack of any method of saving/sharing just the photo of a post.

    EDIT: I meant Mlem, not Memmy.

  • As an author of one Lemmy front-end, I can confirm that you are potentially sharing your username and password. Unfortunately, there is no way for Lemmy front-end developers to, say, open a web socket to Lemmy instance and have you login through a web browser (which would be much prefered from security standpoint, but it is what it is).

    Furthermore, from what I see, many of such front-ends store your password, instead of just the Bearer token. Unfortunately, from what I get, there is also no way of invalidating the Bearer tokens right now, so in the event of it getting stolen - you’re f***ed.

    Now, couple of tips:

    • USE 2FA AUTHENTICATION. In the event of malicious app actually stealing your credentials, you are at least a little bit more protected by this layer.
    • Use password manager - do not use your banking password, please.
    • Only use trusted front-ends, and in the even of an app, only download versions from official sources maintained by the app author.
    • Make sure the instance you’re registered at has a valid HTTPS certificate.
  • …this is literally something an intern could write in a single afternoon.

  • I guess I am a cross between “Normie” and “Conservative”. I use macOS and Fedora daily, I watch MKBHD but also watch FOSS YouTubers. I use WhatsApp, but only because, in Netherlands, it’s impossible to live without it. I don’t use any Chromium, and I use Firefox, but I also use Safari.

    Fuck getting labeled.

  • I like 2019 more.

  • Thanks for the feature idea! I’ll add “Block Instance” function to my app.

  • No problem. Sorry for sounding a bit emotional, I had a rough few days 😅

  • Well, in case of Gimp for Windows, it also doesn’t help that it uses a modified GTK. So, when you start on Gimp on Windows, the program must load all the GTK libraries first, while on Linux the shared libraries are already loaded.

  • The issue was me setting “undetermined” as my preferred language. Turns out, you must press “X” in the web ui right next to the preferred language option.

    In the essence, preferred language may have “undetermined” and “null” (both displayed in the front-end as “Undetermined”) as a valid entry, while neither being the exact same value in back-end, but being the same for the front-end.

  • That was me. Sorry, was waiting for my brother’s results in the hospital, and I tried to occupy my mind with anything that’s not his health right now. I only slept for 3 hours in the past 32 hours 😅

    I’ll try to spell “renaissance” good next time.

  • …they are mates IRL.

  • Apple @lemmy.world

    Leomard - a native macOS client for Lemmy

    Apple @lemmy.ml

    Leomard - a native macOS client for Lemmy