Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SMcNeill

Pages: 1 [2] 3 4 ... 265
16
The color picker and Paint3 subs (my contributions) pretty useful as well as save image code, wouldn't be hard to fix, Steve may have already!

https://qb64forum.alephc.xyz/index.php?topic=1651.0 Latest version works just fine with the changes to Function.  Just update your library.  ;)

17
QB64 Discussion / Re: QB64 Bounty List
« on: April 09, 2022, 11:38:46 am »
Oh, so all the changes I would commission would only apply to me ... couldn't share my creations with others UNLESS the proposed change would go through an approval process???

I imagine they would probably go through to start with, but if they broke something or were undesirable, the team would go and revert them out and say, "No-no."

Of course, you also have to remember, the same folks read and moderate the forums here also.  I'd imagine that if someone truly started pushing for unacceptable modifications, they'd be notified why those changes weren't allowed even before somebody else could accept the job and complete it.

Just having a job remain on the forums itself, is probably what you could consider the first stage in approval to altering the official repo.

18
QB64 Discussion / Re: QB64 Bounty List
« on: April 09, 2022, 10:51:36 am »
I don't think you have to worry about that @Dimster.  The "official" QB64 project still has folks at the head of it who can always speak up and nix an idea or revert it from the repo.  There's nothing to stop you from paying someone to make you a personal version of QB64 with a _HelloWorld command built into it, as QB64 is completely open source -- but the official Dev team doesn't have to accept those changes in the repo.

There's not a lot of limitations that Galleon set on how to develop or expand QB64, but one of the main points was: You can't add/alter anything that will break backwards compatibility.  For instance, I've never been content with InstrRev terminating with a -1, like the rest of our commands which terminate with a 0.  Unfortunately, it's now documented in the wiki, and exists in such a manner in folk's code.  Changing it now would break their old programs, and so, it doesn't change -- even though I personally mod my own version of QB64 to always terminate with 0.

If you pay to add XYZ feature to the language, and the Devs allow that feature into the official repo, then nobody's going to be able to pay a larger bounty to undo it. 

19
QB64 Discussion / Re: QB64 Bounty List
« on: April 09, 2022, 08:21:07 am »
Steve. Just 'one' tractor, right? Man, that is a ton of money... and many times a year! I cringe just thinking about it....

Yep -- just one tractor, and it doesn't measure miles per gallon -- more like gallons per mile! 

Steve wants to pay up for fixes??  He should, if anything, be being paid for all his contributions to QB64.

I've been fortunate -- I'm one of the few who has managed to use the project to earn some money from it.  Several years back I got to write a program for the local Historical Society to help them organize their data and search and find records, and I used QB64 to write just about their whole system.  The language and the community has been good to me for multiple years, and this is just my little way of giving back to it.   

I've tried to dig into these issues myself, but they're deeply embedded into the C-side of things and beyond my realm of expertise.  Since I can't personally fix the issues, and since they bug the heck out of me and interfere with some of the things which I'd like to be able to do with the language, it just makes sense for me to donate some of my discretionary spending to help encourage someone to step forward and fix the issues.  ;)

Oh, and get an electric tractor! If you're out plowing in the rain, just make sure it has good shock absorbers.

I saw one of those at a trade show several years back -- it had enough juice in it to run just long enough to unplug it from the charger to start it up, put it in drive, and then park it so you could put it back into the charger!  When your tractor is built more like a tank or a bulldozer than a car, they simply can't put batteries big enough in it for it to do much more than make a nice lawn ornament...


20
QB64 Discussion / Re: Question regarding interacting with Excel files
« on: April 08, 2022, 08:44:17 pm »
Happy to help get you started, though I'm afraid that's about all I can do for you.  I just don't use Excel enough to have any real idea of it's syntax structure beyond the very basics which I shared above. 😉

You have my best wishes for the rest of the project!  👍

21
QB64 Discussion / Re: Question regarding interacting with Excel files
« on: April 08, 2022, 03:09:16 pm »
Here's a working example for you:

