Live data from Hacker News

BASIC was not just a programming language

gcher.com

91–100 of 121 posts

Re: BASIC was not just a programming language

#91

Earlier quoted context omitted.

“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.“ I genuinely feel that Dijkstra’s famous rant about BASIC had a big hand in killing it off. I don’t think it was the intention but it created so much bias against BASIC. If you created something in basic, or even suggested using…

>impossible to teach good programming to students that have had a prior exposure to BASIC As someone whose first exposure to computer programming was BASIC on an Apple II in the early 1980s when I was around 8-9 years old and who later went on to learn multiple other programming languages, I always wondered what about BASIC inspired that particular sentiment. Was it the line numbers? The GOTO statement? The use of "G…

I tried to answer it in the article that someone recently posted to HN as well - https://news.ycombinator.com/item?id=38743062

spoilers: There was no GOSUB in the version Dijkstra commented on. There was not even anything else to put in an "THEN" statement than a line number ("THEN 210" is the code). If you wanted to store user's name in your variable, "n" was the name to go with, because "name" was not supported. And so on... :)

Oh, and the line numbers were a necessity.

Re: BASIC was not just a programming language

#92
post #40

Earlier quoted context omitted.

which BASIC for CP/M did you use? (there's a few, and there was no standard, so feature parity is not guaranteed)

CP/M already had compilers for BASIC, but I don't recall the name, I only owned a Timex 2068, the 128K were owned by other folks in our group.

I see. I think I've heard that Microsoft's BASIC was fairly popular, and I recently also downloaded BBC BASIC for CP/M - BBC BASIC is widely popular, but the only downside of its good documentation is that it doesn't say which version each thing is supported in.

Re: BASIC was not just a programming language

#93
post #76

I remember when I finally figured out the point of GOSUB (I was maybe 13, so 1986), and why it was more powerful than GOTO. Still no stack, and the only calling convention was that RETURN would take you back to the line after where you called GOSUB. Writing this words now, I don't know that I ever looked into what happened if you called GOSUB from a GOSUB routine, or how deep you could call. That would imply some sor…

On an Amstrad,

    10 level=1
    20 GOSUB 40
    30 END
    40 PRINT"Current level: ",level
    50 level=level+1
    60 GOSUB 40
Prints a "Memory full in 50" after printing level 84. At first I thought it dedicated about 168 bytes for GOSUB stack, but the "memory full" happens on the level assignment.

You can erase this stack explicitly by calling `CLEAR` (will also close open files and clear ALL variables).

Re: BASIC was not just a programming language

#95

Earlier quoted context omitted.

For approved choices :) > AUTO10,1000 Silly > _

Wow I just tried this out on an Electron emulator. It seems like the second parameter for RENUMBER is limited to a byte (255). The first parameter is weird, though: if you put in a number that's too large, the system reports a syntax error. 10000,255 works, but 50000,255 doesn't.

Isn't it because the line number is 16-bit unsigned int?

Re: BASIC was not just a programming language

#96
post #76

I remember when I finally figured out the point of GOSUB (I was maybe 13, so 1986), and why it was more powerful than GOTO. Still no stack, and the only calling convention was that RETURN would take you back to the line after where you called GOSUB. Writing this words now, I don't know that I ever looked into what happened if you called GOSUB from a GOSUB routine, or how deep you could call. That would imply some sor…

On an Amstrad, 10 level=1 20 GOSUB 40 30 END 40 PRINT"Current level: ",level 50 level=level+1 60 GOSUB 40 Prints a "Memory full in 50" after printing level 84. At first I thought it dedicated about 168 bytes for GOSUB stack, but the "memory full" happens on the level assignment. You can erase this stack explicitly by calling `CLEAR` (will also close open files and clear ALL variables).

Does the RETURN statement work correctly on Amstrad when there are multiple subroutines in the call stack? I.e., does every RETURN return to the line after the corresponding GOSUB or after the latest one?

Re: BASIC was not just a programming language

#97
post #28

Earlier quoted context omitted.

>literally take less than a second to boot Literally, completely wrong. More like less than a second after power-up to reach full usefulness at the command line. These type computers did not need to actually boot their OS from a "peripheral" storage device. They did not "boot" at all, they just ran the built-in OS/BASIC straight from where it was contained on ROM. This was like the C64 which had its BASIC in internal…

Define boot. Booting doesn't require loading an os. And if we include dos as an os, I'm not even sure of the conceptual difference between booting basic and booting dos. The only major thing is device discovery and setup etc. But even the 8 bits had to start up the screen output routines, so I would still classify that as 'booting'

>Define boot.

