Posts by fraggle@octodon.social
(DIR) Post #AUxV1opoRMKluYj0ts by fraggle@octodon.social
2023-04-14T15:26:54Z
0 likes, 0 repeats
The Info-ZIP website about unzip proudly boasts that it is "The Third Most Portable Program in the World!"https://infozip.sourceforge.net/It gives some context about why the source code is the way it is. From a casual browse of the manpage and the source code I learned about the existence of at least five (obsolete) operating systems I was never previously aware of. It even has code to support the Sinclair QL, the first computer I ever used back in the '80s.But even putting aside from the utter unmaintainability of the codebase, it's a foolish portability. There are two reasons why: firstly, it's certainly not tested on those operating systems any more. Chances are, the codebase is probably broken on most of the obscure systems it claims to support. Secondly, the extreme reliance on ifdef conditionals is not evidence of portability: rather, it shows the opposite. It's evidence that the code has been *ported* at some point to all these systems, but apparently to do so required piles and piles of hacks to get it to work.Good, portable code is clean. It just works, and doesn't require these kinds of hacks. Sure, sometimes there are system-specific features that you want to include support for. If you have clean interfaces, you can do separation-of-concerns where you keep that kind of thing separate from the main codebase. There's nothing like that here.
(DIR) Post #AUxV1pVHx9VjzC88Y4 by fraggle@octodon.social
2023-04-15T14:41:04Z
0 likes, 0 repeats
I couldn't help myself and last night started attacking unzip with @fanf 's excellent unifdef tool to see what could be done.https://github.com/fragglet/antizip/commits/mainIt's like pulling weeds: you pull out one #define and then you find there are more. And more and more and more and more.
(DIR) Post #AUxV1qLko5Tibug2KG by fraggle@octodon.social
2023-04-15T14:53:39Z
0 likes, 0 repeats
Perfectly normal codebase
(DIR) Post #AUxV1qt4oC8KHGGeGW by fraggle@octodon.social
2023-04-16T16:33:12Z
0 likes, 0 repeats
"This flag is completely redundant now, but we kept it anyway. Just in case. For some reason."Also there are two flags that do the same thing.
(DIR) Post #AUxV1rb2AlIMTapkmW by fraggle@octodon.social
2023-04-16T16:42:44Z
0 likes, 0 repeats
Did you know: Linux is based on System V Unix. QNX too.
(DIR) Post #AUxV1s9m5b5IDL5Uvo by fraggle@octodon.social
2023-04-16T16:50:32Z
0 likes, 0 repeats
Have you ever wanted a broken, less functional version of more(1)? You got it! The PAGER environment variable? What's that?
(DIR) Post #AUxV1sxl5l4CiMTPqC by fraggle@octodon.social
2023-04-16T16:53:46Z
0 likes, 0 repeats
Presented without comment.
(DIR) Post #AUxV1tU19os4KPZB7g by fraggle@octodon.social
2023-04-16T17:03:44Z
0 likes, 0 repeats
Sorry, no -x argument for the command line version on Classic MacOS (wait, the what?). Can you spot the difference between VM_CMS and !VM_CMS? If you can, you win this cookie: 🍪
(DIR) Post #AUxV1u1L9vWfzl9n3w by fraggle@octodon.social
2023-04-16T17:12:17Z
0 likes, 0 repeats
It is vitally important that the help text fits on a single screen. We won't even use our broken internal pager.
(DIR) Post #AUxV1ucYvXIfrCZW52 by fraggle@octodon.social
2023-04-16T17:18:15Z
0 likes, 0 repeats
What is the best place to document a library? I have one hammer, and it is command line arguments. Does anyone know, what is a Unix DLL?
(DIR) Post #AUxV1vRFt3qkOQI05w by fraggle@octodon.social
2023-04-16T17:21:12Z
0 likes, 0 repeats
We made another command, but in case you hate that idea, I can pretend to be it.
(DIR) Post #AUxV1w3Bc2BuI42IDY by fraggle@octodon.social
2023-04-22T14:39:13Z
0 likes, 0 repeats
So I've halved the side of the unzip codebase mostly just with liberal use of unifdef to cut out most of the crap. There's still more to delete
(DIR) Post #AUxV1wj16VeSNnbhQ0 by fraggle@octodon.social
2023-04-23T22:10:25Z
0 likes, 0 repeats
Very important comments
(DIR) Post #AUxV1xUAHDMik1fLuK by fraggle@octodon.social
2023-04-23T23:07:24Z
0 likes, 0 repeats
Codebase is now down to <13kLOC - it was originally >30k. I'm running out of really big chunks of code to delete now, although there may still be some unused constants that can go
(DIR) Post #AUxV1yAhj3OQrxZKDI by fraggle@octodon.social
2023-04-23T23:19:04Z
0 likes, 1 repeats
Good example of the kind of stuff I was able to just throw out. unzip has a huge amount of complicated code just for showing its version information. That includes details about all its compile flags, plus a huge chain of ifdefs to make sure it shows the operating system (in case you don't know what OS you're running I guess). Also, the decryption code has its own special internal version number, for... some reason https://github.com/fragglet/dezip/commit/b02bf449f9df83ec232dfa6315cc9e795a6ad094
(DIR) Post #AV1UvkmRNXX4EQ5yK0 by fraggle@octodon.social
2023-04-25T21:34:23Z
0 likes, 1 repeats
Baffling that this is even a "debate". I'll never understand it
(DIR) Post #AVM7opJtssnreqdGjI by fraggle@octodon.social
2023-05-05T16:05:59Z
0 likes, 1 repeats
All the doomsday talk about AI destroying humanity certainly makes for an entertaining circus while climate change marches on.
(DIR) Post #AVU8m5LE01LoGOTduy by fraggle@octodon.social
2023-05-09T16:41:23Z
1 likes, 0 repeats
(DIR) Post #AWUpvF1T7V3HrOijjc by fraggle@octodon.social
2023-06-08T22:56:12Z
1 likes, 4 repeats
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
(DIR) Post #AWrbqHcyF6M0dR5E4e by fraggle@octodon.social
2023-06-19T17:30:22Z
0 likes, 3 repeats
I have to admit I love this