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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 2:21 am

Heater wrote:
Sun Jul 21, 2019 11:14 pm
DavidS,
Read again. I explained where to get the tool to extract the files from the StrongHelp ImageFS.
I read again. No you did not. No links to anywhere. No instructions. Nothing.

Whatever "ImageFS" is, it's not a file system that Linux or any other OS knows about.
ASCII itself is only recently been widely adopted (only about 40 years has it been widely adopted).
Yes. So what?

We managed to decipher Egyptian hieroglyphs from the Rosetta Stone. So I'm sure the simple ASCII representation, or similar, will be no problem.

All we need just now us a clue...
I do not use the Linux tools for RISC OS development personally,
So what?

The idea is to get the documentation out to the world in a way they can actually read it.

It's a file right? It's in a format that has some specification right? Can you show us that specification?
So you ignored the link I provided to the sdk for you to find the information?
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: Introduction to BBC BASIC

Mon Jul 22, 2019 2:26 am

John Spikowski wrote:
Sun Jul 21, 2019 10:54 pm
David,

It seems you have no interest in Raspbian so I've given up hope you would be the guy to give the Brandy extension module a refresh for RPi users.

It will be interesting to see if you can get ScriptBasic running on RISC OS. ScriptBasic runs great on ReactOS if a Windows alternative excites you.
I only look at ReactOS because people always talk about Windows this Windows that. As if anyone really uses windows anymore (I really believe that most of the Windows Licenses out there are recorded do to computers sold with windows that get Linux installed before they are used for anything, at least in many cases).. Do you know anyone that actually uses windows as anything other than a distraction now days (other than maybe Heater).

You are likely correct that I would put less effort into the ScriptBasic extensions on Raspbian than someone else, as I rarely come over here to Raspbian (it will not even let me remove text from a post, though it will let me add).
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: Introduction to BBC BASIC

Mon Jul 22, 2019 2:29 am

Ok back on RISC OS with the complete ScriptBasic source.

As I signed on to port ScriptBasic to RISC OS, I am going to continue on that path.

Perhaps this is better continued in the ScriptBasic thread.
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

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 3:46 am

DavidS,

Do you mean that link to GCCSDK?

Sorry, it did not occur to me that to read the StrongHelp format specification or find a tool the reads it I would need an SDK for GCC.

Anyway, I'm not about to start digging around in there.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 3:54 am

if Steve Drain grants his permision to do so I guess I could probably dump the text files out of the stronghelp manual.

Remember formatting is likely to be all wrong, and the links will have no meaning.
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
rpdom
Posts: 14722
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 6:30 am

DavidS wrote:
Mon Jul 22, 2019 2:26 am
Do you know anyone that actually uses windows as anything other than a distraction now days (other than maybe Heater).
Only about pretty much everyone.
My father uses Windows. My Mother uses Windows. My Sister uses Windows. My Wife uses Windows. Pretty everyone other than me in my family uses Windows as their primary OS. My brother dabbles in Linux occasionally, but mostly he uses Widnows. Although I do know or have met quite a few Linux people (including a Debian kernel maintainer), most people I know (which is a very large number) use Windows.

I work part time as a volunteer in two public libraries. All the computers there - staff and public access use Windows. The machines that register books in and out automatically use a version of Windows. People come in to use the free wifi with their Windows laptops. In one of the libraries I run a Code Club. We mostly use Windows PCs for that (15 of them) although we do have a few Pi users, which is good. One even brings his own Pi in and got a HDMI to DVI-D cable so he can use the screens in the library.

Soruk
Posts: 21
Joined: Thu Jun 20, 2019 11:25 am

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 8:03 am

Based on the suggestion I could open the directory, I did just that in RPCEmu, and extracted the files to a directory, which I then zipped up under the host OS - so filetypes are contained as ',ffd' (for example), zipped that up and I've uploaded it at http://pegasus.matrixnetwork.co.uk/Basa ... racted.zip
@Steve Drain - if you're unhappy with this, let me know and I'll take it down.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 9:31 am

rpdom wrote:
Mon Jul 22, 2019 6:30 am
DavidS wrote:
Mon Jul 22, 2019 2:26 am
Do you know anyone that actually uses windows as anything other than a distraction now days (other than maybe Heater).
Only about pretty much everyone.
My father uses Windows. My Mother uses Windows. My Sister uses Windows. My Wife uses Windows. Pretty everyone other than me in my family uses Windows as their primary OS. My brother dabbles in Linux occasionally, but mostly he uses Widnows. Although I do know or have met quite a few Linux people (including a Debian kernel maintainer), most people I know (which is a very large number) use Windows.