Code: QB64: [Select]
  1. _Title "XLSX Example data retrieval"
  2. If _FileExists("Example.xlsx") = 0 Then
  3.     Print "File not found in base directory.  We can't work with what doesn't exist!"
  4.     End
  5.  
  6. 'Make a copy of the original so we don't screw anything up.
  7. Open "Example.xlsx" For Binary As #1
  8. l = LOF(1)
  9. s$ = Space$(l)
  10. Get #1, 1, s$
  11.  
  12. Open "Temp.zip" For Binary As #1 'copy the data and rename the xlsx extension to a zip file.
  13. Put #1, 1, s$
  14.  
  15. Shell _Hide "PowerShell Expand-Archive Temp.Zip" 'Expand the zip file
  16.  
  17. Open "./temp/xl/sharedStrings.xml" For Input As #1 'open it up
  18.     Line Input #1, temp$ 'get the data
  19.     Print temp$ 'print the data
  20.  
  21.  
  22. Kill "Temp.Zip" 'clean up the temp file from the drive
  23.  
  24. Print "Remember to clean up your Temp directory and remove it when finished!"
  25.  
  26.  

This opens the xlsx file, copies it, renames it to become a zip file, extracts the contents of the zip file to a Temp directory, then reads the main data file and prints it to the screen, before finishing up.

Note that I'm not extracting any of the data from the xls file itself, so you'd need to parse your results, which are in the following style format:

Code: [Select]
<si>
<t>Name,First</t>
</si>
<si>
<t>Name,Last</t>
</si>
<si>
<t>Age</t>
</si>
<si>
<t>Sex</t>
</si>
<si>
<t>Junk</t>
</si>

*Which all of this is on my very limited usage of Excel -- which I proudly have proclaimed repeatedly that I don't use personally.  Your actual data might be in a different file inside the xlsx folder, but I can't imagine that extracting the information inside it would be much different than what I have here.  You just need to know the actual internal file that you're looking for, to access the right one inside the folder, and then you're good to go!

22
QB64 Discussion / QB64 Bounty List
« on: April 08, 2022, 10:29:06 am »
Just a few days ago, I had the misfortune of having to fill up my tractor's fuel tank from being almost empty.  400 gallons @ almost $5.00 per gallon...  And then a sinking feeling hit the core of my gut as I realized I was going to have to repeat such an experience dozens of times this year.  /cry

By the time this harvest season comes around in fall, I'm predicting that we're going to see increases in the price of staple foods by everything doubling, if not more at that time!

"And how's this ever rising inflating relate to QB64 and its development?", you guys ask.

It's all because I realize the Devs are people too!  They're going to be facing the exact same financial crunch as everybody else in the world, and QB64 is nothing more than a hobby project.  Who's going to have time to spend on hobbies, when they're working their ass off just to try and keep food on the table?!!

So, that's when an idea came to me that sounds like a Win-Win for everyone involved:  A QB64 Bounty List!

Got some extra cash laying around?  Are you, like me, one of those whose prepared no matter what the future brings?  I've had a lifetime to save and put aside for hard times, so I can comfortably coast through the next several years of my life and weather the increasing inflation.  Others aren't as fortunate -- such as some student struggling to make ends meet while working their way through college.  They might have skills to work on QB64 in places which I don't, but they simply don't have time to devote to working on things due to having to take a part-time job at McDonalds just to keep the bills paid.

So here's my proposal -- A "Bounty System", where people can pledge to donate $$$ for whatever fix, enhancement, or addition they wish to see for the QB64 language.  It'll give Devs a little extra cash for small projects, keep the development of QB64 going, and gives the user-base a chance to help guide what/where the language should go next.  It's a win-win for everyone!

To start us out, I'd like to place a bounty on the following issues:

1) $100 Bounty for a fix to each of the input commands we use.  As they currently exist, each of them is flawed in various ways.  For instance here's one to illustrate the problem with _KEYHIT:

DO
    k = _KEYHIT
    IF k <> 0 THEN PRINT k
    _LIMIT 30
LOOP

Run the above in the IDE, and hold down CTRL and press TAB.  The Tab key is a keycode 9 key.  When it goes down, it should print 9, when it comes up, it should print -9.  Instead, what we see is:  NO keycode for the down press.  Nada.  Zip.  QB64 simply does not report that tab key being depressed at all.  For the key release, it reports a value of -105 -- which is the I key!   CTRL-TAB is *both* unmapped AND mismapped. and it's an excellent example of the problem the command has.

I'll pay $100.00 to whoever wants to go in and fix _KEYHIT so that it maps all the possible keystrokes correctly -- for both up and down states, in the various operating systems we compile to.  I'll also offer $100.00 for the exact same fix to INKEY$ and _DEVICES, making a total of $300 for the three commands to be repaired fully.  From my memory, Inkey$ does the same mismapping of values and _DEVICES is completely screwed up with codes being nothing as they should be to maintain backwards compatibility  with older versions of QB64 (prior to version 1.0 when the glitch was introduced), and it doesn't read various keys at all.

