• 1 Post
  • 16 Comments
Joined 1 year ago
cake
Cake day: September 7th, 2023

help-circle
  • First thing is to not mount it at all. Any writes to the overwritten partition will corrupt your data.

    Second thing: install system rescue cd to a live usb and boot it. Look into testdisk and photorec. It's been a while since I've had to use these tools, but I believe testdisk can restore the partition and photorec can find files in a file system that has been deleted. I would try running photorec first to save the recovered files to an external hard disk, and then testdisk to try restoring them. But disclaimer: it's been a while since I've had to do this, so my memory is foggy here.

    Good luck!



  • It would be interesting to see a breakdown by region on that statistic. I would say I work with about 80% Americans and 20% Europeans and Linux is definitely more popular amongst the Europeans. That said, a couple of my American colleagues have also switched from Macs to Linux, but not many people on my team use Jetbrains products (VS Code is more popular here). Overall, I would guess that Linux is more popular in Europe, South America, and Asia, while Apple is more popular in the US, but that's just a pretty rough speculation.




  • I’d really like to do some personal projects, both to learn new stuff and scratch my digital itches.

    Likewise. There are so many things I'd love to do. Hell, I'd even love to just practice and improve at things that I do in my day job. My current job requires golang and while I'm competent, I'm nowhere near the level of comfort that I want to be. And that's just the language, there are other libraries, technologies, etc. where I'd like to improve too.

    But unfortunately, I have to pace myself. And that basically means I can never do anything computer-related in my spare time. A part of me hopes that some day, I can reduce my hours, or just find a very chill job that still pays decently so I can do more important things in my spare time. But for now, this is the choice that I've made.



  • Yeah, I meant to include that in my post but forgot. I actually started out thinking that it wouldn't be too hard to implement on top of std::optional but then went down a rabbit hole to see if it already existing in the standard library.

    In any case, you could also always use abseil for features that haven't landed in the compiler yet. At work, I'm stuck on c++14, but having a great time using plenty of features from later versions thanks to abseil.


  • Overall, I agree. Exceptions are messy and make it difficult to reason about code. That said, I think the macro at the bottom is even worse. I think a better solution to the one posted in the article is to use std::expected instead. This gives you a typed union that allows you to return either a successful result or an error type.

    What's nice about it is that you don't need to add endless amounts of if success {...} else {...} blocks. You can use the monadic operations (and_then, transform, etc.) to add your logic as normal while letting the compiler smoothly take care of doing the error checks. (In fact, I really wish golang has something similar to this, it would get rid of the endless error checking you have to write manually.)

    I wasn't able to find an example using std::expected, and I tried writing one myself, but my version of g++ doesn't seem to support it yet. But here is a nice std::optional example that should be pretty close to what you would do with std::expected.


  • The fact that debug cycles are fast. I started out working in nanotechnology, and spending 3-4 days of fabrication -> electron microscope -> optical verification was soul crushing cause 99.9% of the work never led to anything and you practically never knew why.

    Software development is logical and predictable. It's (relatively) easy to break a large task down into small ones, prove to yourself that they will work, and compose them together to complete a large project. Sure, things go wrong here and there, but for the most part, you can be confident that whatever you're doing should work every step of the way... without having to worry that you committed some irrecoverable error at any step in the process.


  • Have participated in a few sports at the amateur level. Nowhere near the level of these guys - they're the best in the world at what they do and I could barely rank in the top 500 of the collegiate levels in my country. And I couldn't take it. I quit after just about 3 years of university level competition and never once thought about even trying at the open levels.

    Here's the worst part: if you're a spectator, all you think about is the tournament results. Nobody ever thinks about the preparation. The fact that you have to grind for so much time in practice, always asking yourself if it's enough and whether you're able to keep pace with the competition, let alone move up the ranks. Always asking yourself if you need to do even more.

    So I have no idea how people compete at this level and how they manage to keep it up for so long. And how they learn to cope with the defeats, not let it get them down, and to keep coming back after. Just getting back into that preparation mode with no guarantee whether it'll ever pay off. Just think about that again - you can work so fucking hard and bust your ass off, and still have no idea if you'll even qualify for the next tournament let alone do even better.

    Mad respect for all of these pros, especially when they have such long and storied careers as Zai. No matter what their results are, it takes a crazy amount of strength to do what these people do.





  • A few years ago we were able to upgrade everything (OS and Apps) using a single command. I remember this was something we boasted about when talking to Windows and Mac fans. It was such an amazing feature. Something that users of proprietary systems hadn’t even heard about. We had this on desktops before things like Apple’s App Store and Play Store were a thing.

    If this actually were Linux's killer feature, then Linux would have had a much higher market share by now.

    Make no mistake, this is my favourite feature of Linux as well, and I have never used a snap/flatpack/appimage in my entire life. But it doesn't have the kind of broader public appeal that you seem to be suggesting.