Fall of Visual Basic, Rise of QuickBasic?

There was simply no other tool that a developer could use to sketch out a complete user interface and get coding as quickly as VB.

Except Smalltalk on the Xerox Star (1981), ResEdit on Classic Mac (1984), RCS and ORCS on Atari ST (1985), Hypercard (1986), Interface Builder on NeXTstep (1988), and others; Visual Basic came out in 1991, Delphi came out in 1995. Maybe there was no other tool on brain-damaged DOS/Windows systems before VB, I can buy that, but real computers were doing RAD a long time ago.

Alan Cooper, the "father" of Visual Basic, has done some really interesting work with interaction design and user experience, but he didn't invent RAD. VB started life as his project "Tripod", a shell creation tool, basically a user-customizable program launcher or "wizard". Then Microsoft bought it and turned it into "Visual Basic", as a kind of ugly Hypercard (is BASIC a worse language than HyperTalk? Eh.)

VB became famous for a legendary feature called edit-and-continue, which allowed developers to run their programs, find problems, fix them, and then keep going with the new code. This was a sharp difference from almost every other programming environment known to humanity, which force developers to recompile their work and start over after every change.

This is, of course, utterly wrong. Every language with a REPL can do this: You write some code in the REPL, run it, it crashes or produces wrong results, you change the one offending function and resume. All global objects are still present, no recompile necessary.


#;2> (define (hello name) (error 'hello "Unimplemented")) #;3> (define (greetings) (for-each hello '(Cthulhu YogSothoth ShubNiggurath))) #;4> (greetings) Error: (hello) Unimplemented #;4> (define (hello name) (printf "Ia ia, ~A fhtagn!\n" name)) #;5> (greetings) Ia ia, Cthulhu fhtagn! Ia ia, YogSothoth fhtagn! Ia ia, ShubNiggurath fhtagn!

The one difference is that to save state, you have to copy-paste out of .csi_history or whatever. IDLE lets you save off your session history directly, but you still have to edit it into a working script. VB did have the virtue of staying in the live editor, but you're still just coding behind buttons, you have no access to a history or REPL.

(This is why I dislike DrRacket so much: If you edit code, it does destroy your global REPL state! Why even have a fake-REPL there, man?! Command-line Racket doesn't have this problem, but it's still not a great Scheme.)

Just as VB acquired the same power as C#, C# picked up the same conveniences as Visual Basic. For example, .NET’s type safety and memory management features meant that C# developers never needed to worry about memory leaks, just like VB developers.
In other words, C# now had the guardrails to protect hobbyists, students, and new programmers without surrendering its power. All of a sudden, VB was no longer something special. It was just another tool in a capable programmer’s toolkit.

Every part of that is… well, not correct.

  1. My understanding is VB.NET was a mess interacting with .NET resources, so if you used it you were still stuck in the VB gulag or had to learn so much C# or C you might as well move up.
  2. C# is a hard language to start up in, you would never give it to a newbie and say "good luck!"; although that's what Unity does, and most Unity code is nightmarish as a result.
  3. C# is certainly not "never need to worry about memory leaks"; it's a Java ripoff with more native libraries, many of which have dangerous C++ based memory management, and in any case you can over-retain things and fill up memory very quickly.
  4. No capable programmer is going to say "this project is best in… Visual Basic dot Net!" Except on broadcast TV-for-morons.

The one good thing from all this:

An innovative project called QB64 has created a modern QuickBASIC replica. It runs on Windows, MacOS, and Linux, with no emulator required.

OK, this is interesting. Terrible domain name www.portal.qb64.org though, what is happening there? Just qb64.org redirects to that mess.

Once you run the setup_osx.command, it has a qb64 binary, which opens a DOS-like window with the old DOS qbasic.exe UI. Huh. This isn't bad, though the font is small and the only way to change it is with a custom font. It ships with a cyberbit.ttf font which is pretty but very W I D E.

Writing something and hitting Run|Start dumps an untitled binary in the main directory. Saving (to the programs folder in this package) and then hitting the Run|Output EXE to Source Folder toggle does something more reasonable: hello.bas, hello, hello_start.command. A trivial program is 1186K, which is excessive, but it does work, opens a terminal and shows some text.

There's a ton of sample code in program/samples, including a lot of 3D stuff.

This is a pretty credible BASIC environment.

Pro:

  • Structured BASIC, if you want it.
  • You can just recompile on every platform.

Con:

  • No interactive REPL (that was one of the few things classic line-oriented BASIC, or hybrids like ST BASIC, had going for them).
  • Slow compile.
  • Ugly editor, though probably playing with fonts and colors would improve this.

You'll always be better off just giving a newbie Python, but some people may have old code or nostalgia.

  • Chipmunk BASIC is certainly nicer as an interactive environment, but probably hundreds of times slower.

Tower of Babble

Programmers almost compulsively make new languages; within just a few years of there being computers, multiple competing languages appeared:

It proliferated from there into millions; probably half of all programmers with 10+ years of experience have written one or more.

I've written several, as scripting systems or toys. I really liked my Minimal script in Hephaestus 1.0, which was like BASIC+LISP, but implemented as it was in Java the performance was shitty and I had better options to replace it. My XML game schemas in GameScroll and Aiee! were half programmer humor, but very usable if you had a good XML editor. Multiple apps have shipped with my tiny lisp interpreter Aspic, despite the fruit company's ban on such things at the time. A Brainfuck/FORTH-like Stream, working-but-incomplete tbasic, and a couple PILOT variants (I think PILOT is hilariously on the border of "almost useful").