Good idea. Legitimate request.

As it was understood with 1980's microprocessor desktops, booting was a more complex stepwise startup procedure than simply running the fully-functional factory OS or video game instantly from ROM.

Booting required a storage medium other than memory (such as punch cards, paper tape, magnetic tape, disks) to peripherally store the actual OS or shell which had to be loaded into memory in a "bootstrapping" process before it could run. RAM was used for the working OS rather than ROM, so process control was "booted" to RAM right after the ROM code merely establishes a hardware interface and serves as an Initial Program Loader.

Nobody ever talked about "booting" a C64 or Atari400 if all you were going to run was the factory BASIC command line.

Which was the vast majority of non-gaming use. Far fewer users had external storage to begin with and almost all of them used it only for storing & loading their own code or non-ROM game files [0].

Only the uncommonly advanced operators (not me) were actually using their external storage to "boot" to a different OS or programming language, but it was necessary if you were going to use something like Pascal [1]:

"Kyan PASCAL consists of two programs: the editor program (ED) and the compiler/assembler program (PC). When your Apple (ATARI) is booted (to boot the ATARI, push the key during power-up) with a KyanPASCAL disk in the drive the following will be displayed:

KYANPASCAL VERSION 1.0 COPYRIGHT

1985 BY KYANSOFTWARE

1850 UNION STREET, SUITE 183

SAN FRANCISCO, CA 94123

>"

IOW when you didn't push the key during power up (which very few users ever pushed) you weren't booting the Atari, but merely powering up and running the game or command line directly from ROM.

It was not like an x86 PC which used its ROM firmware mainly as an Initial Program Loader, otherwise known as a bootloader, to load your desired OS from storage into RAM, giving you access to a correspronding command line the booting way. If you weren't going to run something like a Disk Operating System why would you want to boot anyway?

It may be obvious but I really did like it with computers that you didn't need to boot.

Sorry if I hurt anyone's feelings.

[0] so BASIC was dabbled in more often and widely as a "game" similar to the regular game cartridges, where they had to start from the beginning each time you turned on the computer, and all progress was lost when you powered down.

[1] http://www.atarimania.com/8bit/files/Kyan_Pascal_Manual.pdf

Re: BASIC was not just a programming language

#98
post #4

I agree that dropping into the basic interpreter was amazing on the old 8 bit computers. Things have really changed recently with the popularity of Retro computing as I wrote about the exact same thing around 10-15 years ago (I can't find the post unfortunately) and I was downvoted a lot as almost all the commenters seemed to think that accessing DevTools in Google Chrome and entering Javascript commands was that sam…

“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.“ I genuinely feel that Dijkstra’s famous rant about BASIC had a big hand in killing it off. I don’t think it was the intention but it created so much bias against BASIC. If you created something in basic, or even suggested using…

> If there’s one language guilty of causing brain damage it’s surely JavaScript.

In its detractors, you mean? (This was a perfectly reasonable comment until you got irrational at the end; even people who understand Dijkstra's comment but feel that we lost something should be extremely pleased that the thing that took BASIC's place is a language that supports structured programming and is otherwise as nice as JS.)

Re: BASIC was not just a programming language

#99
post #13
post #4

I agree that dropping into the basic interpreter was amazing on the old 8 bit computers. Things have really changed recently with the popularity of Retro computing as I wrote about the exact same thing around 10-15 years ago (I can't find the post unfortunately) and I was downvoted a lot as almost all the commenters seemed to think that accessing DevTools in Google Chrome and entering Javascript commands was that sam…

I grew up typing programs from softdisk magazine, Compute! etc... into TRS-80, Apple II, Atari 800, and C-64. I still think JavaScript in a browser is better. JavaScript is way more powerful than Basic on any of those 4 platforms. The canvas 2D API is way more capable and easy than what came with those systems. Even getting something like Was 50-150 lines of code in BASIC, by which I mean a text input line with a cur…

[deleted]

Re: BASIC was not just a programming language

#100

Earlier quoted context omitted.

Well, it is amazing you can write something in a decent set of Javascript these days and have it execute mostly the same across Windows, Mac, Linux, iOS, and Android, irrespective of CPU architecture.

It is, but at the same time I know that if I re-run it in two years it will suffer from bitrot and ill have to futz around with it to get to run. I hate that a lot.

Surely by "re-run" you mean "try to re-build". If you write something that runs in the browser today (and you're not doing something dumb like using experimental or otherwise non-standard APIs), chances are extremely high that it will still work in two years. The browser is one of the most consistent, interoperable, stable software platforms that the industry has managed to produce.
Post reply on HN