Runtime Arguments

13: Terminals: Talking to the machine

Jim McQuillan & Wolf Episode 13

Jim takes us on a walk down memory lane!

Terminals have been around for a long time, probably much longer than you'd ever guess. Join us as we talk about the history of computer terminals and get a bit into how they work and how they've evolved into the amazing applications that we have today.

Links

Julia Evans Wizard Zines links:

Hosts:
Jim McQuillan can be reached at jam@RuntimeArguments.fm
Wolf can be reached at wolf@RuntimeArguments.fm

Follow us on Mastodon: @RuntimeArguments@hachyderm.io

If you have feedback for us, please send it to feedback@RuntimeArguments.fm

Checkout our webpage at http://RuntimeArguments.fm

Theme music:
Dawn by nuer self, from the album Digital Sky

Wolf:

Howdy everybody and welcome to another episode of Runtime Arguments with me. I'm Wolf and my good friend Jim McQuillan. Um I uh w want to Today we today's gonna be an episode I'm pretty excited about, uh, and not just because it's something that interests me, but because it's Jim doing the talking, and that's exciting for me. So I get to ask the questions, and that's exciting for me. This is episode number 13 because we started with zero, uh it's our 14th episode. Um Hey Jim. Hey Wolf, how you doing? I'm doing good. How was your week?

Jim:

Oh, uh we were just talking. I uh I always respond with, well, I worked hard this week. Uh and this week was no no exception. I uh I got to get back into some swift UI programming, which I really kind of enjoy. I'm still kind of learning it. Um I I did figure out how to finally uh display error messages in the UI. Uh, you know, you make like a web request, and if for some reason the HTTP request fails, either it's a you know it's a 503 or something. Um getting that message to display back in the UI is weird because like MVVM, that's what Swift uses, it's model view, view model controller thing. Um you can't display from the network module, you have to do it in the UI section. So I I kind of figured that out, and and I'm quite happy with myself. So I I I made a I I guess that's an achievement. I unlocked a superpower uh this week. So that was kind of fun. Um other than that, you know, I just did other normal work. Uh I I love my job, I love to make customers happy, and and this week was no exception. So you uh you've been busy this week too. What have you been doing?

Wolf:

I have. Uh but you said something before I say what I did in my week. I just want to say I'm not a Swift programmer, but Swift does something really cool that I wish Rust did. Um uh Python has named parameters, but in Swift, um you can actually not just have named parameters, but the parameter can have a great external name and a great internal name, and they can be different. I think that's totally awesome. And in Rust, you can't even have named parameters. Lots of things I love about Rust, but you know, sometimes some other language doesn't matter.

Jim:

Anyway, yeah, so in that case, Swift is pretty good.

Wolf:

It is. My week. Um I did a drive. I uh uh I sold my saxophone. I loved this horn, big uh E-flat alto, uh Summer Paris Super Action 80 series 2, black lacquer, gorgeous horn, beautiful sound. I played her for years. She's about 40 years old, and I drove her to Evanston, Illinois to uh sell her on consignment at a store that kind of specializes in such horns. I'm sad to see her go, but um I I can't play her anymore because of the the radiation treatment that made me lose my teeth. So it was quite a drive. I expected it to be four hours to get to to get there. It was six. I got there about ten minutes before the store closed, but they stayed open for me. Um and then it was something over four hours to go home. I remember why I don't like road trips.

Jim:

You remember what I told you. Uh uh first off, to give it some context, uh Wolf comes from Ann Arbor, so it's Ann Arbor to Chicago. And I had mentioned to him that it, yeah, it's about four hours to Chicago. The problem is Evanston is just north of Chicago. So I told him it's gonna be four hours to Chicago and two hours through Chicago, and and I think I kind of nailed it.

Wolf:

I think you did. Yeah, yeah, yeah. Anyway, um, let me talk a little bit about some of the feedback we've gotten. Uh, we did an episode, it was the most recent one, on GPUs. And uh Jim had made a point that uh yeah, GPUs are super important in training, building the model, but once it's time to serve a request and somebody's walking around inside the built frozen model, GPUs don't play as big a role. It's it's not a uh as they say, um, embarrassingly parallel problem. And friend of the show, Marlin, of whom we've spoken before, super smart guy, works at Meta, uh he listens and he told us, with intimate knowledge, that uh it's true GPUs are a huge part of building the model, but they do play a role in answering individual uh queries because of a thing called inference. Um most GPU inference can be done in one server with uh maybe one GPU, maybe more, uh maybe a cluster. But it's uh which is a lot like a web cluster. Uh but that this is actually uh how you might solve, answer, resolve, um walk around inside the model to uh answer one of these uh queries. Yes, training, a completely different animal. Uh you need all the GPUs all the time, everywhere, everything that you can have. Um but uh in in in an individual query, yeah. Uh you do use a GPU. In GPU it happens. Yeah. Um so before I hand it over to Jim, um, and maybe I should have said this sooner, let me tell you what today we're gonna talk about. Today we're talking about terminals. Um sometimes uh we want to teach you new tools. Sometimes we want to teach you a little history, maybe you would even call it a story. Um today it's a walk down memory lane, and it's gonna be Jim. Jim, tell us about terminals.

Jim:

Yeah, you know, I I use terminals. I I have used terminals like my whole life since since I've touched computers. I've been using terminals. And Wolf and I talked a few days ago about this, and he kind of made it clear to me that a lot of programmers now don't. Some of them never use a terminal. They they get into something like VS Code or or Xcode or whatever their their uh editor is, and they never touch the terminal. Uh and that's kind of weird to me, but I understand that's that's how people work now. Uh I use a terminal. I I log in, I'm at I bring up a terminal and I'm I'm at the shell, and I SSH to another machine, I'm at the shell, still using my terminal. I bring up Vim, uh I do my editing, but you know, it's it's all in the terminal. So this is kind of like interesting to me. I hope it's interesting to you. I know Wolf uses the terminal quite a bit too. Um he does all kinds of editing, uses uh different editors and stuff, but he's still terminal bound, right?

Wolf:

Anyway, yeah, I have found that uh my new editor, I guess I've been using it for about six months now, maybe, Helix. Uh that's terminal-based. And frankly, it's just better than my GUI editors. I I love it.

Jim:

