When in doubt, use brute force.
-- Ken Thompson in an entirely different context
After having lost around 20kg since new year's, I decided to test my deadlift strength. I had a goal of 220kg (aka 5plate) in mind, which would be 10kg below my PR. It was a bit of a struggle...
With Go you get statically linked executables, right?
% go build % file unreadMail unreadMail: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped % GOARCH=arm go build % file unreadMail unreadMail: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped % CGO_ENABLED=0 go build % file unreadMail unreadMail: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
The answer is a clear sometimes. Apparently the import of net causes the executable to be dynamically linked, since it uses CGO. Unless you disable CGO entirely. I would like an option to force go build to statically link or fail if not possible, please. Implicit behavioral changes are not my thing.
[Update 20170815:] You can still force Go to produce a statically linked executable by invoking an external linker and using a libc that fully supports static linkage, i.e. not GNU libc. My favorite so far is musl with its gcc wrapper:
CC=/usr/bin/musl-gcc go build -ldflags ' -linkmode=external -extldflags "-static"'
Not pretty, but better than dynamically linked executables...
Turns out, I don't really use the lower handles on my prowler, so I took them off. Probably the first time I used an angle grinder to cut.
Or: "Print the internet"
Wherein I expand on the reason I wrote (lib)UnreadMail:
I wanted to reduce my time on electronic devices. A big chunk is devised to checking my mails, or at least that's the initial intent - I use unreadMail now to automatically check my mail and print it out. I decide then if I need to go online or if it can wait. This setup only works because of proper spam control, otherwise things would be flooded. Here's the rough outline of what I did:
I know that this wastes paper. But I also know, that the alternative wastes my time.