News for hackers. Stuff that matters.
Re:Lost Lessons from 8-Bit BASIC by laumars on Tuesday September 02, 2014 @08:57AM (#8257225)
I think the article misses the point a little bit. The IDE facets that the author fondly remembers isn't part of the BASIC programming language, it's part of the command shell. It's loosely akin to your terminal emulator running Bash. By default it works in real time but you can write more complicated routines programmatically and then run them at your convenience; and you can do so from the shell prompt (either via aliases, shell functions or just echo'ing to a shell script in a similar fashion as his line numbered example).

Plus a lot of his complaints seem to be about the modularisation of modern languages - which seem an odd complaint to make in my opinion. If anything, I'd personally argue that things like importable, self-contained, chunks of code is one of the single greatest advances.

He definitely has a point that the barrier for entry these days is much higher (and this is probably why so many kids these days fall into web development over native applications) but I think the examples he's used don't justify the conclusion he's trying to draw. And neither do I agree that regressing to a BASIC-like environment would fix the problem. I think the problem is simply expectation - people expect so much more that there often isn't the patience to start with the basics. Plus the "code me!" vs the "consume me!" mindset raised by chx[1] erodes what little patience some might have.

That's my 2c worth anyway

[1] https://news.ycombinator.com/item?id=8256211

Re:Lost Lessons from 8-Bit BASIC by JoeAltmaier on Tuesday September 02, 2014 @09:03AM (#8257246)
BASIC and its command shell were in an 8KB ROM. They were one monolithic program. You've got modern ideas, and trying to apply them to a 20-year-old environment. Its not 'like' a lot of things; it came before them so the most you could say is, those things are like BASIC.

What BASIC was, was an extremely accessible try-it-now environment that needed no installation, no setup, no environment variables, no directory structure. It was what we thought of when we thought of interpreters, as opposed to compilers. But then interpreters got all file-oriented and broken too.

SO there have been a lot of improvements since then. But some of what we lost was very, very different. And some of it was valuable in a way.

Re:Lost Lessons from 8-Bit BASIC by laumars on Tuesday September 02, 2014 @09:32AM (#8257380)
> BASIC and its command shell were in an 8KB ROM. They were one monolithic program. You've got modern ideas, and trying to apply them to a 20-year-old environment. Its not 'like' a lot of things; it came before them so the most you could say is, those things are like BASIC.

Except what you've described is exactly what I described with Bash ;)

> What BASIC was, was an extremely accessible try-it-now environment that needed no installation, no setup, no environment variables, no directory structure. It was what we thought of when we thought of interpreters, as opposed to compilers. But then interpreters got all file-oriented and broken too.

Again, all that is comparable with Bash:

1. Bash doesn't need any installation with most UNIX-like systems. But even in the rare example that Bash isn't bundled with your OS, there's the Bourne Shell (sh) or even Windows cmd.exe (for all it's faults).

2. Bash et al doesn't require any set up.

3. Environmental variables are just global OS variables and since BASIC wasn't namespaced, all variables were effectively environmental variables.

4. Directories are a file system thing, not a language thing. However it's worth noting that many BASIC systems did have a directory structure even if though (at that point) nested subdirectories didn't really exist. You could have different storage devices that were switchable (akin to changing drive letter in DOS) and you could store multiple files on an particular medium. In fact I still have a stack of floppy disks for an Amstrad CPC 464 (which ran Locamotic BASIC) in my attic that would testify to this.

5. Bash et al are interpreters.

Don't get me wrong, I romanises about the old days too. They were fun. But I don't think you can blanket say "[it's a] 20-year-old environment. Its not 'like' a lot of things" just to dismiss any arguments you dislike.

Re:Lost Lessons from 8-Bit BASIC by JoeAltmaier on Tuesday September 02, 2014 @10:05AM (#8257601)
I only disliked the wrong arguments :) Like

"The IDE facets that the author fondly remembers isn't part of the BASIC programming language, it's part of the command shell"

There was no such distinction. That's recasting of the facts into something understandandable today.

Know why the language keywords were so short? Because in an 8K ROM the symbol table was a significant hit on resources. Add a keyword? Means remove some other feature. It was a whole different world, with different constraints. And still it was usable, accessible, friendly even. At least when coming from nothing to a computer (instead of coming from 20 years of growth and confusing hindsight with foresight).

Re:Lost Lessons from 8-Bit BASIC by laumars on Tuesday September 02, 2014 @10:24AM (#8257719)
> There was no such distinction. That's recasting of the facts into something understandandable today.

But that's the whole bloody point of the article. If you have an issue with that then take it up with the author rather than me.

Please also remember that the Bourne Shell is as old as BASIC micro computers. So my comparisons are of two environments of the same age rather than older systems vs modern systems (like you keep accusing me of).

And around the same time some micro computers (even the lower end ones) would support other interpreters (eg the BBC Micro supported BBC Basic, LISP, LOGO, Fortran, and a few others) and you could switch between languages like you switch shells in Linux. Which is also why I like to make the distinction between the language and the shell.

> Know why the language keywords were so short? Because in an 8K ROM the symbol table was a significant hit on resources. Add a keyword? Means remove some other feature. It was a whole different world, with different constraints. And still it was usable, accessible, friendly even.

I know - I was there. And while it's interesting, it's also irrelevant to any of mine or the authors points.

[deleted]
Re:Lost Lessons from 8-Bit BASIC by JoeAltmaier on Tuesday September 02, 2014 @10:21AM (#8257701)
Good point! Minicomputers were around before micros. So BASIC wasn't born in a vacuum. Lots of precedent.

What's relevant is, modern ideas of encapsulation, object-oriented design or even structured design were not available to the inventors of early language ROMs. Nor did they have the room for such luxuries. They wrote one blob of code, probably in one large .asm file, that got the job done.

Re:Lost Lessons from 8-Bit BASIC by laumars on Tuesday September 02, 2014 @10:31AM (#8257763)
They were available as Fortran, LISP, C and Pascal were all around back then. But you're right about the necessity code the ROMs in Assembly .
Re:Lost Lessons from 8-Bit BASIC by npsimons on Tuesday September 02, 2014 @10:54AM (#8257901)
Plus a lot of his complaints seem to be about the modularisation of modern languages - which seem an odd complaint to make in my opinion. If anything, I'd personally argue that things like importable, self-contained, chunks of code is one of the single greatest advances.

Yeah, his respect for BASIC seems misplaced at best. Take this excerpt:

There's a small detail that I skipped over: entering a multi-line program on a computer in a department store. Without starting an external editor. Without creating a file to be later loaded into the BASIC interpreter

So what? Any language with a REPL (and nowadays, that's pretty much all of them) can do that. And sure, computers don't boot up into a REPL, but a) do you really want them to? and b) as the top comment here shows, you can easily set up a computer to boot straight to a REPL.

Re:Lost Lessons from 8-Bit BASIC by garmega on Tuesday September 02, 2014 @02:28PM (#8259263)
On those early consumer 8-bits, the command shell WAS the BASIC interpreter. You turned the computer on and you were right there in the BASIC environment! You couldn't do anything without typing in BASIC commands.

Your other points are OK, but it really wasn't like a Bash shell. An interactive Python command-line is closer, but it's still a stretch.

Re:Lost Lessons from 8-Bit BASIC by laumars on Tuesday September 02, 2014 @04:04PM (#8259805)
A Bash shell is an command line interpreter. Bash is Turing complete and even supports more advanced programming paradigms than those early BASIC machines did (eg functions, different scoping, more advanced debugging and error handling, forking, etc). This is all just built in commands - I'm not including any other POSIX user land. In the right hands, Bash is every bit as much a REPL environment as an interactive Python or LISP shell.

I don't understand why you're discounting Python here though. Would you mind explaining to me why a REPL BASIC shell is different from a REPL Python shell aside the 20 years age gap between them?

One last thing, as I noted in an earlier comment, most of those BASIC micro computers did also support other languages and shells. The later models of the BBC Micro came with LOGO in addition to BBC BASIC and also supported Fortran, LISP and a few other languages. My Amstrad CPC 464 runs Locomotive BASIC but I also have a CP/M disk for it. And around the same time (and a even a few years earlier) there were LISP machines and other computers which booted into other language shells.

BASIC wasn't unique nor special in the regard that you're praising it for. Neither back then then nor now. What made BASIC micro computers special was how simple the language BASIC was (otherwise we'd all be looking back fondly of our Fortran or LISP machines!). And this is why I make the distinction between the shell and the language. Because there's always been and always will be a large array of similar REPL shells - the key distinction between them being the accessibility of the language.

Re:Lost Lessons from 8-Bit BASIC by StillBored on Wednesday September 03, 2014 @12:19PM (#8263744)
I considered saying the same thing about bash, but its really missing a big portion of what made BASIC exciting on those machines. That is the ability to draw graphics. Some of the other scripting languages with Tk linking might count though.

Frankly, I'm convinced javascript is the modern equivalent to BASIC. It is even complete with some horrible brain rotting syntax. But, it does provide both an easy barrier to entry (everyone has a web browser), the ability to show your results to others, and the fact that it remains in source form allows beginners to examine how something was achieved.

Re:Lost Lessons from 8-Bit BASIC by spc476 on Tuesday September 02, 2014 @10:27PM (#8261248)
It depended upon the BASIC version, but the one you got on an IBM PC (the one embedded in the BIOS, usually only on PCs from IBM) was an odd cross between an editor and a REPL. Start out:

    PRINT "HELLO WORLD"
Press ENTER, and you get "HELLO WORLD" on the next line. Okay. Move the cursor up to the PRINT, hit the Insert key, type "10" then ENTER. You have now just entered a line into your program. Type LIST and you see

    10 PRINT "HELLO WORLD"
Move the cursor back up to line 10. Change the "10" to "20" and change "HELLO WORLD" to "IT IS GREAT TO BE HERE" and press ENTER. Reposition the cursor over the LIST command and press ENTER:

    10 PRINT "HELLO WORLD"
    20 PRINT "IT IS GREAT TO BE HERE"
Moving the cursor to the top of the screen wouldn't cause the display to scroll up, but that was more due to constrained resources than anything else. But other than that, the entire screen was the editor. Type in an expression to test it out. Go back up and fix it. Once it's fine, slap a number in front to add it to the program. As a REPL, it was vastly different than anything REPL I've seen since.
Re:Lost Lessons from 8-Bit BASIC by laumars on Wednesday September 03, 2014 @02:36AM (#8261777)
You can do that with Bash (albeit not with line numbers).

But as I said before, there were other languages available for said machines and those had their editors as well. What you're describing isn't a unique attribute to BASIC.