Once a TiddlyWiki fires up a BASIC program, that TiddlyWiki can't directly 
feed anything to the BASIC program.

The only time a TiddlyWiki can "feed" anything to the BASIC program 
directly is upon dynamically building the HTML (BASIC program, javascript 
to interpret the program, and maybe some transcluded goodies that get 
wikified upon dynamically building that HTML) just before sending all of 
that to an iframe.

Anything that changes that HTML passed to the iframe causes the BASIC 
program to restart.

The way to get TiddlyWiki talking to the program while it is running:  local 
storage <https://groups.google.com/g/tiddlywiki/c/ALUN9aSDBuw> !

So whatever widgets involved with, say, a game, in a TiddlyWiki tiddler set 
values in local storage.

The BASIC program regularly checks local storage, and processing gets 
triggered based on what the BASIC program finds in local storage.

The BASIC program can also provide values to the TiddlyWiki via local 
storage, but some kind of trigger needs to be setup in TiddlyWiki to check 
local storage (a manual trigger would involve a human pressing a button; an 
automated trigger would involve some kind of timer in TiddlyWiki to trigger 
check of local storage and retrieving values from local storage.)

TiddlyWiki to BASIC communication is ridiculously easy.  The other 
direction is a bit of work.

Using BASIC for dynamic generation of good-enough graphics based on events 
happening in TiddlyWiki: awesome scenario.

On Wednesday, February 16, 2022 at 5:06:35 AM UTC-4 [email protected] 
wrote:

> Yes this creation of yours is pretty cool.  My main TW project is an 
> interactive novel/pick your own adventure browser game that already uses TW 
> core with multimedia resources, svg animations, vrml (x3d)-- so why not 
> BASIC generated graphics?
>
> Made with the methodically maddening haphazard KAOS theorems (M2HKT) of 
> WikiWitchery...
>
> i1,i2,i3,i4 = ideas
> i1 + i2 = o.0
> i1 + i3 = 0.o
> i1 + i2 +i3 = >.<
> i1 + i2 + i4 = 0.0
>
> On Thursday, February 3, 2022 at 7:37:47 PM UTC-5 [email protected] wrote:
>
>> I fooled you?  Well, my occasional moments of sneakiness (blink and 
>> you'll miss it) can be underestimated ...
>>
>> https://basicanywheremachine.neocities.org/BAM_IDE.html
>>
>> Yeah, pick any of the programs already in there, and export to 
>> .bas.html.  Then open in your browser to see running app.
>>
>> Single html file with nothing but basic program and the goodies that run 
>> the BASIC program.  All self-contained, just itching to be deployed.
>>
>> Don't mind me, that gets my geek mojo gooving something silly.
>>
>> If you sneak a peak at wwwBASIC <https://github.com/google/wwwbasic>, 
>> you'll see that a standard BASIC program in a deployable HTML file looks 
>> like this:
>>
>> `
>> <!DOCTYPE html>
>> <html>
>> <head> 
>>   <script src="https://google.github.io/wwwbasic/wwwbasic.js";></script>
>> <script type="text/basic">
>> PRINT "Hello World!"
>> FOR i = 1 to 10 PRINT "Counting "; i NEXT i
>> </script>
>> </head>
>> </html>
>> `
>>
>> BASIC Anywhere Machine is a fully self-contained TiddlyWiki (my modified 
>> version of wwwBASIC.js is in a tiddler).  The export .bas.html process just 
>> spits out the basic program like in the example above, but also embed all 
>> of the javascript from my version of wwwbasic right into the html file, so 
>> the html file has no external references.
>>
>> Nothing revolutionary, but still pretty cool.
>> On Thursday, February 3, 2022 at 8:03:55 PM UTC-4 [email protected] 
>> wrote:
>>
>>> : )  You fooled me with those iframes, I thought they were FF dev tool 
>>> popups!
>>>
>>> But pre-generated images would be best for static images but it looked 
>>> like some code had interactivity.  I have operated TW's along with web 
>>> pages that had js I couldn't run in TW, or another web app through iframes, 
>>> so this would be along those lines.
>>>
>>> I shall be delving into this Basic Anywhere further-- TY for you wiki!
>>>
>>> On Thursday, February 3, 2022 at 9:59:52 AM UTC-5 [email protected] 
>>> wrote:
>>>
>>>> G'day, and thanks for your interest ~
>>>>
>>>> The code is running in HTML in an iFrame now.  (That BASIC console 
>>>> window is just a TiddlyWiki-generated window containing an iFrame to 
>>>> display the HTML needed to run the BASIC program.
>>>>
>>>> If you export a program as .bas.html, that html file is then something 
>>>> you can display directly in a browser window by itself, or display in an 
>>>> iframe.
>>>>
>>>> The .bas.HTML file will have the BASIC program embedded, and also have 
>>>> the BASIC interpreter (a modified version of wwwBASIC) embedded as well, 
>>>> translating the BASIC program into javascript on the fly.
>>>> On Thursday, February 3, 2022 at 7:07:48 AM UTC-4 [email protected] 
>>>> wrote:
>>>>
>>>>> This is of interest, not just for the custom exports (I home brewed a 
>>>>> basic html export so I could build web pages independent of TW's 
>>>>> stylesheet, but with a custom stylesheet), but the BASIC anywhere.  I saw 
>>>>> that the code examples opened in console windows in FF-- could the code 
>>>>> run 
>>>>> (generate graphics) in html, like a iframe?
>>>>>
>>>>> On Sunday, January 30, 2022 at 8:05:47 PM UTC-5 [email protected] 
>>>>> wrote:
>>>>>
>>>>>> BASIC Anywhere Machine follow-up video <https://youtu.be/b05nQynrvE0> 
>>>>>> showing the usefulness of the TW-native export formats and the three 
>>>>>> additional export formats when exporting BASIC programs.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, January 12, 2022 at 3:56:55 PM UTC-4 Charlie Veniot 
>>>>>> wrote:
>>>>>>
>>>>>>> See details in this blog post. 
>>>>>>> <https://basicanywheremachine-news.blogspot.com/2022/01/new-feature-export-basic-programs-three.html>
>>>>>>>
>>>>>>> Try the features and go some TiddlyWiki code excavation/study with 
>>>>>>> the latest version of BASIC Anywhere Machine 
>>>>>>> <https://intertwingularityslicendice.neocities.org/TW_BasicIDE.html>
>>>>>>> .
>>>>>>>
>>>>>>>    - BASIC Anywhere Machine's File menu, click on the "Exit" menu 
>>>>>>>    item to  get into the TiddlyWiki interface
>>>>>>>    - Relevant tiddlers:
>>>>>>>       - .BAS Exporter
>>>>>>>       - .BAS.HTML Exporter
>>>>>>>       - .BAS.JSON Exporter
>>>>>>>       - Creating a custom export format 
>>>>>>>    <https://tiddlywiki.com/#Creating%20a%20custom%20export%20format>
>>>>>>>    
>>>>>>> Cheers !
>>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f136de6d-ab24-467a-92b0-025ec20135f1n%40googlegroups.com.

Reply via email to