QB64 Phoenix Edition
QB64 is my "go to" language when writing quick programs for file manipulation - 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: QB64 is my "go to" language when writing quick programs for file manipulation (/showthread.php?tid=3610)

Pages: 1 2


QB64 is my "go to" language when writing quick programs for file manipulation - TDarcos - 04-12-2025

I have found when I just want a program to do something, like scan for certain strings in files, that QB64 tends to be my "go to" language for that purpose. I know several different languages, mostly ones I've learned over the years, like Pascal, but it's a bit too formal for what I'm trying to do, which is often to search a line for a specific string, then target points to extract and massage.

One example: I found a list on Wikimedia Commons of tiles (small SVG images that can be pushed together) that can be used to construct railway diagrams, such as subway maps. The file shows all of the tiles and what they look like to know the name of the tile to use. The included links are not for the actual image files, but to the public name. To get that, you have to read the HTML file that is the page for that image, and obtain the actual file name. Take one: File:BSicon_ekKRZr+1o.svg. This is an image of a primary rail line as a vertical dark red line, on a bridge over a secvondary rail line that runs horizontal to it, and curves left to right in an upward direction. These tiles would work quite well for drawing rail maps in a game, as they are public domain (because they explicitly say they are). But that name above is not its "real" name, e.g. https://commons.wikimedia.org/File:BSicon_ekKRZr+1o.svg; no, that's the display name; the actual file is https://upload.wikimedia.org/wikipedia/commons/5/57/BSicon_ekKRZr%2B1o.svg. But to find that you have to read the display page, in order to get the internal file name. It's a lot like screen scraping, only done off-line, (to be polite).

For a dozen or so files, manually downloading them is fine, but in this case, there are over 2,000 images! (There are lots of things to describe in rail maps, I guess.) So I download the index, extract all the display names, then extract each of these, search for the text indicating the internal name, collect and save that, then once that is done, collect the actual files. Doing it manually would take weeks, using a few small programs means it only takes a few hours.

I'm sure there are other languages (like Python) or tools (like AWK) that can do pattern matching, but I just don't feel like learning another language for a small project I can solve in minutes. I'm also not doing this for "production work," for that I'd probably use a more formal language, like Pascal, or C.

There is also an advantage of using a programming language instead of a tool, in that you have more decision and analysis capacity. Also, some programs have value to reuse as a "template" or starter for a different program to do something else.

But I still find QB64 very useful for rapidly writing programs to solve smaller problems. For larger ones requiring more formal work, then I might switch to a more formal language.


RE: QB64 is my "go to" language when writing quick programs for file manipulation - OldMoses - 04-12-2025

QB64 is to me like English (although I spoke a dialect of Applesoft back in the day) in that it's the only language I can be relatively fluent in. I took French in middle school and don't remember a word of it. I took a college course in Assembly and have taken some baby steps in C++ on my own. Of those two I have the greatest respect for those old timers who used Assembly, upon which all else is built.

Ultimately, I do everything in QB64 since it has yet to let me down in terms of speed or power for my purposes. I don't do fast action game programming as I do not play such things enough to concern myself. I too appreciate the ability to quickly mock up algorithms without a lot of setup overhead. The syntax changes from language to language, but the basics are the same, variables, expressions, logical operators, loops, etc.

QB64 deserves far more respect as a coding tool, IMO.


RE: QB64 is my "go to" language when writing quick programs for file manipulation - Pete - 04-12-2025

I'm with Richard on this one. Even back in the day of QuickBasic, I was able to code an entire office program that ran circles around all the $40,000 software crap developed with the so-called formal languages. Now thanks to developers like Sam, even Screen 0 stuff can be made to look as good as any Windows app in existence. So yes, QB64 does deserve a lot more respect than it gets.

I think one reason is the double edge sword of libraries. When I spent a short time coding in C, ever C coder told me, just use a library for that. Most of these gurus couldn't code a keyboard routine if their lives depended on it. Now libraries are fine, but if in QB64 we can do the same things and customize that code. We don't need to rely on any 'standard' to follow. Now the other side of the coin is coders who need to get more work done with less coding. Libraries, oop, etc. are essential. Let's face it, the folks who need to code that way make up probably 90% of our world. Us hobbyist, however, are pretty darn fortunate to have QB64.

[Image: ?u=https%3A%2F%2Fih1.redbubble.net%2Fima...29f561f261]

You just gotta stay positive.
Like, I don't want to learn French?
So every day I think positive
thoughts about not learning French?
And look at me -
I don't know a word of French!


RE: QB64 is my "go to" language when writing quick programs for file manipulation - Jack - 04-12-2025

one of the more disliked aspects of french is the guttural sounds, I would prefer almost any other language provided that they don't use guttural sounding words, but just as the hippie pictured above, " I don't know a word of French!"


RE: QB64 is my "go to" language when writing quick programs for file manipulation - Pete - 04-12-2025

Big Grin Big Grin Big Grin


RE: QB64 is my "go to" language when writing quick programs for file manipulation - OldMoses - 04-12-2025

I tried French toast, French fries, French onion soup, French bread and French dressing. Nothing worked. I still can't speak French, but I refuse to eat anything I find in the guttural.


RE: QB64 is my "go to" language when writing quick programs for file manipulation - George McGinn - 04-12-2025

(04-12-2025, 08:28 PM)OldMoses Wrote: I tried French toast, French fries, French onion soup, French bread and French dressing. Nothing worked. I still can't speak French, but I refuse to eat anything I find in the guttural.

Ah, you didn't try French Kissing - makes me speak French every single time!  Big Grin


RE: QB64 is my "go to" language when writing quick programs for file manipulation - CMR - 04-13-2025

I'm pretty good with a French Dip.  It doesn't last long, though.


RE: QB64 is my "go to" language when writing quick programs for file manipulation - Pete - 04-13-2025

Or how would the Statue of Liberty look differently if it never left France?

It would have both hands above its head, and be surrounded by Germans!

Pete


RE: QB64 is my "go to" language when writing quick programs for file manipulation - SMcNeill - 04-13-2025

(04-13-2025, 04:24 AM)Pete Wrote: Or how would the Statue of Liberty look differently if it never left France?

It would have both hands above its head, and be surrounded by Germans!

Pete