
Birth of BASIC (2014) [video] - AlexeyBrin
https://www.youtube.com/watch?v=WYPNjSoDrqw
======
tasty_freeze
For anyone who has only used Microsoft dialect BASICs, seeing the original
Dartmouth BASIC features might be surprising. I learned BASIC on a Wang 2200
computer (circa 1973), which followed Dartmouth BASIC pretty closely and added
a ton of quirky Wang-specific features on top. The following, as far as I
recall, would have been valid in the 1964 Dartmouth BASIC:

    
    
        10 DIM A(5,5), B(5,5), C(5,5)
        20 MAT READ A,B
        30 DATA <a list of numbers for matrix A and B here>
        40 MAT C=A*B:REM matrix multiply
        50 MAT PRINT C:REM print the contents of C in five rows
        60 MAT C=A*(2):REM scalar multiply
        70 MAT C=A+B:REM matrix addition
        80 MAT C=A-B:REM matrix subtaction
        90 MAT C=TRN(A):REM matrix transpose
        100 REM C=IDN:REM fill C with identity matrix
        110 REM C=ZER:REM fill C with zeros
        120 REM C=INV(A),D: REM invert A, and put determinant in variable D
    

By combining INV with matrix multiply, it was a snap to solve systems of
linear equations. The examples above are all square matrices, but many of the
actions worked on non-square matrices too. It was also possible to change the
dimensions of a matrix so long as the total number of elements was the same or
less than what was allocated by the original DIM statement.

~~~
tasty_freeze
Lines 100-120 were intended to start with MAT C=..., but I had a thinko and
typed REM instead.

------
simonh
I think what was great about BASIC back in the day on early home computers was
that it gave direct access to the hardware. You could PEEK or POKE to any
address in memory and write programs that could manipulate any of the features
of any attached hardware at the lowest level with individual commands. You
didn't even have to write a program, but could just invoke commands
imperatively. It was an incredible learning environment. I remember hacking a
BBC Micro so that it mapped system memory directly into the video display, so
the colour of each pixel on the screen represented a byte of memory, which
changed in realtime. Learning Pascal on a Prime minicomputer was fine, but
never had the same fun factor.

~~~
Jtsummers
The feedback loop with BASIC was faster. You could execute the program
directly from the editor (if not from an interactive prompt, our computer, a
Tandy 1000 circa 1988/1989, didn't have that though). Even without the prompt,
it was very close to the REPL experience (write a line or two, hit F5 to run
it, see the result, edit, repeat). I didn't come to other languages until
later, but even so the feedback loop was just slower: bring up editor, write
code, save, compile, run, repeat. That extra bit of friction is noticeable
after a while. And then there's just what makes a minimum viable program. In C
it's something like:

    
    
      #include <stdio.h>
      int main(void) {
        printf("Hello, World!");
        return 0;
      }
    

In BASIC it's:

    
    
      10 PRINT "Hello, World!"
    

4 extra lines don't seem like much, but to the novice it can be a massive
difference. Especially when all that other stuff seems like magic, versus the
BASIC program which just gets to the point ("I want to print something, so I
tell it to print and it does.").

~~~
blackrock
I wonder why C didn’t just include stdio.h as a default library?

~~~
pjmlp
I guess, because compared with other systems programming languages since the
early 60's, C grew out of language used to bootstrap compilers and its authors
were happy with it being a kind of friendlier macro Assembler.

------
cgh
One of the advantages of the Commodore 64 was its crappy BASIC dialect. To do
anything with graphics or sound, you had to pretty much learn assembly. I'm
pretty sure that whoever decided to stick Commodore BASIC v2 in that thing had
no idea they were creating an entire generation of assembly programmers.

~~~
steve_taylor
It certainly made me want to learn assembly, but I didn't have access to the
Programmer's Reference Guide or any other useful resources for assembly
programming, let alone an assembler cart.

At the same time, my school had a room full of Amstrad CPC 6128 computers with
a very rich BASIC dialect that was good enough for making decent games. I'm
very fond of that machine, but they're extremely hard to come by now, as are
the 3 inch disks.

~~~
sedatk
It's possible to adapt CPC6128 to the modern world. I have a CPC6128 with an
external 3.5" drive attached. There are even SD card modules for 6128, fyi :)

------
vanilla-almond
Something I've wanted to asked ask for a while: who is programming in Basic
today?

The language has evolved substantially from its early days and there are many
dialects. But it's rare to hear someone admit they program in Basic (at least
on this forum). Programmers can be quite judgemental about choice of
programming language.

Does anyone want to share their reason for using Basic? It is by choice or by
necessity (e.g. maintaining a legacy codebase)?

Are there modern incarnations of the language that you feel are overlooked?
(For example, I recently came across _Pure Basic_ , a cross-platform compiler
that lets you build self-contained binaries for Windows, Mac and Linux).

~~~
gramie
There is also a free (except for iOS) version of BASIC
([https://www.b4x.com/](https://www.b4x.com/)) that compiles to executables
that run on Android, iOS, Windows, OSX, Linux, etc.

It's very much like Visual Basic, including a visual UI editor, and has a very
strong community. The developer (one guy!) often answers questions in the
forums.

------
DannyB2
10 INVENT NEW LANGUAGE

20 GOSUB 10

30 PROFIT

~~~
AnimalMuppet
Captain Nitpick here. That will eventually run out of memory and crash,
because of GOSUB instead of GOTO.

Clever, though...

~~~
DannyB2
Eventually, when it reaches the obvious RETURN statement, it should then get
to the PROFIT.

And memory? Memory is unlimited! This is Java! Oh, wait, it's BASIC, memory
isn't unlimited. Nevermind.

~~~
egypturnash

      10 INVENT NEW LANGUAGE
      20 REM ???
      30 GOSUB 10
      40 PROFIT

------
sergius
Imagine if they had put a Forth interpreter instead? That would have been real
genius... but alas we got a crappy BASIC because everyone else had one.

~~~
Jtsummers
To be clear, BASIC came out in 1964 versus 1970 for Forth. I'm not sure how
the creators of BASIC could've used Forth instead.

~~~
sergius
In popular micros that came out in 1980? In 1970 you still huge expensive
boxes as computers...

~~~
pjmlp
Besides the Jupiter Ace pointed about, I used to see ads in YourSinclair and
Crash about Forth units to plug into expansion ports.

