User avatar
hitsware
Posts: 254
Joined: Sat Mar 26, 2016 10:12 pm
Location: sacramento , california , usa
Contact: Website

Re: Introduction to BBC BASIC

Mon Nov 30, 2020 5:27 pm

Image
Attachments
2020-11-30-092328_1366x768_scrot.png
2020-11-30-092328_1366x768_scrot.png (78.85 KiB) Viewed 1106 times
http://www.hitswares.com/

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

Re: Introduction to BBC BASIC

Mon Nov 30, 2020 5:56 pm

I'm not sure what the point of your post is. That Chromium on the Pi doesn't support WebAssembly threads has been discussed previously here. There's nothing I can do about that! Once again, the list of browsers known to be compatible with the in-browser edition of BBCSDL is:

Desktop versions of Brave, Chrome, Edge, Firefox, Opera and Vivaldi.
Chrome for Android (with WebAssembly threads enabled in the experimental features).

For the best results use Firefox, which is noticeably faster than the others.

Even if it did run on the Pi it would be excruciatingly slow. There is approximately a 3x overhead in running WebAssembly compared with native code, and the Pi is already very slow compared with a typical desktop or mobile device.

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

Re: Introduction to BBC BASIC

Mon Nov 30, 2020 8:27 pm

Thanks for the warning, Richard. I tried the WASM link - https://wasm.bbcbasic.co.uk/bbcsdl.html - in firefox-esr (Firefox v.68) on a Raspberry Pi 4, and it gave a similar exception. Not that I was expecting it to run well after your warning, but I wanted to see if it would run at all.

If you want to run BBC BASIC in the browser on a Raspberry Pi, it seems you're stuck with an emulator: https://bbc.godbolt.org
(this runs painfully slowly for me)
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: Introduction to BBC BASIC

Mon Nov 30, 2020 9:11 pm

scruss wrote:
Mon Nov 30, 2020 8:27 pm
I tried the WASM link in firefox-esr (Firefox v.68) on a Raspberry Pi 4, and it gave a similar exception.
I don't know what determines whether WebAssembly threads will be supported on a particular platform. It may simply be that it's a very new feature, only available for a couple of months on most browsers, and that it's taking time to roll out to less popular platforms.

The only mobile browser that has it currently is Chrome on Android, and even then it's classed as experimental and is disabled by default. So it's possible that it will appear on Raspberry Pi browsers eventually, but it may be that the performance simply isn't good enough to make it worthwhile.

