Live data from Hacker News

BASIC was not just a programming language

gcher.com

101–110 of 121 posts

Re: BASIC was not just a programming language

#101

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…

> If there’s one language guilty of causing brain damage it’s surely JavaScript. Why JS and not PHP?

both, depending on adhesive tape usage

Re: BASIC was not just a programming language

#102

Earlier quoted context omitted.

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?

Great clue. Thanks!

RENUMBER takes maximum parameters of 32767 and 255.

But line numbers wrap! So if you do RENUMBER 32767,1 then your line numbers will go:

  32767
  0
  1
  2
  ...

Re: BASIC was not just a programming language

#103
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…

Dijkstra wrote that in 1975 [1]. I don't think it had a major hand in killing off BASIC considering that "peak" BASIC occurred later with the home computer market. The vast majority of home computer users had no clue who Dijkstra was as they happily typed BASIC listings from various magazines and books.

[1] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/E... - 18th June 1975

Re: BASIC was not just a programming language

#104

Earlier quoted context omitted.

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

Great clue. Thanks! RENUMBER takes maximum parameters of 32767 and 255. But line numbers wrap! So if you do RENUMBER 32767,1 then your line numbers will go: 32767 0 1 2 ...

This is even more interesting, 32767 is the max signed 16-bit int. And it wouldn't wrap to 0 after that for sure.

Btw does it allow 0? Amstrad's BASIC does not (oficially).

Re: BASIC was not just a programming language

#105

Earlier quoted context omitted.

Great clue. Thanks! RENUMBER takes maximum parameters of 32767 and 255. But line numbers wrap! So if you do RENUMBER 32767,1 then your line numbers will go: 32767 0 1 2 ...

This is even more interesting, 32767 is the max signed 16-bit int. And it wouldn't wrap to 0 after that for sure. Btw does it allow 0? Amstrad's BASIC does not (oficially).

I no longer have an Acorn Electron, but using ElkJS (https://elkjs.azurewebsites.net/) I did:

  >0 REM
  >10 REM
  >RENUMBER 32767,1
  >LIST
  32767 REM
  0 REM
  >0 REM
  >LIST
      0 REM
  32767 REM
      0 REM

Re: BASIC was not just a programming language

#106

I feel like BASIC on my C64 was the last time I really, intuitively understood what my computer was doing when I was programming and executing software. There are so many layers between me and the hardware today that I feel like I float above it, and that I just have to trust it all intrinsically. I don't, really, and it constantly gives me this feeling of almost falling.

I can totally relate to that, and it is why I really got into WebAssembly. It is such a simple concept that you can understand it fully, easy to write by hand, create an emulator, and more. Feels like stepping back in time :-)

Re: BASIC was not just a programming language

#107

Earlier quoted context omitted.

For me the biggest motivation to not dip my toes too much into BASIC on 8-bit computers was the abysmal performance. If I remember right, assembler was about 100x faster, compiled high-level languages like PASCAL about 10x faster, and FORTH somewhere inbetween compiled languages and assembler.

At least on the C64, I use BASIC as largely a scripting language and master scheduler, calling 6502 machine language subroutines with SYS, and reserving BASIC for the very highest level main loop or non-speed-sensitive tasks that would be inconvenient, bulky or unnecessary to write in assembly. It gives me a scaffold to hang things off.

So, basically how people use python now?

Re: BASIC was not just a programming language

#108
post #13

Earlier quoted context omitted.

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…

Except it's way less discoverable. The BASIC prompt was all you got on some 8 bits computers, so it made playing with it almost mandatory. Also everything was way simpler (less abstractions layers, no network) to grok for a young kid.

my experience was I would not have learned anything without a manual and examples. There was no autocomplete so there was no discoverabliy and there was no internet so unless you bought a book or happened to have access to a library that had modern basic books you were out of luck.

VS Today wheer there are 1000s of websites that will teach you JavaScript and 1000s of free video classes and hundreds of thousands of free examples. JavaScript is several orders of magnitude more discovable than basic ever was

Re: BASIC was not just a programming language

#110

Earlier quoted context omitted.

For me the biggest motivation to not dip my toes too much into BASIC on 8-bit computers was the abysmal performance. If I remember right, assembler was about 100x faster, compiled high-level languages like PASCAL about 10x faster, and FORTH somewhere inbetween compiled languages and assembler.

FORTH could've been a very elegant alternative to BASIC on 8-bit class hardware, but one major problem with it was that having to enter absolutely everything as RPN/postfix notation could be very unintuitive at times. E.g. prefix or mixfix notation for some things such as math is only very slightly harder to parse, but then provides a big gain in user friendliness. And floating point math takes up a big chunk of the…

Perhaps forth for newbies wouldn't be too friendly... but you can totally write an infix parser in forth, and toggle in and out of that parser.
Post reply on HN