QB64 Phoenix Edition
QBJS - QBasic for the Web - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: QBJS - QBasic for the Web (/showthread.php?tid=34)



QBJS - QBasic for the Web - dbox - 04-18-2022

Hi all,

Just wanted to share (again) the QBJS project that I've been working on.

Here is the original post from the qb64.org forum: https://qb64forum.alephc.xyz/index.php?topic=4670.0

What is QBJS?
It is an answer to the question, "What would it be like if QBasic and Javascript had a child together?"

It is an effort to bring the fun and accessibility of the classic QBasic syntax to the modern web browser.  The project is, of course, heavily inspired by both QBasic and QB64.  The main QB-to-Javascript converter is written in QB64 and compiles itself to Javascript for use on the web.  There is a simple IDE with a stripped-down, classic QB look-and-feel.

   

I'll plan to post updates here as new releases are available and/or advances of note are made with the project.

Try it out here:
https://boxgm.itch.io/qbjs

Learn More:
If you are interested to learn more I'm trying to document as much as I can on the project wiki on github.  Here are a few pages of note:
  • QBasic Language Support
    This page describes the overall approach, what differences exist to QBasic/QB64 and features unique to QBJS
  • Supported Keywords
    Lists the set of keywords supported by the current stable release and the level of compatibility with QBasic/QB64
    Keyword links are currently broken which pointed back to the QB64 wiki
  • Roadmap
    The place to document what fixes and enhancements are being worked on for the in-progress release as well as some general planning for the future.
  • Samples
    A centralized place for QBJS code samples.
    Many of these were shared on the previous forum. This page was put together hastily, it should improve in format and organization with time.

As always I am very interested in any and all feedback!


RE: QBJS - QBasic for the Web - bplus - 04-23-2022

This is really great project by dbox and he has me interested in JS.

Alas, there is only so much time in day! At least not bored! Smile


RE: QBJS - QBasic for the Web - DANILIN - 06-02-2022

Fibonacci Infinity


Code: (Select All)
Dim fi1 As Double: Dim fi2 As Double: Dim fi3 As Double
fi1 = 1: fi2 = 1: fi3 = 1: dim a$ as string ' FIBrus.bas
For da = 1 To 102 ' DANILIN & Fibonacci
a$ = Str$(fi3)
d = len(a$)
    For i = 1 To 25-d: Print ".";: Next
    Print fi3
    fi3 = fi2 + fi1
    fi1 = fi2
    fi2 = fi3
Next

https://v6p9d9t4.ssl.hwcdn.net/html/5799342/index.html?code=RGltIGZpMSBBcyBEb3VibGU6IMYTMtITM8oTIArENT0gMTrFK8cJM8YJZGltIGEkIGFzIHN0cmluZyAnIEZJQnJ1cy5iYXMKRm9yIGRhxCogVG8gMTAyICcgREFOSUxJTiAmIEZpYm9uYWNjaSAKYSQgPSBTdHIkKGZpMykKZCA9IGxlbihhJCkKICAgIMRIachHMjUtZDogUHJpbnQgIi4iOzogTmV4dMUoxhVmaTPFDuYApeQAtCvkAPjHFOQAy2ZpMscO5ADQxDDEQw==



Code: (Select All)
...................1
...................2
...................3
............39088169
............63245986
...........102334155
.1779979416004714189
.2880067194370816120
.4660046610375530309
.7540113804746346429
12200160415121876738

Plus I create variants Fibonacci Infinity on Python & C#