Monday, February 28, 2022

BASIC Anywhere Machine version of "Spheres"





Saturday, February 26, 2022

New Functionality: Session Storage interaction

Just added to BASIC Anywhere Machine:

  • SetSessionStorageItem(key, value)
  • GetSessionStorageItem(key)

Sample BASIC program:

SetSessionStorageItem ("salutation", "howdy, buddy")
Print GetSessionStorageItem ("salutation")
SetSessionStorageItem (1, 5)
Print GetSessionStorageItem (1)


Please take the following with a grain of salt, as this is my recently acquired understanding based on what I've read (experience-based understanding is pending!):

Difference between these and the "LocalStorage" counterparts:

  • LocalStorage is persistent (i.e. will still be available after browser/computer restart) and shared among all "same site" web pages across open same-browser instances and browser tabs
  • SessionStorage is temporary and only persistent in the current browser tab's access to a web page (close the tab or navigate to some other website, and temporary storage is gone.)

More info to follow as I slowly wrap my mind around practical uses cases for one vs the other.

Cheers !

A little bit of graphing fun with SIN()

This is an example of the "Algorithmic Digital Art" BASIC Anywhere Machine use case.  Nothing complicated, but still kind of fun.

This is also an opportunity to showcase the benefit of BASIC Anywhere Machine's ability to export a BASIC program, along with everything needed (and just what is needed) for that BASIC program to run in an HTML file, which can then be deployed/shared however one needs.  (See the links in the video's description, or find the links below the embedded video right here.)

Cheers !



Run the program: https://basicanywheremachine.neocitie... View the source code: https://basicanywheremachine.neocitie...


Wednesday, February 16, 2022

On-going research: "Communication" between TiddlyWiki and a BASIC Anywhere Machine program

 Check out this primitive prototype.


The trick involves TiddlyWiki and a BASIC program to share/communicate data via scheduled and/or on demand reading and writing to the web browser's local storage.

Sunday, February 13, 2022

Programming Reference: integration of code samples from BASIC Anywhere Machine

Although I've always appreciated program samples in any programming reference, I've always disliked having to type in that program to see it in action.

So one of my many missions with BASIC Anywhere Machine is to have a programmer's reference (in a dedicated TiddlyWiki instance) that knows how to display sample programs from BASIC Anywhere Machine (a separate dedicated TiddlyWiki instance) via some tagging, along with a button to run a sample program "right there."

Cheers !




Wednesday, February 9, 2022

πŸͺ² Fix to issue: CIRCLE color fill

 The latest version of BASIC Anywhere Machine fixes an issue that exists in wwwBASIC.

CIRCLE (column%, row%), radius%, drawColor%, startRadian!, stopRadian!, aspect!,aspect!,F

The "F" parameter in the CIRCLE statement triggers color fill for a circle.

For example:

screen 21

circle(1,1),325, &hffff00, , , ,F

In wwwBASIC, color-filling a circle with radius greater than 113 (screen modes 11,12,14-21) causes the entire screen to get painted.  The color spills out of the circle via a very small gap between the pixels in the circle's border.

The CIRCLE statement in BASIC Anywhere Machine is fixed such that circles with radius greater than 113 will be filled with color without the color spilling out into the rest of the screen. 

Saturday, February 5, 2022

New Functionality: Toe-Dip into Local Storage interaction

 Just added to BASIC Anywhere Machine:

  • SetLocalStorageItem(key, value)
  • GetLocalStorageItem(key)
Sample BASIC program:

SetLocalStorageItem ("salutation", "howdy, buddy")
Print GetLocalStorageItem ("salutation")
SetLocalStorageItem (1, 5)
Print GetLocalStorageItem (1)

The parameters are type-agnostic.  Although atypical for a BASIC programming language, BASIC Anywhere Machine's BASIC implementation (a customised version of wwwBASIC) is running on javascript.

Friday, February 4, 2022

πŸͺ²IDE Bug Fix (Opened Program Not Showing in IDE)

 BASIC programs are stored in tiddlers.

Programs edited in the IDE are automatically saved in a "draft" field of the program's tiddler.

Programs eventually wind up in the tiddler's standard "text" field when the program is saved.

That was all working fine.

What was not working fine: in the standard TiddlyWiki interface, entering a new BASIC program directly in the text field.

When opening that program in the IDE, the IDE is supposed to copy the basic program from the text field to the draft field, for the draft version of the program to be available for editing in the IDE.

The copying of the program from the text field to the draft field was not working, but is now fixed.

Thursday, February 3, 2022

πŸ“š FUNCTION (and SUB): variable arguments, by default, are "passed by reference"

Preamble A primer on "call-by-reference" vs "call-by-value" BAM HOWTO (BTW:  "call-by-reference" aka "pas...