Yeah. Yeah, well, a lot of people they don't use the terminal. But uh, for those that are listening, uh uh, you know, they're gonna learn something. And for my other friends that share the terminal with me, uh, this is just uh like Wolf said, a walk down memory lane. So um, Wolf, when do you think the first terminal was created?

Wolf:

Um Well, I'm certain that it was in the 1900s. I don't know. I my my dates aren't that good, but you know, in the neighborhood in 1948, 1945, something like that.

Jim:

Yeah, like you'd you'd think that, wouldn't you? Well, I'm gonna blow your mind. Uh terminals have been around much longer than that. Uh the first terminal, um, it was crude, but it was created in 1844.

Wolf:

Wait, 1844?

Jim:

That's like that's like 180 years ago, right?

Wolf:

But there there weren't even cathode ray tubes.

Jim:

I I know. There weren't computers, there weren't anything. But uh there was this new thing called telegraph. Um the the telegraph. You remember Morse code? Um I do. A lot of my friends, they they know it. I've got friends that know how to talk in Morse code. That's a little a little too geeky for me, but uh, but they know how to do it. Uh anyway, terminals were used for that. Um that's kind of weird. That's a long, you know, I I think of 1844, and I think, you know, there weren't 50 states in the US. There at that at that time there were only like 38 or 39. California wasn't even a state yet, and they had terminals. Um so plainly this is a different use of the word terminal. Yeah, but I'm gonna tie it all together in a couple of minutes uh because it because it's relevant. Um the first um uh uh communication using a terminal um uh across the ocean. Um that happened in um uh gosh, where was I? I I I I did say in 1861. That's still what what is that, 160 years ago? Something like that? Can communication across the Atlantic Ocean. Uh they set up uh the the first transcontental uh transcontinental telegraph. Uh they they set up a line and um I'm sorry, that was transatlantic. Uh they set up a line in in uh 1858 and they they fired it up and they they had a terminal on each end uh doing this Morse code thing, and um it lasted three weeks. Uh somebody drove a little too much power over it and it just burned out the cable. But a couple of years later, they set up another one that stayed in in operation for years and years and years. Um so that was that was kind of like the first use of a terminal. But then in like the 1920s, um things started to take off, and teleprinters were created. Um and and that would be uh uh a keyboard type device and a and a printer. And you would type something and it would go to the other end and print on the other end, and then the people at the other end they could re reply back and it would print on your end. Uh that was the 20s. So I'm getting closer to tying this into something more relevant. Uh, in 1963, the teletype model 33 was introduced. Uh uh it was commonly referred to as the ASR 33, asynchronous send-receive 33. It had a keyboard and a printer, and it was mass-produced. And at that time, the cost was like$1,000. Now, this is$1,000 in 1963. That was quite a bit of money. But uh they were mass-producing them, and I think they made over the years, they made something like half a million of those things. Um, and what was kind of neat about it is the first uh terminal to use ASCII. So here we go. We're starting to talk ASCII. This is something we've all been doing for a long time, right?

Wolf:

Um I did not realize ASCII was first. I mean, you there's all these different ones, and I thought, oh, there was a whole bunch of different ones, and finally they all evolved into ASCII, but ASCII was first.

Jim:

Well, uh back at that time, you know, there was also EPSIDIC. You know, if you're in the IBM world, you were doing EPSIDIC. If you were in any other world, you were doing ASCII. Um it's just a standard for character encoding. Um I see. But yeah, that's early 60s that this device was created that would do ASCII. I I think ASCII was actually created in like 58, but uh this device would do ASCII. So why am I talking about an old teletype? Uh because because of the price and availability of these things, they were connecting them to deck PDP computers. And if you know anything about Unix, uh you'd know that uh the Unix operating system was created on a deck PDP 7. Um so we're starting to get into uh a little more modern computer here. Um Unix was created by uh Ken Thompson and um uh who was the other one? Dennis Ritchie, right? Dennis Ritchie, maybe Dennis Ritchie and uh Ken Thompson. And interestingly, um back in 2006, I had dinner with Ken Thompson. I was out in California and a whole bunch of my friends were there, and one of my friends is uh John Mad Dog Hall. I I know some of you guys know who that is. Uh, and he's friends with Ken Thompson, and he said, Jim, how would you like to have dinner with Ken Thompson? And uh I thought, well, yeah. So we had dinner at some place in like Palo Alto or Mountain View or something like that, and I sat across the table from him, and I just didn't know what to say. I I was just like just like a blubbering idiot, you know. Here's the guy that created Unix. What's that?

Wolf:

Kind of makes you wish you were me. I never shut up.

Jim:

Uh I try I I'm not saying I shut up. I tried to talk, but I know what came out of my mouth did not sound all that intelligent. I I just tried to listen uh to this guy. So that was uh so that was kind of fun because he's the guy that created Unix. Um so anyway, uh uh long before that uh dinner with uh Ken Thompson, uh I went to school at Michigan Tech up in Houghton, Michigan, and I worked at the college radio station, and then I got a job at the local radio station. There was an AM FM station. The AM call letters were I think WMPL. I know some of the listeners went to tech, so they probably know about uh Wimple, WMPL. And there was an FM station. I actually worked on the FM side and I don't even recall the the call letters. Anyway, they had an ASR 33 there. Uh I worked overnight, and part of my job was to go to that teletype and tear off the paper and and take us uh uh uh uh straight edge and and rip the paper at the story boundaries. And these were the stories that came in overnight. This was the uh I think it was the AP wire, Associated Press. So news stories would come in and they'd print out on this thing like all night long, and and towards the uh the end of my shift, I would go tear off the paper and then I'd break it up into small pieces, and it might be you know simple little stories, whatever's going on really around the United States and around the world for that matter. That's how the news got around back then using a uh a teleprinter. Um uh so so that was kind of neat. So I do have some experience with that old ASR uh 33. Um, these these kinds of things were called hard copy terminals. And again, I mentioned I was at Michigan Tech, I had a Fortran class, and we uh initially we used punch cards, that was our our input uh method. Uh, but we moved on to uh hard copy terminals. We used the deck writer. I think Wolf, you probably had some fun with the deck writer, didn't you?

Wolf:

In fact, I have interaction with some so many of the things you just said. I learned C and all about Unix on my PDP 1140, which I used in the gerontology lab at the University of Akron. Um I didn't share it with anybody. It was for me. And the annoying part was when it went down and I had to use the switches on the front to key in the bootloader to get the OS off the hard disk, which I think held 5K or 500k. I can't even remember. And the thing I typed on to get stuff in, once there was an OS, uh, was a deck rider. Yeah, I love that machine.

