I know this project is just for fun, but I did once work on a website backend that genuinely used Visual Basic 6 to generate dynamic webpages. This was not a small, internal product either, and it was in this century. I think they moved it all to .NET eventually, but for a while it was Frankensteined out of .NET and VB6.
The main thing I remember was trying to debug questionnaire functionality and getting very nearly nowhere: it was an entire questionnaire engine implemented in VB6, which was probably why it hadn't been ported to .NET yet. I'm sure PHP of the same vintage would have been equally gnarly, mind you.
Cool as this is, this isn't the QBasic that came with Microsoft DOS back in the day. It seems to be written in QB64 which is a modern BASIC distribution that retains compatibility with MS Qbasic.
E.g. to open the TCP/IP connection, this project uses the _OPENHOST function, which does not exist in the olden QB.
https://qb64.com/wiki/_OPENHOST.html
https://github.com/jamonholmgren/qub/blob/main/template/qub/...
And I thought "install from curl" was bad. Now we run from curl, every time?
alias qub="source <(curl -sSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh)"
I love it. I too started programming with QBasic in the 90s. I spent many hours modifying (and breaking) the code for bananas.bas and nibbles.bas to give myself all kinds of superpowers.
I haven't touched QB in decades but I'm glad someone did and had fun working on it.
I very much love it – taking console-oriented languages/environments where they shouldn't be give me so much joy, especially ones you've grown up with. I started with RAD Pascal, and I am lucky that there are modern Pascals around with the very comfortable development environments.
alias qub="source <(curl -sSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh)"
a bit concerning to hot alias a simple command to remote shell executionWow, so cool. I love QBasic, it was officially my first programming language (besides messing around in asm with debug on DOS (version 5 I guess) in the late 80s early 90s
I was hoping to see like request handlers
Great to see this!
Back in the late 90s I worked on a system that generated a static website from an existing QB application. The app itself was a flat file database with a few thousand entries and was very fast. The web version was equally fast as you’d enter a customer number and it would just redirect you to that page. It did very little but we did add a few hints to the screen output and then would screen-scrape the app window to a plain text file and then run my tool to convert those plain text files to templated pages.
Reading [1] brings back such good nostalgia writing Visual Basic. Now I need to take the opportunity to write some good QBasic code. Thanks for this!
1: https://github.com/jamonholmgren/qub/blob/main/template/qub/...
Good stuff! Noticed this is written using the modern day variant QB 64.
Does QB64 still suffer from a slight amount of latency when you punch the RUN button associated with the fact that it has to compile the code before it runs it? I miss the dopamine hit from old school QBasic with its "relatively" instantaneous interpretive code when hitting F5.
Oh my. My last qbasic project was a crappy bbs system with message boards and whatnot in 1994.
I thought we all took qbasic around the barn and never spoke of it again.
How come it is becoming popular again? I seen pascal trending too, why???
Hey, fun to see my fun little project showing up on HN!
Yes, aliasing the CLI command to a remote script is not exactly best practice. My casual question to myself when I made it was … what’s the literal easiest way I could get this to work on someone’s computer with as few dependencies as possible? This was the solution I came up with. (And in my defense, it is similar to how you install homebrew … `/bin/bash -c "$(curl -fsSL https://xn--rvg)`, but I get that most wouldn’t trust a somewhat random GitHub account like this.)
If you have any questions about this, let me know! My website (https://jamon.dev) runs on it (in a DigitalOcean droplet) and I’ve enjoyed the experience.