• 0 Posts
  • 199 Comments
Joined 2 years ago
cake
Cake day: September 2nd, 2023

help-circle

  • One of the techniques I’ve seen it’s like a “password”. So for example if you write a lot the phrase “aunt bridge sold the orangutan potatoes” and then a bunch of nonsense after that, then you’re likely the only source of that phrase. So it learns that after that phrase, it has to write nonsense.

    I don’t see how this would be very useful, since then it wouldn’t say the phrase in the first place, so the poison wouldn’t be triggered.

    EDIT: maybe it could be like a building process. You have to also put “aunt bridge” together many times, then “bridge sold” and so on, so every time it writes “aunt”, it has a chance to fall into the next trap, untill it reaches absolute nonsense.








  • The easiest solutions to the US problem are already solved in most other western countries. That’s why the US is the first (and at this time, the only one) that turned fascist.

    Legal guns are uniquely a US problem. Having a system that only allows 2 political parties is a uniquely US problem. Limitless (in the billions!) political donations is a uniquely US problem. Relying on the stock market for retirement is a uniquely US problem.

    I’m not saying that the rest of the western countries turning fascist is impossible, but it’s much harder. Most fascists are contained to their fascist political party. So until there aren’t enough fascist individuals, they can be mostly ignored. Of course, once they are enough fascists, the fascist party will inevitably win, and there’s nothing that can stop them at that point.


  • Simple.

    1. I’m reading tab A
    2. Tab A links to tab B
    3. Open B in new tab, since I know I’m going back to tab A soon.
    4. Go to tab A
    5. Go to tab B again
    6. I’m finished reading tab B so I close it.

    Notice how I didn’t close tab A. Because at that point, I was not in tab A, therefore I don’t think about that tab much so I don’t even think if I should close it or not. Tab A will probably stay open until I decide to clean my tabs when there are 50+ tabs on them.

    Another common scenario:

    1. I’m reading tab C
    2. Something comes up that makes me either switch to another task or shut down the computer

    From this point there are 2 paths: either I never resume the task I opened tab C for, so it stays there for a long time, or I resume the task when tab C is too far up (I use vertical tabs), so I open tab D that is the same webpage as tab C. When I finish I close tab D, but tab C remains for a long time.



  • I see you ignored my entire comment.

    I don’t know what is more explicit about expect. Unwrap is as explicit as it gets without directly calling panic!, it’s only 1 abstraction level away. It’s literally the same as expect, but without a string argument. It’s probably top 10 functions most commonly used in rust, every rust programmer knows what unwrap does.

    Any code reviewer should be able to see that unwrap and flag it as a potential issue. It’s not a weird function with an obscure panic side effect. It can only do 2 things: panic or not panic, it can be implemented in a single line. 3 lines if the panic! Is on a different line to the if statement.


  • An unhanded error will always result on a panic (or a halt I guess). You cannot continue the execution of the program without handling an error (remember, just ignoring it is a form of handling). You either handle the error and continue execution, or you don’t and stop execution.

    A panic is very far from a segfault. In apparent result, it is the same. However, a panic is a controlled stopping of the program’s execution. A segfault is a forced execution stop by the OS.

    But the OS can only know that it has to segfault if a program accesses memory outside its control.

    If the program accesses memory that it’s under it’s control, but is outside bounds, then the program will not stop the execution, and this is way worse.

    EDIT: As you said, it’s also an important difference that a panic will just stop the thread, not the entire process.





  • You can’t shrink the yardstick down to an infinitesimal size.

    Coastlines are not well defined. They change in time with tides and waves. And even if you take a picture and try to measure that, you still have to decide at what point exactly the sea ends and the land starts.

    If the criteria for that is “the line is where it would make a fractal” then sure, by that arbitrary decision, it is infinite. However, a way better way to answer the question “where is the line” is to just decide on a fixed resolution (or variable if you want to get fancy), which makes the distinction between sea and land clearer.

    It is like saying that an electron is everywhere in the universe, because of Heisenberg’s uncertainty principle. While it is very technically true, just pick a resolution of 1mm^3 and you know exactly where the electron is.