Jim:

Wow, yeah. When I when I was at tech, the computer we had there was a Sperry Univac, I think it was an 1170. Um that was the computer we used, and it it that bootloader was two boxes of punch cards. Um that was uh that that's how they booted that thing up. And uh, of course, it took a long time to boot. Um but anyway, that's how we did it. And our our our input on that machine was the deck writer, and it was a printer and a keyboard, and you'd type in a line of code and it would print it. And you type another line of code and it would print it. And if you wanted to edit, uh uh you could do like uh uh I think the command was something like uh L10, 20, and it would list lines 10 through 20.

Wolf:

So just like GDB.

Jim:

Yeah, a lot like GDB, uh a lot like the old edlin, a lot like ed, uh, you know, that we can use today, um, although I don't know anybody actually using it. Um it was a line editor. Um that was the terminal we had. Um, another popular uh uh hard copy terminal was the IBM 2741. If you were in the IBM world, that's the terminal that you would use. Again, it was a keyboard and a printer. Um and then while I was there at school, uh we had the Texas Instruments Silent 700s. Did you ever see one of those? It came in a briefcase. It had an acoustic coupler on it, it had a little roll of uh thermal paper and a keyboard. And we'd we'd check that out like on a Friday afternoon at the computer center and take it back to our dorm room and uh sit there in our dorm room, open the thing up, and uh using the the telephone, uh you would you would dial up the computer, and then it was an acoustic coupler. You'd take that telephone handset and plug it into the the two rubber cups on the terminal. And I think it was 300 baud, and that was our connection. There was no internet at that time. This is like 1981. Um uh but we could connect up to the to the the school system and we'd be play uh space wars uh using that silent 700. So you know you'd you'd move uh move move your spaceship and it would print out this grid on the thermal printer, and then you'd input a command, and then it would print out the grid again, and you'd do you know uh shoot your phasers or whatever you had, and it was all on paper, uh uh thermal uh thermal printer uh paper. Um and those are kind of neat ones. Really? Uh that was those those are popular at school uh because you could do your work at home. You know, now what did the kids do? You know, they got a MacBook or uh or uh an iPad or whatever. Um, but that back then that's how we had to do it. And you know, you could work on your your uh your homework and and stuff. Of course, there was no web browsing, nothing like that. But anyway, that that that was the hard copy terminals. There were other models, but those are the ones that I was familiar with. And then finally in the 70s um uh video display terminals uh started to appear uh and probably the the the granddaddy of them all was the deck vt100 um there were a lot of different models after that but the vt100 was like the the the base uh model uh and there was terminals from uh data points uh televideo ads viewpoint uh weiss you remember the weiss uh 60 terminals you remember to use those i'm sorry they were amber right or whatever well they were there were green ones and there were amber ones and then later I think we had like a Weiss 160 that was like a a really awful looking white I absolutely encountered Weiss terminals yes I remember yeah yeah those were those were like the cheap uh you could you you could buy them they weren't terribly expensive um and HP had terminals uh text instruments had terminals IBM they had the 5250 uh and that was a terminal that was a block what what they called a block mode terminal and you could connect that to like uh uh an AS400 or a system36 or system38 and that's that's what IBM people would use so these are all serial terminals and I I think they had other technologies there was like twin acts and and various kinds of networking I don't think uh ethernet wasn't wasn't there yet but I I mean look I'm old Wolf is old we works with some really old technology but but you know I gotta say I am not as old as you not you know it's a small difference by by yeah by not that four years but whatever it is it is it is absolutely the case I'm learning right this minute I was today's year old when I found out you you knew about all kinds of old terminals that I have no clue about oh yeah yeah yeah uh well you know four years older than you I know I know that much more right but you also had these computers in college yeah yeah and I didn't have that I didn't get a computer until I got my first real programming job um and then I bought my own Macintosh it was the 512 I think the FatMac oh boy with a built-in terminal I mean well it was it was graphical so it was so anyway that was a that was a that was a computer right it was a real computer our experiences were different different but not that different because we're really kind of the same generation but anyway yeah um in um in like 1984 1985 I I got a job uh working for a small company and we were uh at that time we were doing um Texas instruments business systems like the the the BS 800 uh the BS 600 I think um and and they used serial terminals so we would sell one of these computers it was a mini computer we'd sell these to to our customer and we'd install like seven uh TI terminals uh not not those silent 700s these were actually video display terminals and we'd install those and that's what they would use serial terminals um we we did that quite a bit and then we moved up to uh uh SEO Xenics I think that was around 8788 we kind of moved into the the SEO world uh and you know for those of you who don't know what SEO is the Santa Cruz operation they were a software company that uh they worked with Microsoft at first and they developed a version of Unix to run on the uh the the Intel processors and it was called Xenix so it wasn't exactly Unix but it was Unix like um and that's what we sold we we sold small Intel based servers and again we'd put terminals on them and at first it was the TI terminals then we moved up to the the Weiss uh 60 terminals and you know we'd we'd put a uh a a small system in place run an SCO and do like 30 or 40 of these serial terminals and they had these uh serial ports um that you'd connect up to it like a board you'd put in the computer and then this box that came out it had like 16 serial ports and that's how we would connect all these terminals uh to the computer and and that's how they all worked they were all serial terminals um neat thing about serial I I don't know if it's neat or not but kind of the way that they work you know there's it it's it's just a stream of data shooting at the terminal from the server. And in that stream is text that you would display on the screen and it's escape sequences these these commands that get sent to the terminal and it would be like a command to position the cursor at at you know column three line seven and then some text would display there and then another command to position the cursor somewhere else and a command to make the text highlight or or bold or make it dim or display some kind of line drawing character. These were all escape sequences uh for instance like if you wanted to clear the screen uh the escape sequence uh for uh like a vt100 type terminal I think was escape bracket H. You send that to a terminal and and it responds by clearing the screen and putting the cursor up in the upper left corner. All of the things you could do on a terminal were done using these escape sequences. And if you flip it around the other way everything you type would go down the serial line to the computer. And if you hit things like the enter key it would send uh depending on how it was configured it might send a carriage return and a line feed and what's carriage return um a 13 and a line feed is a 10? I might have that backwards but you get the idea it would be that that carriage return line feed sequence um if you hit a function key it would be an escape sequence that gets sent and then the software on the server would interpret that and do something with it. That's how it could tell the difference between uh you typing some text and you hitting a function key because that sequence was preceded by the escape character. So that's why we called them escape sequences because it was that escape character um uh decimal 27 that would uh say what follows is a command. Um in order to make this work with systems like uh Unix, Xenix and Unix, this is even pre-Linux at the time um you know you could hook all kinds of different terminals up to a system and the mapping was done initially it was done using something called Termcap and it was like this text file of uh all the all the sequences that that terminal would recognize uh or or uh or all the sequences that that keyboard would send so if you had a TI 931 terminal it would be a a bunch of entries for that if you had a Y60 it would be a a different entry for that or a VT100 or uh uh we even had color terminals at the time and they were kind of new and kind of very expensive but colors were all handled by escape sequences so we had this termcap file that would uh uh describe the differences in the terminals so if you wrote a program uh if you were a software developer and you wanted to write a program you didn't have to write in your program all these different escape sequences you would use uh a library uh initially it was called curses it's C-U-R-S-E-S uh and then later the open source version uh the GNU version was n curses and uh that library is what took care of the differences in terminals that would like it was an abstraction layer for these terminals um so you'd write your software to use that and and you know you want to clear a screen you send the clear screen sequence and the the library would take care of figuring out exactly what that was for your terminal um now if you sat down to a terminal and you uh had a had a y60 you would set your at the shell you would set your term variable that's uppercase t-e-rm you would set that term variable equal to what the type of terminal was that you had and it might be set in your.pro file it might be set in a configuration file but you would uh say that I've got a Y60 so then the software would recognize that environment variable and it would know how to talk to your terminal um like I said it was term cap initially and then later there was something called term info so pretty much everything switched over to using term info and it was just a different kind of database for keeping track of all your terminal uh escape sequences all the different mappings uh in fact if you are at your computer right now uh you can open up a shell and you can type echo space dollar term remember it's capital T E R M. Type that and it'll tell you what kind of terminal that you are are emulating. Because you're almost certainly not on a real Y60 or a real VT100 right you're sitting at a using a terminal emulator. But you can type echo space dollar term and it'll tell you what kind of terminal you are and it might be like Xterm dash color or xterm color 256 or something like that. And if you want to see the escape sequences that are set up for that try something fun. Try the infocomp command it's INFO CMP space dollar term uh you type that command at your terminal uh and it'll spit out all the sequences uh in in a human readable way like your terminal won't respond to that it'll just display them um so that's the that's the uh term info database entry for your terminal uh you can type uh infocomp space WY60 and it'll show you the sequences for a Y60. Um anyway you you can do it with any terminal type that's uh recognized by the system. Um I could go it we can make a whole episode about how these things worked but being that we're an audio only format it it would get pretty boring pretty quickly and maybe I'm right on the border of that right now.

