BAM "dev" and "prod" directives - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: QBJS, BAM, and Other BASICs (https://staging.qb64phoenix.com/forumdisplay.php?fid=50) +--- Thread: BAM "dev" and "prod" directives (/showthread.php?tid=1166) |
BAM "dev" and "prod" directives - CharlieJV - 11-21-2022 A program can be at one of two promotion levels: development or production. When at the development level, there are two versions of the program available: development and production. When at the production level, there is only the one version of the program: production. Until edited, at which point it is back at the development level. That aside: We may want a program to look/behave differently depending on what version we are running/exporting. This is where the "dev" and "prod" preprocessor directives come in. Sample code: Code: (Select All) <<dev """ In the sample code above, greet$ will have one value when we are running the development version, and a different value when running the production version. RE: BAM "dev" and "prod" directives - mnrvovrfc - 11-22-2022 I guess an ordinary QB64(PE) program having $IF THESE THEN preprocessor directives, will need to get them stripped in favor of <<prod """these""">> directives for this other processor. In "production" the programmer must be polite if he/she doesn't know who is the user of his/her program... RE: BAM "dev" and "prod" directives - CharlieJV - 11-22-2022 (11-22-2022, 12:01 AM)mnrvovrfc Wrote: I guess an ordinary QB64(PE) program having $IF THESE THEN preprocessor directives, will need to get them stripped in favor of <<prod """these""">> directives for this other processor. In "production" the programmer must be polite if he/she doesn't know who is the user of his/her program... Apologies, cognitive disability over here, which makes it hard for me to express my thoughts and understand what others are saying/writing. Does QB64(PE) have IF THESE THEN preprocessor directives? If so, I totally missed that in the wiki. The rest of your reply, I don't understand what you are saying. To clarify my part, the "dev" and "prod" directives allow deploying a BASIC program in either development or production versions, regardless of the current promotion state of a program. To make easy for a user to know what version they are in, you might make the development versions' screen black text on yellow brackground, and the production version lightgreen text on black background. Then the user has a very obvious cue of which version they are in. So they know that when they are testing something, they are at the right program. And when they want to do "production" stuff, that they are in the right program. I'm not sure I'm explaining myself right. RE: BAM "dev" and "prod" directives - CharlieJV - 11-22-2022 I don't know if images help conveying what I'm thinking. You can export either development or production version of the programs as single-html-file programs for running in web browsers, or export either development or production version of the programs as .BAS files to open in QB64(pe) and compile into EXE's, to then have development and production versions of the executable files. RE: BAM "dev" and "prod" directives - CharlieJV - 11-22-2022 (11-22-2022, 12:01 AM)mnrvovrfc Wrote: I guess an ordinary QB64(PE) program having $IF THESE THEN preprocessor directives, ...strip... Ah, I was looking at https://qb64phoenix.com/qb64wiki/index.php/Keyword_Reference_-_By_usage#Metacommands in the wiki. Whatever metacommands do exist for QB64(pe), I consider them non-existent if they are not easy to be discovered where one would expect to discover them. I'd offer to fix that because I love documentation, but I can't contribute to that wiki. The technology and the process are too heavy for this kid. These metacommands do not look like any fun to implement in BAM when I've already got the ridiculously easy and fun TiddlyWiki scripting language that kicks serious caboose for this kind of stuff. I know nothing that can touch TW's transclusion and filtering capabilities. RE: BAM "dev" and "prod" directives - SMcNeill - 11-22-2022 (11-22-2022, 02:58 AM)CharlieJV Wrote:(11-22-2022, 12:01 AM)mnrvovrfc Wrote: I guess an ordinary QB64(PE) program having $IF THESE THEN preprocessor directives, ...strip... Wouldn't one expect to find them on the metacommands page in the wiki? Metacommand - QB64 Phoenix Edition Wiki RE: BAM "dev" and "prod" directives - CharlieJV - 11-22-2022 (11-22-2022, 04:11 AM)SMcNeill Wrote:Sure if that was easy to find. I don't know where that link exists on the wiki. Where is that link hidden? Wherever it is, if it is fine for the majority, leave it there. I'm not looking for that site to accommodate my needs.(11-22-2022, 02:58 AM)CharlieJV Wrote:(11-22-2022, 12:01 AM)mnrvovrfc Wrote: I guess an ordinary QB64(PE) program having $IF THESE THEN preprocessor directives, ...strip... It was easy for me to find, however, the Metacommands section in the Keyword Reference - By usage page. If there is anything I loathe more than something that seems undocumented, it is inconsistent documentation. But good documentation is a hard thing to do, especially if the technology and the process aren't really inviting (from my perspective because of the challenges I deal with). But I also don't see folk clamoring to bump up the quality of the documentation because for most folk, it is no fun and is often a thankless job. RE: BAM "dev" and "prod" directives - SMcNeill - 11-22-2022 (11-22-2022, 04:37 AM)CharlieJV Wrote: ....Where is that link hidden? .... It's right there on the page that you're sharing. You're just overlooking it, apparently. RE: BAM "dev" and "prod" directives - CharlieJV - 11-22-2022 (11-22-2022, 05:01 AM)SMcNeill Wrote: It's right there on the page that you're sharing. You're just overlooking it, apparently. Yeah, those don't look at all like links to me, and even if they did, what reason would I have to click on them when it looks to me like everything is there on the one page? I'll elaborate on all of that later. It would be absurd for anybody to be hostile towards a wheelchair-bound individual because that individual did not attend a meeting located in a building that has no wheelchair access. That's what I'm experiencing over here. It is a kind of hostility that nobody could ever realise is being experienced on the other end. Because of that, and although it may seem absurd to you, I easily forgive that and easily fall into "roll up your sleeves and kill them with kindness" mode. I will do some reflection and actually respond with individual posts:
Something like that. I'm tired, so not today. Update After some sober second-thought: what's the point? The path of least resistance, surrender, detachment(?) feels way better: Note: Due to lack of interest in BASIC Anywhere Machine by the QB64 community, and unless interest in BASIC Anywhere Machine picks up, I'm (1) suspending posting updates about BASIC Anywhere Machine in the QB64(pe) forum and (2) suspending efforts to improve BASIC Anywhere Machine's compatibility with QB64/QB64(pe). If anybody wants to discuss BAM, I'm there for you, but I'm otherwise not bringing up my project. |