Help understanding complaint

Here you can talk about anything related to BBC BASIC, not covered in another category
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

Hated Moron wrote: Sun 19 Mar 2023, 16:04 Those are terminal escape sequences, suggesting that you are running a non-standard shell which does not emulate a VT-100 (ANSI) terminal by default. Not really helpful to this discussion!

The relevant page ay my website does say quite explicitly: "The console/terminal is assumed to be VT-100 compatible, which the great majority are, in which case most of the standard BBC BASIC VDU commands behave as expected (with the exception of graphics commands), although text viewports are not supported".
Ah. It's hardly my fault that the standard terminal window in Windows isn't capable of that sort of thing, though.

"Console-mode" means different things to different people.

Have you asked the person who's complaining what terminal emulator(s) they've tried?
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

Hated Moron wrote: Sun 19 Mar 2023, 16:04 Those are terminal escape sequences, suggesting that you are running a non-standard shell
Also, what do YOU regard as the /Windows/ standard shell? What do you test under?
Hated Moron

Re: Help understanding complaint

Post by Hated Moron »

JeremyNicoll wrote: Sun 19 Mar 2023, 16:11 It's hardly my fault that the standard terminal window in Windows isn't capable of that sort of thing, though.
It is. I'm running an absolutely standard Windows 10 installation, and the shell that I get with Run... Command Prompt does emulate VT-100. The vast majority, on all platforms, do (some less fully than others, but enough to understand the BBC BASIC escape sequences) which is why the BBC BASIC Console Mode editions make that assumption.

As for what shell that is, I'm not sure how I would find out. It seems to call itself the "Windows command interpreter" and typing ver gives 'Microsoft Windows [Version 10.0.19044.2728]'. In its properties page I don't see anything obvious which would enable or disable VT-100 emulation.

terminal.png
You do not have the required permissions to view the files attached to this post.
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

Hated Moron wrote: Sun 19 Mar 2023, 16:37
JeremyNicoll wrote: Sun 19 Mar 2023, 16:11 It's hardly my fault that the standard terminal window in Windows isn't capable of that sort of thing, though.
It is. I'm running an absolutely standard Windows 10 installation...
I've been Googling; as far as I can tell this support only arrived in Windows 10; I'm using 8.1.
Hated Moron

Re: Help understanding complaint

Post by Hated Moron »

JeremyNicoll wrote: Sun 19 Mar 2023, 17:04 I've been Googling; as far as I can tell this support only arrived in Windows 10; I'm using 8.1.
OK. I thought that Windows 8 was so generally disliked (I know I thought it was horrible compared with Windows 7) that most people accepted the free upgrade to Windows 10. It was particularly attractive because, at the time, Microsoft was saying Windows 10 would be the 'last' version, with subsequent updates just being incremental. That didn't last!

Windows 10 was released in July 2015 so you're using a version that is 8 years old or so, which is a long time in the world of computing. I don't think it's unreasonable for me to assume that most users will have something newer.
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

Hated Moron wrote: Sun 19 Mar 2023, 17:16
JeremyNicoll wrote: Sun 19 Mar 2023, 17:04 I've been Googling; as far as I can tell this support only arrived in Windows 10; I'm using 8.1.
OK. I thought that Windows 8 was so generally disliked (I know I thought it was horrible compared with Windows 7) that most people accepted the free upgrade to Windows 10. It was particularly attractive because, at the time, Microsoft was saying Windows 10 would be the 'last' version, with subsequent updates just being incremental. That didn't last!

Windows 10 was released in July 2015 so you're using a version that is 8 years old or so, which is a long time in the world of computing. I don't think it's unreasonable for me to assume that most users will have something newer.
I think it's likely that a lot of your less technical users will still be using W7 (or maybe even XP)...

I never had W7, went straight from XP to 8 and then 8.1. I hate the "Charms" and sort of phone-like apps, but only ever use the desktop (and command windows of which I normally have two open - one with Admin auth, one without) - all the time. I issue lots of commands in these terminals; my text editor also has a command line from which I issue editor commands, editor script invocations, and also various forms of shell commands though the vast majority of those are done from within editor scripts.

On the whole I would be happy not to update from any level of Windows to the next version; pretty much all of the advertised changes eg in W10 to W11 are all froth as far as I'm concerned, but the under-the-covers work on making the OS itself less insecure IS important to me. For example (was it at the start of W8?) when Microsoft stopped having a smallish number of internal processes each of which ran multiple tasks, and started running one per process, thus making it much harder for any one of them, when crashing or infected with malware, from interfering with other tasks within the same process.

