If your timeline is anything like mine, it's been awash in ChatGPT screen captures.
Not to get all "meta" in an intro of a "cool finds" daily(-ish) newsletter, or anything, but knowledge workers now truly do need to be ready for our "coal miner" moment. ChatGPT isn't going to kill [m]any jobs in present form. It makes too many mistakes, is over-confident, and present knowledge drops off around Q3 2021. But, it will become cheaper and faster to iterate on the model.
Here's how I can be replaced (well, I'll eventually be a farmer or something, so it'll just mean the death of this newsletter). ChatGPT and/or Metaphor chose all three of today's "drops". I'll provide light commentary for how either got to the short blurbs I asked them to make.
sd
It should be obvious that I 💙 text processing utilities. Blame awk
and perl
. So, I asked ChatGPT to:
Please create a short blog post on a useful but less popular text processing command line utility and provide a link to it at the end.
It, uh, gave me awk
as the first reply! It does not seem to know what "less popular" means, and I didn't expound on it, so I asked it to keep choosing, limiting answers to ones created in the last ~3 years.
After jq
, and ripgrep
(HOW ARE THEY NOT POPULAR?!); then after xsv
(which we've already covered in this newsletter, so it definitely got better), I asked it to focus on ones that process unstructured text files.
Here ya go!
One lesser known but incredibly useful text processing command line utility for working with unstructured text files is "sd". Sd (short for "sed Regex Debugger") is a command line tool for quickly debugging and testing regular expressions.
One of the key features of sd is its ability to visualize the process of matching a regular expression against a given string. This makes it much easier to understand how a regular expression works and to troubleshoot any issues that may arise. For example, if you have a regular expression that you are using to search for a specific pattern in a text file, you could use sd to see exactly how the regular expression is matching the text:
sd 'regex' 'text'
This would output a detailed breakdown of each step in the matching process, showing exactly which parts of the text matched the regular expression and which did not. This can be incredibly useful for understanding and debugging complex regular expressions.
In addition to its regex debugging capabilities, sd also has a number of other useful features, such as the ability to test regular expressions against multiple strings at once and support for common regex flags, such as i (case-insensitive) and g (global).
Overall, sd is a powerful and efficient tool for working with regular expressions on the command line. If you're not already familiar with it, be sure to check it out!
wikit
Well, ChatGPT failed miserably due to too many folks (I guess, including me!) submitting prompts, so I went to Metaphor with:
I'd like a link to a command utility that will summarize the content of an article.
The results were better than a Google search (one of the results was a link to a google search!) and I found wikit – a "command line program for getting Wikipedia summaries easily".
It's javascript-based, so npm i wikit -g
has you covered. Then just have a go:
$ wikit structural unemployment
Structural unemployment is a form of involuntary unemployment caused by a mismatch between the skills that workers in the economy can offer, and the skills demanded of workers by employers (also known as the skills gap). Structural unemployment is often brought about by technological changes that make the job skills of many workers obsolete. Structural unemployment is one of three categories of unemployment distinguished by economists, the others being frictional unemployment and cyclical unemployment. Because it requires either migration or re-training, structural unemployment can be long-term and slow to fix.
hcitool
ChatGPT finally had some cycles for me, so I rememberd I owe you a knowledge drop on Bluetooth stuff (it'll be available soon-ish) so I asked:
Please find a command line utility that will list all bluetooth devices within broadcast range. Please also include a link.
There are a few different command line utilities that you can use to list Bluetooth devices within broadcast range. One option is the hcitool utility, which is included with many Linux distributions. Here is an example of how you can use it to list Bluetooth devices:
$ hcitool scan
Scanning ...
00:11:22:33:44:55 Some Bluetooth Device
66:77:88:99:AA:BB Another Bluetooth Device
You can find more information about the hcitool utility, including how to install it on your system, on the Linux man pages website:
https://manpages.debian.org/buster/bluez/hcitool.1.en.html
Note that this utility only works with Bluetooth devices that are in "discoverable" mode, so not all devices may be listed.
FIN
ChatGPT has generated quite a bit of developer attention, and StackOverflow has banned answers generated by it (I mean, it writes the same low-quality answers
as humans do on that site, so it is 100% a threat to their business model.).Knowledge workers have some time before structural unemployment finds its way to our neck of the digital woods. By then, I hope we all learn to wield this new tool, and work to have it help empower those just entering tech/knowledge work and level the playing field a bit. Technology like ChatGPT has the power to do much good, but businesses tend to use these things more as blunt weapons of ambivalent capitalism. ☮
Yes, I have answered plenty of questions on that site over the years. This was a very tongue-in-cheek bad humor attempt.
sd! Now I can grok around the clock. Coolest new to me CLI this year.