• 0 Posts
  • 88 Comments
Joined 1 year ago
cake
Cake day: September 2nd, 2023

help-circle
  • The thing about UB is that many optimizations are possible precisely because the spec specified it as UB. And the spec did so in order to make these optimizations possible.

    Codebases are not 6 lines long, they are hundreds of thousands. Without optimizations like those, many CPU cycles would be lost to unnecessary code being executed.

    If you write C/C++, it is because you either hate yourself or the application’s performance is important, and these optimizations are needed.

    The reason rust is so impressive nowadays is that you can write high performing code without risking accidentally doing UB. And if you are going to write code that might result in UB, you have to explicitly state so with unsafe. But for C/C++, there’s no saving. If you want your compiler to optimize code in those languages, you are going to have loaded guns pointing at your feet all the time.


  • I recently came across a rust book on how pointers aren’t just ints, because of UB.

    fn main() {
        a = &1
        b = &2
        a++
        if a == b {
            *a = 3
            print(b)
        }
    }
    

    This may either: not print anything, print 3 or print 2.

    Depending on the compiler, since b isn’t changed at all, it might optimize the print for print(2) instead of print(b). Even though everyone can agree that it should either not print anything or 3, but never 2.


  • If you want to use instructions from an extension (for example SIMD), you either: provide 2 versions of the function, or just won’t run in some CPUs. It would be weird for someone that doesn’t know about that to compile it for x86 and then have it not run on another x86 machine. I don’t think compilers use those instructions if you don’t tell them too.

    Anyway, the SIMD the compilers will do is nowhere near the amount that it’s possible. If you manually use SIMD intrinsics/inline SIMD assembly, chances are that it will be faster than what the compiler would do. Especially because you are reducing the % of CPUs your program can run on.





  • We need to differentiate between those cases because they are 2 distinct cases. And they are very different.

    They don’t even have the same purpose. The purpose of a human learning is: fulfill a desire to learn or acquiring a new skill that will be useful to fulfill another desire. The purpose of AI learning is: increase the value of the model so it can be sold for more.

    Lemmy is not an entity that is capable of thought. And I’m not Lemmy. I’m just another person and what you are reading is my opinion.

    “Publishers are bad and greedy, therefore everything that hurts them is good for society” is a childish take imo. Not everything is black and white. Copyright exists for a reason. Just removing it won’t make the world better. A law being flawed doesn’t make it worse than not existing.




  • So because you don’t understand it, everything it does should be legal?

    It’s not rare maths. There are trns of thousands of AI experts. And most CS graduates (millions) have a good understanding on how they work, just not the specifics of the maths.

    Yeah, they’re not selling a copy, they are just selling a subscription to a copying machine loaded with the information needed to make a copy. Totally different.

    I should start a business of printers and attach a USB with the PNG of a dollar bill. And of course my printers won’t have any government mandated firmware that disables printing fake money.

    I’m not printing fake money! It’s my clients! Totally legal.




  • If the solution is making the output non-copyrighted it fixes nothing. You can sell the pirating machine on a subscription. And it’s not like Netflix where the content ends when the subscription ends, you have already downloaded all the not-copyrighted content you wanted, and the internet would be full of non-copyrighted AI output.

    Instead of selling the bee movie, you sell a bee movie maker, and a spiderman maker, and a titanic maker.

    Sure, file a copyright infringement each time you manage to make an AI output copyrighted content. Just run it on a loop and it’s a money making machine. That’s fine by me.