Not a great success?

So the big move to WordPress here on Lonely Cactus has not seemed to have the desired effect of encouraging me to move my web presence back under my own control. I still seem to spend most of my time on Twitter making snarky comments and posting random pictures out into the void in the hopes that strangers will like them and give me validation.

In practice, my attempt at using social media to actually improve my social connection has been a bit of a failure. The social media conversion rate: the percentage of people I’ve met online that I consider real-like acquaintances has been quite low.

For Twitter, I’ve not converted anyone into friends. I do feel like I have a sort of a connection with @kcog, and I do see some random posts from Brandie Sylfae, and rarely David Haugen.

Getting off Facebook has has a mixed success. I certainly feel better about my friends because I don’t know so much about their political opinions, and visiting them has been more fulfilling because I don’t know so much about them. There is an actual experience of “catching up”. But I did crawl back to Facebook just as a lurker so that I can get invited to parties.

The social media platform where I’ve actually created acquaintanceship have all been related to hacking: the Guile mailing lists, irc, things like that. Because these culminate in meet ups like Fosdem, where real interactions actually occur. Social media that doesn’t have physical meets is really rather useless.

But anyway, I keep looking at the technology of creating a new self-hosted social media platform, and since I treat everything like a learning experience, I’ve looked at all sorts of things and played with many random bits and tools. So here are a dozen things I’ve learned that are vaguely related to my thoughts about web presence and social media.

  1. The 2018 C standard prerelease — I’ve been following the mailing lists for the updates in the C standard with some interest. The idea that people are still out there clarifying how C works is satisfying. C does come with a standard library, but, that standard library is really quite limited. Much of what we think of as belonging in the C library, such as sockets, is really part of an operating system layer. If you truly wanted to make a portable C program and limited yourself to just what is present in the library, you’d be stuck with file I/O, which would, in practice, require that you write stdin/stdout daemons that get launched by inetd or as CGI.
  2. A standard C library headers project — If I wanted to just use the standard C library, it might be fun to create a set of C header files that only contained the standardized functions. Basically make my own <stdio.h>, <stdlib.h> by pulling the info out of the appendix of the C standard. And then I could compile with those headers and see what I break.
  3. systemd daemons — The great and terrible systemd has its own daemon infrastructure, and would like you to write daemons that use the “new style” sd daemons procedure, as well as having DBus infrastructure.
  4. Docker containers — I’ve been learning that the “correct” way to do Docker is to run one application per container. That I’d have an apache container, a mysql container, a php cgi container. These containers would communicate with another over sockets. And that I’d use docker compose to launch them all as a unit.
  5. Azure — Microsoft is all in on Azure, which, at first glance is just a fancy Docker service. So if I did actually split up a web presence into an app made of a set of containers launched with docker-compose, I could up load them “to the cloud” on Azure much like AWS. I think.
  6. Fedora Server — I have a box running the server spin of Fedora, which comes with monitoring tools for docker in its web GUI
  7. Guile and FastCGI — From an article on Docker, I gathered that one should run Apache in one container, and then run a PHP Fast CGI instance in another container. So naturally I looked to see if Guile had a Fast CGI library. There was a guile-fcgi, but, it seems have have vanished many years ago. There seem to be at least a half-dozen webservices frameworks cobbled together with Guile, and there is no convergence on a one true path.
  8. Markdown — many blog engines have a feature where you can write your posts in Markdown. Markdown might actually be a great post format if I ever got back to writing a grand unified HTTP & Gopher blog engine. For the HTTP visualization, I’d convert markdown to html plus a style sheet. For Gopher, I’d more or less display it as is, but, then I’d examine it for links. Any picture links I found would be converted to GIF and placed in the same directory. Any outbound links would be added to the gophermap for that entry.
  9. Video — For a while I was working on my video editing, and I though about how I could put videos on YouTube, my own web presence, and my own gopher presence. I’d put the proprietary on YouTube, Ogg/Theora/Vorbis on my web presence, and h241 on my gopher site.
  10. Twitch — I’ve been somewhat fascinated by the “Always On” channels on Twitch, that stream whatever all day long. There are enough public domain movies from the 1930s on archive.org, that I could probably put together a week’s worth of content and make my own Always On channel. That would be fun.

Anyway, this is how my brain works.

Telnet and ZModem

As part of the Ridiculous Gopher Project, in which I make a blog and gallery using the gopher protocol, I wanted to make a way for readers to comment on the gopher-protocol blog. The gopher protocol does support telnet, so I thought I might write a minimal program that allowed one to comment via telnet.

This morphed into making a minimal BBS which I will call Pupper BBS. Pupper BBS is a tiny BBS with just enough functionality to let users read and write messages and to upload and download files. This is what BBS’s used to do.

