New: Console Mode editions of BBC BASIC

for discussion of bbc basic for windows/sdl, brandy and more
User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Sun Jul 05, 2020 9:46 pm

I have updated the Console Mode editions of BBC BASIC to version 0.15.

The main difference in this version is that the keyboard input routine has had a major revision. The effect in Linux and MacOS is that the function keys etc. now return the expected codes (and can be redefined using *KEY). The effect in Windows (in which the function keys always worked) is that the input really is taken from STDIN rather than directly from the keyboard, so it may be fed from a file or pipe etc.

Also, in the Linux and MacOS editions (only) UTF-8 mode is automatically set, because the keyboard returns (and the terminal expects) UTF-8 encoded text on those platforms. Please note however that if you use the VDU 23,22... custom mode command it will override that setting.

Version 0.15 may be downloaded from the usual place:

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Sun Jul 05, 2020 10:16 pm

Code: Select all

soruk@RaspberryPi2 ~/bbcbasic $ ./bbcbasic 
BBC BASIC for Linux Console v0.15
(C) Copyright R. T. Russell, 2020
>TIME=0:PRINT TIME
3.86547057E9
>_
Am I doing something wrong? Running the Raspbian edition.
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Sun Jul 05, 2020 10:27 pm

Soruk wrote:
Sun Jul 05, 2020 10:16 pm
Am I doing something wrong? Running the Raspbian edition.
Works fine here (RPi 4, Raspbian Buster). I am relying on there being a CLOCK_MONOTONIC which is pretty much universal I think, but isn't guaranteed.

Edit: I should probably check whether there is a CLOCK_MONOTONIC and if not issue an 'Unsupported' error or something, but I hadn't realised any 'current' systems lacked one.
Last edited by Richard Russell on Sun Jul 05, 2020 10:45 pm, edited 1 time in total.

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Sun Jul 05, 2020 10:45 pm

Richard Russell wrote:
Sun Jul 05, 2020 10:27 pm
Soruk wrote:
Sun Jul 05, 2020 10:16 pm
Am I doing something wrong? Running the Raspbian edition.
Works fine here (RPi 4, Raspbian Buster). I am relying on there being a CLOCK_MONOTONIC which is pretty much universal I think, but isn't guaranteed.
It certainly used to work in 0.12, but while TIME is counting up correctly, it can't be zeroed.
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Sun Jul 05, 2020 10:51 pm

Soruk wrote:
Sun Jul 05, 2020 10:45 pm
It certainly used to work in 0.12.
There's been no change at all in that area of the code since the initial release. What's the absolute value of TIME (before you try to zero it)? The documentation for CLOCK_MONOTONIC simply refers to it representing "monotonic time since some unspecified starting point" so it may not be guaranteed to be in a sensible range.

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Sun Jul 05, 2020 11:00 pm

Richard Russell wrote:
Sun Jul 05, 2020 10:51 pm
What's the absolute value of TIME (before you try to zero it)?

Code: Select all

soruk@RaspberryPi2 ~/bbcbasic $ ./bbcbasic 
BBC BASIC for Linux Console v0.15
(C) Copyright R. T. Russell, 2020
>PRINT ~TIME:TIME=0:PRINT ~TIME
  F36C4556
  E6666667
>_
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Sun Jul 05, 2020 11:13 pm

Soruk wrote:
Sun Jul 05, 2020 11:00 pm
>PRINT ~TIME:TIME=0:PRINT ~TIME
F36C4556
E6666667
Well there's your problem: TIME is negative! clock_gettime(CLOCK_MONOTONIC...) must be returning some crazy values for that to happen; although it's documented that it returns the time since "some unspecified starting point" I have been assuming that the starting point is in the past (probably boot time) rather than the future!

Maybe with care I could make it work in such circumstances (perhaps if I treat TIME as unsigned), but I've not seen anything similar on my machines.

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Sun Jul 05, 2020 11:37 pm

Would you be so kind as to run this program on your Raspberry Pi and let me know what it reports:

Code: Select all

      CLOCK_MONOTONIC = 1
      DIM timespec{secs%, nsecs%}
      SYS "clock_gettime", CLOCK_MONOTONIC, timespec{}
      PRINT "secs = " ~timespec.secs%
      PRINT "nsecs = " ~timespec.nsecs%
