• 0 Posts
  • 73 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle


  • So the basic purpose of a library is to allow code that does some useful thing to be easily used in multiple programs. Like say math functions beyond what is in the language it self or creating network connections.

    When you build a program with multiple source files there are many steps. First each file compiled into an object file. This is machine code but wherever you have calls into other files it just inserted a note that basicly says connect this call to this part of another file. So for example connect this call to SquareRoot function in Math library.

    After that has been done to every file needed then the linker steps in. It grabs all the object files combines them into one big file and then looks for all the notes that say connect this call to that function and replaces them with actual calls to the address where it put that function.

    That is static linking. All the code ends up in a big executable. Simple but it has two big problems. The first is size. Doing it this way means every program that takes the squareroot of something has a copy of the entire math library. This adds up. Second is if there is an error in the math library every program needs to be rebuilt for the fix to apply.

    Enter dynamic linking. With that the linker replaces the note to connect to the SquareRoot function in math library with code that requests the connection be made by the operating system.

    Then when the program is run the OS gets a list of the libraries needed by the program, finds them, copies them into the memory reserved for that program, and connects them. These are .so files on Linux and .dll on Windows.

    Now the os only needs one copy of math.so and if there is a error in the library a update of math.so can fix all the programs that use it.

    For GPL vs LGPL this is an important distinction. The main difference between them is how they treat libraries. (There are other differences and this is not legal advice)

    So if math.so is GPL and your code uses it as a static link or a dynamic link you have to providd a copy of the source code for your entire program with any executable and licence it to them under the GPL.

    With LGPL it’s different. If math.so is staticly linked it acts similar to the GPL. If it’s dynamicly linked you only have to provide the source to build math.so and licences it under LGPL. So you don’t have to give away all your source code but you do have to provide any changes to the math library you made. So if you added a cubeRoot function to the math library you would need to provide that.




  • Because this is a science thread I’ll be a bit pedantic. Mostly because I think it’s an interesting topic. It’s a mass-energy equivalence (≡) and not just an equality (=) they are the same thing.

    So it’s meaningless to say convert mass into energy. It’s like saying I want to convert this stick from being 12 inches long to being 1 foot long.

    You can convert matter (the solid form of energy) into other types of energy that are not solid. But the mass stays the same.

    It’s like when people say a photon is massless. It has energy and therefor mass. It just has no rest mass. So from the photons frame of reference no mass but from every other fame of reference there is mass.











  • Could be. Grateful and understanding does describe my two trans friends. However they we friends before they transitioned. So the relationship was established and they knew I cared about them.

    I knew one for ten years before they transitioned. So yeah I try not to dead name them but it takes time to adjust. For me it took about 2 years before I didn’t think of their old name and have to adjust it before speaking.

    I was talking about them with a mutual friend at a party. Someone I don’t know yells at me from across the room “we don’t use that name here.” I’m better friends with them then you and you just made the entire party aware of their status.

    Maybe it’s just the people who make it a big deal publicly and like to challenge people. They tend to be the most noticeable in the community.


  • Yeah I support trans rights. If you are consistent I’ll use your preferred pronouns. I don’t care what bathroom people use. Health care is between you and your doctor. I only care about what genitals you have if we are going to be doing things with each others genitals.

    That said so many trans people are complete assholes about it. I’m on your side but fuck so many of you are annoying jerks.

    I remember when gays started coming out of the closet and they handled it better. Polite but firm about being treated fairly. The trans community is making more foes then friends the way they are acting.