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.
This is great because it is an entirely new way to teach programming that is tied to the web for beginners.
For those who started with basic and grew from there, the journey seems to have been critical to start with basic to have so many aha’s so early in learning a skill.
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.
Worked on a ton of classic ASP back in 06-08 at a local insurance company. They crazy thing is that none of that stuff got converted to anything else and is still running in production.
At one of my first jobs I had a similar VB6 / .NET hybrid app to take care of. I always remember back to trying to figure out how to work on the VB6 app if it ever broke and we had to fix it and the answer being something absurd like a Stack overflow post was calling out that you had to go on Ebay and buy a used copy of the IDE on a CD-ROM. Wild.
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.
In principle, you could build a web server in classic QBasic: although it has no native networking support, it supports loading and calling machine code functions written in assembly. So, you could write assembly code to call a DOS networking API (such as packet driver), and then use that to build a web server in classic QBasic. I expect the performance will be terrible, but probably someone will eventually do it (not me) just to show it can be done.
QBASIC had the CALL ABSOLUTE statement for calling machine language code. It didn’t require QuickBasic, the QBASIC that can with MS-DOS had it. Also GW-BASIC had it before it. You store the machine code as a list of integers in a DATA statement.
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.
That being said, exactly the same here. My first program that was ever used by anyone other than me was a National Lottery number picker for my grandad :) saved him 20 minutes a week...
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.
Wow, 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
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.
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.
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.