Wolf:

But if you're more interested in how these things worked um there's a friend uh that we have well Wolf knows her I don't uh Julia Evans I don't really know her okay well you ch you you have chatted with her okay um I I've exchanged messages with let me just let me just um give her a shout out because her name is Julia Evans and um I I have a thing I admire people who teach um and Julia Evans she's a teacher um it's built into her she's great at it she is on um where I interact with her on Mastodon she is mork b-o-r-k except the O is a zero mort and she has a website WizardZines um that's uh wizardzines.com yeah we've got a link yeah we'll put them in the show notes her most recent I think she's got 15 zines or something and what they are is they are sm you can have the PDFs or you can have the actual physical printed copies along with the PDFs um for individual zines or for the whole collection and she teaches you things like her most recent one the Secret Rules of the Terminal tells you everything about uh how they communicate why what things you can say how you change interaction with them she's got other things like uh bite-sized command line bite-sized Linux how Git works which by the way is fantastic my absolute favorite of her books and by the way I have all of them printed um even though I know lots of stuff I still uh respect the way she explains them and because I own all of her books um all of her zines I have learned new stuff from every single one of them my favorite is the pocket guide to debugging I think debugging is fascinating fascinating if if um if you could only get one maybe it would be that one or maybe it would be the get one but wizard zines Julia Evans absolutely worth checking out no no question sorry to interrupt these zines are like um uh they're like not not exactly a cartoon or a comic but they're like they're like drawn sort of like that um and they're just fantastic full of information and I know I I I've watched her process because she's pretty public about it on on Mastodon about how she she works on this stuff and she puts an awful lot of effort into it.

Jim:

