💾 Archived View for thrig.me › blog › 2023 › 07 › 07 › 80s-style.gmi captured on 2023-07-10 at 13:41:37. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-11-14)

-=-=-=-=-=-=-

'80s Style

https://80.style/

is apparently done in a 1980s style. The apparently is because the site is broken in w3m, and displays nothing but a blank page. Rumor has it CSS is used. A look with ftp(1) shows JavaScript and some shouty caps.

    $ ftp -o - https://80.style/ | egrep '\.js|[A-Z]{2,}' | sed 10q
    Trying 74.207.254.95...
    Requesting https://80.style/
    21364 bytes received in 0.00 seconds (3.72 MB/s)
    <!DOCTYPE html>
                    <script src="/js/min/generics.min.js">
                    <script src="/js/min/tio.min.js">
                             *      TIO screen interface:
                    <script src="/js/min/nav.min.js">
                    <script src="/js/min/cui.min.js">
                            <!-- TOUCH HANDLE -->
                            <!-- TOUCH HANDLE -->
                            <div id="link_msg">LINK COPIED, READY TO BE PASTED</div>
                            <div id="cml"></div><!-- TIO MARGINS --><div id="cmr"></div>

ftp-style.png

The xterm(1) shown is 1980s software, though has been changed over the years. And so has ftp(1) to be able to pull down HTTPS links. That's an OpenBSD thing. So either you have museum pieces, such as the above site, or evolved ecosystems that still use tools from the 1980s or earlier. This vi(1) dates to 1976 or so. Nobody told the coelacanths they were supposed to be extinct.

Substance

Gemini is less complicated than terminals or line printers were in the 1980s. For example, there is no bold. Bold back in the day was, or still is, done by moving the print head back one character, which would cause a printer to apply more ink to roughly the same spot. Software still acts on this notion:

    $ perl -E 'say "bold b\bbo\bol\bld\bd"'
    bold bold
    $ perl -E 'say "bold b\bbo\bol\bld\bd"' | less
    bold bold
    $ perl -E 'say "bold b\bbo\bol\bld\bd b\bxo\bxl\bxd\bx"' | less
    bold bold xxxx
    (END)

This maybe needs a screenshot to show what is going on:

to-boldly-bold.png

Software still uses the backspace for bold thing, and col(1) exists to filter out this sort of escape.

    $ man ls | head -3 | od -bc
    0000000  114 123 050 061 051 040 040 040 040 040 040 040 040 040 040 040
               L   S   (   1   )
    0000020  040 040 040 040 040 040 040 040 040 040 040 040 107 145 156 145
                                                               G   e   n   e
    0000040  162 141 154 040 103 157 155 155 141 156 144 163 040 115 141 156
               r   a   l       C   o   m   m   a   n   d   s       M   a   n
    0000060  165 141 154 040 040 040 040 040 040 040 040 040 040 040 040 040
               u   a   l
    0000100  040 040 040 040 040 040 040 040 040 114 123 050 061 051 012 012
                                                   L   S   (   1   )  \n  \n
    0000120  116 010 116 101 010 101 115 010 115 105 010 105 012
               N  \b   N   A  \b   A   M  \b   M   E  \b   E  \n
    0000135
    $ man ls | head -3 | col -bx | od -bc
    0000000  114 123 050 061 051 040 040 040 040 040 040 040 040 040 040 040
               L   S   (   1   )
    0000020  040 040 040 040 040 040 040 040 040 040 040 040 107 145 156 145
                                                               G   e   n   e
    0000040  162 141 154 040 103 157 155 155 141 156 144 163 040 115 141 156
               r   a   l       C   o   m   m   a   n   d   s       M   a   n
    0000060  165 141 154 040 040 040 040 040 040 040 040 040 040 040 040 040
               u   a   l
    0000100  040 040 040 040 040 040 040 040 040 114 123 050 061 051 012 012
                                                   L   S   (   1   )  \n  \n
    0000120  116 101 115 105 012
               N   A   M   E  \n
    0000125

Another way to bold is via a suitable code, usually Xterm Control Sequences, though there is variation here, and software such as tmux(1) will hide the details behind a "fg=bold" abstraction that may boil down to the above thing in the end.

    $ printf '\e[1;4;32;44mbold\e[22m notbold \e[24mnotunderlined\e[m\n'
    bold notbold notunderlined

fancy.png

Note how the instructions can be chained into a list: "bold ; underline ; ...". The Alacritty terminal emulator at one point only supported up to 16 entries; more than that and it would crash. Whoops! In theory the list can be infinite? Given the complexity of these character attributes, it's probably a good thing that gemini does not offer support for them. Also note the "\e[m" guard that resets to the default. This is handy when testing, unless you like random attributes maybe spilling over into your shell.

Complications? Oh, yes, escape sequences can overlap, or continue elsewhere on the screen. For instance (assuming Xterm Control Sequences, again) one might clear the screen, advance a line, start some bold text, start an underline, turn off the bold, jump elsewhere, and revert to the default. There might be good reasons to hide such behind a library or macros or constants. A game such as rogue or Dungeon Crawl Stone Soup will be a veritable spraw of such sequences.

    $ printf '\e[1;1H\e[2J\n\e[1mcat\e[4mdog\e[22mfish\e[1;1Hend\e[m'

xterm(1) does have a lot of cruft; not all of it need be dragged along to something new, especially where simplicity is a goal.

When the going gets Troff...

1980s style would also involve "UNIX® Text Processing" (Dale Dougherty and Tim O'Reilly. 1987) though troff these days is also pretty niche.

/tech/troff-quickstart.gmi

Probably we should also leave you with some popular 1980s music.

https://www.youtube.com/watch?v=3jrHIRd9pGo

bphflog links

bphflog index

next: lp0 on fire