Birth of BASIC (2014) [video]
youtube.com
youtube.com
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. #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.").But I never had the tools or instructions to do assembly -- it wasn't until I got a PC and had BBS resources that I did any advanced programming.
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.
By the time I finally started seeing some Assembly books and the Input magazines on a couple of stores, the 16 bit home chapter was already into its way.
Most of the spectrum books that I own have been bought when hunting for old books.
You could define a wave pattern (square, sawtooth, triangle, ring, etc.), attack, decay, sustain, release, and pulse width with that version of BASIC and generate all sorts of sounds and music.
I spent loads of time messing around with using variables for these different parameters to see how I could generate the coolest/most annoying sounds.
Graphics were also a lot easier to play around with (it even had an interactive sprite editor built-in) but that's a whole other story.
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).
A couple of years ago a shop I was at had a dev that used it to construct test frameworks for the apps he was working on. Said he'd been using it since the 80s and it worked for him. The dev leads said OK and the tests were apparently extremely well done. Got bought by IBM, so I don't know if they're still doing testing that way :-).
With a modern Windows PC a 7 yro has to learn to use the mouse, to click, press icons, the concept of windows, etc. Which, she somehow picked up in about 1 month time frame and is now able to launch games and play PC Minecraft. But anyway...
And
Color Maximite 1/2: http://geoffg.net/maximite.html
Are two interesting takes on modern BASIC
Back in 2010 I was writing production code in VB6 on a Inventory management and ERP system that ended up being sold off when the original developer decided to retire. As far as I know that piece of software is still being used today and runs quite a number of restaurants, airline catering companies and amusement parks.
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.
There's actually a good number of businesses that run Multivalue databases like this. They all use similar dialects of BASIC with various levels of enhancements. The databases are noSQL from before SQL was really a thing.
Might seem a surprise to many HNers, but there are people using Excel for their research, instead of R, Python, Julia,....
I guess it helps that plenty of data readers are Windows only and provide COM/DLL automation interfaces.
So when their Excel macros + VBA outgrown themselves, they get IT to install them VB.NET and carry on.
So that medicine one is taking might have had its reaction curve analysis done in VB.
20 GOSUB 10
30 PROFIT
Clever, though...
And memory? Memory is unlimited! This is Java! Oh, wait, it's BASIC, memory isn't unlimited. Nevermind.
10 INVENT NEW LANGUAGE
20 REM ???
30 GOSUB 10
40 PROFIT