So like Wolf said we've got a link to it in the show notes check it out uh the secret rules of the terminal talk about all this uh uh escape sequence stuff and serial IO stuff uh the driver uh stuff how to turn on echo and all that stuff is is in there so yeah check that out so we're kind of talking about just serial terminals here and what happened in the like the early to mid 80s is uh uh PCs became a thing right uh when when was the IBM PC really something like 81 something like that and before that there was the apples and and uh anyway personal computers started to take over um and so now people instead of having a terminal on their desk they had a personal computer on their desk so what had to happen if they still wanted to talk to a server somewhere they had to have a terminal emulator on their system uh that's that's a software program that acts like a terminal it responds you know like if you had a terminal emulator and you set it in vt100 mode it's going to appear just like a vt100 to the server so all the escape sequences that a vt100 would would need uh would be interpreted by this terminal emulator and there were several of them out there uh there was one called Telix uh century software had a program called Term I'm familiar with that because that's what we used at the company I worked at when we started putting uh PCs on people's desks uh minicom was something that was in the in the Unix uh Linux world that was a terminal emulator um putty is a terminal emulator that's for Windows it it's primarily an SS Putty we have today putty we have today is a it's a terminal emulator right I didn't realize how long that's been around it's been a long for a long long time and uh it's primarily an SSH client for Windows um but I I think there might be some provision there for it to talk serial as well but even an SSH client you know SSH is just the transport that will get you to a server but it you know you need a terminal emulator to be a terminal um so that's uh those started to appear I'm not sure when putty actually started I don't think it was in the 80s but it was a terminal emulator program that you could put on a PC at some point and then we moved into the graphical terminals right what I've been talking about so far is all character based terminals and and you know you see you used to see them all the time but uh graphical terminals started to be a thing and I remember in it was like 1986 I went to Usenix conference in uh Toronto and I saw my first uh X Windows display and that was a graphical terminal and that was pretty cool you know now we're doing graphical things um the uh in fact in the 80s uh the X Windows system was created uh Jim by by uh two people uh Jim Geddes and Bob Scheifler I think Jim was working at deck computer at the time and Bob was like an M MIT guy and they created the X Windows system and I know some of you have heard of that uh it it's it's maybe not as popular as it used to be with Wayland out there for Linux boxes but X Windows was a way to uh it was a protocol primarily for communicating between a desktop device and a server um and that that was the standard way for doing graphical terminals uh remotely um I I've I've actually had the occasion I'm gonna name drop a little bit more I I've become friends with Jim Geddes uh uh he and I went to a lot of conferences together uh back in the in the early 2000s I was doing a lot of computer conferences and I'd bump into him all the time and we became friends. Um anyway these graphical terminals this whole idea uh sort of spawned the ability to have something called thin clients so here we are another iteration on the terminal uh thin clients uh they started popping up and they would uh usually hook up like across a network but it was still just a terminal and it would emulate terminals and in some cases they would be graphical clients uh and you could do X windows on these things sometimes or you could do RDP that's Microsoft's remote desktop protocol uh using a thin client you could do that so again you're sitting there with a with a terminal on your desk but the work is being done on a server somewhere remotely it might be in the server room it might be across the network um and that was thin clients that's what we used to call them we used to call them servers now we call them the cloud the cloud yeah yeah they're still just servers right they they just they might not be in the in in the in the uh data center uh or the uh you know the closet or under somebody's desk now they're uh out there right they're at amazon or or microsoft or google or something um anyway uh in in the early 90s uh linux started well linux appeared right in the mid 90s it started gaining popularity and with the x window system all of a sudden people had these graphical workstations on their desks um and there was a tool on there uh it was an emulator program called xterm I used xterm all the time it basically emulated a vt100 uh with some extensions it was a great uh terminal emulator i loved it it was fast it uh it it did a really good job It was easily customizable. Well, let me let me take that back. It was customizable. The configuration syntax wasn't exactly easy, but I could make it do what I needed to do. And it it worked really, really well. So let's move on to the late 90s. Um in 19 uh 99, uh a good friend of mine, um, in fact, he's a he's a super fan of our podcast, Ron. We've mentioned him before. Um, he was IT director at a at a hospital supply company uh here in the Detroit area, and they needed a solution. They wanted a terminal to sit on somebody's desk. For a long time, they had two terminals. They had one terminal to connect to the AS400 and another terminal to connect to an SEO Unix system, and that was a problem. They wanted one terminal, so they had found some terminal company, I don't remember the name of it, but that terminal was supposedly capable of talking uh the 5250 protocol for an IBM and uh uh um like a VT100 uh emulation uh to talk to the Unix boxes, all in one device. And it was like a hotkey you'd hit and it would switch screens and switch emulations so you could be connected to both of those servers at the same time and flip back and forth between them. It's really a great idea. Unfortunately, the terminal was lousy and it would lock up on them, like like it would just lock up solid, and you'd have to turn the thing off and turn it back on, and that was a pain in the ass. So uh pardon my language, it was a pain. They uh uh they didn't like that. The users uh didn't like it, Ron didn't like it, so we started talking and we tried to get the manufacturer to fix the problem. They recognized they had a problem, and Ron and I we went out to Comdex in Las Vegas. You remember you ever been to Comdex, Wolf Computer Expo?

Wolf:

I think I did go one time.

Jim:

I I'd been there a couple of times. Anyway, uh that company that created that terminal was out there, so we went and we got a private meeting with them. We sat down and and you know, we said, your terminal has a problem. And I think they said, Yeah, we know, and they were unwilling or unable to fix it. So Ron and I said, Get us the source code, we'll fix it. And they wouldn't, they would not give us the source code. I think it was probably one of those deals where they didn't even own the source code, some other manufacturer made these things and they were a reseller or something, you know, like an OEM kind of thing. So they couldn't get us the source code, they wouldn't fix the problem, so we ended up returning all I don't know how many terminals he had, like 30 or 50 or something. They returned them because they just didn't work. So that left Ron in a in a bit of a situation where he needed a terminal. So he finally got frustrated and he said, you know, and this is like 1999, he said, let's just put Linux on everybody's desk. Let's figure out a way to put Linux on the desktop and see if we can do it uh inexpensively and not require too much support. So we started looking at it.

Wolf:

I did not realize this was all Ron's idea.

Jim:

Uh yeah, yeah. It was uh it was from Ron's urging that uh uh we needed to come up with a way, and I'm kind of getting in a long explanation of a pretty cool project that that I was uh a big part of. Uh we created a thin client built on Linux. We took out the hard drive, took out the floppy drive, figured out how to do network booting by putting a boot ROM on the network card. Uh, we used a package called Ether Boot that was there, and uh we figured out a way to boot these computers over the network, uh, grab the kernel across the network using TFTP and mount the root file system using NFS, and all of a sudden we had a diskless workstation, a Linux thin client. Um, and then you know it's like Linux has everything. It had X Windows, it had everything we needed, it had terminal emulators, so now we're running uh Linux thin clients. Um after a few months, we had this thing working. We gave it a try with like I think we had like 12 or 14 workstations at the client. We booted it up and it worked. So they started using it. And then I gave a talk on this little thing. It was just a bunch of shell scripts at the time. I gave a talk at uh our local Michigan Unix users group, MUG. We uh we've mentioned them before, it's a group that Wolf and I are on the board of. We gave a talk there, and there was a guy in the audience that said, Jim, you ought to make this an open source project. And like, yeah, okay. He said, People would love it. So we did. We made it an open source project, and we called it the Linux Terminal Server Project. That's how that was born. LTSP. Uh, I think we had our first public release around August of '99, and very quickly people started using it. I think we sort of hit a nerve at just the right time. People started using it. We wrote up documentation on how it worked, we refined the installation process and really, really made this thing work. It was a thin client, it was a uh a Linux box that had no floppy, no hard drive. And you know, you take all those moving parts out of the computer and it lasts forever. And these were small computers that uh people would basically throw away because they weren't powerful enough anymore to run Windows. At that point, what was it, Windows 98 had come out, and all those computers that were running Windows 95 just weren't powerful enough for 98, and people were frustrated, so the landfills were gonna fill up with these things. Well, we figured out we could just rip all the moving parts out of them and put Linux on them, boot it across the network, and away we go. So that was really, really popular. I don't know if you remember, Wolf. This is about the time I met you. Uh yeah. Uh I think we met like around 2000, might have been 2001.

