In a previous blog entry I had discussed building a tiny linux distro and ended up with ~1 MB kernel + ~1.5 MB busybox initrd which worked fine for my purposes. While that was fairly quick and easy (and pretty barebones), I wanted to see how I would fare by following the standard Linux From Scratch instructions while tweaking things to meet the following requirements as well:
- stay small(ish)
- use git to keep track of the code for the packages used in it
- use git tags for version control of those packages
- can be rebuilt by running make
- use zig cc to build all of the stuff that needs C (optional?)
Now, LFS just gives links to downloadable tar.gz files and that doesn't match requirements 2 and 3 listed above so I decided to see if I could get our AI overlords to help me with generating the git repos corresponding to each of those tgz packages. My attempt at "vibe coding" this is documented in fairly excruciating detail (see the git log for the prompts I used at each commit).
While it generated the code and the corresponding git repo links without too many mistakes, I realized that the git repos it generated, which were meant to point to the matching LFS packages weren't quite right. So I had to do the actual grunt work to figure out the right links.
Consider the rest of this blog as a rant - and also as yet another data point in the evaluation of whether the current crop of AI is going to be a major boost to software productivity especially in projects such as this.
I should probably add an AI generated image of "old man shaking fists at cloud" here in keeping with the vibe.
Some of what I'm listing below is quoted verbatim from the recent commit message that I made while adding the corrected git repo links.
To start off, LFS 12.3 has a list of 94 elements in its wget-list. The list generated by all of my prompting to ChatGPT/PerpelexityAI with suggestions to "add more stuff" and to check its work resulted in just 57 entries. So that is a fairly large group of 37 missing packages - so 57/94 gives ~60% "truthiness".
For the packages that it did list, many had the wrong versions. Some of the packages for which it got the correct versions were: groff, mpc, sed, zlib, patch, tar, gmp, m4, mpfr, grep, make, attr, flex, bzip2 and autoconf - 15 out of 57 for an overall "truthiness" rating of (57/94)*(15/57) == ~16%
In addition to the sins of omission, it added some made up packages that don't exist or it was confused about the names, for eg: awk, in addition to gawk and procps/procps-ng, net-tools, etc.
The worst part of all was the list of links to the git repos that it generated.
The entire point of this "vibe coding" exercise was not to make the coding easier - that is the most trivial part in some sense.
The real point of getting ChatGPT/PerplexityAI involved was to see if the grunt work of mapping from the packages to their git repos could be automated or at least made easier. And this is where it completely fell short. Most of the git repos that were generated do not exist so the data it generated is either old or atrophied (due to link rot, maybe?) so I ended up doing all of that work manually anyway.
So I don't have much of a choice except to give AI an 'F' for the work done so far.