One nasty feature of clocks on Linux is that the time_t type is not standardised, so a situation could arise in which the datatype assumed by the compiler is not the same as the datatype used by the library it calls! It's even conceivable that time_t has changed between one version of Raspbian and another, which could explain what you are seeing.

I'll try not to let this descend into another anti-Linux rant, but (short of recompiling from source) I've no idea how one is supposed to cope with this situation. What genius came up with the idea of providing a library function in a shared object that takes as a parameter a non-standardised datatype?

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Sun Jul 05, 2020 11:41 pm

Richard Russell wrote:
Sun Jul 05, 2020 11:37 pm
Would you be so kind as to run this program on your Raspberry Pi and let me know what it reports:

Code: Select all

      CLOCK_MONOTONIC = 1
      DIM timespec{secs%, nsecs%}
      SYS "clock_gettime", CLOCK_MONOTONIC, timespec{}
      PRINT "secs = " ~timespec.secs%
      PRINT "nsecs = " ~timespec.nsecs%
One nasty feature of clocks on Linux is that the time_t type is not standardised, so a situation could arise in which the datatype assumed by the compiler is not the same as the datatype used by the library it calls! It's even conceivable that time_t has changed between one version of Raspbian and another, which could explain what you are seeing.

I'll try not to let this descend into another anti-Linux rant, but (short of recompiling from source) I've no idea how one is supposed to cope with this situation. What genius came up with the idea of providing a library function in a shared object that takes as a parameter a non-standardised datatype?
Not sure it's negative...
I just remembered your *Hex64 switch, and reran the test, getting:

Code: Select all

soruk@RaspberryPi2 ~/bbcbasic $ ./bbcbasic 
BBC BASIC for Linux Console v0.15
(C) Copyright R. T. Russell, 2020
>*HEX64
>PRINT ~TIME:TIME=0:PRINT ~TIME
  F3700510
  E6666668
>PRINT ~-1
FFFFFFFFFFFFFFFF
>_
And, your code snippet: (Same session, Hex64 is on)

Code: Select all

>CLOCK_MONOTONIC = 1
>DIM timespec{secs%, nsecs%}
>SYS "clock_gettime", CLOCK_MONOTONIC, timespec{}
>PRINT "secs = " ~timespec.secs%
secs =     2160A4
>PRINT "nsecs = " ~timespec.nsecs%
nsecs =   3125749A
>_
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Mon Jul 06, 2020 12:05 am

Soruk wrote:
Sun Jul 05, 2020 11:41 pm
Not sure it's negative...
TIME is a 32-bit value so by 'negative' I mean the MS bit is set (obviously if you interpret it as an unsigned value it's a positive value greater than 2^31-1). But in practical terms it makes no difference, a 32-bit number is a 32-bit number, and my code will 'fail' either way (and so will a lot of BASIC programs that don't expect TIME to wrap from a positive value to a negative one).

I'll make a mental note to look at this again before the next release in case a simple modification (like changing a signed int to an unsigned int or vice versa) will be effective as a workaround.

User avatar
BigEd
Posts: 3199
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by BigEd » Mon Jul 06, 2020 11:24 am