I am paying the price for being an 'early adopter' of WebAssembly threads (I don't know of any other application that uses them), but without that feature my BBC BASIC, which is totally reliant on multithreading, couldn't run.

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

Re: Introduction to BBC BASIC

Mon Nov 30, 2020 9:49 pm

RichardRussell wrote:
Mon Nov 30, 2020 9:11 pm
I am paying the price for being an 'early adopter' of WebAssembly threads (I don't know of any other application that uses them), but without that feature my BBC BASIC, which is totally reliant on multithreading, couldn't run.
Extraordinarily cool, as ever. Not particularly surprising that WASM threads didn't work in firefox-esr, since it's Firefox v.68 and they only came in with Firefox 79 back in July.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
hitsware
Posts: 254
Joined: Sat Mar 26, 2016 10:12 pm
Location: sacramento , california , usa
Contact: Website

Re: Introduction to BBC BASIC

Wed Dec 02, 2020 12:35 am

RichardRussell wrote:
Mon Nov 30, 2020 5:56 pm
I'm not sure what the point of your post is. That Chromium on the Pi doesn't support WebAssembly threads has been discussed previously here. There's nothing I can do about that! Once again, the list of browsers known to be compatible with the in-browser edition of BBCSDL is:

Desktop versions of Brave, Chrome, Edge, Firefox, Opera and Vivaldi.
Chrome for Android (with WebAssembly threads enabled in the experimental features).

For the best results use Firefox, which is noticeably faster than the others.

Even if it did run on the Pi it would be excruciatingly slow. There is approximately a 3x overhead in running WebAssembly compared with native code, and the Pi is already very slow compared with a typical desktop or mobile device.
Happened onto it here :
http://www.thebackshed.com/forum/ViewTo ... &TID=13135
http://www.hitswares.com/

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

Re: Introduction to BBC BASIC

Wed Dec 02, 2020 8:22 pm

It's still a little rude to make a "this thing that can't work doesn't work" post by just including an image: some explanation of why you think it should work might've been a start.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: Introduction to BBC BASIC

Fri Dec 04, 2020 12:26 pm

I've released version 1.18a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android, iOS and in-browser. The changes in this version are as follows:

  1. BASIC Interpreter / Run Time Engine

    Added a new command-line switch -borderless to remove the title bar.

    Extended the PTR() pseudo-variable (again) to accept a function or procedure name as a parameter.

    Fixed an obscure bug which could cause a star-command to crash if within 256 bytes of the end of a library!

  2. IDEs and Utilities

    Updated BBCEdit to version 0.37.2, which speeds up directory listings when there are many files.

    Modified SDLIDE to make the behaviour of Backspace more consistent, for example you can backspace through the line-number field.

  3. Libraries

    Added Svein's excellent pdflib library for creating PDF files (single A4 page only).

    Fixed a bug in aagfxlib causing 'dashed' lines to be sometimes drawn slightly too long.

    Modified box2dgfx, imglib, shaderlib and webgllib to clip to the current graphics viewport, if any.

  4. Example Programs

    Added saa505x.bbc in examples/tools, to demonstrate the different MODE 7 character sets.

    Added raytrace.bbc in examples/graphics, another shader demo from Shadertoy.com (sorry, doesn't run on the RPi).

    Updated aagfxdem.bbc in examples/graphics, to check that 'dashed' lines are the right length.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspbian, Android, iOS, 64-bit Linux and in-browser editions, currently).

Please remember that if you use the BBC2APK Android Application Generator you should download a new APK template to ensure that any updates to the run-time engine are incorporated in your own apps.

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

Re: Introduction to BBC BASIC

Tue Dec 15, 2020 6:55 pm

I have updated the Console Mode editions of BBC BASIC to version 0.30. The main changes in this version are:

  • Changed the 'autorun' priority to favour running a .bbc program, with the same name as the executable, over a program specified on the command line. This allows a utility created using BBC BASIC to accept command-line parameters.

  • *DUMP has been extended to accept optional hexadecimal start and end offsets (or start and length) using the same syntax as *LOAD and *SAVE.

  • Fixed files created with OPENOUT sometimes being padded with extra bytes (Windows edition only, although could theoretically have happened on the others).

  • Fixed an obscure bug that could cause a 'star' command to crash if within 256-bytes of the end of the last-loaded library!
Version 0.30 may be downloaded from the usual place:


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

Re: Introduction to BBC BASIC

Sun Dec 20, 2020 11:20 am

RichardRussell wrote:
Tue Dec 15, 2020 6:55 pm
I have updated the Console Mode editions of BBC BASIC to version 0.30.
I have now added the Console Mode editions to the Github project.

PDP8
Posts: 20
Joined: Thu Nov 21, 2019 4:04 am
Location: Los Angeles

Re: Introduction to BBC BASIC

Wed Dec 23, 2020 10:53 am

Richard - just a quick note of thanks for BBC Basic after all these years.

Despite being on the other side of the pond, I always enjoyed BBC Basic and it's documentation the most back when I was first introduced to computing. It was either staring at a blank screen, or learning how to do something .

Prior to that, I still have my most prized book from Cambridge and still inspires me today since the author hand-drew everything!

Illustrating Basic (A simple programming language)
by Donald Alcock
Cambridge University Press 1977
ISBN 0 521 21703

I think what gets lost is that Basic, as it initially came from Professors Kemeny and Kurtz at Dartmouth College, was intended for undergrad liberal-arts type students to get access to computing (DTSS time-shared no less!), rather than being denied access by not being in an advanced math/scientific curricula, nor to become particle-physics programmers.

Power to the people! Reputedly, Professor Kemeny had the ability to bring things like E=mc2 to the level of the common man on the street and have them understand.

So to bring things like time-sharing and an easy to use language so that non-brainiacs could actually do something useful, fun, and collaborative was totally mind-blowing.

But I know you know this already. I wish more understood this, but marketing and politics have always overshadowed kids who don't remember the joy of making a computer count to 10, instead of staring at a blinking prompt. :)

Thanks again for all your hard work all these years!

Puffergas
Posts: 205
Joined: Thu Dec 19, 2019 12:16 am

Re: Introduction to BBC BASIC

Mon Dec 28, 2020 3:44 pm

+1

I also admire his dedication and steady work !

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

Re: Introduction to BBC BASIC

Mon Dec 28, 2020 5:05 pm

PDP8 wrote:
Wed Dec 23, 2020 10:53 am
Richard - just a quick note of thanks for BBC Basic after all these years.
Keeping BBC BASIC up to date and (hopefully) competitive with other programming languages has only been possible because of the foresight of those who designed it back in 1981. I have always tried to keep any extensions in keeping with the original 'spirit' of the language, and compromises have rarely been required.

Very few languages can claim the degree of cross-platform compatibility that BBC BASIC achieves, even to the extent of 2D & 3D graphics, sound, physics simulation, shader programming etc., allowing programs to be written that will run on virtually any platform without modification. Even 'leading' languages like Python need extensions that are not installed by default (such as pygame) to come anywhere close.

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

Re: Introduction to BBC BASIC

Mon Dec 28, 2020 8:37 pm

This is an older dialect of BBC BASIC than you are supporting, Richard, but I was very impressed with Getting Started in BBC BASIC with Owlet, which embeds multiple emulated BBC Micros into the one browser window.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

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

Re: Introduction to BBC BASIC

Mon Dec 28, 2020 9:28 pm

scruss wrote:
Mon Dec 28, 2020 8:37 pm
I was very impressed with Getting Started in BBC BASIC with Owlet, which embeds multiple emulated BBC Micros into the one browser window.
I saw that mentioned at the StarDot forum, it's very clever (although I confess I'm not a 'retro-computing' enthusiast, so the whole idea of running programs on an emulated 1982-vintage BBC Micro leaves me cold).

It would be nice to see something similar for my modern versions, using the in-browser edition of BBC BASIC for SDL 2.0, although I doubt that it would be possible to display the code listing alongside the output in the same way (given that mine is coded in WebAssembly rather than JavaScript). I wonder if there are any web experts out there who might attempt it. 8-)

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

