Browse Source

Added C-128 information and math

main
Kenneth John Odle 2 weeks ago
parent
commit
3a0bbcd468
  1. 41
      002/codex-002.tex
  2. BIN
      002/images/c128.jpg

41
002/codex-002.tex

@ -89,6 +89,9 @@
% Cancel units in math mode!
\usepackage{cancel}
% Use nice fractions
\usepackage{nicefrac}
\author{Kenneth John Odle}
\title{
{\Huge the codex} \\
@ -123,7 +126,7 @@ The buttons are from the Button Optimizer website, which is here: \href{https://
\noindent \textbf{Credit where credit is due:} A lot of people have come forth (mostly from Reddit) to help me out in various ways. See the preamble to this document in the source code to see them. One aspect of our society is that nobody \textit{has} to help you. It is wonderful when it happens, and I am grateful for their help.
The picture on page 6 of a Commodore 64 is courtesy of Bill Bertram. It was published at \href{https://commons.wikimedia.org/wiki/File:Commodore64.png}{\texttt{https://commons.wikimedia.org/wiki/File:Commodo \\ re64.png}} where you can also find the Creative Commons 2.5 license it was licensed under. I did slightly crop the top and bottom to make it fit better. LaTeX didn't care.
The pictures of a Commodore 64 is courtesy of Bill Bertram. It was published at \href{https://commons.wikimedia.org/wiki/File:Commodore64.png}{\texttt{https://commons.wikimedia.org/wiki/File:Commodo \\ re64.png}} where you can also find the Creative Commons 2.5 license it was licensed under. I did slightly crop the top and bottom to make it fit better. LaTeX didn't care. The picture of a Commodore 128 is courtesy of Evan-Amos, and was published at \href{https://commons.wikimedia.org/wiki/File:Commodore-128.jpg}{\texttt{https://commons.wikimedia.org/wiki/File \\ :Commodore-128.jpg}}, where you can find the Creative Commons 3.0 license it was licensed under.
\tableofcontents
@ -217,7 +220,35 @@ I purchased this computer from the back of a K-Mart, in much the same way the me
\vspace{-12pt}
\end{wrapfigure}
Unfortunately, when you bought a computer in those days you got exactly that in the box: a computer. There was no monitor, there was no disk drive, there was no printer. You just got a computer in a box with a power cord. I had scrimped and saved forever to buy this, and had fortunately also managed to save enough for a monitor, which in those days was a big, heavy cathode-ray tube device (CRT, for short). One of the selling points of the C-64 was that it was portable. You could just pick it up and take it with you. (It seems like all computers in the movies back in the day either took up entire rooms or buildings---think Hal-9000 in \textit{2001: A Space Odyssey}---or something you could carry in your hand---think the tricorders in \textit{Star Trek}. We've never managed a happy medium.) The monitor, however, was anything \textit{but} portable. It was heavy, it was bulky, and it was fragile. Slam a lid closed on a modern laptop and everything will probably be fine. Knock a CRT off the table and it's toast. If it lands on your foot, you'll probably end up in the emergency room.
Unfortunately, when you bought a computer in those days you got exactly that in the box: a computer. There was no monitor, there was no disk drive, there was no printer. You just got a computer in a box with a power cord. I had scrimped and saved forever to buy this, and had fortunately also managed to save enough for a monitor, which in those days was a big, heavy cathode-ray tube device (CRT, for short). One of the selling points of the C-64 was that it was portable. You could just pick it up and take it with you. (It seems like all computers in the movies back in the day either took up entire rooms or buildings---think Hal-9000 in \textit{2001: A Space Odyssey}---or were something you could carry in your hand---think the tricorders in \textit{Star Trek}. We've never managed a happy medium.) The monitor, however, was anything \textit{but} portable. It was heavy, it was bulky, and it was fragile. Slam a lid closed on a modern laptop and everything will probably be fine. Knock a CRT off the table and it's toast. If it lands on your foot, you'll probably end up in the emergency room.
The second computer I ever owned was a Commodore 128. Whereas its predecessor only 64 kb of memory, the C-128, as we called it, had a whopping 128 kb of memory—twice the memory for nearly the same price. While the C-64 could only run in the 1 Mhz\footnote{megahertz—a measure of a computer's computing speed} mode, the C-128 could run in 1 Mhz mode or 2 Mhz mode, but such were the demands on its resources that running in 2 Mhz mode meant the screen would go blank—it simply didn't have the power to process fast and display that processing on the screen at the same time. For comparison, I just pulled up a cheap Lenovo laptop on Best Buy's website that has an Intel i3 processor with 8 GB of memory and a 256 GB solid state drive and is on sale for \$389. It has a clock speed of three \textit{gigahertz}.
\begin{wrapfigure}[]{l}{0.5\textwidth}
\vspace{-12pt}
\includegraphics[scale=0.13]{c128}
\vspace{-12pt}
\end{wrapfigure}
Unlike the C-64, which was round and bulky, the C-128 was slim and sleek. In fact, one of its selling points was its portability, and I recall seeing a brochure where a college student is walking around campus with one under his arm. What they left out of that illustration, of course, is his friend dragging a little red wagon with a terribly heavy CRT monitor in it, along with an incredibly heavy power source. They were portable in theory, but not in any practical manner. But compared to a mainframe that took up an entire room or building, it was light years ahead of its time. And I \textit{felt} like that, too, like this computer was going to take me places where I would be light years ahead of where I was then.\footnote{It didn't, because you need so much more than just a computer to get ahead. You need resources, you need people who believe in what you're doing and support you, and you need people who can point you in the direction of the next step. If you don't have those things, you're not a visionary with a bright future ahead of him, you're just a nerd with a computer.}
Like I said, the laptop I am using now has 8 GB of memory, which is a lot more than 128 kb of memory. But how much more? It's difficult for most people to visualize numbers, especially when they are orders of magnitude apart, and looking at raw numbers doesn't give our brains much to latch onto. We need to \textit{visualize} these numbers, which is why I used money earlier. But because I like math and most people like food, let's visualize these numbers a different way: through food.\footnote{A\&W once tried to launch a $\nicefrac{1}{3}$ burger to compete with McDonald's quarter-pounder, the idea being you get more meat for the same price. But it didn't sell because people thought a third of a burger was less than a fourth of a burger. They could get $4>3$, but they couldn't understand $\nicefrac{1}{4}<\nicefrac{1}{3}$. See \href{https://awrestaurants.com/blog/aw-third-pound-burger-fractions}{\texttt{https://awrestaurants.com/blog/aw-third-pound-burger-fractions}} for the full story.}
Let's assume that those 128 kb of memory is equivalent to one happy childhood meal. Maybe it's your dad cooking out on the weekend, or your Nonna making homemade meatballs, or maybe it's not a childhood meal; it's just you and your significant other sitting on the futon enjoying spaghetti Lady and the Tramp style. Pick whatever meal you love, that you think you could eat every day. That meal is the equivalent of those 128 kb of memory.
We've already established that there are 1,048,576 kilobytes in a single gigabyte. Let's do some more math.
\[
\frac{1,048,576 \text{ kb/Gb}}{128 \text{ kb/meal}} = 8,192 \text{ meals}
\]
That means that for every single gigabyte of my modern laptop's memory, you could eat that meal once a day for 8,192 days. Since there are 365 days in a year, we'll do the math again:
\[
\frac{8,192 \text{ \cancel{meals}}}{1 \text{ Gb}} \times \frac{1 \text{ \cancel{day}}}{1 \text{ \cancel{meal}}} \times \frac{1 \text{ year}}{365 \text{ \cancel{days}}} = 22.44 \text{ years/Gb}
\]
I hope you really like that meal, because you're going to be eating it every day for the next 22.44 years. Oh, but wait, that's for \textit{one} gigabyte. My laptop has eight. A bit more math tells me that you'll be eating this meal for $22.44 \times 8 = 179.6$ years. Oof, not only is it tasty, but it's also life-extending.
\section{High School Computer Class}
@ -364,7 +395,7 @@ alias gpush="git push origin main"
You can also execute bash scripts as well. In addition to a local backup on an external drive, I also backup the directories in my home drive to a remote storage location. To make life easy, I created a script (called, naturally, \texttt{backup.sh}) in each of those directories to back them up. To execute those backup scripts, I just need to go to that directory, open the directory in a terminal and type \texttt{./backup.sh}.
The problem here is that a lot of times, I'm not even in those directories when I'm saving files to them. I'm somewhere else. And to open the directory in my GUI and then open it in a terminal, or to open a terminal and then navigate to that directory, is a little \textit{too} much when I want to run that backup script. Remember, you want to back up soon, and you want to back up often. Backing up on that basis is a good habit to have. So let's remove as many obstacles to that habit as possible.\footnote{I am often amazed by how often people (myself included) want to form a new good habit (eating more fruit, getting more exercise, etc.) and then put as many things as possible in the way of that habit. Again, it's because we're so used to the old, bad habit that we don't think. Sometimes, we just need to get out of our own way.} In this case, we'll add an alias to run those backup scripts.
The problem here is that a lot of times, I'm not even in those directories when I'm saving files to them. I'm somewhere else. And to open the directory in my GUI and then open it in a terminal, or to open a terminal and then navigate to that directory, is a little \textit{too} much when I want to run that backup script. Remember, you want to back up soon, and you want to back up often. Backing up on that basis is a good habit to have. So let's remove as many obstacles to that habit as possible.\footnote{I am often amazed by how often people (myself included) want to form a new good habit (eat more fruit, get more exercise, etc.) and then put as many things as possible in the way of that habit. Again, it's because we're so used to the old, bad habit that we don't think. Sometimes, we just need to get out of our own way.} In this case, we'll add an alias to run those backup scripts.
This is what I have in my \texttt{.bashrc} aliases:
@ -403,12 +434,12 @@ alias kls="ls -Ahl"
\itemsep-0.4em
\item \texttt{A} lists all files and directories, including invisible ones (but excluding the . and .. directories\footnotemark).
\item \texttt{h} gives us file sizes in human readable sizes, i.e., ``4.0K'' instead of ``4096 bytes''.
\item \texttt{l} gives us the listing as a list, because I find that to be more readable, especially with a directory that contains a lot of stuff. I'd rather just scroll up and down than up and down \textit{and} right and left.
\item \texttt{l} gives us the listing as a list, because I find that to be more readable, especially with a directory that contains a lot of stuff. I'd rather just scroll up and down than scroll up and down \textit{and} scroll right and left.
\end{itemize}
Again, I'm typing three keystrokes instead of seven. When you spend eight or more hours a day on the computer, whatever keystrokes you can save really start to add up.
\footnotetext{If you've ever wondered about what these are, here's a simple explanation. The . (dot) represents the current working directory, i.e., the one that you are in. The .. (dot dot) represents the parent directory, i.e., the directory that contains the directory you are currently in. Whenever you create a directory in a Unix-based system, it is added as a new entry to its parent directory, and these two entries (hard links) are created in the new directory. \\ \tabto{1.9em}\texttt{ls} and \texttt{ls .} are the same command: they give you the contents of the directory you are in. \texttt{ls ..} gives you the contents of the parent directory to the one you are in. It's the same as going up into your parent directory, getting a content listing, and then moving back into the child directory you were just in. And for what it's worth, you can do \texttt{ls ../..} to get the content listing of the grandparent directory. Nifty? Depends on how lost you are. \\ \tabto{1.9em}\texttt{cd ..} will move you up into your parent directory, whereas \texttt{cd .} moves you nowhere, because you are literally telling the terminal to change the directory to the current directory. It's a bit like changing into the underpants you are currently wearing. \\ \tabto{1.9em}Anyway, enough of the stupid pet tricks.}
\footnotetext{If you've ever wondered about what these are, here's a simple explanation. The . (dot) represents the current working directory, i.e., the one that you are in. The .. (dot dot) represents the parent directory, i.e., the directory that contains the directory you are currently in. Whenever you create a directory in a Unix-based system, it is added as a new entry to its parent directory, and these two entries (hard links) are created in the new directory. \\ \tabto{1.9em}\texttt{ls} and \texttt{ls .} are the same command: they give you the contents of the directory you are in. \texttt{ls ..} gives you the contents of the parent directory to the one you are in. It's the same as going up into your parent directory, getting a content listing, and then moving back into the child directory you were just in. And for what it's worth, you can do \texttt{ls ../..} to get the content listing of the grandparent directory. Nifty? Depends on how lost you are. \\ \tabto{1.9em}\texttt{cd ..} will move you up into your parent directory, whereas \texttt{cd .} moves you nowhere, because you are literally telling the terminal to change the directory to the current directory. It's a bit like changing into the underpants you are currently wearing. \\ \tabto{1.9em}Anyway, enough of the stupid human tricks.}
And that's it. Just about anything you type often on the command line can be turned into a bash alias to save you time. Go for it. It's a great way to manage your mischief.

BIN
002/images/c128.jpg

After

Width: 3948  |  Height: 1932  |  Size: 2.3 MiB

Loading…
Cancel
Save