(It's not obvious to me how setting TIME to 0 could fail to work, and make it positive, even if it starts out with the MSB set. Is there a simple answer to that?)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Mon Jul 06, 2020 12:13 pm

BigEd wrote:
Mon Jul 06, 2020 11:24 am
(It's not obvious to me how setting TIME to 0 could fail to work, and make it positive, even if it starts out with the MSB set. Is there a simple answer to that?)
Relatively simple, yes. TIME is derived from a system-wide monotonic clock which can be read but not written, so when you 'change' TIME what you are actually doing is setting the value of an 'offset' variable which contains the difference between the system TIME and the value you've said you want it to be. When you next read TIME that offset is added to (or subtracted from, I can't remember which) the system TIME.

In my assembly language versions this all works without problems because there is no concept of whether TIME and the offset are 'signed' or 'unsigned', they are just 32-bit integers. But C makes a distinction between signed and unsigned integers which can mean that a signed offset may not have enough range to make the required adjustment.

I think it's connected with this C language rule: "When an unsigned int and an int are added together, the int is first converted to unsigned int before the addition takes place (and the result is also an unsigned int)".

User avatar
BigEd
Posts: 3199
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by BigEd » Mon Jul 06, 2020 12:21 pm

Ah, thanks - that does make sense!

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Mon Jul 06, 2020 5:28 pm

I have updated the Console Mode editions of BBC BASIC to version 0.16. Differences in this version are:
  • Paged mode (set with Ctrl+N) is implemented, except that as the shift key cannot be detected, pressing space displays the next page.
  • TIME is now initially evaluated modulo about 50 days, so there will be a minimum of about 200 days before it goes out of range.
This new version may be downloaded from the usual place:

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Mon Jul 06, 2020 5:43 pm

TIME=0 is now behaving itself :D
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Mon Jul 06, 2020 6:08 pm

Richard Russell wrote:
Mon Jul 06, 2020 5:28 pm
Paged mode (set with Ctrl+N) is implemented
Before somebody comments, I know it doesn't work quite like it does on the BBC Micro etc. on which the display pauses before a scroll, not after. This is because that behaviour requires that a scroll can be anticipated, but that requires knowledge of the height of the console/terminal window which I don't (necessarily) have. All I can do with confidence is to detect that a scroll has just happened, hence it pauses afterwards, leaving the bottom row blank.

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Mon Jul 06, 2020 6:55 pm

In an attempt to head off another possible comment, you may think the board in 'chess.bbc' has the wrong orientation (light-coloured square in the A1 position). That's because the squares are grey and blue, and in the original QBasic version (and indeed in BB4W and BBCSDL) the grey squares appear darker than the blue ones. But with the colour palette used by the console the blue squares seem darker, hence the apparent wrong orientation.

simontaylor
Posts: 3
Joined: Mon Sep 21, 2015 3:23 pm
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by simontaylor » Tue Jul 07, 2020 3:33 pm

The Linux version crashes when run from the path unless there is a file called 'bbcbasic' in the current directory. Then it runs and makes a directory called 'bbcbasic' in the home directory.

Code: Select all

$ pwd
/home/simon/bbctest
$ ls ~/bbcbasic
ls: cannot access '/home/simon/bbcbasic': No such file or directory
$ which bbcbasic
/home/simon/bin/bbcbasic
$ bbcbasic
Segmentation fault (core dumped)
$ touch bbcbasic
$ bbcbasic
BBC BASIC for Linux Console v0.16
(C) Copyright R. T. Russell, 2020
>QUIT
$ ls -ld ~/bbcbasic
drwx------ 1 simon simon 4096 Jul  7 15:08 /home/simon/bbcbasic

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Tue Jul 07, 2020 4:56 pm

simontaylor wrote:
Tue Jul 07, 2020 3:33 pm
The Linux version crashes when run from the path unless there is a file called 'bbcbasic' in the current directory.
I think this is related to the issue of how a program can discover its own directory (i.e. the directory containing the executable) which is discussed here. I'm currently using the argv[0] method which is described as "portable (but less reliable)", and it seems that it isn't reliable on your machine when run from the path!

I could switch to using the /proc/self/exe method but my understanding is that this isn't universally supported either. Perhaps I should try that first and only revert to using argv[0] if it fails. I'm far from being a Linux expert (I'm a dyed-in-the-wool Windows user) so I'm very dependent on Google for anything Linux-related! If you know of a better way for a program to find its own directory I would be very interested.

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Tue Jul 07, 2020 11:14 pm

I have updated the Console Mode editions of BBC BASIC to version 0.17. Differences in this version are:
  • Added a *DUMP command to display the contents of a file in hex and ASCII.
  • EDIT can now concatenate multiple lines, up to a maximum of 255 characters.
  • The Linux edition now uses /proc/self/exe to find its installation directory.
This new version may be downloaded from the usual place:

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Wed Jul 08, 2020 10:19 am

Does anybody have any suggestions for additions / changes that would make these Console Mode editions more useful, before I tie up the loose ends and consider them 'done'?

chess_console_win64.png
hanoi_console_win64.png
queens_console_win64.png
snake_console_win64.png

User avatar
BigEd
Posts: 3199
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by BigEd » Wed Jul 08, 2020 10:47 pm

One thing I notice, on the Mac, is that pasting many lines of text doesn't work so well: it will accept a dozen lines of input (or so) but ignore the rest.

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Wed Jul 08, 2020 11:11 pm

BigEd wrote:
Wed Jul 08, 2020 10:47 pm
One thing I notice, on the Mac, is that pasting many lines of text doesn't work so well: it will accept a dozen lines of input (or so) but ignore the rest.
Yep, I get the same on the Raspberry Pi.

I don't know if *EXEC is supposed to work, but it can't find files that are clearly there.

Code: Select all

soruk@RaspberryPi2 ~/bbcbasic $ ./bbcbasic 
BBC BASIC for Linux Console v0.17
(C) Copyright R. T. Russell, 2020
>*ls -l
total 140
-rw-r--r-- 1 soruk soruk  1040 Jun 25 21:30 15puzzle.bbc
-rw-r--r-- 1 soruk soruk  1546 Jun 28 13:42 8queens.bbc
-rwxr-xr-x 1 soruk soruk 91028 Jul  7 22:48 bbcbasic
-rw-r--r-- 1 soruk soruk 10992 Jul  3 20:20 chess.bbc
-rw-r--r-- 1 soruk soruk   524 Jul  8 23:14 doodle
-rw-r--r-- 1 soruk soruk   807 Jun 23 17:10 hanoi.bbc
-rw-r--r-- 1 soruk soruk     5 Jul  2 13:26 int32.bbc
-rw-r--r-- 1 soruk soruk     5 Jul  2 13:27 int64.bbc
-rw-r--r-- 1 soruk soruk  1245 Jun 27 15:15 snake.bbc
-rw-r--r-- 1 soruk soruk  2712 Jul  3 09:39 speed.bbc
-rw-r--r-- 1 soruk soruk     5 Jul  2 13:27 uint8.bbc
>*exec doodle

File or path not found
>_
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Thu Jul 09, 2020 12:05 am

BigEd wrote:
Wed Jul 08, 2020 10:47 pm
One thing I notice, on the Mac, is that pasting many lines of text doesn't work so well: it will accept a dozen lines of input (or so) but ignore the rest.
How are you attempting to paste? I looked at the possibility of taking input from the clipboard, but there seemed to be no straightforward cross-platform way of accessing it. So I've never tried to paste because I didn't even know it was possible!

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Thu Jul 09, 2020 12:17 am

Soruk wrote:
Wed Jul 08, 2020 11:11 pm
>*exec doodle
File or path not found
That's perfectly correct, there is no file doodle.bbc! What you should have entered was:

Code: Select all

*exec doodle.
(with a trailing dot). In my BBC BASICs there is always a default extension, most commonly .bbc but sometimes a different extension is assumed depending on context. Coming from a CP/M then MS-DOS then Windows background this is the expected behaviour, and I'm certainly not going to be changing it, not least because it would break compatibility with BB4W and BBCSDL.

Anyway, surely even in Linux a text file ought to have an extension like .txt or .bas? I've got used to executables not having one, even though that seems strange to someone with a background in Microsoft OSes, but not other file types.

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Thu Jul 09, 2020 12:52 am

Richard Russell wrote:
Thu Jul 09, 2020 12:17 am
Soruk wrote:
Wed Jul 08, 2020 11:11 pm
>*exec doodle
File or path not found
That's perfectly correct, there is no file doodle.bbc! What you should have entered was:

Code: Select all

*exec doodle.
(with a trailing dot). In my BBC BASICs there is always a default extension, most commonly .bbc but sometimes a different extension is assumed depending on context. Coming from a CP/M then MS-DOS then Windows background this is the expected behaviour, and I'm certainly not going to be changing it, not least because it would break compatibility with BB4W and BBCSDL.

Anyway, surely even in Linux a text file ought to have an extension like .txt or .bas? I've got used to executables not having one, even though that seems strange to someone with a background in Microsoft OSes, but not other file types.
I can understand .bbc for a tokenised BBC BASIC program, or perhaps even a program in text form (which I think your IDEs use .bas for), but for a plain-text script which could be a program or other list of commands, I am not sure expecting a .bbc suffix is appropriate for *EXEC.

Extensions are entirely optional in Linux, shell scripts, python, Perl, it depends on the programmer's style. And unlike DOS or CP/M, the dot is a part of the string that makes up the name, it's not a separator for some underlying name storage (the ancient msdos driver for Linux excepted, but nobody uses that now as vfat has superceded it and supports long filenames).
Matrix Brandy BASIC VI (work in progress)

User avatar
Richard Russell
Posts: 1595
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Richard Russell » Thu Jul 09, 2020 1:28 am

Soruk wrote:
Thu Jul 09, 2020 12:52 am
I am not sure expecting a .bbc suffix is appropriate for *EXEC.
I agree, it's not. The reason I did it (probably in the late 1980s) is lost in the mists of time, and I've often thought .bas would have been a better choice. But it's one of those things that can never be changed.
Extensions are entirely optional in Linux, shell scripts, python, Perl, it depends on the programmer's style.
I appreciate that they're optional (and even in Windows they're "part of the string"). But having a way to indicate a file's 'type', and particularly being able to associate a default application which opens files of that type, is so valuable that I would have thought one would almost always choose to use an extension.

Where Linux and Windows do differ is in the way filename pattern matching behaves in the presence of a dot. In Windows "*.*" matches all files (even those with no extension) whereas I presume in Linux it matches only files with a dot in the name. Similarly in Windows adding a trailing dot is the way of indicating that you want to match with files not having a dot in the name.

User avatar
BigEd
Posts: 3199
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by BigEd » Thu Jul 09, 2020 8:26 am

Richard Russell wrote:
Thu Jul 09, 2020 12:05 am
BigEd wrote:
Wed Jul 08, 2020 10:47 pm
One thing I notice, on the Mac, is that pasting many lines of text doesn't work so well: it will accept a dozen lines of input (or so) but ignore the rest.
How are you attempting to paste? I looked at the possibility of taking input from the clipboard, but there seemed to be no straightforward cross-platform way of accessing it. So I've never tried to paste because I didn't even know it was possible!
I just pasted with the usual keyboard shortcut: command-V on the Mac. I would guess at a buffer size issue although I suppose it could be timing. It looks like something less than 300 characters made it (but more than 256.)

Edit: maybe the application sees such a paste as furious type-ahead?
Last edited by BigEd on Thu Jul 09, 2020 8:28 am, edited 1 time in total.

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Thu Jul 09, 2020 8:28 am

Richard Russell wrote:
Thu Jul 09, 2020 1:28 am
Where Linux and Windows do differ is in the way filename pattern matching behaves in the presence of a dot. In Windows "*.*" matches all files (even those with no extension) whereas I presume in Linux it matches only files with a dot in the name. Similarly in Windows adding a trailing dot is the way of indicating that you want to match with files not having a dot in the name.
That certainly makes sense. What I was not expecting is to have to follow DOS/Windows naming style on Linux! And yes, *.* won't match files without a . in the name.
Last edited by Soruk on Thu Jul 09, 2020 8:30 am, edited 1 time in total.
Matrix Brandy BASIC VI (work in progress)

Soruk
Posts: 774
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: New: Console Mode editions of BBC BASIC

Post by Soruk » Thu Jul 09, 2020 8:29 am

BigEd wrote:
Thu Jul 09, 2020 8:26 am
Richard Russell wrote:
Thu Jul 09, 2020 12:05 am
BigEd wrote:
Wed Jul 08, 2020 10:47 pm
One thing I notice, on the Mac, is that pasting many lines of text doesn't work so well: it will accept a dozen lines of input (or so) but ignore the rest.
How are you attempting to paste? I looked at the possibility of taking input from the clipboard, but there seemed to be no straightforward cross-platform way of accessing it. So I've never tried to paste because I didn't even know it was possible!
I just pasted with the usual keyboard shortcut: command-V on the Mac. I would guess at a buffer size issue although I suppose it could be timing. It looks like something less than 300 characters made it (but more than 256)
I was pasting with middle-click in an xterm window on the RasPi. I don't encounter any limitations when pasting into other things, e.g. Nano.
Matrix Brandy BASIC VI (work in progress)

Post Reply

Return to “modern implementations of classic programming languages”