[HN Gopher] Qub - a framework for building websites with QBasic
___________________________________________________________________
Qub - a framework for building websites with QBasic
Author : bcjordan
Score : 103 points
Date : 2024-08-04 20:46 UTC (1 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| jayski wrote:
| 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 wrote:
| 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 wrote:
| You're right! It was gorilla.bas, cheers!
| jamon51 wrote:
| 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 wrote:
| That's fantastic. Are they published somewhere?
| roywiggins wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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.
| slmjkdbtl wrote:
| alias qub="source <(curl -sSL https://raw.githubusercontent.com/j
| amonholmgren/qub/main/src/cli.sh)"
|
| a bit concerning to hot alias a simple command to remote shell
| execution
| shannongreen wrote:
| 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)"
| hnuser123456 wrote:
| Getting ideas...
| kevin_thibedeau wrote:
| Shell as a Service. It's the new frontier in IT outsourcing ,
| ready for the next repetition of the thin client fad.
| mrinfinitiesx wrote:
| Slap LLM and buzzwords like 'collaboration' and
| 'inclusiveness' in it and I'm sold.
| fuzztester wrote:
| 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.
| coolcoder613 wrote:
| I made an issue about it.
| https://github.com/jamonholmgren/qub/issues/1
| jamon51 wrote:
| I updated the README with instructions on how to download the
| file, review it, and alias it locally. :-)
| IshKebab wrote:
| Install from Curl has an undeservedly bad reputation. The only
| real issue is that it makes hiding malware slightly easier.
| fuzztester wrote:
| daniel should be brought to judgement ;)
|
| #sorrycouldntresist
|
| https://idioms.thefreedictionary.com/a+Daniel+come+to+judgem.
| ..
|
| https://daniel.haxx.se/
|
| like so many, i respect his work a lot.
|
| https://curl.se/
|
| https://curl.se/docs/faq.html
|
| https://en.m.wikipedia.org/wiki/Daniel_Stenberg
| pan69 wrote:
| 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 wrote:
| 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 wrote:
| I am quite sure you would need QuickBasic proper for that,
| however I don't have the manual around to confirm that.
| starik36 wrote:
| If I remember correctly, you had to run qbasic.exe with a
| /L switch to load 3rd party library.
| skissane wrote:
| 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.
| jamon51 wrote:
| 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.
| cookiengineer wrote:
| 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 wrote:
| 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.
| j45 wrote:
| 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.
| nxobject wrote:
| 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 wrote:
| This made me happy. I also (obviously) have a soft place in my
| heart for pushing the boundaries of old / limited tech.
| keepamovin wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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.
___________________________________________________________________
(page generated 2024-08-05 23:01 UTC)