I work part time as a volunteer in two public libraries. All the computers there - staff and public access use Windows. The machines that register books in and out automatically use a version of Windows. People come in to use the free wifi with their Windows laptops. In one of the libraries I run a Code Club. We mostly use Windows PCs for that (15 of them) although we do have a few Pi users, which is good. One even brings his own Pi in and got a HDMI to DVI-D cable so he can use the screens in the library.
I work for a company that specialises in audio software and hardware - although we use MacOS and Linux, Windows is our primary development platform (a team of 20 to 30). Every outfit I've worked for has been Windows in dev, Linux in back office. Porting to MacOS is a secondary concern.

Our local council is entirely run on Windows. All the schools are now Windows. Every single web cafe, IT section in local libraries are all, with zero exceptions, Windows.

I have never seen, in all my years, any form of RiscOS in actual use since the Archies at school.

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 11:31 am

Soruk wrote:
Mon Jul 22, 2019 8:03 am
@Steve Drain - if you're unhappy with this, let me know and I'll take it down.
The whole thing is released under the modified BSD licence, so do as you will, just don't blame me.

I cannot see why most of the members here are making such a fuss about a piece of software they will never be able to use. Once upon a time I had hopes that Basalt would become some sort of accepted extension to ARM BASIC and there is more than one attempt at providing full paper documentation on my drive, but it was always more fun programming. For the curious, I have uploaded a summary of keywords to http://kappa.me.uk/Basalt/Keywords.zip. This is the same file that provides command-line help, with a little bit of formatting. It is not very comprehensive and may have mistakes, but it will give you an idea.

There are a few quite important pieces of software on RISC OS that are primarily documented using StrongHelp, That is because it provides a system-wide method of calling up context-sensitive information instantly. To do this it exploits two features of RISC OS that are not common, or absent, from other OSs. The first is a system integrated method of passing messages among all applications. A program does not have to subscribe to anything to send and receive them. The second is image file systems. A single file opened as an image file is exacly equivalent to a mounted drive and software can be run directly from it. There is more to it than that, but it really is special.

StrongHelp itself is a bit of an orphan as the original author left the RISC OS scene a very long time ago. It is kept running, but there is no development. That is testament to its importance and robustness. The markup system is contempory with HTML2, but it serves a different purpose.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 1:18 pm

Steve Drain wrote:
Mon Jul 22, 2019 11:31 am
I cannot see why most of the members here are making such a fuss about a piece of software they will never be able to use.
I can't speak for "most of the members" but as far as I am concerned I was responding to the suggestion that it might be possible to write an automated conversion tool that would convert a BBC BASIC program using my extensions into a program which would function the same but using your extensions, or vice versa. To assess whether that is at all feasible, or just one of DavidS's fantasies, I would need to know a great deal more about Basalt than I currently do. Hence my desire to find documentation in a format I can easily read.
The first is a system integrated method of passing messages among all applications. A program does not have to subscribe to anything to send and receive them.
Windows has built-in inter-process messaging of course, including 'broadcast' messages, indeed it's central to how Windows works.
The second is image file systems. A single file opened as an image file is exacly equivalent to a mounted drive and software can be run directly from it.
MacOS has that, in the form of .dmg (disk image) files. Windows not so much, although the integrated support for Zip files, which appear in the File Explorer as directories, comes close.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 1:24 pm

Steve Drain,
...a system integrated method of passing messages among all applications.
That sounds like dbus in the Linux world. I have never used it so I can't comment on how they compare.
The second is image file systems.
In the Unix/Linux world I do that all the time with loop back mounts. https://fossbytes.com/mounting-isos-ima ... -in-linux/

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 3:52 pm

Steve Drain wrote:
Mon Jul 22, 2019 11:31 am
StrongHelp itself is a bit of an orphan as the original author left the RISC OS scene a very long time ago. It is kept running, but there is no development. That is testament to its importance and robustness. The markup system is contemporary with HTML2, but it serves a different purpose.
It might also be a testament to a small and moribund user base. It didn't fill me with much confidence that the FAQ starts with:
StrongHelpFAQ.jpg
"When I started writing StrongHelp I looked at HTML, but found it largely unreadable and decided to make my own syntax. If I had done today, I would've used HTML. Not because it has gotten any better, but because it is so well known."
StrongHelpFAQ.jpg (30.42 KiB) Viewed 403 times
“My homebrew markup system is better than the one the entire rest of the world uses” has just a touch of hubris to it. Yes, the text-based protocols we sling about on the web may not be the absolute best, but they're the ones everyone can understand and has tools to work with. If the StrongHelp dev has left, how well will the RISC OS community respond to the challenges of documentation in bidi languages with Unicode rendering and accessibility requirements? HTML has addressed all of these because of its global user base.