Wolf:

Um I think I was giving a talk or something, and you were attending. I don't remember.

Jim:

You were you were given a talk at the Toledo Linux Users Group. Toledo Area, Telug, Toledo Area Linux Users Group. You gave a talk there, and uh Glenn, the guy that was organizing it, said, Jim, you gotta come down. This uh this this guy, he works at Mozilla. Uh uh, he's gonna talk about uh the web and web browsers and stuff. So I went down and I I I remember sitting in that room listening to you talk, and I swear to God, you were the smartest person I had ever seen.

Wolf:

Now you can't see, but I'm blushing.

Jim:

Yeah, well, you should be. Um uh like I swear, I sat there and he talked about how the web browser worked and what they were doing at uh you worked at Netscape and then it kind of transformed into Mozilla. And you were talking about that, and and I just sat there thinking, I I I I need to get closer to this guy. He's smart, and I, you know, hang around with smart people and great things happen. So that's what, 25 years ago? So that's what happened. So uh you were working at Mozilla. Uh what were you doing there? You were like on a team of eight people or something, weren't you?

Wolf:

Uh at Netscape. So if this was Netscape, I don't I don't remember if this was before or after I m there was a Netscape organization, and then we sort of grew a Mozilla organization off of that. At Netscape, I was the lead of the Macintosh UI team. Um and I'm the guy who decided we ought to use a language, something like HTML, to uh describe the user interface. We called that Zool. Um now it it was my idea, but the guy who did so much of the work was David Hyatt. Uh brilliant guy, great implementer. He went on to Google, I think he's gone other places since then. Uh he gets so many props. Um yeah, I started the ball rolling, but um I don't know who I would credit as the uh the real force behind Zool uh uh uh uh above David Hyatt. I just don't think I I could do that. Anyway, so that's what I did at Netscape. Um I was module owner for XPCOM and for strings, I was an architect and I was um, you know, the lead of the UI team for Macintosh. Um at Mozilla, I still had those module owner roles, but my module owner, that's right, uh but my actual role was technical evangelist, so I flew all kinds of places and gave talks on how does this web browser actually work so that I can get people to contribute? How can you write code that can be part of this? That was my job.

Jim:

And you did pretty well at it, you know. I mean, Firefox is still out there, it's still uh an important piece of technology and it's still there. Uh it'd be curious to to see uh how much of if any of your original code is is in there.

Wolf:

I did write a fundamental piece of code um that I happen to know for a fact is still in modern Mozilla, and that is um they decided uh completely against my arguments that fundamental was their ability to uh replace running parts. So they wanted to use COM C-O-M uh common object model? That is correct. Um but of course, you know, you don't use com, you use your own version. So they made XPCOM, and I argued so hard against it that they made me the owner of it. Um and everybody wanted to just use raw pointers and you know, x XPCOM is a reference-counted system. So if you had a object that was a COM object, um, you'd ink ref and deck ref your pointers to it. And of course, that that way lies madness. So I made a C smart pointer called NSCom pointer, and NSCom pointer did all the stuff. It automatically uh dropped references when it went out of scope and added references when you made it, and it could do the magic lookup to make sure you were looking at the right interface uh of the object. Um and I I was very careful, and I did performance testing to prove that it was just as good as a raw pointer, um, if you did the stuff you were supposed to do with the raw pointer, and that's how we got it accepted into the code base. Um and it was so careful to work with all the special classes and do all the special things. It uh used tons of C templates, uh, and it it it was good code, and it is I think it's over 20 years later, maybe 25 years, yeah, and it's still there. It's fundamental to the fact that uh Mozilla actually functions without leaking. Well, there you go. That's that's what NSCom Pointer gave it, and I wrote that code to last, and it did.

Jim:

Well, great. Okay, let's let's get back to terminals. We want to wrap this thing up, right? Um so so we created LTSP, and it was uh it was really popular. You know, we created it to scratch our own itch. Ron needed it for his clients, and so we did that, and we could use Xterm as the terminal emulator to talk to the SEO Unix boxes. Um, and he used uh he found a program called TN5250, which was a 5250 emulator, and he used that, and and guess what? We had a problem. The the emulator would croak every once in a while. Um but being an open source project, Ron grabbed the source code to it, figured out what the problem was, fixed it, contributed back to the project, and that thing worked. I I I don't think they're still using LCSP at this client because that's a long time ago, but they used it for a lot of years. And uh TN5250 to talk to the the AS400 and Xterm to talk to the Linux uh box, and it you know, it's a graphical interface using X windows. They could have multiple terminals, as many, as many windows open as they wanted, talking to all these different machines. It was fantastic. And LTSP was used like all over the world. In fact, I traveled, I did a lot of traveling. I've been to Brazil and Germany and England and Norway and all kinds of places uh talking about LTSP. Um, I I kind of got away from the project in 2007. I I had kids in high school that were going on to college, and I figured I I wasn't making any money doing open source development. So I had to kind of uh uh bring it, uh dial it down quite a bit and and do some real work uh because I had to put kids through college. But uh the project is still out there. Um there's another guy in Greece that's that's managing it. You check out ltsp.org if you're interested. Uh anyway, uh let's get on to some terminal applications. I mentioned Xterm because I used that a lot. Um if you're on a Mac right now, you you might be using the uh terminal app that's built into Mac OS. But I I I advise you to look at if you are. Yeah, I advise you to take a look at uh iTerm2. Uh it's a much better emulator for the Mac. Um uh if you're on Windows, there's lots of terminals. If you're on Linux, there's like uh console that's spelled with a K that's in the KDE uh desktop environment. There's a GNOME terminal. Uh there's still Putty. I think Putty even worked on Linux. I think there's an open source version of it for Linux. Uh there's all kinds of different terminal emulators. Um I'm I I used iTerm 2 for a long, long time, but I recently switched to Alacrity, which also exists on Windows and Linux. And that's an emulator. It's written in Rust, and it's open source, and you can get it for uh, you know, the the three big platforms, the Linux, uh uh Windows, and Mac. Um, and there's a lot of others. Um all kinds of features. But let's talk a little bit about the current state of some of these things. One of the one of the complaints, uh, you know, I said I switched to Alacrity, and part of it is because iTerm 2 is a great emulator, but it wants to be so much more than an emulator. It's got AI built into it, it's got all kinds of stuff built into it. But all these other emulators, they're they're building things in too. You know, these things, uh, these emulators, they have like tabs, uh, they they handle split screens, they handle copy and paste, uh keyboard shortcuts, automation, profiles, uh, tmux integration. And uh tmux is a terminal multiplexer, like screen, and that lets you make one connection to another server, and then uh you run this like tmux and it gives you multiple sessions and you can switch between them with a hotkey. So you got one connection to a server and then you got multiple screens going on, and uh Wolf that that's not the good part.

