QBJS v0.6.0 Release
#1
Hi All,

The latest version of QBJS (0.6.0) is now available.  Here are some of the highlights for this release:

File I/O Support
Support has been added for standard QBasic file input/output.  QBJS now has a virtual file system that supports most file system operations.  As part of this update there is now a File tab in the console to manage the virtual file system.  Files can be dragged into the currently selected folder and downloaded by clicking the file name.

What is supported so far:
- INPUT, OUTPUT, APPEND and BINARY file modes

What is NOT supported yet:
- RANDOM file mode


Project Support
Now more complex projects can be managed and shared in QBJS.  There is a new toolbar which allows you to open and save either individual .bas source files or a .zip file containing an entire project.  Additionally, you can share publicly published projects with the src parameter.  Here are a couple of examples:
- Simple Project Example
- Sleighless


Expanded Set of QB/QB64 Keywords
25 new keywords have been included with this release:
_CWD$, _DirExists, _FileExists, _OS$, _StartDir, ChDir, Close, EOF, Files, FreeFile, Get, Input (file statement), Kill, Line Input (file statement), LOF, MkDir, Open, Print (file statement), Put, Name, RmDir, Seek, Write, Write (file statement), XOR (bitwise)


See the full release announcement for a complete list of fixes and enhancements.

Download the latest version of QBJS at: https://github.com/boxgaming/qbjs/releases/latest

Try it out online here: https://qbjs.org
Reply
#2
+2 for being a mind reader and including a whole bunch of new keywords I work with all the time. You know when I wrote programs to run golf tournaments, the ability to use QB64 online would have been amazing. I can only hope others, who encounter this project, can now take advantage of this wonderful extension of the language.

RA files are a bit of a pain as QB has a couple of ways of coding for them, so good luck when you get to implementing those. Most of my smaller apps use sequential files that I simply overwrite. I presume "NAME" in your list is for that, as in: NAME "xyz.dat" AS "abc.dat"

Now here is something I'm pretty excited about, but I have no idea if this is in the project, or is being considered. Have you or have you thought about making objects like HTML buttons, form input lines, etc. interact with QBJS code? In other words I make something like a form to hold 5 variables and a submit button and it runs the QB64 code associated with it using the value of the variables in the data fields and the output either shows up on the html page, or another output page is generated and opened?

Congrats on the new forum space!

Pete
Reply
#3
Quote:Now here is something I'm pretty excited about, but I have no idea if this is in the project, or is being considered. Have you or have you thought about making objects like HTML buttons, form input lines, etc. interact with QBJS code? In other words I make something like a form to hold 5 variables and a submit button and it runs the QB64 code associated with it using the value of the variables in the data fields and the output either shows up on the html page, or another output page is generated and opened?

Absolutely, this was definitely something I found interesting early on in the project.  There is a standard library (web/dom.bas) that is included with QBJS that lets you interact with the HTML page.  You can create virtually any HTML control and implement custom handlers for the various events.

HTML Controls
Simple Web Calculator

There are a number of additional examples on the Samples page here:

https://github.com/boxgaming/qbjs/wiki/S...the-screen
Reply
#4
Very cool. I envision some time in the future a "Convert to JavaScript" option in the QB64-PE IDE! One language for PC, Web, and eventually Mobile Devices. That's are nice future to look forward to.

I would highly recommend you edit your first post to include, and update as needed, this link in your original post...

Download the latest version of QBJS at: https://github.com/boxgaming/qbjs/releas...0.6.0-beta

Make it easy for users here to download and get started.

Thanks,

Pete
Reply
#5
Thumbs Up 
Yeah to my most pleasant surprise that calculator was done with GUI!

Is that QB64 source or something geared for JS and the HTML / Internet?
b = b + ...
Reply
#6
Heart 
Congratulations with the new sub-forum! It was a matter of time, to better spread the good word.
Reply
#7
Can QBJS be used with the NodeJS command line program?
Ask me about Windows API and maybe some Linux stuff
Reply
#8
(11-07-2022, 08:07 PM)Spriggsy Wrote: Can QBJS be used with the NodeJS command line program?

Not yet, but that is an interesting question.  I have been kicking around the idea of using node.js to support a Console:Only mode for QBJS.
Reply
#9
The QBJS works with a "modern" web browser. Such as Chromium or any other based on it.

Not Palemoon. Take my word for it, don't try to run this on Palemoon which cannot even permit the user to save his/her work. Yes, this thing exists and I prefer it if it weren't for shortages like this.

I noticed "LOCATE" doesn't display the cursor on the output screen at all. It doesn't for "INPUT". That's why I joked in the other thread that the programmer might have to process the cursor position and draw the cursor for requesting input from the anxious types.

Another thing: at least on my system (Linux 64-bit/Manjaro MATE/Brave) there's no indication on the screen the program run ended. IDK, maybe say in the console: "Program run has completed."
Reply
#10
(11-07-2022, 08:17 PM)mnrvovrfc Wrote: The QBJS works with a "modern" web browser. Such as Chromium or any other based on it.

Not Palemoon. Take my word for it, don't try to run this on Palemoon which cannot even permit the user to save his/her work. Yes, this thing exists and I prefer it if it weren't for shortages like this.

Yeah, sorry, I'm targeting the most popular browsers for my testing: Chrome, Safari, Edge, Firefox.  I just don't have the bandwidth to test on the more obscure ones.
https://gs.statcounter.com/browser-market-share

Quote:I noticed "LOCATE" doesn't display the cursor on the output screen at all. It doesn't for "INPUT". That's why I joked in the other thread that the programmer might have to process the cursor position and draw the cursor for requesting input from the anxious types.

Yes, I never got back around to displaying the cursor for input.  I'll put it on the TODO list.

Quote:Another thing: at least on my system (Linux 64-bit/Manjaro MATE/Brave) there's no indication on the screen the program run ended. IDK, maybe say in the console: "Program run has completed."

Good suggestion.  At present you can tell the program has stopped because the < Stop > button disappears.  It didn't exactly seem to fit in this context to display "Press any key to continue".
Reply




Users browsing this thread: 6 Guest(s)