~Thumos

Creative Nostalgia and Hand-crafted HTML 1.0

April 10, 2024
I've been continuing my deep-dive into using the ed text editor and here are some more nuggest I've unearthed.

April 8, 2024
How did it take me fifteen years of linux use to realize that filename expansion also worked for directory names? Spent years typing "cd very-long-directory-name" when I could have just typed "cd *name" and gotten there quicker....

March 19, 2024
Wisdom from my days in the Army: Never pass up an opportunity to eat, sleep or take a leak.

March 10, 2024
Inspired by tilde.club member ~VE3ZSH and his Python Maze One-Liner, I decided to try to create my own version in Bash/Dash. Once I had a working script, I started a bit of code-golf to shorten it. I finally got it down to a one-liner:

while :; do [ $(shuf -i 0-1 |head -n1) = 1 ] && printf "/" ||printf "\\"; done

The Dash version subsitutes "." for ":" in the "while" statement, but the two are the same length. I'm going to keep trying to see where I can nibble around the edges, but with the state of my current knowledge of Bash/Dash, I feel I'm getting close to the shortest I can make it right now.

February 22, 2024
Doing another small, very small, happy dance right now as I was able to (finally) solve a problem ssh-ing into a raspberry pi zero that had been driving me nuts for a while. Googling didn't solve my problem, but it pointed me in the right direction.

February 19, 2024
Another bit of interesting command-line esoterica:

I write a lot of shell scripts for fun and learned early on about parameters such as "$@" and "$*" and even "$?". But poking around some command-line-related stuff on Stack Overflow today, I learned about "$_", which doesn't appear in the man pages for either bash or dash. It's a now-depricated parameter that is nevertheless implemented in some shells. "$_" contains the last parameter of the previous command, sort of like using "alt-." in bash. For example, if the previous command was "cat test.txt," then "$_" gives you "test.txt." If the previous command was "ls," then "$_" gives you "ls." But it isn't simply a replacement for "alt-."; it behaves quite differently. For example, if you type "ls *.txt" and get a list of three files, "$_" doesn't give you your original input of "*.txt", it only gives you the name of the last file of the list that expanded from "*.txt". And if you have any aliases, you may get parts of those as a result. For example, when I typed "ls" and then tried "$_," I got "--group-directories-first."

*ETA 20240301:* Also, unlike "alt-.", using "$_" will instantly run any command in that parameter. Not a bad idea to "echo $_" first to see what the parameter currently holds.

February 2, 2024
When I'm not working, my hobbies are messing about with linux shell scripts and martial arts. Two entirely separate realms: one mental, one physicial. Or so I thought until just the other day, when I realized that the goal of both is unconscious competence. When I started scripting, I progressed from "how do I do that?" to "Let me try X and see if it works," to seeing the skeleton of a script once I clarify what problem I'm trying to solve. No different, really, from progressing from "how do I throw him?" to "Let me try X and see if it works," to feeling the energy of contact and joining with it to flow organically into a throw.

In addition, I'm beginning to feel confident enough in my skills in both hobbies that I'm more and more willing to try experiments in technique--even if they don't work. I can try writing a script and consciously say "I could do it using X, but let's see what happens if I try Y instead." The same with one or another martial arts techniqe: shift my stance or my hand position and see what results. In both cases, I can always go back to the "standard" way of doing things if I fail.

January 31, 2024
The more I learn about linux, the more basic and "further back" I seem to be going. When I first started using Debian over a decade ago, I wrote a few bash shell scripts that helped me take care of my system. As I learned more, I branched out into using bash and AWK and sed to do scripting projects, like a (bad) RSS reader or a chain-adding cryptographic function. But now, I find myself circling back around and learning POSIX and the dash shell, so that I can make my scripts portable. It's like learning a different, but related language; or more properly, like learning Latin when one already knows a Romance language. It's been interesting to see how hard it is to do things that are easier in later, "better" shells, and equally interesting to learn the alternatives and the workarounds that come with POSIX.

January 25, 2024
Modern technology has caught up with me, it seems. Last weekend, my dumb-phone broke in two--literally. I bought a new (smart) phone and tried to move my old number--which I've had for over a decade--to my new phone. However, that could only be accomplished by sending a confirmation code to my old phone. Which was broken. Even trying to log into my account (suggested by tech support as an alternative), defaulted to sending a 2FA code to my old phone number. So I ended up with an all-new phone. And an all-new number. Now I have to call/text everyone I can think of to update my info with them. Cue the list of doctor's offices, the bank, and a bunch of other places. Doubtless, I'll forget a few and will only discover that when I find out they tried to contact me, but couldn't. Losing your phone these days is the modern equivalent of losing your wallet.

