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/)C
Posts
0
Comments
522
Joined
3 yr. ago

  • With your definition this conversation doesn't make sense though. Since rust's direct array access doesn't perform bounds checks when building in release mode. And it doesn't require using unsafe.

  • As I said, I don't consider going out of bounds of a buffer a memory safety issue. Forcing the programmer to handle an out-of-bounds case every time there is an array access can be incredibly tedious. So much that not even rust forces you to do so. And if that language has iterators, it's even less of an issue.

    I consider out-of-bounds array access to same as casting a pointer to another type. Just because a language lets you do it, it doesn't mean that it is not memory safe. It is a performance feature, since checking the bounds every time is always possible (and incredibly easy to implement), but also with too big of an impact when you could just check the length once per loop instead of per loop iteration.

  • How can you not have memory-safety while also having a garbage collector?

    Garbage collection means that all objects live as long as you have a reference to it. Which means that you can only dereference a pointer to invalid memory if you willingly create an invalid pointer, or reinterpret the type of one pointer into another. Going out of bounds of an array counts as the first case.

    If a language has garbage collection but no compiler/interpreter supports it, then the language doesn't have garbage collection.

  • Null safety and memory safety are different features.

    Null safety means that you cannot access a struct's fields without first checking if the pointer to that struct isn't null. And this must be a compile-time check.

    Memory safety means that you cannot read or write to/from memory that has been free-ed. Without leaks ofc, otherwise it would be very easy.

  • I kinda disagree. The reason rust caught on is because it is much safer than C++ while having the same or even better performance. And in some contexts, being garbage collected means bad performance.

    Before rust you could either have a fast language (C/C++) or a memory safe language (any other language. That is, languages with garbage collector). But if you required memory safety and peak performance, there wasn't any option.

    Yes, the reason that rust is both memory safe and fast is because it has a borrow checker. But the borrow checker is the means, not the end.

  • True

    Jump
  • Your library has dedicated parking?

  • It is not. App X creates image A with location data.

    App Y without location permission accesses image A in read mode. Now image A has no location.

    You open image A again from app X and the location is no longer there. It makes no sense. Had app Y written to image A, it makes sense that location data was stripped. But opening a file in read mode should not alter it. Except for metadata of the kind "last opened at ...".

  • Your Airbnb was someone's home.

  • Having more people always adds overhead. It's not only software developers.

    You don't need to have two developers working on the same piece of code, you can have each one working on a feature. And different teams can develop different projects/products. If a project takes 1 year to complete but you want an output of 2 projects per year, you don't need to overwork your current employees. You can hire a new team so there are 2 simultaneous projects being worked on at the same time.

  • The answer depends on a LOT of things. Most importantly country of origin.

    If you're from Latin America, most people won't even notice. Since we already have huge amount of Latin American immigrants, so we are used to it.

    If you're from a "white" country, it's very important that you are respectful to the local culture and try to genuinely learn Spanish. This is mostly a problem with tourists instead of immigrants, but most Spaniards hate with passion when foreigners complain about things not being in English/German/french/whatever.

    If you're from a "black" country, it depends on where you move to. In some parts of Spain you'll inevitably face a lot of racism. In others, you'll find groups of people that will try to protect you. But as always, there's always at least some racists.

    And of course, don't do crime. But that goes for locals too.

    And I think this is a global advice. But people will instantly judge if you are lazy or hard-working. If you help your local community without asking much in return, people will probably talk about how hard working you are, and even racists will probably say "for being for country X, he's a nice guy".

  • Sometimes you can't not have a god class (struct in this case). When doing UI specifically, I always end up with one.

    You can try using encapsulation to reduce the amount of fields technically, but in the end it's the same amount of information in a single god class.

  • The supreme court gave total immunity to the president while Biden was president. He didn't use it a single time.

  • I don't know how hackaday works. Is literally anyone allowed to write articles full of non-factual information?

  • Rust: has stronger typing than C. This guy: I don't like rust since it's weakly typed.

    Also this guy: doesn't uses cargo because it downloads from the internet without taking the 5 seconds of research to know that --offline exists.

    Also this guy: I don't like that rust calls C unsafe. It's safer than assembly.

    The guy is just dumb as rocks.

  • I'm not talking about the technical possibility. Of course you can have multiple video stream, one per participant.

    I'm saying that without multicast, it can be more resource intensive than having intermediate servers that can multicast on the application layer.

  • Is a connection between 3+ people still p2p? Or is there another term for it?

    I don't know how this would work over the internet though.

    On a LAN you could use multicast, but I don't think ISPs support multicast, it seems like it would be an easy way to DoS. But I honestly don't know.

    So, if you can't multicast, the way to have serverless multi-user video calls would be to have a separate video feed for each receiver, which I can see using more resources than through a server that would replicate the stream to all the receivers. Of course this is dependant on distance, even without multicast it consumes more resources if everyone is in the same LAN.

  • Slice as chunks is huge. I would prefer an unsafe &[T] as &[T;N], but this can be used for that too.

  • There are no words that can express the same as curse words. Otherwise, we wouldn't use them as much.

    Words are words. And they are used to communicate. I don't understand the American panic about this small set of words. They are words like any other.

    Non-american countries also have some people that panic about curse words, but I don't think they match the level of panic of Americans.

  • I'm surprised they at least know they have a problem. I would think these companies would just say "look how the sales numbers haven't changed, that means that we were correct in doing the AI thing. Without it, sales would be sinking into the ocean!"