Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
Fun with Ray Casting
Forum: a740g
Last Post: MasterGy
43 minutes ago
» Replies: 8
» Views: 125
|
QBJS - ANSI Draw
Forum: QBJS, BAM, and Other BASICs
Last Post: dbox
58 minutes ago
» Replies: 3
» Views: 69
|
Cautionary tale of open, ...
Forum: General Discussion
Last Post: doppler
6 hours ago
» Replies: 3
» Views: 82
|
Extended KotD #23 and #24...
Forum: Keyword of the Day!
Last Post: SMcNeill
7 hours ago
» Replies: 0
» Views: 31
|
Big problem for me.
Forum: General Discussion
Last Post: JRace
11 hours ago
» Replies: 11
» Views: 183
|
Virtual Arrays
Forum: Site Suggestions
Last Post: hsiangch_ong
Today, 12:35 AM
» Replies: 8
» Views: 297
|
QBJS v0.9.0 - Release
Forum: QBJS, BAM, and Other BASICs
Last Post: hsiangch_ong
Today, 12:25 AM
» Replies: 17
» Views: 305
|
Very basic key mapping de...
Forum: SMcNeill
Last Post: SMcNeill
Yesterday, 11:18 PM
» Replies: 0
» Views: 33
|
1990's 3D Doom-Like Walls...
Forum: Programs
Last Post: a740g
Yesterday, 06:12 PM
» Replies: 10
» Views: 323
|
Editor WIP
Forum: bplus
Last Post: aadityap0901
Yesterday, 08:54 AM
» Replies: 12
» Views: 687
|
|
|
What is BASIC Anywhere Machine (aka, maybe: BAM) |
Posted by: CharlieJV - 11-07-2022, 12:11 AM - Forum: General Discussion
- Replies (6)
|
|
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 ...
|
|
|
Thoughts on BAM and QBJS (etc.) |
Posted by: CharlieJV - 11-06-2022, 05:42 PM - Forum: General Discussion
- Replies (13)
|
|
I didn't want to risk clogging "JavaScript-ing it, I need to get with it" with anything of no interest to anybody (or of interest and creating a whole discussion maybe not fitting the OP in that thread.
To me, every BASIC implementation out there that isn't "dead" is filling a place for however many folk that no other BASIC implementation can.
I can imagine that some folk might very well use one ore more BASIC implementations, each for one or more specific purposes.
Although both BAM and QBJS can outright stand on their own for what they are good at, I think both of them also have the potential of being great sidekick helpers for QB64/QB64PE/QBASIC (the big boys) programming.
If not 100% compatible with the big boys, then at least compatible enough for coding certain snippets of code. Why? To be able to create/edit those snippets of code from anywhere anytime (you just need a web browser), regardless of device and without an available install of "a big boy" BASIC.
This is a pretty big deal not just for anywhere-programming-anytime, but also for testing algorithms/functions/subroutines/whatever. You can put the code on the web not just for viewing the code, but also running it. That kind of world-wide access/availability means you can get collaboration from anywhere at any time easy peasy.
In my mind, QBJS and BAM are otherwise very different beasts. I think:
- QBJS is and will be the cat's meow for compatibility and performance
- BAM is and will be the cat's meow for serious project management, source code management, and all things software development process, including documentation (being a TiddlyWiki instance, BAM inherits all of the core TiddlyWiki goodies, and the goodies from whatever TW plugin's get added as you make BAM your own)
Just like neither QBJS nor BAM can ever be competition for QB64/QB64PE/QBASIC, QB64/QB64PE/QBASIC can never be competition for either QBJS or BAM, just like QBJS and BAM can never be competition to the other: all very different beasts really good at specific things.
QBJS and/or BAM as sidekicks for QB64/QB64PE/QBASIC for whatever projects? There is some bad-a$$ potential there.
|
|
|
JavaScript-ing it, I need to get with it |
Posted by: mnrvovrfc - 11-06-2022, 03:53 PM - Forum: General Discussion
- Replies (15)
|
|
https://qb64phoenix.com/forum/showthread...66#pid9266
This thread exists because I didn't want to reply to that post, and I selfishly didn't want to post on the dedicated thread about the subject.
Good job with this project, surprised that it's as deep as it is in such a short time. Normally I don't like stunts done by clunky web browsers but this interested me. I visited the page on Github to learn about support for QB64(PE) keywords. These are just my observations.
- "COMMAND$" - not even a special "global" dialog to put in its value? Some programs depend on this, including all-uppercase return value, and it might be difficult to change away from it. Might not have to worry a lot about "COMMAND$(1)" or alike. OTOH Linux is very lame about this sometimes, limiting terminal command line to a maximum of 255 characters.
- "IF... THEN" - clarify that it has to be "IF (condition) THEN GOTO (linenum/label)", or "GOTO" cannot be used at all? (OK discovered below "GOTO" and labels aren't even supported.) Does this mean only block "IF" could work? No problem for me but some old programs would need extensive revision then, you know how much colons were loved back then...
- "LOCATE" - does this mean changing the cursor shape? Because this is a bit sad this day and age. I mean in graphics mode "druw yer own kersair for krissakes"...
- "OPEN FOR RANDOM AS" - this should be easy to implement one way. "TYPE... END TYPE" is supported, am I correct? It must have to do with a security issue. Entire files could be "dowloaded" which isn't as useful to me and I could never get to grips with Internet functionality in QB64PE.
- "SELECT CASE" - what is "EVERYCASE"? Do you mean "CASE ELSE"? Must be Visual Basic tendency.
- "TIMER" - a few QB64 programs will be broken because of this. So this might mean the QB64-only edition of "ON TIMER" isn't supported neither.
- "_MOUSEINPUT" - LOL so this is like being on a Macintosh.
- "_OS$" - I think this should work like in normal QB64, some programs depend on this information and don't use the preprocessor.
A few other things:
Sub parameters are passed only by value: this is one reason why I'll have difficulty with this package. LOL I like using "SUBs" instead of "FUNCTIONs" to return values, especially more than one value since I also like to program in Lua.
"GOSUB... RETURN" not supported: yeech!
Function return could be array, associative arrays support: don't need unless the above two are fixed!
Errm... I understand the tendency toward Visual Basic, but I guess this isn't for converting programs created before M$ came up with that product. No spaghetti code allowed! Also give them no choice with "OPTION _EXPLICIT" always enabled. Some people with bad habits made by Q(uick)BASIC are going to be alienated, however.
As I've said, these are just observations (opinions).
|
|
|
Day 001: _GREEN32 |
Posted by: SMcNeill - 11-06-2022, 02:33 PM - Forum: Keyword of the Day!
- Replies (3)
|
|
Perhaps not the greatest of keywords to start with, but that's the nature of randomness. It is what it is, so with no further ado, here's _GREEN32 explained and showcased.
What is _GREEN32? It's a simple command that takes a color value and returns the green component back to you from it.
When would you use it? Basically when you have a color (perhaps taken from one of the color names), and you need to know what the green value is in it.
Example:
Code: (Select All) Screen _NewImage(640, 480, 32)
$Color:32
Print "Lime : "; Hex$(Lime)
Print "======"
Print "Alpha: "; Hex$(_Alpha32(Lime)), _Alpha32(Lime)
Print "Red : "; Hex$(_Red32(Lime)), _Red32(Lime)
Print "Green: "; Hex$(_Green32(Lime)), _Green32(Lime)
Print "Blue : "; Hex$(_Blue32(Lime)), _Blue32(Lime)
As you can see from the simple example above, _GREEN32 can be used to easily get back the green color values from whatever 32-bit color you send to it. Used in conjection with _ALPHA32, _RED32, and _BLUE32, you can quickly and easily break down a complex color value into its component parts with almost no effort on your part.
|
|
|
Keyword of the Day! |
Posted by: SMcNeill - 11-06-2022, 02:21 PM - Forum: Learning Resources and Archives
- Replies (1)
|
|
From the topic here -- Code fix (qb64phoenix.com) -- I was surprised to see both Dimster and OldMoses were both unaware of the INPUT$ function. It's one of those commands that's been in the language since the beginning of time (back when cavemen used LET and such), so I just assumed everyone was familiar with it by now.
Fool me once, as they say!
So the question then becomes, "What other keywords are folks missing out on? And how can we help draw attention to those keywords, to make the user base aware of them?"
My solution??
Keyword of the Day!!
Every day I'll run the little code below and TRY to write up an explanation and a few simple samples of whatever keyword the list gives me. If it's a keyword that's already been covered, then YAYYYY -- I get a day off!! For those that know the keyword, I encourage you to add any explanation and examples that you can with it, to showcase WHY one would use it and WHEN they would use it. On any day which I might miss due to illness, life, or whatnot, I encourage any other user to feel free to run the code below and put up a sample for a Keyword of the Day!
Let's see how many days in a row we can go without missing one!
Code: (Select All) '$INCLUDE:'.\source\subs_functions\syntax_highlighter_list.bas'
ReDim KeyWords(0) As String
ParseList KeyWords(), listOfKeywords$
Randomize Timer
i = Int(Rnd * UBound(KeyWords)) + 1
Print "The KeyWord for the day is: "; KeyWords(i)
Sub ParseList (Array() As String, list$)
ReDim Array(10000) As String
Do
p = InStr(list$, "@")
Array(count) = Left$(list$, p - 1)
list$ = Mid$(list$, p + 1)
If Left$(list$, 3) <> "_GL" Then count = count + 1
Loop Until p = 0
ReDim _Preserve Array(count) As String
End Sub
|
|
|
Code fix |
Posted by: Chris - 11-06-2022, 11:51 AM - Forum: General Discussion
- Replies (15)
|
|
Hello
Please modify the code.
Normal inputs are: zero (inclusive) to 6
How to convert the code so that the option without entering digits after pressing the Enter key, T # takes the value 7.
Thank You
PRINT "Enter a digit"
K$ = "": F$ = ""
WHILE LEN(K$) < 1 AND F$ <> CHR$(13)
F$ = ""
WHILE F$ = "": F$ = INKEY$: _LIMIT 30: WEND
IF F$ = CHR$(27) THEN 15
IF F$ = CHR$(32) THEN 20
IF F$ <> CHR$(13) THEN K$ = K$ + F$
WEND
T# = VAL(K$): PRINT T#
|
|
|
|