• 47 Posts
  • 2.46K Comments
Joined 6 years ago
cake
Cake day: May 31st, 2020

help-circle

  • Hmm, that sounds exactly like my setup. Weird.

    I did have the file created, with {} inside (empty Nix expression). If I git add it, it works as well:

    And yeah, I understand that it’s supposed to be a stacktrace, but other error messages look similarly horrendous and I can often only try to guess what’s wrong by reading the stacktrace top-to-bottom, so I’ve somewhat gotten used to doing that.

    But good to know that these terrible error messages might be a problem with my system. Thanks!


  • Hmm, that’s interesting. For me, it looks like this:

    I actually thought, it said somewhere in there, that the file isn’t staged, but apparently not even that (anymore?).

    You don’t happen to be using Lix or something, do you? I’ve heard that it’s supposed to have better error messages, but I was never sure how much better it might be…

    Edit: Perhaps I should add that those code locations it shows, are not from my code. Only the modules/terminal/new_file.nix in the second-last line is relevant.




  • Yeah, I was gonna say, that might be the root cause.

    In the vast majority of cases, you want Box<dyn Error + Send + Sync>, but folks tend to leave out the Send + Sync, because it looks like additional complexity to them, and because it doesn’t cause problems when they’re not doing async/await.
    It’s better to define a type alias, if you don’t want that long type name everywhere.


  • Huh, I’ve been using a directory named exactly like that for basically the same reason. Still not sure, how I feel about applications randomly deciding to throw a folder into there. I guess, it is much better than MuseScore deciding, fuck it, here’s a folder under Documents/, though.

    And while I’d prefer applications not to just randomly create folders in general, I can also understand that it’s a somewhat big ask from average users, where they’d like your random folder to be stored.




  • cfg_select! looks good. cfg_if! always added so much boilerplate that it rarely reduced complexity, even though it offered a valid solution for when you had a complex condition in one branch and then not() that in the other. It was also annoying that you had to add a dependency for those rare cases.

    We did also move away from cfg_if!, though, because IDE tooling would mostly just quit working within the cfg_if! macro call. Will have to see, if that’s better with this compiler built-in, or if the IDE tooling gets updated to support that well.



  • Ephera@lemmy.mltoMemes@lemmy.mlNever Forget
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 days ago

    Oh yeah, when I double-checked my information for the above comment, I also ran across this section, which is kind of wild (Hitler was clean-edge in some disciplines, while not at all in others):

    Hitler stopped drinking alcohol around the time he became vegetarian […] He was a non-smoker for most of his adult life, but smoked heavily in his youth (25 to 40 cigarettes a day); he eventually quit, calling the habit “a waste of money”. […] Hitler began using amphetamine occasionally after 1937 and became addicted to it in late 1942. Speer linked this use of amphetamine to Hitler’s increasingly erratic behaviour and inflexible decision-making (for example, rarely allowing military retreats).

    Prescribed 90 medications during the war years by his personal physician, Theodor Morell, Hitler took many pills each day for chronic stomach problems and other ailments. He regularly consumed amphetamine, barbiturates, opiates, and cocaine, as well as potassium bromide and atropa belladonna

    https://en.wikipedia.org/wiki/Adolf_Hitler#Health








  • A few years ago, there was someone from the customer side who was learning to code, and I was the most seasoned dev in that project, so it was kind of expected of me to give mild feedback when the guy presented what he had coded.

    And yeah, at some point, the guy showed off around 2000 lines of Python code in a single function. He explained the whole lot and I just sat there like, what the fuck, I don’t understand a thing.
    Thankfully, I wasn’t expected to give much feedback, so I just told the guy that modularization would be important. 🥴

    I would’ve loved for this to not be a customer situation, so that I could bluntly tell the guy that this seasoned dev is completely flattened by the complexity he deals with, because becoming good is about managing complexity rather than expanding your brain to fit all of it in there.