• 2 Posts
  • 23 Comments
Joined 9 months ago
cake
Cake day: February 21st, 2024

help-circle



  • The thing is, we either get 2 more years of Biden, or 2 more years of Trump. Besides this one issue I don’t think Biden has been that bad. Trump and more broadly republicans have publicly declared their intent to move the country towards a dictatorship.

    In the election 2 years from now, if Biden is the president, we will have an interesting primary to see who is the next DNC candidate. If Trump is president, I’m not sure the country will be in a state where that’s possible (not to mention that if it doesn’t get that bad, the DNC will likely put Biden on the ballot regardless of what happens this year).







  • The way you recover data from a totally dead drive is use a program that scans every byte and looks for structures in the data that look like files e.g. a jpeg will have a header followed by some blocks of content. In an encrypted drive everything looks like random data.

    Even if you have the key, you can’t begin searching through the data until it’s decrypted, and the kind of error that makes it so your drive won’t mount normally is likely to get in the way of decrypting normally as well.



  • The NTFS one is a Samsung EVO 860 1TB. The ext4 is a cheapo generic brand 256GB.

    I’ve got an AMD 5950X CPU. The motherboard is Aorus X570 Elite. Not sure about the SATA controller except it’s whatever comes with that motherboard.

    In my searching I found something about Ubuntu changing ntfs and ext4 drivers, but I’m not sure if that’s a change between 20.04 and 22.04 or an earlier one. Also the fact that it’s both drives makes me think it’s probably something else going on.

    What I do know is something weird is going on, and my googling so far hasn’t gotten me any good results (just things about not being able to mount drives in the first place, or mounting drives as read only, neither of which are this situation).




  • The malicious code wasn’t in the source code people typically read (the GitHub repo) but was in the code people typically build for official releases (the tarball). It was also hidden in files that are supposed to be used for testing, which get run as part of the official building process.



  • Say I’m doing what you describe, operating on the same data with different functions, if written properly couldn’t a program do this even without a class structure to it? 🤔

    Yeah thats kinda where the first object oriented programming came from. In C (which doesn’t have classes) you define a struct (an arrangement of data in memory, kinda like a named tuple in Python), and then you write functions to manipulate those structs.

    For example, multiplying two complex vectors might look like:

    ComplexVectorMultiply(myVectorA, myVectorB, &myOutputVector, length);

    Programmers decided it would be a lot more readable if you could write code that looked like:

    myOutputVector = myVectorA.multiply(myVectorB);

    Or even just;

    myOutputVector = myVectorA * myVectorB;

    (This last iteration is an example of “operator overloading”).

    So yes, you can work entirely without classes, and that’s kinda how classes work under the hood. Fundamentally object oriented programming is just an organizational tool to help you write more readable and more concise code.


  • To add to this, there are kinda two main use cases for OOP. One is simply organizing your code by having a bunch of operations that could be performed on the same data be expressed as an object with different functions you could apply.

    The other use case is when you have two different data types where it makes sense to perform the same operation but with slight differences in behavior.

    For example, if you have a “real number” data type and a “complex number” data type, you could write classes for these data types that support basic arithmetic operations defined by a “numeric” superclass, and then write a matrix class that works for either data type automatically.