Wolf:

The good part is when you run TMUX on the server, then if you somehow get disconnected. Oh that's the good part.

Jim:

You know, I I uh I I have to start up a lot of long running processes, things that might take uh I I've got one process that I run that takes about eight or nine hours to run. And I run it at the command line. Uh but when I started, I always launch Tmux first, and then I start this process running. And like Wolf said, if you get disconnected, your process continues to run. You can connect back up to that server and reattach to that running process, and it's still running and it's beautiful. Tmux, I used to use screen, and then Wolf nudged me a little bit, and I started using TMUX, and it's really an amazing uh little piece of software. It's very handy if you're using a terminal. Um anyway, we sort of talked about the state of these applications. There's a lot of great emulators out there, uh, they have a lot of great features, but they all still emulate, which is which is pretty cool. Um we're just about done here. I wanted to sort of talk about how I use a terminal emulator. And the this is a case where Wolf and I use them differently. Uh, we already talked about how a lot of the young programmers now they don't use a terminal at all. They just launch VS code and stay there all day long. I open a terminal for everything and I open lots of them. Um before we started recording today, I closed all of my terminal windows, but I think I had 19 windows open uh to various servers. Uh when I want to take a look at something, I pop open another terminal and I look at it. Uh I want to edit a file, I pop open a terminal and I go edit that file. Uh I want to edit another file, I open another emulator, uh, another terminal, and I go look at that. Um when I was using um uh iTerm2, I I'm on a Mac and Mac, Mac does things a little bit differently than than than uh Linux does. Uh when I was on Linux, I was using Xterm. And you know, when you launch an application on Linux, it's an instance of that application. So I launch Xterm and it's an instance of Xterm. I launch another one and it's another instance of Xterm. And with Linux, it was really easy to set up a hotkey. I think I used like Alt T and I hit Alt T and it pops open a window. Hit Alt T again, it pops up another window. So if I'm in like a browser and I need to go look at something in the shell, Alt T, there's my terminal. I go log in and I and I do my thing. Um iTerm 2 doesn't work that way. Uh iTerm 2, you might have a couple of windows open. If you want to, you can set up a hotkey. And if you launch the window, what happens is if you had six terminals open already, all of those six terminals come forward. And then it launches the seven terminal for seventh terminal for you. So if I'm in a web browser and I want to open a uh a terminal, I hit Alt T or Command T and it opens up another terminal, but all seven of my terminals are on top of the browser, and that would drive me crazy. And I've been fighting that ever since I moved into the Mac like seven years ago. So I found Alacrity, uh, and that let me set a hotkey to launch. Uh in fact, I think I'm using keyboard maestro on the Mac in order to launch that terminal, but it just opens up another instance of Alacrity. Uh so I can keep doing this all the time. Um, but Wolf, that is not how you use a terminal, right? That is correct. Yeah.

Wolf:

When I use a terminal, I might have, I don't know, on a really busy day. Well, uh so my work machine is a Windows box. So uh for terminal, I use Windows Terminal Preview. And for a shell, um, I my primary shell is git bash for windows. Uh but I have menus, and in that same window I can open up a tab for command.exe, PowerShell, uh uh my WSL windows, whatever. But mostly I mean Git Bash for Window. Windows. So my personal machine, a MacBook, on both Windows and MacBook, uh, if I open three separate windows, that's a lot for a day. And then within a window, I might open up five tabs. Each window is gonna be its own thinking about some totally different project. I'm working on my editor at work. You know, uh, when I say editor, that's the project that I am writing at work. It's an edit not a text editor, but it's a but you know. Anyway, um, but I'll have multiple trees, multiple git repos, all associated with that. Um, and a tab for a shell that's at the right directory, but also a tab that is uh my editor uh that I am using uh to look at source files and change them, and that's Helix. Helix itself has tabs, but the point is here's the difference between me and Jim. Jim opens a window. New thing, new window. Tabs? Screw tabs, no tabs, all windows, lots of windows. Me? Uh couple windows, maybe three, lots of tabs. Not lots and lots of tabs, not like some people in their crazy browsers with 50 tabs, but you know, five tabs, six tabs, sure. And uh different shells sometimes, because sometimes I need command.exe, sometimes I need PowerShell, not not all that often, mostly Git Bash for Windows is enough. Um and that's that's a big difference between us. Um and strangely enough, uh, it comes up in conversations between the two of us. Things you wish you could do uh and can't, because what you want is impossible.

Jim:

Yeah, there there's I'm real happy with alacrity, but there's one thing I still cannot figure out. iTerm 2 had this ability to let me hit uh uh I don't even remember the keystroke, but I could hit a keystroke and it would maximize the window vertically and not horizontally. So I I do that a lot. I want a tall window but not terribly wide. I cannot do that in Alacrity. Uh my only choice is too.

Wolf:

I don't forget to mention you have additional constraints. Because I've told you many different ways to solve this problem, but your additional constraint is I want to maximize the height, but I also don't want to buy any other software.

Jim:

Um I I think you and I looked into this, and even with other software, we cannot make this particular thing do its thing. I can maximize my screen full screen, but I just can't restrict it to vertical only. And if I if there was a piece of software I could buy to do this, I would do it. Because hey, I did buy keyboard maestro to do the uh hotkey. You did do that. So I'm not afraid to buy software. Um but I think I use stuff that comes close.

Wolf:

Like I use Moom M-O-O-M, and it will let you uh move windows around and change their size, and only change their size uh to specific positions and sizes on the screen. Yeah. But Moom doesn't actually have a function that leaves a window exactly where it is except for the height. So yeah, Moom doesn't solve your problem, but it solves all my problems.

