Go to advanced search

by RichardRussell
Thu Apr 18, 2019 3:38 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 154
Views: 2584

Re: ScriptBasic

I have a great code challenge / project suggestion. Lets do a GUI IDE/Debugger for the RPi. (Linux) I still think the IDE/Debugger should be written in ScriptBasic. I've seen that you have support for graphics, via an extension, and it would be a good demonstration of what the language can achieve....
by RichardRussell
Tue Apr 16, 2019 8:59 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Except that it no longer supports legacy x87 instructions. Correct me if I'm wrong, but my understanding is that the x87 FPU instructions are supported by Valgrind, but their results will be accurate to only 64 bits of precision rather than 80. Hence numeric values may be different compared with no...
by RichardRussell
Tue Apr 16, 2019 5:48 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

That's all gone now. On modern 64-bit x86 platforms everything is done with 64-bit floating point only ... unless you specifically ask for it True, and with Microsoft's compilers you can't even "ask for it": they give you only 64-bit precision even if you explicitly specify 'long double' type! But ...
by RichardRussell
Tue Apr 16, 2019 5:01 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Why cant you just stick with 64-bit floating-point (IEEE binary64) - doubles in C, for the common floating point type? It's principally the issue of cascading multiple operations causing a loss of precision. A compiled language like C can recognise that a floating-point calculation involves many se...
by RichardRussell
Tue Apr 16, 2019 4:30 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

C, for example, has a lot of platform dependent things. A language like BASIC should not. I should perhaps add that some of the very features that give BBC BASIC its strength also mitigate against cross-platform compatibility. One is the low-level indirection operators , which are comparable to the...
by RichardRussell
Tue Apr 16, 2019 4:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

C, for example, has a lot of platform dependent things. The size of int for example. A language like BASIC should not. I absolutely agree, in principle. Indeed I would argue that one of BBC BASIC's Unique Selling Points is the ability to write programs which run without modification on the full ran...
by RichardRussell
Tue Apr 16, 2019 3:44 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Is there any possibility of releasing your freeware compiler Liberty Basic Booster as open source or getting it to run on the Raspberry Pi? As far as open-sourcing LBB is concerned, that has been suggested and discussed previously. Technically it's perfectly straightforward, LBB is written in BBC B...
by RichardRussell
Tue Apr 16, 2019 3:25 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 154
Views: 2584

Re: ScriptBasic

The Windows version of ScriptBasic has a great GUI IDE / Debugger. If you get stuck on the RPi, use the Windows version to debug your code. I don't know if this is a practical solution with ScriptBasic, but the BBC BASIC for SDL 2.0 IDE/debugger is itself written in BBC BASIC, ensuring that every (...
by RichardRussell
Tue Apr 16, 2019 2:37 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Engineering yes. Cryptography. I was meaning specifically floating point numbers (which was the context here): I assume that cryptography would normally be using integers, sometimes very big integers indeed! A language that natively supports arbitrary-precision integers, such a Liberty BASIC, may b...
by RichardRussell
Tue Apr 16, 2019 12:15 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Note that while arm decided to make long double 128 bits in their arm64 ABI, no current arm core has support for 128 bit floating point in hardware. So "long double" calculations on arm64 will be done with a software implementation. There isn't currently a 64-bit build of BBC BASIC for the RPi, but...
by RichardRussell
Tue Apr 16, 2019 11:10 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

RichardRussell wrote:
Tue Apr 16, 2019 11:09 am
prints 2.079360823713349806E2089 and is still very fast!
On a PC, I should add, not a Raspberry Pi which does not have the floating-point range. On a RPi the furthest you can go without getting a 'Number too big' error is FIbonacci(1476).
by RichardRussell
Tue Apr 16, 2019 11:09 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

That's great. But for such small numbers isn't faster to do it with a naive iterative loop? Possibly. As I said, the purpose was for language comparison with the Python original and the ScriptBasic version listed in another thread. If you don't need a precise answer you can of course specify a much...
by RichardRussell
Tue Apr 16, 2019 8:39 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

