Author Topic: BBC BASIC for Windows  (Read 21178 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP vs. Native BBC GUI
« Reply #60 on: January 20, 2014, 12:46:33 PM »
Here is the Windows 7 64 bit version of the above screens running under Wine.











Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
BBC BASIC for Windows - Closing Post
« Reply #61 on: January 20, 2014, 01:33:41 PM »
I have enjoyed working with BBC BASIC for Windows and it's author Richard. BBC4W is one of the best interactive BASIC languages I have had the privilege to work with and recommend buying a copy for your toolbox.

« Last Edit: January 20, 2014, 02:15:53 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows
« Reply #62 on: February 05, 2014, 10:32:20 AM »
Quote from: Richard - BP.org
This is not (at least, it was not intended to be) a 'my BASIC is better than yours' (and even less 'my OS is better than yours') thread.  It was specifically an attempt to seek out somebody who would be interested in porting BBC BASIC for Windows onto another platform by using my relocatable object modules.  Sadly nobody here seems to find this an interesting project; I will look elsewhere.

Putting the graphics aspect of BBC BASIC aside, what makes BBC BASIC for Windows a better BASIC then what is currently offered now? (most free) BaCon is a C translator so the advantage of a assembler in BBC4W rapidly diminishes.

I have said this from the beginning that my interest in BBC BASIC (Brandy BASIC V) was the easy to use (old school) graphics syntax and the auto clipping of off screen rendering. I have included the BBC graphics syntax in the ScriptBasic SDL extension module along with SDL_draw, SDL_image, SDL_terminal and a few routines I slapped together to fill in the holes.

You didn't seem to like my Back to the Future comment on your forum where  a BBC4ARM BASIC (possibly embedded) in Raspberry PI class development boards direction had merit. Taking advantage of your past ARM RISC knowledge when working on the original ACORN PCs seemed like a natural to me. With more home automation, security with mobile access, these project boards are becoming more of a draw to hobbyists and as a educational tool. It's would be a new adventure but in familiar territory. It all depends my much energy and effort you're willing to invest changing platforms IF this makes any sense to you.
 
Quote
Bringing Brandy up to an equivalent degree of functionality, as suggested earlier in the thread, is theoretically an alternative approach, but it would be far more work and probably quite impractical to achieve an acceptable degree of compatibility.  That would certainly qualify as 'reinventing the wheel'.

No one is arguing that BBC4W and Napoleon are more advanced / more compatible BBC BASIC than Brandy BASIC V (SDL). The point is that we have something working that is portable and lets each BASIC that binds to the BBC API  another twist on language. What's wrong with BBC Old School Graphics being a theme for the library? Lets get the Brandy SDL graphics compatible and then worry about making it faster / better. Not many are going to bitch about a second or two either way. BASIC should stand for easy to use and should hide the uglies under the covers for more qualified to maintain.

Quote
By finding the courage to be ourselves, we gain the power to make a difference.
 
-- Lindsey Stirling --
« Last Edit: February 06, 2014, 11:17:44 AM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows
« Reply #63 on: March 10, 2014, 01:02:48 PM »
Quote from: Richard Russell - BBC4W forum
Where have the BB4W supporters gone?
   
Once upon a time there were plenty of enthusiastic BB4W users who were keen to support the language, for example in the creation of libraries (e.g. BB4WMAPM), support utilities (e.g. the API Viewer plug-in), documentation (e.g. the Beginners' Tutorial) etc.

But now that enthusiasm seems to have completely evaporated. Here are some examples of attempts to get the BB4W 'community' to help support the language which have failed:

  • DLGEDITCE (the Community Edition of the Dialogue Editor). At one time that project had at least three active members, but when I recently posted a message here asking for somebody to report on its status, there was not a single reply.
  • GUILIB (the proposed new library to support the Windows GUI). Despite me publishing a draft specification, and some initial activity, that project appears to have been abandoned because of an unwillingness by interested parties to cooperate.
  • BB4W version 6. This new version of BB4W, initially developed to support 'LB Booster', is stalled because of the several volunteers who offered to be testers only two have provided any feedback! Most haven't even acknowledged receipt of the Beta version.
  • BB4W for Linux. A while ago I asked for somebody to help port BB4W to Linux. You might think this is a worthwhile exercise that would attract some interest, but nothing!

This is all very disappointing and demotivating.

Richard.

I haven't seen much activity or interest in the Script BASIC BBC graphics extension module either. Maybe it's time to reinvent / return to the environment BBC BASIC has always been successful at. Hobbyists programming for fun. The Raspberry PI like boards and ARM/RISC processors seems like a natural for your offering. I personally think your wasting your time competing in the Windows environment with a nostalgic BASIC language that can't be decoupled from its IDE. I think your pushing the envelope using the term standalone compiled application. BBC4W has become too fragmented trying to adapt to Windows and still be relevant. IMHO
« Last Edit: March 10, 2014, 01:26:29 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows
« Reply #64 on: March 16, 2014, 10:59:04 AM »
Quote from: Richard Russell - BP.org
Most BASIC code is functional, but not particularly pretty.  I thought I'd share what I consider to be a beautiful piece of BBC BASIC code (OK, admittedly I wrote it myself!) which not only runs blindingly fast - it does a least-squares fit of a 5th-order polynomial to 20,000 data points in 0.02 seconds - but also shows at a glance (at least, to a mathematician) how it works, without the need for any comments:

Code: [Select]
:
      sum_x = SUM(x())
      x2()  = x() * x()   : sum_x2  = SUM(x2())
      x3()  = x() * x2()  : sum_x3  = SUM(x3())
      x4()  = x2() * x2() : sum_x4  = SUM(x4())
      x5()  = x2() * x3() : sum_x5  = SUM(x5())
      x6()  = x3() * x3() : sum_x6  = SUM(x6())
      x7()  = x3() * x4() : sum_x7  = SUM(x7())
      x8()  = x4() * x4() : sum_x8  = SUM(x8())
      x9()  = x4() * x5() : sum_x9  = SUM(x9())
      x10() = x5() * x5() : sum_x10 = SUM(x10())

      sum_y = SUM(y())
      xy()  = x() * y()   : sum_xy  = SUM(xy())
      x2y() = x2() * y()  : sum_x2y = SUM(x2y())
      x3y() = x3() * y()  : sum_x3y = SUM(x3y())
      x4y() = x4() * y()  : sum_x4y = SUM(x4y())
      x5y() = x5() * y()  : sum_x5y = SUM(x5y())

      matrix() = \
      \ npts%,  sum_x,   sum_x2,  sum_x3,  sum_x4,  sum_x5, \
      \ sum_x,  sum_x2,  sum_x3,  sum_x4,  sum_x5,  sum_x6, \
      \ sum_x2, sum_x3,  sum_x4,  sum_x5,  sum_x6,  sum_x7, \
      \ sum_x3, sum_x4,  sum_x5,  sum_x6,  sum_x7,  sum_x8, \
      \ sum_x4, sum_x5,  sum_x6,  sum_x7,  sum_x8,  sum_x9, \
      \ sum_x5, sum_x6,  sum_x7,  sum_x8,  sum_x9,  sum_x10

      vector() = \
      \ sum_y,  sum_xy,  sum_x2y, sum_x3y, sum_x4y, sum_x5y

      PROC_invert(matrix())
      vector() = matrix().vector()

This solver code is only an extract.  The entire program (and a runnable EXE) can be found here.

How would you write this in your preferred BASIC dialect, and would it be as pretty?

Richard.

Nice example Richard! Matrix math is one of the features I had hoped to release in Script BASIC 2.2 as an addition to the Tools extension module. Script BASIC makes this even easier as it doesn't require you to DIM anything and there no limit to indices's (indexed or associative or a combination of both) or the type of data the elements contain. (long, double, string, another array or a mix of these) Script BASIC arrays can be created/populated within a C extension module and passed back an forth as arguments in a function/sub.
« Last Edit: March 16, 2014, 11:06:01 AM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2422
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows
« Reply #65 on: March 22, 2014, 10:16:21 PM »
Quote from: Richard Russell - BBC4W forum
This is the first in an occasional series of posts on features of BBC BASIC for Windows which distinguish it from other BASICs, but which are so obscure that nobody ever uses them, unless of course you know different!

1. Outputting bottom-to-top text

BB4W supports outputting right-to-left text (for languages like Hebrew and Arabic) and top-to-bottom text (for Chinese, Japanese and Korean, rarely) but it also supports bottom-to-top text - both when output to the 'mainwin' and to the printer:

Code: [Select]
      *font Lucida Console,24
      VDU 23,16,12;0;0;0;13 : REM Bottom-to-top text
      PRINT "Hello world!"

But there is no national language written this way, as far as I know, so apart from as a gimmick it's unlikely this facility has ever been used in a real program.

Richard.

I don't see that feature as unique to BBC4W. I haven't tried it yet with the Script BASIC BBC extension module library. It would be interesting to know how BBC BASIC compatible the Script BASIC BBC library is. I personally don't have the time to learn BBC BASIC graphic primitives.



Code: [Select]
' ScriptBasic GFX

IMPORT gfx.inc

scrn = gfx::Window(200, 200, "ScriptBasic GFX")
gfx::FontRotation 3
gfx::stringColor scrn, 100, 150,"Bottom To Top" & CHR(0), 0xffffffff
gfx::Update
WHILE gfx::KeyName(1) <> "+escape"
WEND
gfx::Close



Code: [Select]
' ScriptBasic GFX

IMPORT gfx.inc

scrn = gfx::Window(200, 200, "ScriptBasic GFX")
FOR x = 1 TO 13
  gfx::stringColor scrn, 100, 180-x*12, MID("Bottom To Top",x,1) & CHR(0), 0xffffffff
NEXT
gfx::Update
WHILE gfx::KeyName(1) <> "+escape"
WEND
gfx::Close

This seems more BASIC like to me rather than dealing with cryptic codes based on bit flags.



Code: [Select]
  gfx::stringColor scrn, 180-x*11, 180-x*11, MID("Bottom To Top",x,1) & CHR(0), 0xffffffff

@Richard - What would be the VDU code for this one?   :)
« Last Edit: March 23, 2014, 11:01:03 AM by John »