Re: Introduction to BBC BASIC

Tue Dec 29, 2020 11:26 pm

RichardRussell wrote:
Mon Dec 28, 2020 9:28 pm
I doubt that it would be possible to display the code listing alongside the output in the same way
What should be achievable, though, is to have a BASIC code editor in one browser tab which opens another tab to run the program. I've confirmed by experiment that if one saves a file to the browser's persistent (IDBFS) file system, and then opens another tab, that file is visible from there.

PDP8
Posts: 20
Joined: Thu Nov 21, 2019 4:04 am
Location: Los Angeles

Re: Introduction to BBC BASIC

Tue Dec 29, 2020 11:58 pm

I'm not into retro-computing either and wouldn't go back if I could - however the *ideals* are still sound.

I guess I'm in an appreciative mood for both Cambridge and Dartmouth based upon what's under my fingertips, albeit it is a long historical stretch of things not implemented to be productized..

Cambridge Programming Language > BCPL > B > C as the systems programming language that Ken Thompson and Dennis Ritchie implemented on limited hardware for the *nix kernel. Just to provide a nice environment for a small handful of guys that got placed into an attic at ATT.

And oh yeah, what was included in those early *nix releases? A version of basic akin to DEC-Basic. Let the user choose the best tool for the job and their ability.

Whaddy'a know? I've got BBC-Basic and the RPD under my fingertips at this very moment.

Good ideas stand the test of time! :)

Return to “Other programming languages”