2)  I'll also offer a $100.00 bounty for whomever wants to go in and fix our fonts for us.  The issue here is with various fonts being cut-off and not rendering properly.  I don't have an example ready at the top of my hand, but I'll dig one up of someone wants to tackle the issue.  Basically, with various fonts, letters get truncated off.  The bottom of the "g" might lose several pixels, or the top of an embellished T is completely cut off...   Fix that, earn $100.00

3) I'll also offer another $25.00 bounty for whomever wants to go in and fix our _LOADIMAGE command.  At the moment, it's impossible to load 256-color images -- they automatically convert over to 32-bit images.  It'd be nice for loadimage to work fully like its supposed to.  I think this should be a small fix (as we apparently load the image first and then convert them to 32-bit somewhere automatically), so it's a smaller bounty.

That's all my poor wallet can afford to place a bounty on at the moment, and as for me personally, I'm rather content with what QB64 can already do for me.  I'm not really pushing for any sort of "future development"  (besides a desire for someone to import a video playback library for us via a _LOADVIDEO command, or for someone to fully integrate a text-to-speech system for us), but I encourage any with a little extra cash to post their own "bounties" here for the Devs to look over and work on. 

QB64 is free.  Users don't pay anything for it; yet there's always a large list of things which people want added to it.  I see nothing wrong with offering a few $$$ towards enhancing or promoting development of the project.  The more people who are willing to donate and place bounties on things, the more Devs can treat QB64 as more than just an occasional hobby-project.

Is there anyone else out there willing to donate for a "fix" to something that's been bugging them?  Or willing to donate to have a feature added you've been dying for?  Is there anyone willing to pick up these Bounties and earn a little extra cash on the side, while helping the language grow and expand over time?

I guess only time will tell!