For language comparison purposes, here's a BBC BASIC version of the Fast Fibonacci program under discussion in another thread: REM based on https://www.nayuki.io/res/fast-fibonacci-algorithms/fastfibonacci.py @% = &1414 PRINT FN_Lhs_Fibonacci(92) END DEF FN_Lhs_Fibonacci(n) LOCAL a, b IF n = 0 THEN ...
by RichardRussell
Tue Apr 16, 2019 8:12 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

ScriptBasic wrote:
Tue Apr 16, 2019 12:03 am
BASIC is acknowledged but not recommended.
Eben Upton himself is enthusiastic about BBC BASIC: https://www.raspberrypi.org/blog/learn- ... with-eben/
by RichardRussell
Mon Apr 15, 2019 1:55 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

The tool is cool but does BBC BASIC dev environment run on my phone? The 'mobile' editions (Android, iOS and in principle a Raspberry Pi with the official touchscreen - to keep this on-topic) use a simplified 'IDE' suited to the touch environment. It lacks several features of the desktop editions, ...
by RichardRussell
Sun Apr 14, 2019 10:42 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Just kidding. I know, but I take my obligations as a vendor seriously. Although BBC BASIC for Windows is a commercial product, BBC BASIC for SDL 2.0 (which is the subject of this thread) is entirely free, and always will be - even the Windows edition. It can't create an exe file, but the MacOS edit...
by RichardRussell
Sun Apr 14, 2019 10:16 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

I want my $50 back. :D I am always prepared to refund the payment of any dissatisfied customer, and have occasionally done so voluntarily despite not being asked. But I would refer you to the documentation , which states " The Compile command allows you to create a stand-alone executable file from ...
by RichardRussell
Sun Apr 14, 2019 10:04 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

BBC BASIC for Windows is a compiler No it isn't. BBC BASIC is interpreted (indeed, my versions are well towards the 'pure interpreter' end of the spectrum, with only tokenised keywords as a contribution to performance and none of the pre-processing steps that Brandy uses). If you are thinking of BB...
by RichardRussell
Sun Apr 14, 2019 9:01 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

If I were a game programmer, I wouldn't be using an interpretive BASIC anyways. You should chat to David Williams, the author of 'Forces of Darkness' and other prizewinning games. He'd explain why he finds BBC BASIC particularly well suited to games programming; you can also look at his website whi...
by RichardRussell
Sun Apr 14, 2019 8:14 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

ScriptBasic wrote:
Sun Apr 14, 2019 6:33 pm
How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect?
I suggested that when the forum categories were reorganised a few months ago, but it didn't happen.
by RichardRussell
Sun Apr 14, 2019 6:31 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

I'm using SDL 1.2 with the BBC BASIC and SDL_gfx extension modules for ScriptBasic. The Raspberry Pi, as a relatively slow machine, benefits from the hardware acceleration that SDL 2 can take advantage of, but SDL 1 can't. That's particularly evident in some of the YouTube videos, for example 'Vide...
by RichardRussell
Sun Apr 14, 2019 5:41 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

ScriptBasic wrote:
Sun Apr 14, 2019 5:31 pm
I'm using Brandy's SDL BBC BASIC graphic library module with ScriptBasic which seems to work okay.
Sadly not an option I have, because Brandy is SDL 1 but mine is SDL 2.
by RichardRussell
Sun Apr 14, 2019 5:35 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

I presume if you select -mstrict-align GCC will "break up" large items and write them out as individual bytes. That sounds expensive, compared with a trap. It implies that GCC will split it up if it doesn't know whether the address is aligned or not (which is likely to be whenever it's via a void* ...
by RichardRussell
Sun Apr 14, 2019 5:20 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

No worries, we will be using GCC or Clang compilers for RISC V. By all means contact me privately if you want to attempt a port. All my versions of BBC BASIC (back to the 1982 Z80 version) have had a clear delineation between the generic 'language' modules and the platform-dependent 'input-output' ...
by RichardRussell
Sun Apr 14, 2019 4:40 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 76
Views: 1098

Re: Introduction to BBC BASIC

Any chance of a BBC BASIC for the 32 bit RISC V? https://riscv.org/ The C source code of my 'generic' BBC BASIC interpreter (i.e. with the SDL2 I/O stuff omitted) is reasonably portable, although it does depend on some GCC/clang extensions (for example that sizeof(void) is 1) and intrinsics. Howeve...

Go to advanced search