Almost every new language is invented as marketing bullshit based on a few Ur-languages:

  • C++: Swift
  • Java: Javascript (sorta), C#, Go
  • Awk: Perl, Python, PHP, Julia
  • C: Rust
  • Smalltalk: Objective-C
  • Prolog: Erlang, Elixir
  • ALGOL: C, Pascal, PL/1, Simula, Smalltalk, Java
  • LISP: Scheme, ML, Haskell, Clojure, Racket
  • BASIC: None, other than more dialects of BASIC.
  • FORTRAN: None in decades, but is the direct ancestor of ALGOL & BASIC.
  • COBOL: None in decades.

A few of these improve on their ancestors in some useful way, often performance is better, but most do nothing new; it's plausible that ALGOL 68 is a better language than any of its descendants, it just has mediocre compiler support these days.

Certainly I've made it clear I think Swift is a major regression, less capable, stable, fast, or even readable than C++, a feat I would've called impossible except as a practical joke a decade ago. When Marzipan comes out, I'll be able to rebuild all my 15 years of Objective-C code and it'll work on 2 platforms. The Swift 1.0 app I wrote and painfully ported to 2.0 is dead as a doornail, and current Swift apps will be uncompilable in 1-2 years; and be lost when Apple abandons Swift.

When I want to move my Scheme code to a new version or any other Scheme, it's pretty simple, I made only a handful of changes other than library importing from MIT Scheme to Chez to Chicken 4 to Chicken 5. When I tested it in Racket (which I won't be using) I had to make a handful of aliases. Probably even CLISP (which is the Swift of LISPs, except it fossilized in 1994) would be 20 or 30 aliases; their broken do iterator would be hard but the rest is just naming.

Javascript is a pernicious Herpes-virus-like infection of browsers and desktops, and nothing can ever kill it, so where it fits the problem, there's no reason not to use it. But there's a lot it doesn't do well.

I was leery of using FreePascal because it has a single implementation (technically Delphi still exists, but it's $X,000 per seat on Windows) and minimal libraries, and in fact when it broke on OS X Mojave, I was disappointed but I-told-you-so.

I'm not saying we should quit making new Brainfuck and LOLCODE things, I don't think it's possible for programmers to stop without radical brain surgery. But when you're evaluating a language for a real-world problem, try moving backwards until you find the oldest and most stable thing that works and will continue to work, not piling more crap into a rickety new framework.

The Biblical reference in the title amuses me, because we know now that it requires no malevolent genocidal war deity scared of us invading Heaven to magically confuse our languages and make us work at cross purposes; anyone who can write and think splinters their thought into a unique language and then argues about it.

Lost Treasure

In 1979, I learned to program in BASIC on a TRS-80 Model I. Sometime in the next year, I read one of my first programming books:

I played Monster Chase and Lost Treasure, modified them extensively, and combined them, so the cave on the island had a monster chase to reach the exit. I recall having problems getting Starship Alpha and Devil's Dungeon to work, but they joined my software library eventually.

One of my earliest and happiest programming memories was sitting at the dining room table, reading Monster Chase, and writing out a smarter movement system and obstacles in a notebook; at the time the only computers were at school, so I wrote code on paper and typed them in later.

So when I found the book again on archive.org last night, I was very excited, and had to reimplement it. I actually typed this into Pythonista on my phone with the PDF open on an iPad, only moved it to the computer to do some final cleanup and upload it.

The book suggests some modifications, and I did some minor ones: Lowered the movement error to 10%, and risk of shark attack to 10%, rising by 1.5x rather than a flat +50% each time; being anywhere near the island edge killed you too often in the original. I also don't move you out of the water automatically, that should cost a turn.

I realized in converting it that I hate, hate, hate Row,Column coordinates instead of Cartesian X,Y; tons of mainframe-era computing resources used Row,Column, and you can still see it in some APIs like Curses. Note that the original program is 74 lines, mine's 214; BASIC is a terrible language, but it's terse.

I could adapt this into another doorgame for my Mystic Dungeon BBS, but I'm not sure what the multiplayer aspect would be, and it has limited replayability without doing some randomization.

End of 2018

Let's watch Poseidon — Only available on Netflix until tomorrow! Normally I watch Strange Days, but I feel an upside-down sinking ship is a more accurate metaphor for the year than failed love and revolution and pretty Angela Bassett. Maybe for Chinese New Year (Feb 5), Gabriel Dropout's New Year/armageddon episodes.

I don't go super intimate online, but it's been a rough year. I've lost a friend and two of my last few relatives to cancer, my dad's had some close calls, and his dog died. Doing any kind of work under the stress load is… not great. And I'm not a good friend or coworker in this state. My new puppy is a terror, both looks and behavior like a jackal puppy, but the one really good thing.

State of software I touched on yesterday. This is the year a new Perilar rises from the ashes, and Learn2JS is moving along nicely, I think that's going to be a big deal, it's a sweet environment.

I goofed off yesterday and started writing tbasic, a Tiny BASIC interpreter in C, because that's a useful thing to do! I've done this before, but made a messy parser. The new one is a tiny single file and much cleaner. Might be published tomorrow morning sometime. While nobody needs BASIC, it's good C programming exercise, and I can link in SDL2 and give it cross-platform graphics and sound, which is actually kinda neat.

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
—Edsger W. Dijkstra, EWD 498: How do we tell truths that might hurt?
[mdh: In case you can't read the paper and get the joke, he's joking. Sort of.]

I got a little writing in on Delvers in Darkness, I'm thinking about more adventures for it, solo gamebooks and Refereed.

Poseidon is really terrible already. Everyone's a ridiculous caricature. Oh, this is gonna be a good shipwreck.