23
QB64 Discussion / Re: ElseIF v's Or
« on: April 07, 2022, 08:52:56 am »
I see it Steve , but my conundrum is a decisional statement following a logical operator. Mostly the decisional statement is an IF statement (I haven't tried it with a Select Case statement). But it seems logical to me to pose the formula

 if A=B or IF A=C then ...

if A=B and if A=C then ..

Brackets don't work either ..(if A=B) or (if A=C) then ..

I suppose Elseif could be considered a substitute for OR or AND but when it comes right down to it, Elseif is conditional and not logical. I do realize you can use logical operators within an IF statement ..If A=B or A=C then ... works fine but no go between two if statements.

In this case, you just use the and/or without the IF.

IF A = B OR A = C Then...
IF A = B AND A = C Then...

Why would you need that extra If statement after the And/Or?  Tell me how exactly adding the word IF in there after that And/Or would change performance at all.   

IF A = B OR IF A = C THEN PRINT "Hello World"

What happens if A = B?  Do we evaluate true and say hello to the world?  What if A = C instead?  What if it doesn't equal either?  And how would it be any different if we took that IF out of the statement after that OR?

What am I not seeing here??

24
Programs / Re: Just a silly "Hello World" Marquis
« on: April 06, 2022, 09:37:22 pm »
Code: QB64: [Select]
  1. _HelloWorld

Your syntax is wrong.  PHEW!  For a moment there, I thought you'd found one of the hidden Easter Egg commands we've squirreled away in QB64!

You'll have to try a little better than that, I'm afraid.  😂🤣🤪

25
QB64 Discussion / Re: ElseIF v's Or
« on: April 06, 2022, 06:35:46 pm »
In your example would you get a triplicate without the AND?

You would.

     If Array(x) = Array(y) then  <--- This line checks to see if we have a duplicate first.
         Duplicate = Array(x)
         IF Array(x)=Array(y+1) then Tripiplicate = Array(x)  <--- And only if we have a duplicate can we check to see if it's a triplicate.
     END IF

Look at your code for a brief moment:

     If Array(x) = Array(y) then Duplicate = Array(x)
     or IF Array(x) = Array(y) and Array(x)=Array(y+1) then Tripiplicate = Array(x)

Notice how the conditions are *exactly* the same for the portions I colored?  Those lines can be simplified so that a single IF checks for their condition, with sub-conditions coming inside the main if.

Think of it as:

IF x >0 AND x < 4 THEN PRINT "I"
IF x > 0 AND x < 3 THEN PRINT "I"
IF X > 0 and X < 2 THEN PRINT "I"

The above is a simple Roman Numeral printer for values from 1 to 3, but it's got a total of 6 IF checks to pass before it goes on past this segment of code.  The exact same thing can be simplified by nestled IF structuring:

IF x > 0 Then 'Every condition needs x to be greater than 0
   IF x < 4 then Print "I"
   IF x < 3 then Print "I"
   IF x < 2 then PRINT "I"
END IF
 
Now there's only a total of 4 IF checks to pass, and the results will be exactly the same.  ;)

When you have segments that contain the exact same conditions to operate, it's often simplest to merge them together under one blanket nestled condition.



26
QB64 Discussion / Re: ElseIF v's Or
« on: April 06, 2022, 05:38:33 pm »
From your example, it'd just be a complication of values.

For x = 1 to 10
  For y = 1 to 10
     If Array(x) = Array(y) then
         Duplicate = Array(x)
         IF Array(x)=Array(y+1) then Tripiplicate = Array(x)
     END IF
etc etc

Isn't the above much easier to understand and follow than what you had?

27
I don't have a Linux machine, and I have almost no real experience in Linux.  I did some updates to the Console stuff a few years back, but it was all Windows-only based.  I don't know if anyone ever took the time to expand those routines to work for Linux/Mac or not, but here's basically how you can test it:

 
$CONSOLE:ONLY
_DEST _CONSOLE: _SOURCE _CONSOLE

PRINT "Press any key, and I'll give you the scan code for it.  <ESC> quits the demo."
PRINT
PRINT
DO
    x = _CONSOLEINPUT
    IF x = 1 THEN 'read only keyboard input ( = 1)
        c = _CINP
        PRINT c;
    END IF
LOOP UNTIL c = 1
END

28
Programs / Re: Just a silly "Hello World" Marquis
« on: April 05, 2022, 09:33:16 pm »
Reminds me of the way we ended up doing "Hello World" back in high school where we tried our best to drive our teacher completely insane.

Imagine 30+ old Apple IIc computers running a program very similar to this one (no delays needed back then, of course!):

Code: QB64: [Select]
  1. Const Annoying_Sounds = -1 'TRUE!
  2.  
  3. centerText 10, "Hello World", 1
  4. centerText 12, "presented by", 1
  5. centerText 14, "Steve McNeill", 1
  6. centerText 16, "1990, Floyd VA", 1
  7.  
  8.  
  9. Sub centerText (y, text$, delay)
  10.     text$ = _Trim$(text$) 'strip off leading or trailing spaces
  11.     l = Len(text$) 'length of text
  12.     If l Mod 2 Then text$ = text$ + " " 'make it even sized length
  13.     h = l \ 2 + 1 'half length
  14.         w = _Width \ _FontWidth
  15.     Else
  16.         w = _Width
  17.     End If
  18.     xLimit = w / 2 - 1
  19.     For i = 0 To h - 1
  20.         x = 1
  21.         Do
  22.             Locate y, x: Print Mid$(text$, h - i - 1, 1);
  23.             Locate y, w - x - 1: Print Mid$(text$, h + i, 1);
  24.             If x > 1 Then
  25.                 Locate y, x - 1: Print " ";
  26.                 Locate y, w - x: Print " ";
  27.             End If
  28.             x = x + 1
  29.             If Annoying_Sounds Then Sound Rnd * 4000 + 39, delay
  30.             _Delay delay / 18
  31.         Loop Until x > xLimit
  32.         xLimit = xLimit - 1
  33.     Next

29
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 05, 2022, 05:13:02 pm »
Have you checked out your GPU usage in task manager with the hardware only version?  At 500 characters per loop, and 140 loops per second, this little program is a great stress test on my GPU, running it sometimes up towards 50% usage figures.  It's enough to make my laptop's fans kick in, which is rare as heck on it from graphic usage!

30
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 05, 2022, 04:00:40 pm »
Dang that's fast! Whew!

I do miss the color of drop going to white at end.

How do we go to white at the end?  Is it something to do with this line?

        ElseIf d >= 3 Then
            c~& = _RGBA32(0, 255, 0, 190 - d * 5)

When d is greater than 18, aren't you dealing with a negative value alpha, which overflows back to repeating the same color palette normally?

What's going on here when d becomes a value like 77 (I noticed it that high with a few error debugging lines before)?  Is it somehow overflowing to alter other values than just alpha so that we end up more white than red?

Pages: 1 [2] 3 4 ... 265