(even getting that screen shot out of RISC OS and into a usable file format required building old/unmaintained Python libraries and patching code so it would run even in the soon-to-be-deprecated Python 2.7. If anyone wants to share in the joy of building spr2img, it's here: The Spritefile Module)

I went looking for a RISC OS imagefs decoder/mounter on Linux with no joy. Seems that the term is a common search terms for the juggernaut Kubernetes system, so any RISC OS signal is lost in the noise.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 4:25 pm

scruss wrote:
Mon Jul 22, 2019 3:52 pm
bidi languages with Unicode rendering
If I can use that as an excuse to drag this thread, kicking and screaming, back on topic, something that I've not (yet) attempted to support is bi-directional text in the SDLIDE code editor. Support for Unicode (UTF-8) is there, so if you include Arabic or Hebrew text, say, in a quoted string the characters are rendered (not correctly in the case of Arabic, admittedly, because of the contextual forms) but left-to-right instead of right-to-left:

Image

Fixing this is probably not a high priority but it would be nice. A pre-requisite is to identify the points in a string where the direction changes, which implies being able to deduce whether it's a RTL language from the Unicode code points. There must be a standard mapping for this but I haven't looked for one.

If somebody would like to take on the task of adapting the SDLIDE code editor to support bi-directional text (which ought not to be too onerous, it is written in BBC BASIC after all) I would be only too happy to give encouragement!

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 4:44 pm

To assess whether that is at all feasible, or just one of DavidS's fantasies, I would need to know a great deal more about Basalt than I currently do. Hence my desire to find documentation in a format I can easily read.
No fantisy. Ok there are difficulties to overcome.

And we see now why I rarely post code anymore.

When I make a suggestion, people mock it. As in this example.

When I post working code everyone says "I will not look at assembly Language", or why did you use assembly language, etc etc, etc, etc.

So i pretty much stopped posting code on these forums as a result.

I still occasionally make suggestions as it is tolarable to deal with the mocking. It is not tolarable to have people spit at code for no reason other than the programming language of choice.
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

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 5:08 pm

Never mind the mocking.

If it's a significant piece of code and it works well and you want to share it then it matters not what people say. The code speaks for itself.

Put it in a repo on github or bitbucket or gitlab or wherever and point people at it from discussion here.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 5:32 pm

Heater wrote:
Mon Jul 22, 2019 5:08 pm
Never mind the mocking.

If it's a significant piece of code and it works well and you want to share it then it matters not what people say. The code speaks for itself.

Put it in a repo on github or bitbucket or gitlab or wherever and point people at it from discussion here.
The mocking is ok, as I said. Though spitting on the code without actually looking at it just because it includes assembly language is what I am not willing to tolerate.

Go ahead and mock my code, that is how I learn. Though mock my code, do not ignore the code and spit on it because it contains assembly language.

See my post over in the thread in the C sub-forum for more information on this view.
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
scruss
Posts: 2355
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 5:52 pm

RichardRussell wrote:
Mon Jul 22, 2019 4:25 pm
If I can use that as an excuse to drag this thread, kicking and screaming, back on topic, something that I've not (yet) attempted to support is bi-directional text in the SDLIDE code editor.
but huge props for a seriously valiant attempt. Bidi is one of the maddening things that many programmers just can't get their heads around. "I'm adding characters to this string but the rendered length is getting shorter!"

I do appreciate all you've done over the years for BBC BASIC, from being involved in the very earliest specification work to maintaining it to the present day. Thank you!
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 5:57 pm

Heater wrote:
Mon Jul 22, 2019 5:08 pm
If it's a significant piece of code and it works well and you want to share it then it matters not what people say. The code speaks for itself.
But if it has nothing to do with BBC BASIC, can you discuss it in another thread, please? I'd like my thread back!

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 6:36 pm

Sorry Richard.

About that bidi thing. It's great. If you have bidi support you can write code like this:

Code: Select all

let ﻝ = {
    ﺍ: function () {
        return ("Hello world!");
    }
}

let msg = ﻝ.ﺍ();
console.log(msg);

ف = (2 + 3) * (3 + 3)

console.log(ف);
And amaze people that it runs perfectly.

But seriously, I think its a really bad idea. Support left to right or right to left but not both at the same time.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 7:29 pm

Heater wrote:
Mon Jul 22, 2019 6:36 pm
If you have bidi support you can write code like this:
Because BBC BASIC is tokenised, so characters with the high bit set represent keywords, you can't use Unicode for variable or function names but only in quoted strings, comments, DATA statements etc. Personally I don't think that's a bad thing.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 7:43 pm

Sounds good to me.

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

Re: Introduction to BBC BASIC

Mon Jul 22, 2019 10:08 pm

Heater wrote:
Mon Jul 22, 2019 6:36 pm
Support left to right or right to left but not both at the same time.
I'm not sure that I understand what you mean. Every programming language that I know of uses an appproximation of English for its source code, something which I for one am pleased about! Left-to-right text is therefore enshrined in the syntax of the language, and right-to-left text will typically only be encountered within programs as literal strings, comments etc. Thus support for "both at the same time" (which is what bidirectional' means) is unavoidable, as in:

Code: Select all

      PRINT  "هنا مثال يمكنك من الكتابة من اليمين" : REM Arabic
      PRINT  "الى اليسار باللغة العربية"
(if you move the text caret through the above code with the right-arrow key on your keyboard, using a bidirectional editor like Notepad or Wordpad or even BBC BASIC for Windows, you will see what happens).

Even in a block of prose written in a RTL language there may be occasional references to numbers (which are typically still written with the most-significant digit on the left) or words borrowed from a foreign language written left-to-right, so 'bidirectional' text is the norm.

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

Re: Introduction to BBC BASIC

Tue Jul 23, 2019 3:18 am

What I was getting as is:

1) If one is to support internationalization with Unicode one should likely allow it in function and variable names. It seems natural to me that people would want to use their language for that. I have seen a lot of code written by non native English speakers that does.

2) When you allow bidirectional languages in the source all hell break lose. See my example above.

When I crafted that bidirectional example a few years back most browsers rendered it using fonts such that the characters could be easily mistaken for regular latin aphabet. So for example:

Code: Select all

let msg = ﻝ.ﺍ();
looked like

Code: Select all

let msg = i.j()
but of course what is actually going on there is

Code: Select all

let msg = j.i()
The object is "j" and the method being called is"i". Not the other way around as it seems.

The other example there with the arithmetic expression is just totally mangled by bidi.

As well as being fun confusing everybody I always suspected it could be enhanced to sneak malware into source code. Hidden in plain sight as it were!

ejolson
Posts: 3231
Joined: Tue Mar 18, 2014 11:47 am

Re: Introduction to BBC BASIC

Tue Jul 23, 2019 4:47 am

Heater wrote:
Tue Jul 23, 2019 3:18 am
As well as being fun confusing everybody I always suspected it could be enhanced to sneak malware into source code. Hidden in plain sight as it were!
Agreed. The problem with allowing Unicode variables is that is it possible to create two visually indistinguishable labels that are different. Not only could this be a source of bugs, but a sneaky way to intentionally write code with unexpected behaviour. Even without bidirectional fonts, tricks could be played, for example, by violating the expected shadowing behaviour of lexical scoping by using two variables which looked the same but weren't. With dynamic or implicitly typed languages, the possibility for trouble is greater.

In FidoBasic colour has semantic meaning. Thus a red letter x refers to a different variable than a blue x. Since dogs are colour blind, this is another indication--in addition to an insistence that n-level meta-programming is more useful than efficient parallel processing--that the lead developer of FidoBasic is barking mad.

Speaking of colour, I understand there was an American edition of BBC Basic such that the COLOUR statement appeared as COLOR when the exact same tokenised source code was loaded into the editor. In particular, tokenised source code lends itself to a much more useful form of internationalisation: the source code is exactly the same, but when the tokens are rendered by the editor the program appears in different languages according to personal preference.

Imagine how much easier it would be if the tokenised form of

10 X=2^0.5
20 PRINT X
30 STOP

automatically appeared as

10 X=2^0.5
20 लिखो X
30 विराम

when edited with the correct localisation set. I suppose one could also render the numerals correctly and even the X.

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

Re: Introduction to BBC BASIC

Tue Jul 23, 2019 5:59 am

Brilliant! This multi-lingual tokenization idea has got great potential.

I could write code in Javascript, for example, and post it here. In your browsers and editors you could see it as FidoBasic or whatever your language war setting is set to. Somebody else might work on it as Haskell. And so on.

Finally programmers will be able to work together in harmony.

:)

Return to “Other programming languages”