January 17, 2024
Many of us who use bash shells get used to using the history--the up arrow to bring back the last command, for example--and moving along the command-line with varrious ctl- and alt- combinations.

Technically, the dash shell can have a history file (if it's compiled with support for it), but it's not implemented in any version I've ever seen. However, dash (or any POSIX shell) still has expansions, which means instead of using tab completion to finish some-big-long-command-or-file-name, you can simply use the "*" character to finish--or begin--of some-big-long-command-or-file-name by typing either "*name" or "some*" in the command line.

January 11, 2024
Even this early, the shape of the year is beginning to take form. A workshop to attend in November, a conference in September. Amazing how the first day or two of a new year are so full of thoughts of being able to do *anything* and how quickly work and life reassert themselves. I'm not complaining, no more than I'd complain about footprints on an otherwise pristine field of snow--signs of someone moving forward with a purpose. Just noticing the flow of life.

January 3, 2024
Happy new year, tildeverse. I've made some minor updates to my scripts page. Just a few tweaks here and there as I learn more about shell scripting.

December 31, 2023
A modest proposal: Perhaps there wouldn't be so much trouble with social media if there was no way to delete a post. Then a person/company/government would either have to stand by what they said, or explain why their reasoning changed.

December 26, 2023
An accounting for Anno Domini 2023:
Not a bad year. Not a bad year, at all.

December 12, 2023
Some interesting uses of the "echo" command:

December 08, 2023
Over the past year, I've created a bookmark file of every website I found useful and/or interesting. Today I used wget to download them all. The total size for a year's worth of websites was about 117M. I now have all that information, searchable using grep. It's like my own private Wikipedia.

December 06, 2023
Doing a small, very small, happy dance right now as a minor but infinitely irritating computer problem was solved with a bit of google-fu.

November 26, 2023
How I use Wikipedia:

November 14, 2023
I picked up a used Barnes and Noble nook at a charity sale for about ten dollars. It had been "withdrawn" from a local private-school library and still had an active account from the school on it. I took it as an opportunity to see what I could do to find alternative uses and/or root the device.

Over the past couple of weeks, I spent an hour or two on random days to see if I could reset, update, and then get the nook working again. I'd hit a roadblock, look for a solution on the internet and give the solution a try. Sometimes it helped; other times, it didn't. I moved forward in fits and starts. But today, I plugged the nook into my laptop, mounted it as a usb device and copied epub files onto it.

Success! One slow step at a time.

November 13, 2023
I have a dumb-phone. I like having a dumb-phone. I can text and call people I want to communicate with. They can do the same to me. However, the number of times I've been asked to open an email on my phone to get a confirmation number or scan a QR code and the dead silences/blank looks I get when I say that I cannot have all increased lately. I don't want to use a smart phone but the world, it seems, is pushing me in that direction. I'll hold out for as long as I can, though.

October 26, 2023
Old man shouting at the clouds, I know, but:

The place where my wife and I have gone for Thanksgiving dinner for the past ten years had a simple system for reservations--call them and they took down your info, charged your credit card and sent you an email confirmation. On Thanksgiving, you went to the lady in the front, who looked at your email and/or checked your name on the reservation list. And then you sat down to eat.

This year, the venue decided to use Ticketmaster. Beside the annoyance of having to create yet annother account just buy the tickets, it's been two days of Ticketmaster "Can't process your request at this time" popups and "Contact the venue to resolve this problem." Still waiting to hear back from the place where we've eaten dinner for a decade. This is *progress?*

October 18, 2023
I've spent the past few weeks fighting a great sense of resistance to the work in progress. So I took some time away altogether from work (a luxury I have) and dealt with several other projects. However, yesterday, I once again felt the urge to return to my main "work." And today, I was back at is as if nothing had ever happened. I guess I'm allowed a few weeks off every twenty years or so.

October 5, 2023
I'm on the simplest diet ever: Bought a cheap kitchen scale. Weigh one portion of something. Eat it. Note down the calories. When I hit my calorie target for the day, I'm done.

September 24, 2023
My apartment started looking less cluttered with one simple change: I started saying to myself, "Don't put it down, put it away." It's amazing how those small, at-the-margin changes can have a larger, cumulative effect.

September 22, 2023
Re-installing Debian on my laptop got me thinking about what I could do if something went wrong. So I experimented and read up on what all I could do within just the dash shell. Here are the results. Hopefully, this info could be of use to someone who's having severe computer problems.

September 02, 2023
There's nothing that fills me with more niggling worries than my annual re-installation of a fresh copy of Debian on my laptop. Have I copied all the files and settings I've come to expect on my system? Are there any packages I've installed in the past year that I forgot to write down? (I know I can use dpkg to give me a list of installed packages, but I still worry that it's missed something....) Have I done my backups of my home directory? How many times on how many different media in case something goes wrong?

