User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Sun Jun 30, 2019 9:26 pm

RichardRussell wrote:
Sun Jun 30, 2019 9:12 pm
DavidS wrote:
Sun Jun 30, 2019 5:00 pm
Though those two versions of BBC BASIC are not quite the same
The interpreters are (at least, BBC BASIC for Windows and the 32-bit x86 editions of BBC BASIC for SDL 2.0 share identical code). The differences lie in areas which would be considered part of the OS on the BBC Micro or in RISC OS, but for reasons of emulation are part of the BB4W and BBCSDL packages.
(is there a way to call a kernel SWI in SDL BBC BASIC?).
There has never been a RISC OS build, so the question of SWIs hasn't arisen. SYS can be used to call an OS API of course, but different OSes mean different APIs.
I thought BBC BASIC 4 SDL ran on Linux. So is there a way to call a kernel SWI (which is what the SYS statement should do in Linux in my opinion)?

When we load a program, in order to get the dynamically linked libraries going we call kernel SWI's in Linux.
I could not use any of my BBC BASIC RISC OS programs in BBC BASIC for SDL simply because the way it interacts with the OS to produce GUI elements, support messaging, do file I/O, implement GPIO routines, and the like.
File I/O is surely compatible (at least if you use BGET#, BPUT# and GET$#). In respect of GUI elements, my understanding is that RISC OS is a cooperative multi-tasking system so compatibility with Windows or SDL would be hard to achieve, at least without some undesirable compromises.
On file I/O, it is most desirable in most cases to call SYS "OS_File" in order to accomplish most file I/O, as it gives more control than the builtin commands (eg filetype?).

On gui stuff, it would be possible to use the same system call model to implement it. In RISC OS task switches generally accure on a call to Wimp_Poll or Wimp_PollIdle, in Win32 you have polling calls used to obtain messages, in X11 you have polling calls to obtain any messages, and in most other Window Managers you have the same kind of thing, be they preemptive or cooperative multitasking.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Sun Jun 30, 2019 10:12 pm

DavidS wrote:
Sun Jun 30, 2019 9:26 pm
I thought BBC BASIC 4 SDL ran on Linux.
Yes, but crucially not only on Linux so it wouldn't be appropriate for a cross-platform language like BBC BASIC for SDL 2.0 to incorporate a feature specific to just one OS. The whole point is that it should present the BASIC program with a consistent environment irrespective of the underlying OS or platform.
So is there a way to call a kernel SWI (which is what the SYS statement should do in Linux in my opinion)?
I associate 'SWI' with ARM, the equivalent in x86 Linux would probably be INT &80. But apart from the cross-platform issue a BASIC program ought not to be messing with the kernel (and assuming that it is running with ordinary user permissions it wouldn't be able to anyway).
On file I/O, it is most desirable in most cases to call SYS "OS_File" in order to accomplish most file I/O, as it gives more control than the builtin commands (eg filetype?).
Filetype (in the sense in which you are using the term) is a uniquely RISC OS concept. In Windows, Linux, MacOSX, Android and iOS the 'filetype' is generally ascertained from the 'extension' (e.g. .bbc) so is exposed when using the standard BBC BASIC file statements and functions. I wouldn't expect you to need to call an OS function for normal file operations.
you have polling calls to obtain any messages, and in most other Window Managers you have the same kind of thing, be they preemptive or cooperative multitasking.
Most modern Operating Systems are event-driven and polling is deprecated because of the waste of CPU time. Both BBC BASIC for Windows and BBC BASIC for SDL 2.0 support the ON SYS statement (one of my extensions) which 'interrupts' the program and can reduce the need for polling, although probably not eliminate it.

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Sun Jun 30, 2019 10:45 pm

Richard,

Is VDU commands still the primary graphics interface or have you gone your own direction?

ZXDunny
Posts: 117
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Sun Jun 30, 2019 10:56 pm

Guys, why are we dithering over what BASIC should and shouldn't be? What does it matter?

BASIC is, at best a prototyping language and at worst a toy. For most people it will be somewhere inbetween - I know many folks that are happy to mess around making interesting patterns on the screen or solving maths problems with various BASICs and never develop their skills in other languages. I know many who have started in BASIC and quickly moved on once they have learnt the initial ground rules of coding.

It's rarely used in production outside of niche environments - and those shops that do use it aren't bothered about evolving the language in any particular way.

So to that end, make your BASIC do what you want it to do. It's had its day, you can't damage the language by enjoying yourself.

Andyroo

Re: Searching for BASIC

Sun Jun 30, 2019 11:23 pm

ZXDunny wrote:
Sun Jun 30, 2019 10:56 pm
...
It's rarely used in production outside of niche environments - and those shops that do use it aren't bothered about evolving the language in any particular way.
...
Nope - https://www.tiobe.com/tiobe-index/ ranks it above C# now and climbed from 10th to 5th in five years.

I’ve seen plenty of development houses and users very happy with core business software and no plans to change. Even a couple of local contractors have taken up the language to supplement the work the do.

ZXDunny
Posts: 117
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Sun Jun 30, 2019 11:31 pm

Going somewhat against what I was saying in my previous post, but I'm not seeing BASIC anywhere on that list... :D

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Sun Jun 30, 2019 11:40 pm

ScriptBasic wrote:
Sun Jun 30, 2019 10:45 pm
Is VDU commands still the primary graphics interface or have you gone your own direction?
If by "VDU commands" you mean the 'VDU stream' mechanism which operates behind the scenes to communicate graphics commands from the interpreter to the 'OS' then that is very much still used, and will continue to be. Apart from anything else many existing BBC BASIC programs assume that to be the case, so compatibility would be unacceptably compromised if it worked differently.

It also has two big advantages over any alternative. Firstly it means that you can build 'macros' containing any number of graphics commands and store them in a string (or in a file); this is very similar in concept to the graphics metafiles used by Windows. For example I put it to great use in the BBCSDL 'file selector' by creating the 'file' and 'directory' icons in this way, then when I list the contents of a directory I simply prepend the filename with one or other of these icon strings. It's rather like defining your own characters or sprites but using vector graphics rather than a bitmap!

Secondly the VDU stream mechanism is very convenient for passing the graphics commands between threads, which is a necessity in BBC BASIC for SDL 2.0. It is a characteristic of OpenGL that all graphics functions must be called from the 'GUI' thread (in SDL2 that means the thread that created the renderer); the 'graphics context' has thread affinity. The BASIC interpreter, however, runs in its own thread so there must be a mechanism for passing the graphics commands to the GUI thread. Because SDL has a built-in event queue which is ideally suited to inter-thread communication I can pass the VDU commands through that queue.

This also gives a performance benefit because the interpreter can be doing something else while the graphics are being rendered in the other thread. With luck I can get up to a two-times speedup compared with the situation when the same thread is running both the interpreter and the graphics rendering. This is a bit like the Second Processors which could be used with the BBC Micro, except that in that case the VDU stream was passed down the 'Tube' (Acorn's proprietary inter-processor communication system).
Last edited by RichardRussell on Mon Jul 01, 2019 12:05 am, edited 2 times in total.

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Sun Jun 30, 2019 11:53 pm

ZXDunny wrote:
Sun Jun 30, 2019 11:31 pm
Going somewhat against what I was saying in my previous post, but I'm not seeing BASIC anywhere on that list... :D
I don't know where you are looking but Visual BASIC .NET is currently at number 5, having risen above C# in the latest list, with Visual BASIC at number 19. As has been noted before, the only other BASIC in the Tiobe top 100 is BBC BASIC (albeit that it has sadly fallen out of the top 50 in the last year or so)!

User avatar
scruss
Posts: 2633
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Searching for BASIC

Mon Jul 01, 2019 1:32 am

ZXDunny wrote:
Sun Jun 30, 2019 10:56 pm
Guys, why are we dithering over what BASIC should and shouldn't be? What does it matter?
I think many posters here want a system that had the instantaneous impact of ROM BASIC on a home computer. This may not be realistic this days.

There are also - despite the ANSI standard - so many BASIC variants. The one you started with was probably the best, even if it wasn't.

I even found a bug in a fairly mature interpreter today, and the buggy output is almost logical. This code:

Code: Select all

10 LET I1=-3
20 LET K=1
30 FOR I1=I1 TO -20 STEP I1
40   PRINT K,I1
50   LET K=K+1
60 NEXT I1
70 PRINT "AFTER: ",I1
80 END
produced the following output:

Code: Select all

 1            -3 
 2            -6 
 3            -12 
AFTER:        -24 
It's resetting the STEP value with every loop, just like C can. The correct output (as produced by every other interpreter) should be:

Code: Select all

 1            -3 
 2            -6 
 3            -9 
 4            -12 
 5            -15 
 6            -18 
AFTER:        -21 
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Mon Jul 01, 2019 1:59 am

RichardRussell wrote: If by "VDU commands" you mean the 'VDU stream' mechanism which operates behind the scenes to communicate graphics commands from the interpreter to the 'OS' then that is very much still used, and will continue to be. Apart from anything else many existing BBC BASIC programs assume that to be the case, so compatibility would be unacceptably compromised if it worked differently.
While I was aware that your BBC BASIC has VDU byte stream implemented, it does bring up another question:

Do you implement any subset of OS_Byte (also heavily used by many many BASIC Programs).

We know that most BBC BASIC programs will not run do to the lack of the WIMP and its SWI's (even if faked).
RichardRussell wrote: I don't know where you are looking but Visual BASIC .NET is currently at number 5, having risen above C# in the latest list, with Visual BASIC at number 19. As has been noted before, the only other BASIC in the Tiobe top 100 is BBC BASIC (albeit that it has sadly fallen out of the top 50 in the last year or so)!
I do not know how long it has been since you looked at Visual BASIC, though it has very little in common with BASIC. Yes the old MS-BASIC commands are in there, though it is not used in that way anymore. With the way that Visual BASIC has been used since its introduction, calling it BASIC is a stretch at best.

Though Assembly Language is at #10. Though it does not say for what CPU.
scruss wrote: I think many posters here want a system that had the instantaneous impact of ROM BASIC on a home computer. This may not be realistic this days.

There are also - despite the ANSI standard - so many BASIC variants. The one you started with was probably the best, even if it wasn't.
Well I learned AppleSoft BASIC first, then Pascal, C, CBM BASIC v2, 65xx Assembly, then BBC BASIC V (the first introduciton to BBC BASIC was version V, ARM BASIC), then many other languages, with ARM Assembly coming shortly ater BBC BASIC.

And my prefered BASIC is BBC BASIC, do to its power and ease of use, nothing to do with what BASIC I began with. Oh and it is used exactly the same way today in RISC OS 5.24/5.26 as it was back then in Arthur OS (predecessor to RISC OS).
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Mon Jul 01, 2019 2:10 am

ScriptBasic allows changing FOR variables on the fly.

Code: Select all

a = 1
b = 20
c = 2

FOR i = a TO b STEP c
  PRINT i,"\n"
  IF i = 5 THEN
    i = 10
    b = 15
    c = 1
  END IF
NEXT
Output

Code: Select all

jrs@jrs-laptop:~/sb/examples/test$ scriba varfor.sb
1
3
5
11
12
13
14
15
jrs@jrs-laptop:~/sb/examples/test$ 
Last edited by John_Spikowski on Mon Jul 01, 2019 2:54 am, edited 2 times in total.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Mon Jul 01, 2019 2:47 am

@RichardRussell:
Also as to filetypes:
Many OS's use filetypes stored as seperate metadata in the filesystem, like RISC OS does. It is the oddity that does not if you look at it realistically.

Some OS's That Store the Filetype as seperate Metadata in the FS:
  • Xerox Alto (all systems).
  • Apple SOS.
  • Berkley Softworks GEOS (8-Bit).
  • Apple ProDOS.
  • Apple Lisa Offices System 7/7.
  • Apple Mac OS / Macintosh System Software.
  • Arthur OS (and by extension RISC OS).
  • Apple GS/OS.
  • NeXTSTEP.
  • BeOS.
  • HaikuOS.
This is very far from a complete list, there are many times more.

In fact you will likely find that the only systems that do NOT have this level of metadata are those modeled after Unix, using a FS based on MS-DOS rules based on CP/M rules (where most of our file type extensions come from), or are early 1980's OS'e that did not think about file types at all.

Other OS's that use means other than filename to determine Filetype:
  • Amiga OS.
  • AtheOS.
There are many many more, just can not find them. These used a different method of keeping tract of the filetype (in these cases by interogating the file for its type, eg magic number filetyping).

So I would ask you about the filetype issue all over again?
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Mon Jul 01, 2019 4:03 am

A quick comparison of traditional BASIC implementations.

This is a comparison of features, it negates some of the other issues like speed. For example Apple Integer BASIC is a lot faster than AppleSoft BASIC, though AppleSoftBASIC has much better support for graphics.

Also note that this only covers some of the better known BASIC versions that qualify as traditional Home Computer BASIC versions.

Implemetations that have builtin File I/O:
  • Fifth Edition Dartmouth BASIC.
  • Commodore BASIC (all versions).
  • AmigaBASIC.
  • BBC BASIC.
  • Sinclair BASIC.
  • Beta BASIC.
  • ST BASIC.
  • MSX BASIC.
  • SuperBASIC.
  • CBASIC
  • IBM PC BASIC, and its follow ons (GW-BASIC, BASICA, etc).
  • QuickBASIC.
Implementations that provide Pointers (the use of a variable as an address to access memory by type):
  • BBC BASIC.
  • Super BASIC.
Many others can accomplish the same goal with PEEK/PEEKW/PEEKL and POKE/POKEW/POKEL.

Implementations that provide a reasonable set of integrated graphics commands:
  • Commodore BASIC 3.5 and newer.
  • Sinclair BASIC.
  • Beta BASIC.
  • Super BASIC.
  • AppleSoft BASIC.
  • AmigaBASIC.
  • BBC BASIC.
  • MSX BASIC.
  • ST BASIC.
  • IBM PC BASIC, and follow ons.
  • QuickBASIC.
Implementations that support clipping of graphics output:
  • Commodore BASIC 3.5 and newer.
  • AmigaBASIC.
  • SuperBASIC.
  • MSX BASIC.
  • ST BASIC.
  • IBM PC BASIC, and follow ons.
  • QuickBASIC.
Implementations that have integrated support for GUI/WIMP commands:
  • AtariBASIC.
  • AmigaBASIC.
  • QuickBASIC.
Implementations that provide a direct method of calling the OS:
  • BBC BASIC.
  • AmigaBASIC.
  • QuickBASIC.
Implementations that support parameterised procedures/functions with local veriables:
  • BBC BASIC.
  • SuperBASIC.
  • AtariBASIC.
  • QuickBASIC.
Now in the order of speed, none outperforms BBC BASIC V on the ARM for interpreted BASIC. Some of the compiled BASIC implementations do pretty good.

I think this list gives a fairly good idea of why I prefer BBC BASIC V.

It may be noted that I left BBC BASIC V off of the list of ones that support GUI/WIMP. BBC BASIC V does not support these things, though has to make calls to the operating system to do them.

I also left BBC BASIC V off of the list of support for clipping graphics output. Again BBC BASIC V does not support this, it needs to call the OS to do this.

Also note that unfortunately QuickBASIC is relegated to Macintosh computers running in 24-bit addressing mode, do to MS making some poor coding choices.

Final NOTE: AppleSoft and Apple Interger BASIC do not support file I/O internally, they are patched by Apple DOS/ProDOS to provide said support.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Mon Jul 01, 2019 4:14 am

@DavidS,

If I bring back the BBC extension module as BBV, would you update the library to where Matrix is with it and see if you can get it running on SDL2?

I personally don't have a craving for Acorn Basic V but from what I see on this UK centric forum the language still appeals to some. (the 57 Chevy in the garage)

Heater
Posts: 13930
Joined: Tue Jul 17, 2012 3:02 pm

Re: Searching for BASIC

Mon Jul 01, 2019 4:46 am

ScriptBasic,
I personally don't have a craving for Acorn Basic V but from what I see on this UK centric forum the language still appeals to some. (the 57 Chevy in the garage)
I don't know how many Americans actually had a Chevy in the late 1950. But almost nobody in the UK had an Acorn RISC Machine (Archimedes). To expensive. The vast majority of home users opted for an Atari ST or Commodore Amiga when looking to upgrade their 8-bit micros. I'll wager that almost nobody knows what "Acorn Basic V" is.

To this day I have never actually seen an Archimedes for real, despite lusting for one back in the day, when I could not afford it :(
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Mon Jul 01, 2019 4:57 am

I put a lot of work into making the original Brandy Basic SDL graphics a standalone library other languages could use. I even put a C BASIC wrapper around it to make it more readable and encourage improvement.

I would like to see someone find value in the library working with ScriptBasic. Most of the work is already done.

User avatar
rpdom
Posts: 15608
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Searching for BASIC

Mon Jul 01, 2019 6:19 am

Heater wrote:
Mon Jul 01, 2019 4:46 am
ScriptBasic,
I personally don't have a craving for Acorn Basic V but from what I see on this UK centric forum the language still appeals to some. (the 57 Chevy in the garage)
I don't know how many Americans actually had a Chevy in the late 1950. But almost nobody in the UK had an Acorn RISC Machine (Archimedes). To expensive. The vast majority of home users opted for an Atari ST or Commodore Amiga when looking to upgrade their 8-bit micros. I'll wager that almost nobody knows what "Acorn Basic V" is.

To this day I have never actually seen an Archimedes for real, despite lusting for one back in the day, when I could not afford it :(
They were good machines. I got a discount on mine, back when they came out, but it still cost me a few months wages. I also attended the launch in London and had an introductory "training" day on them at Acorn in Cambridge.

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Mon Jul 01, 2019 7:56 am

I'm going to do a DIFF of the Brandy Basic code I used and the Matrix version. It can't be that much diffetent.

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Mon Jul 01, 2019 8:18 am

DavidS wrote:
Mon Jul 01, 2019 1:59 am
Do you implement any subset of OS_Byte (also heavily used by many many BASIC Programs).
What do these "many" BASIC programs use the OS_Byte API for? I would expect that anything a program 'commonly' needs to do would be provided as a native BASIC statement or function, for example I believe INKEY with a negative parameter (to test whether a key is depressed) is implemented as an OS_Byte call under the hood, on Acorn platforms.

It represents a failure of the language design if a commonly needed operation can only be achieved by making a direct OS call, immediately making the program platform-specific. It wouldn't have been possible to make the cross-platform BBC BASIC for SDL 2.0 had direct OS calls been a common requirement in programs.
Yes the old MS-BASIC commands are in there, though it is not used in that way anymore.
That's the point: the old-style commands can mostly still be used, even if it's not recomended, so VB must count as BASIC in any discussion of this sort. Some of my 'modern' BBC BASIC programs don't look much like traditional BASIC either!

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Mon Jul 01, 2019 8:32 am

DavidS wrote:
Mon Jul 01, 2019 2:47 am
Some OS's That Store the Filetype as seperate Metadata in the FS:
How many of those OSes are in common use today? None of the popular desktop or mobile OSes in 2019 routinely store the file type as metadata, they either rely on the 'extension' or on a signature in the file itself.
So I would ask you about the filetype issue all over again?
It isn't an issue for BBC BASIC for SDL 2.0 which doesn't run on any of the OSes you list (not least because I don't suppose SDL2 does either). It's quite enough work supporting five OSes simultaneously (more when you include 32/64-bit variants and Raspbian) without worrying about OSes that nobody uses.

ZXDunny
Posts: 117
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Mon Jul 01, 2019 8:34 am

scruss wrote:
Mon Jul 01, 2019 1:32 am
I think many posters here want a system that had the instantaneous impact of ROM BASIC on a home computer. This may not be realistic this days.

There are also - despite the ANSI standard - so many BASIC variants. The one you started with was probably the best, even if it wasn't.
Back when I were a nipper, my first exposure to programming was Sinclair BASIC. First with the ZX81 and then later the Spectrum - and after all these years of professional coding in various IDEs and languages what I really, really wanted was that immediacy - a language that starts up, gives you an interactive "console" 8-bit style with direct access to the screen with no setup code needed. The language wasn't important, but as Sinclair was the one I started with, that's the one I went with. I've extended it massively with more colours, better graphics commands, flow control and suchlike - all while maintaining as much compatibility with the original language as I can. The hard part was making sure that the BASIC code could be compiled to bytecode and still remain interactive - the original was pure interpretation (though tokenised on entry).

I think I've largely succeeded. I've been maintaining it for ten years now, so it's pretty mature but still growing.

BBC BASIC was (amongst others) where I went to harvest new ideas.
DavidS wrote:
Mon Jul 01, 2019 4:03 am
A quick comparison of traditional BASIC implementations.

This is a comparison of features, it negates some of the other issues like speed. For example Apple Integer BASIC is a lot faster than AppleSoft BASIC, though AppleSoftBASIC has much better support for graphics.

Also note that this only covers some of the better known BASIC versions that qualify as traditional Home Computer BASIC versions.
You can add SpecBAS as having the following:

builtin File I/O
Pointers (which is mostly the ability to get the address of a variable or memory block and then use the various POKE commands to write to it - when compiled there's no difference to writing to a variable with a pointer prefix or suffix)
Integrated graphics commands - arguably way more than users will likely ever need
Clipping
GUI/WIMP commands - built in commands for creating persistent UI elements on the screen, no access to the host WM or OS API
Parameterised procedures/functions with local variables

As for speed, it's roughly about the same speed as Python. In some cases it's a lot faster, in others Python beats it handily. SpecBAS has no support for integer maths operations.

The bytecode compiler in SpecBAS uses peephole optimisation, expression simplification, loop unrolling etc etc so gets a reasonable performance. I'm happy with it, but am always looking for more ways to improve speed. Short of compiling to native asm, I'm about done in that regard though.
Heater wrote:
Mon Jul 01, 2019 4:46 am
ScriptBasic,
I personally don't have a craving for Acorn Basic V but from what I see on this UK centric forum the language still appeals to some. (the 57 Chevy in the garage)
I don't know how many Americans actually had a Chevy in the late 1950. But almost nobody in the UK had an Acorn RISC Machine (Archimedes). To expensive. The vast majority of home users opted for an Atari ST or Commodore Amiga when looking to upgrade their 8-bit micros. I'll wager that almost nobody knows what "Acorn Basic V" is.

To this day I have never actually seen an Archimedes for real, despite lusting for one back in the day, when I could not afford it :(
We had some at our school just as I was leaving. I recall being particularly impressed with the art package. I however moved up to an Amiga shortly after leaving school which satisfied my 16bit urges. The Archie was a very nice bit of kit though, even if its OS looked terrible :)

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Mon Jul 01, 2019 9:01 am

DavidS wrote:
Mon Jul 01, 2019 4:03 am
I also left BBC BASIC V off of the list of support for clipping graphics output. Again BBC BASIC V does not support this, it needs to call the OS to do this.
Surely VDU 24... (set graphics viewport) works in BBC BASIC V? Or are you considering VDU to be an 'OS call' like SYS? The VDU statement is implemented in a largely compatible fashion in every version of BBC BASIC that I know of, so I consider it a feature of the language, not the OS.

miab3
Posts: 4
Joined: Mon Jul 01, 2019 12:50 pm

Re: Searching for BASIC

Mon Jul 01, 2019 1:02 pm

@ZXDunny,

Have you tried to compile your SpecBAS with Lazarus for Raspberry Pi?
https://www.getlazarus.org/setup/?download#linux

Michal

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Mon Jul 01, 2019 1:16 pm

RichardRussell wrote:
Mon Jul 01, 2019 8:32 am
DavidS wrote:
Mon Jul 01, 2019 2:47 am
Some OS's That Store the Filetype as seperate Metadata in the FS:
How many of those OSes are in common use today? None of the popular desktop or mobile OSes in 2019 routinely store the file type as metadata, they either rely on the 'extension' or on a signature in the file itself.
So I would ask you about the filetype issue all over again?
It isn't an issue for BBC BASIC for SDL 2.0 which doesn't run on any of the OSes you list (not least because I don't suppose SDL2 does either). It's quite enough work supporting five OSes simultaneously (more when you include 32/64-bit variants and Raspbian) without worrying about OSes that nobody uses.
Fair enough. Though SDL 2 does run on many of those OS's (at least the ones still used on a daily basis by many people. I would actually like to see a port of BBC BASIC for SDL on RISC OS, though I am not the person for that (I do not like working with UnixLib), RISC OS does support SDL2.

As to the question of how many such OS's are used still on a daily basis, and are still kept up to date, well Mac OS (68K and PowerPC), GS/OS, HaikuOS, RISC OS, BeOS to name a few.

There are many newer OS's that do the same, it just takes a lot of time to research which ones, especially beings as they are not ones I personally use. I remember recently seeing this in the feature list of one of the newer OS's that is gaining a little bit of popularity among some circles.

It is interesting to note that most OS's that began with a GUI/WIMP environment as standard also use extended metadata for filetypes, including the newer OS's.

CP/M was never meant to have a GUI when it was designed, so it used file name extensions.

Unix was never meant to have a GUI when it came about, so it just trusts that the user know what they are doing (it does not even care about file name extensions).

Linux/BSD/Darwin, etc were all modeled to some extent after Unix and as such use the Unix model of doing things.

Atari TOS is based on GEMDOS which is based on DR-DOS which evolved from CP/M.

DR-DOS/PC-DOS/MS-DOS/FreeDOS were all modeled after the way of doing things in CP/M. Windows used the DOS model, as it ran on DOS. NT (which includes windows 10) was based on OS/2, OS/2 used the DOS model of doing these things for the most part.

Of the OS's still in use:
The only ones that lack support for filetypes in extended metadata are those modeled after CP/M or Unix. All others that I know of store filetypes in extended metadata.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
RichardRussell
Posts: 592
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Mon Jul 01, 2019 1:40 pm

DavidS wrote:
Mon Jul 01, 2019 1:16 pm
RISC OS does support SDL2.
I don't think so, it's not mentioned in the list of supported platforms (SDL 1.2 may support RISC OS, but that's not relevant here). To run 'my' BBC BASIC under RISC OS (on a Raspberry Pi) it would be easier to bypass SDL2 completely and interface the interpreter directly with the OS.
still kept up to date, well Mac OS (68K and PowerPC)
SDL2 doesn't support Mac OS 9.

To reiterate, the only OSes supported by BBC BASIC for SDL 2.0 are Windows (32 and 64 bits), MacOSX (64 bits only), Linux x86 (32 and 64 bits), Raspbian (32 bits), Android (32 bits only at present) and iOS (64 bits only).

Return to “Other programming languages”