BASIC vs awk

Monday, 27 April 2026 11:59 pm
miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
I was just thinking some more about the difference between BASIC and awk, and how different our computing world would have been if our early personal computers had used awk instead of BASIC.

BASIC was first run in 1964 at Dartmouth College in UK, where it was created.

UNIX was first created in 1971. It was just 16Kb in size.

In 1975 the Altair -- the world's first personal computer was released; it ran an absolutely minimal BASIC, just 4Kb in size. They later released a more capable version of BASIC, 8Kb in size.

The first TRS-80 was released in 1977, the same year awk was released inside AT&T Bell Laboratories. It wasn't until another year or two that awk was released world-wide as a part of Unix, and in 1988 the Free Software Foundation released gawk, which is today the most used version of awk.

The TRS-80 initially had a 4Kb BASIC, but later was upgraded to a more complete 12Kb BASIC.

The first Tandy Color Computer (CoCo) had an 8Kb BASIC. That was later upgraded to a 16Kb extended BASIC.

These are all still very small figures when compared to modern computer languages, which tend to be megabytes or even gigabytes in size.

So how big is gawk -- the most used version of version of awk?

It is about 3Mb on my 64-bit computer.

But that's a bit of an unfair comparison. Those earlier computers were 8-bit computers, not 64-bit. Also, the machine code was hand-written, whereas awk is written in C and compiled, which never creates code that's as efficient as a human can. (Though modern AIs might one day improve on that.)

So, how big might awk be if rewritten for an 8-bit computer? Well it just so happens that the Tandy CoCo was able to switch out its BASIC ROMs and run OS-9, which is a Unix-like operating system, and it has an implementation of awk (actually gawk) which is 36Kb in size -- a lot smaller, but it's still compiled from C. It makes me wonder how small it would be if hand-coded in assembler. Of course we will probably never know.

Would it be possible to make awk the operational language for a small, 8-bit computer? I don't know. It is difficult to imagine.

What a pity Unix/Linux/OS-9/flex... or some similar variant never took over the early 8-bit computer market. We might be so much further ahead of where we are now.

I do have to admit though, that the early Microsoft BASICs were masterful. They fitted tremendous functionality into extremely small spaces.

Date: 2026-04-28 12:14 pm (UTC)
greylock: (Default)
From: [personal profile] greylock
What a pity Unix/Linux/OS-9/flex... or some similar variant never took over the early 8-bit computer market. We might be so much further ahead of where we are now.

You know it wouldn't be better.
Commerce would have gotten involved.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

May 2026

S M T W T F S
      12
3456789
10111213141516
17181920212223
24252627282930
31      

Style Credit

Expand Cut Tags

No cut tags
Page generated Saturday, 2 May 2026 10:54 pm
Powered by Dreamwidth Studios