Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is BASIC Anywhere Machine (aka, maybe: BAM)
#1
It is something I have had a devil of a time trying to explain since I started this project back in the late fall of 2021.

So I will start with this, and refactor in an incremental and iterative way to try and get it just right.  (Bear with me: cognitive disabilities make it a challenge to put down into succinct and organised words this mess of intertwingled thoughts in my sponge.)

Imagine if you had the product (not the content) that is Wikipedia, but all in one file.  And that one file had a QB64PE interpreter, IDE, and everything else needed to create a large QB64PE project:  all the stuff you need for project management, task management, source code management (versioning, promotion levels, etc.), project and software documentation, all things needed for all artifacts and all processes related to all of that and everything needed in an end-to-end software development process.

It would be a bit like a bottle garden.  Everything you need is in there, in one file.  And all you need to work with it and all of your programs in it is a web browser.  The web browser can be offline or online, and the one HTML file can be stored anywhere: USB thumbdrive (or whatever other portable storage), file hosting service on the web, storage on whatever kind of device.

The operating system is irrelevant.  And your one standards-compliant file should still work A-1 in whatever web browser 15 years from now.  At worst, browsers no longer exist so you need to find a web browser to run in some virtual machine.

Now replace Wikipedia with TiddlyWiki, which has it's own language for creating whatever kind of user interface you want for all of the things you want this bottle-garden programming environment to be.

And you have access to all of the TiddlyWiki power to use as a meta-programming/scripting/macro-tool during pre-processing of your QB64PE program.  The macro language can be used to dynamically create QB64PE code, or to include all of the program's parts that have been broken down into individual modules,

And the data used to run/test the program exists in the TiddlyWiki, and can be dynamically turned into DATA statements in your program.

Everything is there, in that one file.  And because it is a wiki, you can easily manage it all, categorise, link, transclude, you name it.

And it has a whole bunch of export options, so you can export your program for different purposes: .BAS files for bringing those programs into QB64PE; source code in HTML file as documentation; small HTML application files (the minimal HTML needed, along with the interpreter and the program) for deploying/sharing the program as a single file for running in an offline/online web browser.

(The export options are limitless and ridiculously easy to develop: imagine the ability for all of the previous exports to include a language option for localisation!)

And so much more.  How do I wrap that nicely into a short paragraph?  Yikes ...
Reply
#2
For me, I'd have to see working examples to understand what you are getting at. At a glance, what sparks my interest from reading your post is this...

Let's say our wiki was filled with only the types of examples you could read but also use, either as copy/paste or by direct export into an app you are building. Need INKEY$? Okay, there are 10 Wiki examples, and probably one or more could be used, as is, in whatever app you are building. That's the impression I am getting from reading your post. Close?

Pete
Reply
#3
(11-07-2022, 12:20 AM)Pete Wrote: For me, I'd have to see working examples to understand what you are getting at. At a glance, what sparks my interest from reading your post is this...

Let's say our wiki was filled with only the types of examples you could read but also use, either as copy/paste or by direct export into an app you are building. Need INKEY$? Okay, there are 10 Wiki examples, and probably one or more could be used, as is, in whatever app you are building. That's the impression I am getting from reading your post. Close?

Pete

Because the programming reference is big and complicated, I created a wiki instance just for that.

That way, a programmer isn't loading all of that up every time BASIC Anywhere Machine is brought up.

But here's the thing.  While you are looking up a keyword like INKEY$ in the documentation, embedded in the documentation (dynamically coming on demand from BAM; so not copies) are programs from BASIC Anywhere Machine right there.  You can look at the source code samples AND RUN the source code samples as if everything was right there in the documentation.  So BAM is acting almost like a server, serving content to the programming reference.

Click here to open the programming reference.
Once there, click on "Menu" in the top-ish lefthand corner.
Click on "Keywords Reference" to view the dropdown content.
Click on the button "All Keywords and Special Characters
Then click the close button at the top-ish right corner to close the dialog box.
(Yeah, a bit cludgy, but that was a quick way to get from point A to B until I've got the time to build something different.)
In the list, find INKEY$ and click on it
In the new window, scroll down to see a bit of BASIC Anywhere Machine embedded in an iframe, showing program samples that us INKEY$
Click run on any sample to view that running source code.  Not a copy of the source code.  That source code right there.

So we can put everything and the kitchen sink in one BASIC Anywhere Machine, or put the kitchen sink in some other TiddlyWiki instance.

Divide and conquer as needed!

BTW: on my radar: in BASIC Anywhere Machine, click on something to view Programming Reference documentation about whatever you clicked on.  So going the opposite direction.
Reply
#4
(11-07-2022, 12:20 AM)Pete Wrote: For me, I'd have to see working examples to understand what you are getting at. At a glance, what sparks my interest from reading your post is this...

Pete

Next exercise: Let's explore "File Management" for managing all programs (remember:  BASIC Anywhere Machine is like a bottle-garden; it is one file with everything, except programming documentation, in it.)

Click here to open BASIC Anywhere Machine.

Click on the File menu.

Click "Open..."

Here, you can view the list of all programs in BAM sorted alphabetically.

Click on Options to see the dropdown content. Click on the check boxes and play.  (Delete programs too.  That's fine.  You can't save your changes to the server BAM is hosted on.)  Click on programs to open them and view them.

So BASIC Anywhere Machine is like a virtual machine and TiddlyWiki performs the file management duties (here "wiki page" management duties, pages being the equivalent to files) that would be handled by an operating system on a real (or virtual) device.

Another exercise at some point: save (i.e. download) BASIC Anywhere Machine so you have a local copy to do with it as you please.  Which could be a pain to keep up to date with changes I make: easy process pending !
Reply
#5
Ah, what you have there is more of a live demo wiki. I like the concept, especially useful to be able to run the code without the need to copy/paste/compile and run. Very modern approach.

Pete
Reply
#6
(11-07-2022, 01:27 AM)Pete Wrote: Ah, what you have there is more of a live demo wiki. I like the concept, especially useful to be able to run the code without the need to copy/paste/compile and run. Very modern approach.

Pete

Pretty cool, eh?  I love that kind of stuff, but could never imagine how to do it until I started working on BAM with TiddlyWiki.

This kind of thing handles my biggest general pet peave: one or more copies of one thing.

No matter what it is, if I must write/create it, it must exist just once in one place (i.e. a "single source" of information philosophy for all things; yeah, I'm a huge Scott Ambler and Agile Modeling fan), so that wherever I see it (and it must be visible/available wherever I need it), I know it is the accurate/current version of it.  Because there is no other version of it.
Reply
#7
(11-07-2022, 01:27 AM)Pete Wrote: Ah, what you have there is more of a live demo wiki. I like the concept, especially useful to be able to run the code without the need to copy/paste/compile and run. Very modern approach.

Pete

For BAM, it is trivial.  Once a program exists in BAM and has "meta-data" keywords setup (i.e. enter statement/function names in a field), the programming reference (dynamically building a URL for a looked up keyword, using that URL to "query" the BAM TiddlyWiki, BAM responds with an HTML page that has the list of programs with that keyword (INKEY$, for example.)  So web-server-like and database-server-like things going on.  Without a web server and without a database (and database server).

The same thing could be done embedding QBJS in the QB64PE wiki, but it would be a ginormous pain in the caboose.  Huge effort to setup, huge effort to maintain.

The work I have to do to include a new "INKEY$" program in the documentation?  Go to that program in BAM, add the "INKEY$" keyword to the program's metadata, save BAM locally, and upload the new version to my web site.  (I'm not even touching the documentation.)
Reply




Users browsing this thread: 1 Guest(s)