Jim:

And if I could, you know, if I could make that last thing work, I would be 100% happy. Right now I'm about 98% happy. But uh one more thing that that uh you know, I'm kind of mentioned that I just keep opening Windows. That works pretty nicely for me because I've got two really big displays on my desk. And I can open up Windows and move them around and every everything works really well. But coming up, I'm gonna be doing some traveling and I'm gonna be using my my MacBook and it's a 16-inch display. But my way of doing things doesn't really lend itself to a laptop display. I don't have a second monitor. Um so I think I'm going to try. Especially.

Wolf:

What's that? With our eyes, especially. Yeah, with my 64-year-old eyes. Yeah. I think 16 inches was big when we were 25. I mean, we didn't have it, but it was big. Well, because I I know 25-year-olds and they use a five-point type or whatever.

Jim:

I think over the next couple of weeks, as I'm doing some traveling, I'm gonna be looking to you for some help. I'm gonna give uh tabs a try. Where I open up one window or maybe just a few windows, but keep all my related things in the same window as a tab. I'm gonna give you a tab.

Wolf:

I will tell you, maybe this won't help you, but here's I think the most important secret of tabs in almost all terminals, you can fix the name of the tab to be what you want. Yeah, I think setting the setting the label inside a tab is the is the helpful thing. And rearranging them.

Jim:

Yeah, rearranging them. And one nice thing about tabs is you can use a hotkey to cycle through them or another a different hotkey to go directly to a tab. You know, uh that that's that seems handy to me. I can't really do that right now when I have multiple windows. Um, you know, there's ways to cycle between the the windows, but it's clumsy for me. And I think tabs is gonna make that easier. And if I can figure out over the next couple of weeks how to do this with tabs, I might even start using it on my desktop. Um we'll we'll see.

Wolf:

I'm not holding out any hopes.

Jim:

No, but I I uh I I have to try it. And and you know, it take you know, it takes a lot for me to try something, but oftentimes uh when you nudge me enough and I finally do try it, it turns out I like it. So we're gonna give it a check.

Wolf:

If I can prove to you that it's a benefit. That it's better enough than what I was doing. It has to be better enough. All right. Yeah. It sounds like you're at the place where you tell us the takeaways.

Jim:

Uh yeah, only, you know, because this wasn't a uh this wasn't our typical episode where we have a bunch of things that we teach you. This was more like a walk back uh through memory, memory lane. Um I I don't have any takeaways. You know, if you're using a terminal now, maybe you have a little bit more uh an idea of what's going on. If you don't use a terminal, maybe you'll start. Uh if you don't need to use a terminal, well, don't use a terminal. But they're there, right? So that's kind of what I'm saying.

Wolf:

That's a takeaway. Yeah? I have a takeaway. My takeaway is uh you should care what Julia Evans says, and you should go to the Wizard Zine site. There you go. Um and she for sure has researched in greater detail than you ever would. I'm talking to the listener, some topic that you really care about. Um the terminals is one, debugging is one, and git is one. All three of those are just fantastic. Um and and she has more. Absolutely. Follow her on Mastodon. Um go go download some zines. Anyway, that's my takeaway.

Jim:

So yeah. So uh so hey, thanks for listening today. If you made it this far, uh kudos to you. Uh we appreciate it. Tell your friends about us. Uh we've been doing this for a while now. Uh this is our 14th episode, and we're we have ideas lined up through February. So we've got a whole bunch of really great episodes coming up. I can't wait to get some to some of those. In fact, to all of those.

Wolf:

Uh and we're we're working very hard on making episodes that put tools in your pocket.

SPEAKER_01:

Yeah.

Jim:

Yeah. And uh hey, did you want to talk a just just a second here about the length of our podcast? We put out a a request several episodes ago for some feedback on how long these episodes should be. Yeah.

Wolf:

Um the the feedback was in in general that except for me, everybody wants episodes shorter than an hour. Um and this one I think went a little bit over. I feel bad about that, but we are shooting for an hour. Uh we have been planning some future episodes, and uh in the planning we saw that it was too much content. Rather than compress or omit, we decided for that episode we're gonna split it into two. Our plan is to do what you guys told us to do. We're gonna make it fit in an hour, if if we possibly can.

Jim:

Yeah.

Wolf:

Yeah.

Jim:

Well, the last several episodes have been in the hour and ten minute range, but that's alright. Right? We're we're close. We're working on it. But but hey. Uh thanks for coming. Uh we got show notes. Uh how do they get to the show notes, Wolf?

Wolf:

You go to runtimearguments.fm or you look at your podcast player uh because if you go to the the episode in your podcast player, the show notes are right there. You can send us feedback to feedback at runtimearguments.fm and uh you can follow us or just look at what we have to say um on Mastodon. It's runtimearguments at uh hackyderm.io. Uh Jim is at Hackyderm. He's jammq at hackyderm.io, and I have my Mastodon uh account at Hackyderm. It's yesjustwolf at hackyderm.io. Um and that's us. Thank thanks for listening.

Jim:

Mine's actually j-a-m-m-c-q at hackyderm.io. But did I say that? You don't have to you you miss the C. You don't have to remember that. Just look at the show notes because we're gonna have our contact information there. Uh please send us feedback. We love feedback. Uh it helps shape the show. So uh if you got something to say, if you liked an episode, if you didn't like an episode, if uh if you're like Marlin and you spotted something that we that we missed, let us know and we'll correct it. Uh so yeah, thank you, Wolf.

Wolf:

Uh I gotta say the same thing. Thanks to everybody for listening. I hope that you got something out of this episode, because we did. Um and tell us what you thought, good or bad. Um follow us, write public stuff, good or bad, uh whatever you say is important to us. Thanks. Yes, thank you. Bye.

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.

CoRecursive: Coding Stories Artwork

CoRecursive: Coding Stories

Adam Gordon Bell - Software Developer
Two's Complement Artwork

Two's Complement

Ben Rady and Matt Godbolt
Accidental Tech Podcast Artwork

Accidental Tech Podcast

Marco Arment, Casey Liss, John Siracusa
Python Bytes Artwork

Python Bytes

Michael Kennedy and Brian Okken
Talk Python To Me Artwork

Talk Python To Me

Michael Kennedy