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

help-circle


  • The people in the picture are so used to working with assembly language, that even though they know the average person doesn’t know much about assembly, they assume the average person knows a little, which is already way more than the average person actually knows.




  • Makes sense because if you want to make freely available code but want to allow commercial projects to use it you want to use a liberal license because if your code is copy left licensed businesses won’t want to use it.

    I’ve seen this in action: I’ve seen a business reject working with one research group because their code was copyleft licensed, so instead they turned to another group offering a liberally licensed competitor.






  • 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.