NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Qub – a framework for building websites with QBasic (github.com)
jamon51 14 days ago [-]
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.

j45 14 days ago [-]
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.

cookiengineer 14 days ago [-]
This is such a wonderfully absurd and amazing project, I love it!

I think this has huge potential in the educational sector, and bridges the gap of how our generation learned programming back then and the modern web.

Again, kudos!

j45 14 days ago [-]
Wonderful yes, not so sure if absurd makes sense?

Basic is a very capable beginners language to learn enough concepts.

Many developers had their first experiences of magic as kids with something like Basic.

roywiggins 15 days ago [-]
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.

sakopov 14 days ago [-]
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.
j45 14 days ago [-]
Something to be said for code that can be understood due to its simplicity even if it’s verbose, which can be good for people new to the code base.
latentsea 14 days ago [-]
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.
ndiddy 13 days ago [-]
Microsoft still offers VB6 CD images as part of an MSDN subscription.
pan69 14 days ago [-]
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/...

skissane 14 days ago [-]
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.
pjmlp 14 days ago [-]
I am quite sure you would need QuickBasic proper for that, however I don't have the manual around to confirm that.
skissane 14 days ago [-]
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.
starik36 14 days ago [-]
If I remember correctly, you had to run qbasic.exe with a /L switch to load 3rd party library.
14 days ago [-]
shannongreen 15 days ago [-]
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)"
kevin_thibedeau 15 days ago [-]
Shell as a Service. It's the new frontier in IT outsourcing , ready for the next repetition of the thin client fad.
mrinfinitiesx 14 days ago [-]
Slap LLM and buzzwords like 'collaboration' and 'inclusiveness' in it and I'm sold.
fuzztester 14 days ago [-]
here, have an upvote, and a quote:

"we have exclusive features like 'inclusiveness' and competitive features like 'collaboration'."

>and I'm sold

requested buzzwords are above, I'm told.

jamon51 14 days ago [-]
I updated the README with instructions on how to download the file, review it, and alias it locally. :-)
coolcoder613 15 days ago [-]
IshKebab 14 days ago [-]
Install from Curl has an undeservedly bad reputation. The only real issue is that it makes hiding malware slightly easier.
fuzztester 14 days ago [-]
hnuser123456 15 days ago [-]
Getting ideas...
jayski 15 days ago [-]
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.

kinlan 15 days ago [-]
GORILLA.BAS, no?

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...

jayski 15 days ago [-]
You're right! It was gorilla.bas, cheers!
jamon51 14 days ago [-]
I made around 200 QBasic games when I was a teenager with no internet to help me, and it gave me so many amazing skills that I still use today!
averageRoyalty 14 days ago [-]
That's fantastic. Are they published somewhere?
nxobject 14 days ago [-]
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.
jamon51 14 days ago [-]
This made me happy. I also (obviously) have a soft place in my heart for pushing the boundaries of old / limited tech.
slmjkdbtl 15 days ago [-]

  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 execution
keepamovin 14 days ago [-]
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

I was hoping to see like request handlers

mattl 14 days ago [-]
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.

nickstinemates 14 days ago [-]
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/...

vunderba 14 days ago [-]
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.

0points 13 days ago [-]
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???

jqpabc123 13 days ago [-]
The software industry is on a mission to re-discover Basic and Pascal.

But with "new and improved" syntax for political and marketing purposes. See Python for example.

0points 12 days ago [-]
Re-inventing tech debt like its 1994 ;-)
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 14:37:34 GMT+0000 (Coordinated Universal Time) with Vercel.