
QuickBasic64: Basic for the Modern Era - daitangio
https://www.qb64.org/portal/
======
II2II
I was playing with the version of QBASIC that comes with MS-DOS 5 last
weekend, and it was a lot of fun. Part of the reason may have been nostalgia.
(I deliberately choose that version since that it what my first IBM compatible
had.) I think a more important reason was the simplicity.

Take graphics. You aren't searching for a library to handle graphics since it
is built into the language. Initializing graphics takes one line, so you
aren't creating a separate function to handle an over-complicated process.
Heck, there's less documenting of what you're doing since the language's
documentation usually does that better than you can. You simply dive into the
next task, which is always doing something more interesting than over-
engineering a project that you originally set out on to have some fun.

I understand why complexity has grown in modern development tools and how much
of a hindrance simplicity would be for professional software development, but
it would be nice if there were more modern options out there to facilitate
programming for pleasure. (I don't really count languages designed for
education, since they're usually designed to deliver a curriculum. Something
like Arduino would be a good example, since it is designed to facilitate
creative projects.)

~~~
rwmj
I'm not vouching for anything in particular, but there are "8 bit"-type
machines running BASIC which are very accessible like this. Here's one which
the 8 Bit Guy reviewed recently (it's actually a 32 bit ARM part):
[https://www.youtube.com/watch?v=IA7REQxohV4](https://www.youtube.com/watch?v=IA7REQxohV4)

I have the Gigatron which is a bit similar but you have to solder it together.

~~~
happycube
If you have a Raspberry Pi (<=3B) you can load up Risc OS Pico which boots
straight into BBC Basic.

------
amasad
Based on pg's request[1] I've been working on a Basic and while I started with
Classic Basic as I've been improving by dropping line numbers and currently
adding labels I think I've reinvented QBasic!

Anyways, here it is if you want to play with it:

repl: [https://repl.it/languages/basic](https://repl.it/languages/basic)

docs: [https://docs.repl.it/misc/basic](https://docs.repl.it/misc/basic)

some community programs:
[https://repl.it/talk/share?lang=basic](https://repl.it/talk/share?lang=basic)

[1]:
[https://twitter.com/paulg/status/1256526589300441093](https://twitter.com/paulg/status/1256526589300441093)

------
jonplackett
I made my first every game using qbasic when I was 11, and learned just by
RTFM, no-one to teach me, no internet tutorials because no internet. Such a
simple language and great way to start programming. I think we're missing
something like this. Scratch is too easy. Javascript needs too much setup.

In case you wondered, it was called "Dancing Dobbins" and was a horse racing
and betting game. It generated Random Horse names and odds, you placed bets
and the horses ran across the screen, each drawn very jaggedly with vector
lines.

I just kept adding to it and adding to it and it eventually got quite strange,
some of the horses would randomly go mad and start attacking adjacent lanes. I
believe there was alien abduction during some races.

------
graton
Ah good memories. Once BASIC got rid of requiring line numbers and supporting
function calls it really wasn't too bad of a language from what I remember.

I started out with TRS-80 BASIC, then assembly language on the TRS-80, then
using BASIC on the PC, and then assembly language on the PC. After that was C.

But I still have fond memories of BASIC as my first programming language.

~~~
oscargrouch
Basic was also my first introducing to programming. And nowadays i still think
its probably the best language to teach programming. I don't think it should
be used to create professional programs, as its pretty limited for that, and
doing modifications to turn into an able environment for this would only
create a creepy language, inflicting misery in people that have to maintain
large codebases of such a thing.

What i really want to point out, is that, if you look into Basic for what it
shines, i think things like "GOTO line" are very good, because it teach you
how the computer works under the hood (the native code will point to memory,
stack, registers, program offset, call hard defined OS syscalls, etc..)

You could deal with the soft/logical and hard/physical paradigms at the same
time, understanding that the logical ones are built through abstractions over
the hard ones.

Later if you decide to code, than you can choose if you want/can be spoiled
and use more abstract and easy languages like Python or Javascript, but also
with a good understanding/intuition of how things work under the hood.

And all of this can be done in a easy way, like with jumps to a giving code
position. (It alsos teach you to think over indirections, why some things are
good or bad, and have the power to teach you to move on to better things, but
only after you really know whats going on).

The basic GOTOS and other techniques might be bad for coding in real life, but
im against taking them out of languages that can serve to teach programming to
kids, and even creating more of this sort of instructions, that teach how to
reason about code, where you can start with "bad practices" but that are
pretty easy to use at a beginning level.

Stupid little things like taking graphics and sound for granted and not having
to import libraries, using things like 'CIRCLE' or 'BEEP' or 'GOTO 10' is what
your eight year old self would think its pretty cool and would run to your
parents to show them with confidence in yourself.

------
codr7
I started out with Basic on a C64, patiently entering the programs from the
back of the manual.

In 9th grade we had to choose a company for work practice. I chose Oki, since
I figured printers were close enough to computers to be interesting.

Turns out the task was burning EPROMs, basically pushing a button once every
five minutes. Luckily, the computer controlling the burner had QBasic
installed. I remember some of the employees looking over my shoulder and
oohing and aahing while I was making time pass by writing code.

Fast forward 30 years and here we are. Haven't touched Basic since then but
I've written substantial amounts of code in most languages out there. Even
created ten or so of my own.

As much as I respect the guy; when it comes to Basic, Dijkstra was wrong. You
have to start somewhere.

~~~
Gibbon1
I think if it was up to Dijkstra you'd never have been allowed to program.
Instead you'd be still pushing the button and I'd probably be attaching the
label.

Also I feel the pain, at one time I was the guy hitting enter every couple of
minutes, then applying a label and putting the programmed eeprom in the tube.

~~~
codr7
Probably, cranky old fart :)

Damn, now I remember the tubes.

Once a day or so a tube came back because one or more EPROMs where faulty
which meant they all had to be verified.

~~~
Gibbon1
Slips first eeprom into the tube. Falls out the other end. Another 5 minutes
of life gone.

Dijkstra would have been even crankier if he'd lived an another 15 years.

------
mysterydip
If you're looking for "basic for the modern era", also check out freebasic and
appgamekit studio, the latter of which is a descendant of darkbasic and the
"tier 1" version uses a basic dialect. What made appgamekit better for me than
qb64 or freebasic is the runtime debugging. While qb64 and freebasic compile
down to native code, appgamekit uses bytecode in a vm, allowing you to use the
same step, watch, breakpoint stuff as quickbasic of old.

~~~
versteegen
FreeBASIC is a great descendent of QB, which is suitable for serious, even
commercial projects. It has seperate "qb", "fb" and "fblite" dialects. "qb" is
very highly compatible with QuickBASIC, while "fb" (the default) is a modern
language which has almost all the features of C++98 except multiple
inheritance and templates.

I'm co-maintainer of a large RPG creation engine written in FB.

------
themodelplumber
Funny to see this posted today. I was just listening to an interesting QB64
interview with a developer who recently published his QB64 game to Steam. It's
episode 3, here:

[https://qb64.buzzsprout.com/](https://qb64.buzzsprout.com/)

------
RcouF1uZ4gsC
qb64 is great for an intro to programming. I am teaching a young child to
program. One of the things I noticed, is that they had difficulty with “if”
and “else” blocks. The concept of a block of code that gets executed together
versus another block of code just wasn’t intuitive. I changed to basic “if ...
goto” and they immediately grasped the code. It was just a labeled linear set
of instructions that you just followed starting from the top and going down
unless you encountered a “goto”.

Once they get more facile with programming BASIC in this style, I will
introduce them to more structured programming.

BASIC is a great intro language for non-programmers cause it is so linear and
there are few extraneous noise (for example the parentheses in Python 3)

------
darksaints
This is interesting from a historical perspective, but honestly I'm really
glad that the era of Basic is gone. Having had a handful of opportunities to
work with legacy Basic code from a wide variety of programmers, it's just a
disaster that always leads to unmaintainable garbage. I'm not even sure it is
possible to have well architected Basic. Structuring and modularizing code is
ridiculously difficult. The very principles of the language somehow lead to
pervasive use of globals and gotos. It's neither functional, nor object
oriented. Everything ends up as blocks of mutable procedures, tightly coupled,
with red flags everywhere.

I'm a very opinionated person about programming languages, and there are
plenty of modern language trends that have been bothersome to me. But none of
them will be ever as bad as any of the Basic code I have interacted with. I'd
rather read and maintain code that went through a unicode-permitted Haskell
code golf competition than anything written in Basic.

~~~
BeetleB
Were you dealing with BASIC or QuickBasic or VisualBasic?

Also, consider that it may not be the language but the fact that most BASIC
programmers tend not to know much about programming...?

~~~
darksaints
It was BASIC, and a little bit of QBasic. In a different realm, I also worked
with VBA, which wasn't much better, but I think that was more due to
programming inexperience. Admittedly didn't have much exposure to Visual Basic
or VB.Net.

------
pjmlp
_$NOPREFIX_ is an welcomed improvement.

As for modern era, a though that crossed my mind a couple of times was having
QB target WebAssembly as well. :)

Porting those MS-DOS samples into a browser canvas.

~~~
yjftsjthsd-h
> Porting those MS-DOS samples into a browser canvas.

I feel obligated to point out that
[https://copy.sh/v86/](https://copy.sh/v86/) has been able to do this for
quite a while now. Of course, having a more native option is an extremely
welcome improvement.

~~~
pjmlp
Yeah I am aware of it, that was my point. :)

------
djhaskin987
Oh man, they taught QBASIC in my first programming class in high school as a
freshman in 2001. We had to make a game, we had to learn about loops using
WHILE WEND, and now I can show my kids what I used to learn programming
because it still works. This is exciting!

As a continuation of the story, the next year I took AP computer science and
we learned using Borland C++. the year after that we learn Java 1.4 for AP
computer science. Blast from the past, no?

------
nathell
Does this mean I can finally run NIBBLES.BAS and GORILLA.BAS natively on
macOS?

~~~
pjmlp
Probably PureBasic, RealBasic, Xojo would have been an option, although with
code having to be changed for them.

~~~
akudha
Xojo seems interesting (is that what used to be called RealBasic?). Do you
have experience with it?

~~~
SyneRyder
Xojo did used to be called RealBasic (and briefly Real Studio). It's more like
Visual Basic than QBasic/QuickBasic though.

I've used it for a long time to make tools for myself that will run cross-
platform Windows / Mac / Linux.

~~~
akudha
thank you for the answer. can you give some examples of the tools you built
with xojo?

~~~
SyneRyder
My main Xojo program is a business database front-end for my indie software
business. It parses sales notifications and inserts them into an offline
database (ie so no customer data is ever kept online). It has a business
dashboard for key performance metrics, generates charts for various sales /
demographic queries. It also lets me generate serial codes for customers when
giving away copies of my apps in promotions. I've been using that for about 20
years.

I also made a cross-platform Twitter-esque client (similar to Tweetbot) to
work with the Micro.Blog social network. I had it fully working with Mac,
Windows and Linux before I got disillusioned with Micro.Blog and didn't
release it.

For internal use, I made a project estimation app for solo/indie developers
like myself, that uses Monte Carlo estimation to predict an actual ship date
based on the (in)accuracy of your previous task estimates. It had charts of
percentage confidence, so you could give an 85% or 95% confidence of shipping
a milestone by X date. The tasks & milestones were structured like an outliner
and could be moved just with keyboard navigation. It was able to load project
files from a discontinued Java program called Mr Schedule that I loved. That
Xojo app was cross-platform Windows & Mac too.

------
stevekemp
I've been following a few different BASIC projects over the past few months,
it seems that there is a sudden rise of them. Whether nostalgia, or just
fun/learning/experimentation is to blame I can't say.

My own BASIC is very simple, but easy to embed/extend:

[https://github.com/skx/gobasic](https://github.com/skx/gobasic)

I sometimes consider extending it with WHILE/WEND, named functions, and
similar. But then I remember the constraints are part of what makes it
interesting to me.

I still remember the Christmas when I received 48k Spectrum, with my sisters.
The tape-deck didn't work, so my sisters lost interest. I worked my way
through the (spiral-bound orange) manual, typing BASIC and having a blast.

Later we got a cassette recorder which worked, and I started playing games,
and hacking them for infinite lives. I think my initial love/enthusiasm for
typing in BASIC programs directly lead to my career.

------
throwaheyy
RapidQ was my stepping stone from QuickBasic to Windows GUI and server CGI
programming. I could not afford VisualBasic and didn’t have a computer with
enough disk space to install it. It’s still around online as abandonware and
while it’s not “modern” any longer, the bang for buck in getting a simple
application going is pretty high.

It compiled to bytecode so you could even compile (at least console and CGI)
executables for Linux, and there was something similar to P/Invoke so you
could call system functionality for advanced extending.

The author of RapidQ went on to develop RealBasic, but for a long time
afterwards (and still today?) there’s a large community of people making
extensions and addon components for it.

[https://en.wikipedia.org/wiki/RapidQ](https://en.wikipedia.org/wiki/RapidQ)

------
protomyth
I actually taught QBasic for a 100-level class at a college. It was very
interesting to see how close it actually was to the "grown-up" languages they
used for the Comp Sci curriculum.

------
dang
If curious see also

2010 (1 comment)
[https://news.ycombinator.com/item?id=1161656](https://news.ycombinator.com/item?id=1161656)

------
TazeTSchnitzel
It's QB64, not QuickBasic64.

------
zoom6628
Excellent addition to the arsenal of languages for bringing beginners onboard
as well as letting advanced/adventurous people solve problems in a forgiving
environment - its much easier and less invasive to install qb64 than say a
VSCode or VisualStudio or even NetBeans.

More languages and IDEs like this will make easier for more people to find an
on-ramp that suits them and their interests and ways of thinking.

------
anta40
I think this is the core of QB64 (written in C):
[https://github.com/QB64Team/qb64/tree/development/internal/c](https://github.com/QB64Team/qb64/tree/development/internal/c)

Kinda difficult to read hehehe...

------
orionblastar
IBM PC BASIC can be emulated through
[https://sourceforge.net/projects/pcbasic/](https://sourceforge.net/projects/pcbasic/)
PC-BASIC to run classic BASIC programs.

------
jshaqaw
Basic is still the sweet spot for kids to move past Scratch but aren’t quite
ready for the complexity of a Python.

------
FpUser
I knew about Basic but never got to use it. My first languages were machine
code, assembly, C and Turbo Pascal

------
ambyra
I used to love this as a kid. The language is horrible though. A python
version would be nice :)

------
thewebcount
It crashes on launch for me on macOS Catalina. :-(

------
cchance
OMG QBASIC FLASHBACKS!!!!!!!!!