But oh, when it's over, the joy of booting up and logging into that fresh system for the first time! It's sort of like having a blank canvas or page which will soon be covered with one's own idiosyncratic scribblings.

August 10, 2023
More stray-voltage thoughts for the day:

Preaching to the Tilde.Club choir that modern technology really isn't always a benefit but jeez. Heading on a foreign trip soon and the credit card company insists on sending texts/emails to your phone. Incomprehension when I told them my phone doesn't work overseas and apparently, they have no "backup plan" for dealing with this situation. This may be a more interesting trip than I bargained for.

Working on a new super-secret, lowest-common-denominator computing project. Hope to have something thrown together and a link to the results here soon.

July 18, 2023
Just achieved a life-long dream: published a (admittedly very short) article in 2600 magazine.

July 6, 2023
Some stray-voltage thoughts for today:

Today is Aphelion, the day when the earth is farthest from the sun. But in the northern hemisphere, the tilt of the earth toward the sun has a far greater effect on the temperature.

Money management advice from Mr. Micawber: "Annual income twenty pounds, annual expenditure nineteen nineteen and six, result happiness. Annual income twenty pounds, annual expenditure twenty pounds nought and six, result misery."

June 25, 2023
Walking one mile burns the same calories as running a mile--the distance is the same. The difference lies in the fact that if you run, you burn those calories in 6-7 minutes; walking, you burn them in 15-20. A good metaphor for the completion of any project.

June 19, 2023
Every now and then, I get the urge to just drag everything I own out into the parking lot of my apartment building and set it all on fire. Not out of anger or despair, but simply as a new beginning, to be able to say "Omnia mea mecum porto."

June 12, 2023
For years, I've kept a text file with various computer-related tips and tricks--complex, easily forgettable stuff like a particularly thorny "scanimage" command or how to encrypt a pdf from the command line. That file saved my bacon today when the local cable company did a bunch of maintenance in the neighborhood which cut off internet access for most of the day. I had to not only reboot, but redo the settings on the wifi modem. Which then necessitated a command-line reconnection to my wifi using iwlist and nmcli. Thank the All Above that I had examples of those commands tucked away in my "notes.txt" file....

June 11, 2023
Still playing around with the ed editor, poking my nose into dark corners and trying experiments to see what I can (or can't) do with the program. I don't think I'd want to do something like write an entire novel using ed, but I've gotten familiar enough with the program that I'm now using it for moderate-size and -complexity tasks (like adding this blog post).

May 14, 2023
Nothing gives a sense of accomplishment quite like running through the vimtutor program using ed.

Thanks to: Behold, I shall showcase the intricacies of the venerable Ed editor for the idea.

May 10, 2023
I liked the look of twtxt text blogs, but didn't want all the "extras" like following and unfollowing. (I'd rather just curl and diff the page of anyone I "follow.") I also have a preference for top-posted blogs. So I knocked together a short script to do only what I wanted in the way I wanted.

May 9, 2023
My wife and I have a 140-year-old mantel clock that still runs. Unless I forget to wind it. I also have to occasionally re-set the bell when it gets out of sync and rings the wrong hour. There's a sense of responsibility and care that comes with physical, analog objects that I actually enjoy--even if it makes more work for me.

April 30, 2023
I've been playing around again, this time with the ed text editor. Here are some notes on what I've learned about the program.

And I've also added a couple of bash aliases I use to the scripts page.

April 15, 2023
You know you've gone far, far down the rabbit hole of ancient computing when you start wondering if you shouldn't add the following line to your .bash_aliases file:

alias vim="ed -vp*"

April 4, 2023
I've been playing around lately with the mail/mailx program and decided to share some short notes on things I've learned.

March 26, 2023
Lots of interesting astronomical data such as seasons, eclipses and navigational stars available through the U.S. Naval Observatory Astronomical Applications Department. They also have an API if you'd like to pull and process your own information. I spent way too long playing with the API last night....