The message-reading and message-writing functionality came together pretty quickly by using MySQL and ncurses++’s forms and menus. But the upload and download drew me down a rabbit hole. The BBS upload and download protocol is call ZModem. All modern day ZModem code
seems to descend from the venerable rzsz program by C Forsberg of Omen Technology. I spent a week converting lrzsz into a library I call libzmodem.

But to actually test out my BBS’s upload and download, I will need a telnet client program that can send and receive by ZModem. This seems like it was pretty common, but, everything seems to be a little bit broken. There are various projects call ztelnet and zssh, none of which compile on my Linux box.

I did finally happen upon this article on TechTinkering that explains how to use C-Kermit to do telnet with zmodem.

So, no maybe I can start debugging Pupper BBS’s upload and download, which are quite broken, apparently.

The Ridiculous Gopher Project: BBSs and ZModem

In the previous entry, I talked about the ridiculous Gopher project, in which I might try to make a presence for myself in Gopher Space.

So my first though was that I would have a blog and a webgallery over gopher.

The blog entries are a very simple prospect, since they need to be plain text. I don’t really like the block paragraph style, but, I did sketch out a conversion from markdown to troff to text that does some nice formatting.

The directory of the blog entries is a bit more complicated. I had an idea for a cgi that handled directory structures and indices that are date-based with a parallel directory structure and index that is keyword based.

But anyway, I got stuck on my first step, and fell down a rabbit hole, as per usual.

So I thought to myself, what if I wanted to have comments for my gopher blog? How would that work? What technology would I used? Well, in the original Gopher spec, there is a capacity for a Telnet session. I thought that I could make a tiny Telnet-based BBS with just enough functionality to let one leave a comment or read comments.

So I went on the internet to find a tiny BBS to examine. I found just about the simplest BBS one could imagine. It is called Puppy BBS.
I found it in here:MS-DOS archive on cd.textfiles.com

So there this California-based guy named Tom Jennings who does a lot of stuff in the intersection between tech and art. Once upon a time he was a driving force behind FidoNet, which was a pre-internet community of dial-up BBSs. He’s done many cool things since FidoNet.

Check out his cool art at Sensitive Research

I guess Tom wrote PuppyBBS as a reaction to how complicated BBSs had become back in the late 1980s.

So I thought, hey, does this thing still build and run? Well, not exactly. First off, it uses a MS-DOS C library that handles serial comms, which, of course, doesn’t work on Microsoft Windows 10 or on Linux. And even if that library did still exist, I couldn’t try it even if I wanted to. I mean, if I wanted to try it I would need two landlines and two dial-up modems so I could call myself. I do have a dial-up modem in a box in the garage, but, I’m not going to get another landline for this nonsense.

Anyway, I e-mailed Tom and asked if I could hack it up and post it on Github, and he said okay. And so this is what this is PuppyBBS.

Puppy BBS has four functions:

  • write messages
  • read messages
  • upload files
  • download files

From there, I started writing a Telnet-based BBS, which PupperBBS. And that went pretty well. It took very little time to get the message reading and writing running. I was on a roll, so I decided that I would quickly tackle the other two functions that PuppyBBS had: uploading and downloading files. And that was where it all got complicated.

PuppyBBS used XModem for file transfer, because it was the 80’s and that was what people did. But I thought ZModem, which was faster and more reliable, would be the way to go. So, I thought I’d just link a zmodem library to the BBS and I’d be ready to go.

But, I couldn’t find a zmodem library that was ready to go. All zmodem code seems to be derived for lrzsz, so I downloaded the code from lrzsz and made it into a library. To do that, I had to understand the code, so I tried to read it. That code is so very 1980s. It is terrible, so I had to fix it.

(Let the record show that by “terrible” I mean terrible from a reader’s point of view. It was written with so much global state and no indication of which procedures modify that state. There is no isolation, no separation of concerns. As a practical matter, it works great.)

And that led to a full week of untangling it all, which is what became the libzmodem library. Now my libzmodem isn’t really much more readable than the original code, but, at least it makes more sense to me.

Great, now I linked libzmodem to PupperBBS to add some ZModem send and receive functionality. Now to test it. I set up PupperBBS. I telnetted in to the system, got to the BBS, and tried to upload and download some files. It became apparent that for ZModem to work, the telnet program itself has to have some parnership with rz and sz, launching one or the other as appropriate.

Since this had to have worked in the past, some internet searches led me to zssh on sourceforge . zssh has a telnet program that has a built-in zmodem send and receive functionality. Unfortunately, it wasn’t packaged on Fedora didn’t compile out of the box, so I started trying to understand it and fix it.

So, anyway to summarize:

  • Let’s do a Gopher blog!
  • How do you do comments?
  • Telnet works on Gopher!
  • Let’s make a BBS
  • BBS’s do Zmodem
  • Let’s make a ZModem library
  • Let’s make a Telnet client that does ZModem.

And this is why I never finish anything.