Plus one, minus one

Y'know, other stuff, Sinclair related.
equinox
Berk
Posts: 34
Joined: Mon Oct 08, 2018 12:57 am

Plus one, minus one

Post by equinox » Sun Jan 13, 2019 9:15 am

You, YES YOU, just got hired to improve Spectrum BASIC by removing one stupid sucky keyword, and adding a new cool one. What will you remove, and what will you add (and why)?

Hints:
* You will be tempted to remove important stuff that you personally don't use, like SIN/COS/TAN, or CLOSE #, but you have to make a convincing argument about why. And you better believe that some graph-drawing, microdrive-owning bastards will be sitting here judging you.
* Your new keyword should be realistic. Like, not, adding the keyword GTA that turns the Speccy into a console game. You jerk.
* We're doing 48 BASIC. Anyone who wants to remove SPECTRUM or PLAY will get my boot up their scrawny arse, that's too easy (also PLAY is really good!).

Here's my vote: (DO NOT READ UNTIL YOU MADE YOUR OWN DECISION)

* I remove <> (yes, that's technically a keyword, f*** you) because it doesn't reduce the expressibility of the language and you can just write NOT(a=b).
* I add: INSTR, because every cool BASIC has got that, and if you ever tried to find one string in another string in Spectrum BASIC, Jesus Christ, you'll be bleeding in a bathtub before you're four characters deep.
1 x

User avatar
R-Tape
Site Admin
Posts: 2331
Joined: Thu Nov 09, 2017 11:46 am

Re: Plus one, minus one

Post by R-Tape » Sun Jan 13, 2019 9:38 am

Hehe, good thread.

I'd remove GO TO* because I consider it harmful, and I'd replace it with a command that allows you to LDIR data. I guess it'd have to be called SPUNKDAT. So SPUNKDAT 32768 SCREEN$ would LDIR 6912 bytes from 32768 to the display file.

*or INVERSE, because not once has it been used for the purposes of good. I defy you to prove me wrong.
0 x

equinox
Berk
Posts: 34
Joined: Mon Oct 08, 2018 12:57 am

Re: Plus one, minus one

Post by equinox » Sun Jan 13, 2019 9:42 am

The Sam Coupé had a graphics copy command in BASIC, I think it was called BLITZ. Sam BASIC is ****ing amazing, pity it was stillborn.

BTW, GOTO may be harmful, but what are the alternatives? We don't even have scoped functions. Ouch -- oh wait, I've just remembered you can GOTO line *and* statement with some POKE trick. That's not allowed! NO! Can I edit my... ughhh too late.

INVERSE is a good call because you can fake it with INK and PAPER (and maybe some dirty PEEKing if you can't remember what colours you already had). In fact you could ask why there isn't an UNBRIGHT or UNFLASH command. I think they were just trying to stay relevant with the hip modern teletext. lol. kill me
0 x

User avatar
R-Tape
Site Admin
Posts: 2331
Joined: Thu Nov 09, 2017 11:46 am

Re: Plus one, minus one

Post by R-Tape » Sun Jan 13, 2019 9:58 am

Aye, dropping GO TO may be too radical, so I'll lose INVERSE. Having said that—without GO TO, SQIJ would never have been possible.

BLITZ? Ridiculous name.
0 x

User avatar
MatGubbins
Manic Miner
Posts: 537
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Plus one, minus one

Post by MatGubbins » Sun Jan 13, 2019 10:18 am

Get rid of Continue.

Add a Plot Graphic style command that would place a character at pixel position. This could be used with the OVER command so that it would merge with whatever was on the screen at the time.

Would a FAST command work for the Spectrum? Turn the screen off, but allow printing to the screen area, Spectrum runs a bit quicker, then switch fast off and the screen appears again, with all the text/graphics etc drawn, back to normal screen. A bit like Fairlight...
0 x
Bomb Munchies Ver1930 17th Nov 2017 (look for the blue download box ) If you get a time-out message and live in the UK then try after 9pm-3am.
Send me a PM and I can email it to you too. Kent, UK

equinox
Berk
Posts: 34
Joined: Mon Oct 08, 2018 12:57 am

Re: Plus one, minus one

Post by equinox » Sun Jan 13, 2019 10:25 am

Haha. I like it! But dude you would miss CONTINUE when you are debugging. You've been spoiled with emulators and snapshots.

I am intrigued by your char-at-pixel thing (PRINT AT # ??). Pretty cool but it seems rather specialised, how is this useful to a typical programmer?

The FAST/SLOW as you remember was a ZX81 thing, but frankly if you're trying to scrape a few dirty cycles off the screen that way then you should probably be using Z80. Were you really thinking about BASIC? hmmm? hmm? huh? huh? were you? ahhh? oh?
0 x

User avatar
R-Tape
Site Admin
Posts: 2331
Joined: Thu Nov 09, 2017 11:46 am

Re: Plus one, minus one

Post by R-Tape » Sun Jan 13, 2019 10:45 am

MatGubbins wrote:
Sun Jan 13, 2019 10:18 am
Add a Plot Graphic style command that would place a character at pixel position. This could be used with the OVER command so that it would merge with whatever was on the screen at the time.
Good call. You're thinking sprites in BASIC? Even better would be PLOTSPRITE, that does it with a 16x16 graphic. But then we are fully into 'it's not a games machine' territory.

The downside is that it could have robbed us many a naff UDG game.
0 x

equinox
Berk
Posts: 34
Joined: Mon Oct 08, 2018 12:57 am

Re: Plus one, minus one

Post by equinox » Sun Jan 13, 2019 10:59 am

lol. You're supposed to be adding a BASIC command, not some secret hack for game making. I forgot that anyone even thinking about Spectrum BASIC in 2019 is a leeto haxor (maybe we should add a special keyword to access the dirty machine code we hid in a REM in line 9998, huh?) You sluts.

Q: what feature do you really want in visual basic?
A: we want it to be C#.

The "spirit" of my original question was more like: if you were a naive, "hey i just got a computer!" guy in 1982, what command would you... ah f*** it. Happy new year to all.
0 x

User avatar
PROSM
Dizzy
Posts: 89
Joined: Fri Nov 17, 2017 7:18 pm
Location: Sunderland, England
Contact:

Re: Plus one, minus one

Post by PROSM » Sun Jan 13, 2019 11:04 am

I would remove COS, since there would be no loss in functionality - any code that called for "COS x" could just be rewritten as "SIN 90+x".

In its place, I would agree with @MatGubbins for a "plot graphic" command, but instead of making it a separate command altogether, I would just make it a pixel-precise version of the AT keyword (maybe called ATP). Then you could have not only UDGs anywhere on the screen, but also be able to centre strings with odd numbers of characters exactly in the middle - strings being slightly off-centre really gets up my nose, but I don't really know why! :lol:
1 x
All software to-date

Current Projects:
Currently working on ZX Adventure Designer, which lets one create point-and-click graphic adventures for a 48K Spectrum.

Ralf
Dynamite Dan
Posts: 1215
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Plus one, minus one

Post by Ralf » Sun Jan 13, 2019 11:54 am

I would throw away all stuff supposed to work with microdrives: OPEN#, CLOSE#, MOVE, ERASE,CAT etc. Microdrives turned out to be crap, 95% of people didn't have them, so the commands were useless.

And my new command would be SPRITE spriteNr,X,Y ;) Drawing sprites directly from Basic would be really great, probably a lot of software would use it.
0 x

Post Reply