March 18, 2023
Pro Tip: When you find a brand of bologna you like, it's worth paying the extra money for it.

March 7, 2023
Two short thoughts for the day:

When you mess up, accept responsibility, apologize and then fix what you did wrong.

When someone does something nice for you, thank them as soon as possible. You may not get another opportunity.

February 22, 2023
One of the hardest things about long-term projects is that it's easy to lose yourself in the day-to-day grind and forget about the big picture: that what you're doing right now is just a page in a bigger book, a single drop in a large jar. One bad day can seem insurmountable.

One of the best feelings about long-term projects, though, is when you're finally done and can look back over the weeks and months and say, "Wow. I *did* accomplish a lot, didn't I?"

February 17, 2023
The few examples I've seen of the answers these new AI chatbots spit out have been interesting: glib, coherent, but often wandering off topic or into the territory of untruth. If a program shows the biases of those who created it, what does it reveal that the AI's seem to be unable to simply say, "I don't know?"

February 12, 2023
Interest always comes first. Finding out everything about and spending every minute with a new romantic partner. Learning all the new features of the latest gadget you just purchased. Sometimes that interest fades. You discover that now that you know everything about the other person, there was nothing other than newness holding you together. Or you find out that the week-old gadget doesn't do everything you wanted it to do, or does it in a way that's not exactly how you wanted.

And sometimes that interest doesn't fade, exactly, but matures into commitment. You learn everything about your romantic partner and still become a gray-haired couple together. You use the gadget--despite its occasional annoyances--every day for years and when it breaks, mourn that they're no longer manufacturing anything like it.

The joys of interest are intense but short-lived; the joys of commitment are lower-key but endure. This is because the thing separating interest from commitment is time.

February 5, 2023
I've started a page to share some of the quick-and-dirty (and ugly-and-buggy) scripts I've written.

January 27, 2023
I guess it says something about my love of the antique that my favorite candy is Necco wafers, which were first manufactured in 1847.

January 24, 2023
I'm beginning to notice a back-and-forth between how I move around on the command line in Tilde.Club and on my desktop at home. A couple of months ago, if you asked me if I spent most of my time "in the command line" I'd have said yes. But in reality, I use a lot of command line programs inside terminals inside a window manager, so no, not really. But TC has forced me to up my tmux game and now I'm finding myself using it inside of a single terminal at home, rather than using multiple terminals. My home use is getting more TC-like.

January 18, 2023
I don't work with computers in my day job, so HTML and Linux are my hobbies. I studied the Great Books at school and one of the oft-used terms was "ad fontes:" go to the source. Read a book. Then read the person who influenced the first person to write the book. Then read the person who influenced the second person to write the book that the first person read. (This always seemed to lead back ultimately to either Plato or Aristotle for some reason.)

I like to do something similar for computer-related stuff--go back to the basic, foundational sources. Bash, sed, AWK, and grep. Text files written in vim. I use mutt to read email on my laptop and now find myself idly wondering if I could do the same with fetchmail/sendmail and mailx. Lowest-common denominator computing. Of course, this sometimes complexifies things that could be simple. But to be honest, I *like* spending hours figuring out how to write a shell script that hammers RSS feeds into text, even though I know newsboat does it better. For me, though, it's ad fontes--going to the source--even if it's not the most efficient way.

January 13, 2023
It's amazing to me to read the early HTML documents at CERN and see how little there was in terms of structure and scale. A dozen basic tags. A web server written in three lines of shell script. A list of every computer connected to the World Wide Web (less than 30) as of late 1992. Here are the mud-brick, walls-of-Uruk foundations of the internet as we know it today. Yet even now, those dozen tags are still recognized and rendered by modern web browsers. (Just have a look at the source code for this page to prove it.) Out of curiosity, I decided to see what I could (and couldn't) do within the constraints of the earliest HTML. Here are the results of my experiments, along with links to the CERN documents.

And just for the heck of it, here's the code for the web server:

#! /bin/sh read get docid echo "<TITLE>$docid</TITLE>" echo Here is the data
January 10, 2023
Getting settled in to my new account. This is going to be interesting, educational, and fun.

January 6, 2023
The web of the early- to mid-1990's was much smaller and messier; finding something new meant you had to read about it on someone else's page or in a text-file you downloaded via gopher. You could spend hours going from page to page or file to file and each visit online was an ephemeral, idosyncratic web-ring. God, I miss those days.

~~~~~~~~~~~~~~~~~~~~~~~~~

thumos [at] tilde [dot] club