Nice job - definitely consider implementing at least a little bit of the Win32 API layer! For kicks I tried importing an old highschool VB6 map editor at it which uses BitBlt but sadly it didn't work.
Here's something that will bake your noodle. Sage 100, the accounting/ERP software, is still to my knowledge written in Business BASIC from the 1970s—specifically the variant that ran on MAI Basic Four minicomputers (just 64 KiB of RAM!). This variant of BASIC was so, as Claude says, load-bearing that several companies emerged to support source-compatible versions on a variety of platforms as the non-mainframe business world evolved from custom-schmustom minicomputers to Unix workstations and PCs. The most common variants today are BASIS International's BBx and BBj (Java), and ProvideX. Sage 100, originally MAS 90 and MAS 200, was an accounting solution originally developed for those 1970s minicomputers and then forward-ported to new platforms as the business landscape evolved.
I dealt with ProvideX code for a Customer who was using an industry-specific customized version of MAS 90. I managed to see some of the source (under NDA) of the customizations and it was fucking horrifying-- line numbers and GOTOs and global variables. It makes my eyes burn a little thinking about it...
One feature that Business BASIC did have even way back in 1975 that I really appreciate is some form of exception handling: just about every I/O operation had, as a required argument, at least one line number to jump to in case of failure. Some required several, for different types of failures (file not found, I/O error, etc.).
That code you looked at must have been incredibly old! I think that BBj and ProvideX both added structured-programming features to make working in their environments at least somewhat tolerable. As intolerable as we find it today, Business BASIC was really a breath of fresh air in its time compared to the alternatives, like COBOL...
I dug up to code to make sure I was remembering properly and, oh boy, I was! There's a header on the file that indicates a revision date of 2011. I wonder if the coding style isn't based on style-guidelines at the MAS 90 customization company. I'm betting they have code going back decades, and keeping a consistent style is probably a win (even if the style is eye-gougingly bad to read). I do see they've adopted a mix of numeric line numbers and alphanumeric labels.
I'm used to "ON ERR GOTO"-type error handling in BASIC dialects, whereas in this code I'm seeing a lot of defensive "IF ERR=xxx" after API calls. It looks like they're also "cleverly" using the division by zero handler as an "escape hatch" out of a subroutine. To paraphrase some their code:
> 31338 IF ERR=15 THEN LET ERRMSG$=MSG(-1) ELSE IF ERR=14 THEN GOSUB DB_LOGIN; IF NO_CONNECT THEN LET a=1/0 ELSE GOTO 31337
That's the stuff!
Apparently they didn't make use of line renumbering (or the ProvideX environment doesn't support it) because I see features and error-handling shoehorned in between lines numbered ascending by 10. It reminds me of 9 y/o me shoehorning in new code when I was trying to write text adventure games using a unique INPUT / IF/THEN / GOTO block for each "room" of the game.
IIRC even QuickBASIC 4.5 had a form of "IntelliSense" in the form of hints as to the defined data structure, if provided in DECLARE statements. F1 hints are mentioned elsewhere for built-ins but I seem to recall it (or a similar quick action) also working for a smart of "what kind of data are you allowed to pass to this user defined subroutine or function".
TYPE PERSON
AGE AS INTEGER
FIRSTNAME AS STRING * 12
END TYPE
DIM KURTZ AS PERSON
PRINT KURTZ._
You could do something like this, but it wouldn’t provide any kind of code completion or autocomplete to show the AGE/FIRSTNAME fields where the underscore represents the text cursor.
However you are right that if you hit F1 on KURTZ it would then show User defined PERSON, and then you could hit F1 again and it would show built-in help of user defined TYPE with AGE/FIRSTNAME properties. Sort of like context-sensitive help I guess.
As far as subroutines/functions go, if you tried to pass data into a subroutine where the data couldn’t be coerced, it would just give you a type mismatch.
DIM Y AS SINGLE
Y = 10.5
PRINTIT Y ' Throws parameter type mismatch
PRINTIT (Y) ' Succeeds through a self-evaluated expression which is effectively BYVAL because Microsoft takes pain in your suffering.
SUB PRINTIT (X%)
PRINT X%
END SUB
But again I wouldn’t consider that to be intellisense of any kind; that’s just error handling.
I've spent the last 6 months building a similar 1:1 faithful recreation of QBASIC and QuickBasic 4.5 that runs natively in the browser [1] - so I know way more about this than anyone should by right.
The speed with which this thing launches in a browser should put shame on the faces of current IDE developers. While VB itself was nothing to write home about there certainly was something lost when hardware became more powerful. Imagine what current and 'recent' hardware were capable of if only efficiency was taken seriously again. Maybe generative AI can provide a boost where human developers would rather spend their time on chasing the latest fads, adding yet another feature or inversely removing even more functionality in an attempt to create the 'perfect' sparse application? Let the humans think up the features and write the initial implementation, then loosen the bots on the code to make it run as efficiently as possible on hardware which used to be current a few generations back.
The power relationship between the computer and the human has shifted since then. We want our computers to run slower so we don’t feel quite so inferior.
Yes, if you look at the developer's Twitter account they've shared a large number of projects in the past week, including in-browser recreations of Windows Vista, XP, 2000, ME, 98, 95, 3.1, Mac OS 9, Word, Excel, OneNote, Access, Visio, Adobe Illustrator, Adobe Reader, a Git Client, a CAD program, a video editor, etc. https://x.com/wieslawsoltes
Looking through his work it seems that he has build a whole .net browser based ecosystem [1]. Pretty impressive its own right. However, for his showcase projects I was wondering how he'd prompt to guide these recreations, i.e. what is used as the input, I can't image that he'd describe every tiny detail...
I was wondering how he'd prompt to guide these recreations, i.e. what is used as the input, I can't image that he'd describe every tiny detail...
I thought the same way when I saw some impressive AI-generated videos not long ago, and I suspect the author prompted AI to get a basic idea, and then possibly after many iterations, finished it up with manual editing.
- Xojo is a commercial tool which I believe does that (but with a price and license to match)
- MoonBasic seems like a promising start
- Gambas for folks using Linux?
- For folks using the very affordable PureBasic there is the matching (also commercial, just about as affordable) SpiderBasic
Naturally if one extends the search to other languages there are lots of options, but Lazarus with a .js Object Pascal compiler seems worth mentioning. For my part, I was swayed when flet.dev announced their v1.0 and so went the Python route....
Best part of VB5 was that when you hit F1, you instantly got help for whatever was under the cursor. VB6 changed it to use some much slower MSDN help system instead.
Yes! I have often wondered how many other kids had this experience. I too had my life changed by how convenient and complete QBASIC's help feature was.
When I was 12, my dad brought home a laptop that the company he worked at was going to throw away. He convinced them to let him take it home instead, and turned it into our home computer. My brothers didn't care about it, but I became obsessed with it. Stumbled into QBASIC just looking at all the executable files in DOS.
The help feature alone taught me about and how to program, at least enough to turn it into something that I wanted to do for the rest of my life. (though notably I missed some very important features just by accident: for instance, I never learned that subroutines and functions existed until I actually took a real class in Pascal years later... I used a horrible rats' nest of GOTOs).
If it wasn't for that help feature, I'd probably have ended up a barista aspiring to get a novel published. Instead I became a (probably overly obsessed) software engineer, with complicated but mostly good outcomes. I'm 45 and retired now for example, and I certainly wouldn't be if I hadn't gone down this path. And I wouldn't have gone down this path if I hadn't randomly found QBASIC on that computer, and if the help feature hadn't been so helpful.
A copy of MSDN documentation was included on one of the DVDs for Visual Studio .NET's first release, so at least around that time offline mode was possible. I think I was reading those docs more than actually programming.
Yeah, it’s not 100% correct (some margins are off to my eye) but it’s okay.
Some texts on the other hand scream LLM to me. E.g. this label in the Print Code dialog:
> Opens a browser print window containing source only. Browser and operating-system print settings remain native.
This is just not how humans write. In fact, I don’t think a human would write anything here – it’s an implementation detail, not something that should be user-facing.
For what it's worth, I'm thinking of some version of this for my upcoming game's modding tools, although the backend processing will be on a web server unlike this demo, and there is much more of an AI agent focus.
This is pretty much exactly https://anvil.works (I'm a founder). The full-featured language is Python (both server and client side). Hit Publish and we'll host it for you (database included), or git-clone it and self-host.
There are a bunch of escape hatches if you want to get to the lower level platform (eg use JS libraries, or express a particular piece of styling in HTML+CSS), but the core experience is very VB-like: drag, drop, edit properties, run code on events.
135 comments
[ 4.6 ms ] story [ 164 ms ] threadAnd parts of their patient portal website were still VB6 on the backend a decade ago, not sure that's true anymore. Visual Basic 6 as a web backend.
That code you looked at must have been incredibly old! I think that BBj and ProvideX both added structured-programming features to make working in their environments at least somewhat tolerable. As intolerable as we find it today, Business BASIC was really a breath of fresh air in its time compared to the alternatives, like COBOL...
I'm used to "ON ERR GOTO"-type error handling in BASIC dialects, whereas in this code I'm seeing a lot of defensive "IF ERR=xxx" after API calls. It looks like they're also "cleverly" using the division by zero handler as an "escape hatch" out of a subroutine. To paraphrase some their code:
> 31338 IF ERR=15 THEN LET ERRMSG$=MSG(-1) ELSE IF ERR=14 THEN GOSUB DB_LOGIN; IF NO_CONNECT THEN LET a=1/0 ELSE GOTO 31337
That's the stuff!
Apparently they didn't make use of line renumbering (or the ProvideX environment doesn't support it) because I see features and error-handling shoehorned in between lines numbered ascending by 10. It reminds me of 9 y/o me shoehorning in new code when I was trying to write text adventure games using a unique INPUT / IF/THEN / GOTO block for each "room" of the game.
Was that there?
Does the site have intellisense? Yes
Did VB6 have intellisense? Also yes
However you are right that if you hit F1 on KURTZ it would then show User defined PERSON, and then you could hit F1 again and it would show built-in help of user defined TYPE with AGE/FIRSTNAME properties. Sort of like context-sensitive help I guess.
As far as subroutines/functions go, if you tried to pass data into a subroutine where the data couldn’t be coerced, it would just give you a type mismatch.
But again I wouldn’t consider that to be intellisense of any kind; that’s just error handling.I've spent the last 6 months building a similar 1:1 faithful recreation of QBASIC and QuickBasic 4.5 that runs natively in the browser [1] - so I know way more about this than anyone should by right.
[1] - https://mordenstar.com/share/qbasic-core-demos
https://news.ycombinator.com/item?id=42105869
[1] https://wieslawsoltes.github.io/Home/ecosystem/
I thought the same way when I saw some impressive AI-generated videos not long ago, and I suspect the author prompted AI to get a basic idea, and then possibly after many iterations, finished it up with manual editing.
- Xojo is a commercial tool which I believe does that (but with a price and license to match)
- MoonBasic seems like a promising start
- Gambas for folks using Linux?
- For folks using the very affordable PureBasic there is the matching (also commercial, just about as affordable) SpiderBasic
Naturally if one extends the search to other languages there are lots of options, but Lazarus with a .js Object Pascal compiler seems worth mentioning. For my part, I was swayed when flet.dev announced their v1.0 and so went the Python route....
no CLAUDE.md, no AGENTS.md, no SKILL.md, no .claude or .agents directories either.
Dare we dream? A project this ambitious, done without AI help?
Untracked.
Also MS Access form designer was quite like that; I kinda miss it.
It was just wonderful. I owe so much to that thoughtful feature as a child.
I wish I could meet the person who decided that. You’ve changed my life.
When I was 12, my dad brought home a laptop that the company he worked at was going to throw away. He convinced them to let him take it home instead, and turned it into our home computer. My brothers didn't care about it, but I became obsessed with it. Stumbled into QBASIC just looking at all the executable files in DOS.
The help feature alone taught me about and how to program, at least enough to turn it into something that I wanted to do for the rest of my life. (though notably I missed some very important features just by accident: for instance, I never learned that subroutines and functions existed until I actually took a real class in Pascal years later... I used a horrible rats' nest of GOTOs).
If it wasn't for that help feature, I'd probably have ended up a barista aspiring to get a novel published. Instead I became a (probably overly obsessed) software engineer, with complicated but mostly good outcomes. I'm 45 and retired now for example, and I certainly wouldn't be if I hadn't gone down this path. And I wouldn't have gone down this path if I hadn't randomly found QBASIC on that computer, and if the help feature hadn't been so helpful.
Some texts on the other hand scream LLM to me. E.g. this label in the Print Code dialog:
> Opens a browser print window containing source only. Browser and operating-system print settings remain native.
This is just not how humans write. In fact, I don’t think a human would write anything here – it’s an implementation detail, not something that should be user-facing.
Is there something similar for the web now? Easy UI editor but a fully featured language behind with direct database access.
There are a bunch of escape hatches if you want to get to the lower level platform (eg use JS libraries, or express a particular piece of styling in HTML+CSS), but the core experience is very VB-like: drag, drop, edit properties, run code on events.
That brings me back.
Well, it's close in JS: 3 - 3.01 = -0.009999999999999787