I know 8.1 is out of support, but can't find the concentration to set up two Win 10 laptops (one Pro, one not) I bought over a year ago.

I also don't like any of the privacy issues with W10, and W11 seems even worse, but the alternative is BSD or Linux and - despite lurking on FreeBSD, Centos, Debian, and openSUSE mail lists for years hoping that Unix/Linuxisms would climb into my brain by osmosis, it hasn't happened.
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

Notwithstanding the not-a-VT100-issue I thought I'd explore whether I could get a really simple "read a line, print a line" program to work with redirection. With

Code: Select all

      REM. "Simple stdin stdout test"

      INPUT name$
      PRINT
      PRINT "Hello "; name$
      PRINT

      END
I tried, from my basic terminal window:


C:\>echo Fred > %temp%\name.txt

C:\>type %temp%\name.txt
Fred

C:\>"C:\Users\--myuser--\Downloads\bbcbasic_console_win64\bbcbasic.exe" -quit jn_simple.bbc < %temp%\name.txt > %temp%\out1.txt 2> %temp%\out2.txt


(which didn't return to the C:\ prompt until I gave it a Ctrl-C)


C:\>
C:\>type %temp%\out1.txt
?BBC BASIC for Win64 Console v0.42
(C) Copyright R. T. Russell, 2023
>Fred

Mistake
>
>
C:\>

C:\>type %temp%\out2.txt
^C
C:\>

OK, that didn't do what I hoped ... BUT it's clear that the name "Fred"
did (via redirection) get seen by bbcbasic.exe ... but perhaps not by
my programme, just by the interpreter?


I wondered if perhaps the name.txt file didn't have the right line-
ending after "Fred" for the input line to be read/seen by my programme.

So I tried providing two lines of input hoping the first one at
least would be seen by my programme:


C:\>echo Jim > %temp%\njim.txt

C:\>echo Bob >> %temp%\njim.txt

C:\>type %temp%\njim.txt
Jim
Bob

C:\>"C:\Users\--myuser--\Downloads\bbcbasic_console_win64\bbcbasic.exe" -quit jn_simple.bbc < %temp%\njim.txt > %temp%\out3.txt 2> %temp%\out4.txt

C:\>


C:\>type %temp%\out3.txt
?BBC BASIC for Win64 Console v0.42
(C) Copyright R. T. Russell, 2023
>Jim

Mistake
>
>Bob

Mistake
>
>
C:\>type %temp%\out4.txt
^C
C:\>
User avatar
JeremyNicoll
Posts: 72
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: Help understanding complaint

Post by JeremyNicoll »

I also tried to get bbcbasic to confirm it had actually loaded/read my programme, by sending via redirection a LIST command, but that started producing control codes again.
Hated Moron

Re: Help understanding complaint

Post by Hated Moron »

I have just received this email from my correspondent:
Unfortunately this special case 'basrun.bbc' step was omitted in the tests as a parameter late last night while also doing similar tests with other command line languages.

Retesting including basrun.bbc it works just fine.
...
So it works as stated and your enquiry can be closed on the forum.
So it seems this whole thing was a mistake on his part, and the Windows Console Mode edition in fact works correctly. Unbelievable.

The degree of stress that this has caused me has been off the scale.
Hated Moron

Re: Help understanding complaint

Post by Hated Moron »

JeremyNicoll wrote: Sun 19 Mar 2023, 17:50 I think it's likely that a lot of your less technical users will still be using W7 (or maybe even XP)...
Actually I suspect some "less technical users" may not fully understand what a Console Mode application is, and are relatively unlikely to be wanting to use it. There have been a couple of comments in this thread which support that suspicion.

As regards versions of Windows supported, BBC BASIC for Windows will still run in Windows 95 OSR2 (so long as it has Internet Explorer), BBC BASIC for SDL 2.0 needs Windows Vista or later, and the BBC BASIC Console Mode edition (seemingly) needs at least Windows 10 to support the VT-100 emulation.

It may be worth adding that if the destination is not detected as an interactive terminal (for example you have re-directed it to a file) the escape sequences should not be sent. For example the output written to bbcbasic.out here does not contain them:

Code: Select all

bbcbasic -quit basrun.bbc hello.bas > bbcbasic.out