And then the first non-comment line is: #include <X11/Xlib.h>
Which itself is over 4000 lines and includes tons more code.. It's a pretty meaningless metric.
And then the first non-comment line is: #include <X11/Xlib.h>
Which itself is over 4000 lines and includes tons more code.. It's a pretty meaningless metric.
When someone does a python one liner that just calls a library or something that relies on boost, the point is lost for anyone hoping to have a minimal example.
Hardly. Including standard libraries in the line count wouldn't mean much, unless you're the compiler.
Doing it this way lets you know how many lines are likely to have problems. Not to mention how much code the guy wrote.
The code in X11 libraries is infinitely closer to a window manager than what this guy wrote. This is barely anything at all added to work that other people did already.
http://www.verisoft.de/PublicationPage.html
The high-assurance community also did a low-complexity GUI:
This "classic troll comment" appears with reasonable frequency in the demoscene: "your 4 kilobyte binary depends on gigabytes of OS libraries" --- and is countered the same way: "as opposed to a multi-gigabyte application also depending on same."
https://en.wikipedia.org/wiki/Comparison_of_X_window_manager...
Just as web developers could write x lines of code that run on any web browsers and engines.
A more meaningful objection is that you link with -lX11, which is a significant amount of actual code. But apart from "what about libc and the kernel" counterarguments, the X protocol is actually pretty straightforward - I'd bet you could write this with just socket syscalls in about as many lines of code, too. (Which is to say, an embedded system without libX11 could implement a window manager for a remote machine given just ~100 lines of C or similar and a TCP stack, and the TCP stack is only required because it's remote, anyway.)
X11 is part of the system, just like glibc...
"Here's this lovely new functional language!... written in Haskell, using Haskell's entire runtime as a basis."