• 0 Posts
  • 18 Comments
Joined 10 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.




  • This is that “enlightened centrism” false equivalence.

    I honestly can’t believe that in good faith you can compare Biden and Trump as equals.

    One is a president whos platform is making minimal change.

    The other is a president whos platform is to tear down democracy and human rights.

    If you honestly can look at these two and say they are equal than I have to conclude you are at least indifferent to maintaining democracy and human rights.

    I know the “counter argument” is about Biden and Israel/Gaza, but the thing is, that’s not really up for debate because I don’t believe there’s any chance Trump would be better about Gaza.

    There are 2 options:

    • death in Gaza and status quo in the US
    • death in Gaza and loss of human rights and possibly our democracy in the US

  • WolfLink@lemmy.mltoMemes@lemmy.mlChad VLC
    link
    fedilink
    arrow-up
    37
    ·
    8 months ago

    libvlc uses libavcodec

    VLC relays on ffmpeg for a lot of video decoding, as do lots of other media programs. Go look up the legal notice on your TV and there’s a good chance the ffmpeg licensing information is in there.







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