this post was submitted on 23 Aug 2023
48 points (96.2% liked)

Programmer Humor

19512 readers
658 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Why do we need appimage when we can have single binary statically compiled executable?

Additionally, I can't really understand why are dynamically linked libraries so popular and how on earth anyone who ever had a ".dll / .so not found" error thinks this is a good idea.

The main idea as far as I understand was to be able to share code which I think everyone knows work only in theory, besides would it not be easier to just recompile the executable from source with updated dependency statically linked?

Other idea behind dlls were that you could replace a dll with different dll as long as the api was compatible which is very unlikely scenario for average people.

Yet another possible advantage would be that the library code is shared so it takes less space on disk which might be true for some libraries which are very common but on the other hand static compilation only includes the part of library code that is used by the program so it takes less space anyway and is more optimized.

So the reasons to use the dlls can be easily dismissed.

About the disadvantages - if the dll is not present the program will not work. It's quite simple and in my view if you create a program which does not work by itself then that's a failure on your side.

The dlls are just nightmare most of the time, static compilation for the win. (pic for attention)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

From Ellen Ullman's Close to the Machine:

"The project begins in the programmer's mind with the beauty of a crystal. I remember the feel of a system at the early stages of programming, when the knowledge I am to represent in code seems lovely in its structuredness. For a time, the world is a calm, mathematical place. Human and machine seem attuned to a cut-diamond-like state of grace.

...

Then something happens. As the months of coding go on, the irregularities of human thinking start to emerge. You write some code, and suddenly there are dark, unspecified areas. All the pages of careful documents, and still, between the sentences, something is missing.

Human thinking can skip over a great deal, leap over small misunderstandings, can contain ifs and buts in untroubled corners of the mind. But the machine has no corners. Despite all the attempts to see the computer as a brain, the machine has no foreground or background. It cannot simultaneously do something and withhold for later something that remains unknown[1]. In the painstaking working out of the specification, line by code line, the programmer confronts all the hidden workings of human thinking.

Now begins a process of frustration.

[1] clarifies how multitasking typically works, which was usually just really fast switching at the time of the book.