News for hackers. Stuff that matters.
Re:Show HN: QBasic 4.5 on Android by stuaxo on Thursday November 09, 2023 @07:09AM (#38203985)
This is nice, I'd like to know the changes you made.

I started a discussion on GitHub, I think the killer feature of QBasic and even more so QuickBasic was the help and reference.

Even the ASCII table was fun to look at and go grab characters, you could imagine something analogous for Unicode.

Similarly for all the stuff in there working out modern equivilents.

The annoying stuff was how much hassle it was to do extra things like handle the mouse pointer via assembly, it would be good if this has extensions for touch etc all documented.

Re:Show HN: QBasic 4.5 on Android by thatha7777 on Thursday November 09, 2023 @07:30AM (#38204160)
Ah, and I almost forgot, in re the changes:

the commit log is the definitive (and painstakingly accurate) log of changes: https://github.com/ianatha/bababasic/commits/main

To clarify my slightly obtuse original post, I started this by using PuffinBASIC, but I ended up forking it because there were a few things implemented differently than my reference QuickBASIC 4.5 installation (running on DOSBox):

* label syntax / case-insensitive labels * forward function declarations * flexible array indexing (i.e. in QBasic your arrays could start at 0, or at 1, and it somehow figured it out, and it still had bound checks) -- haven't implemented this yet * various functions (VAL, INKEY$, SLEEP)

Lastly, and more importantly, PuffinBASIC required Java AWT support (which made it necessitate a desktop), but I have refactored BabaBASIC to abstract the HCI portions (audio/video/keyboard).

Another interesting technical point is that the "Run View", which displays a terminal through which you interact with your script is also a (very small) fork of Termux.

(I needed something to efficiently draw a text buffer while handling all the VT100-related functionality.)

Re:Show HN: QBasic 4.5 on Android by stuaxo on Thursday November 09, 2023 @12:11PM (#38207740)
QB64 has taken on the mantel of modern reimplementation, its worth seeing if there are any extensions from there that are worth implementing.
Re:Show HN: QBasic 4.5 on Android by thatha7777 on Thursday November 09, 2023 @07:21AM (#38204071)
Ohhhh yes, you're absolutely right.

Frankly, this is my first Android/mobile application, so I'm still trying to wrap my head around the limited screen space and whatnot.

I'd be awesome to get some syntax hints, or some form of better autocompletion (it only recognizes some basic statements/lang-delcared functions right now).

I'll follow up on GitHub -- thank you for contributing the discussion there, this is very exciting!

Re:Show HN: QBasic 4.5 on Android by knome on Thursday November 09, 2023 @08:15AM (#38204580)
>I think the killer feature of QBasic and even more so QuickBasic was the help and reference

without any internet access in the 90s, I taught myself QBasic largely out of that help reference in order to write little games and simulations. it really was something fantastic.

Re:Show HN: QBasic 4.5 on Android by jamon51 on Thursday November 09, 2023 @10:28AM (#38206206)
I had the same experience as a kid. Probably built over a hundred QBasic-powered games with no internet to help me.

I missed it, so last year when I rebuilt my website I built it in QBasic:

jamon.dev

Re:Show HN: QBasic 4.5 on Android by rlawson on Thursday November 09, 2023 @11:00AM (#38206661)
100%. Heck I coded up a system that printed footage marks along the side of industrial coated material using qbasic interfacing to an industrial printer via the joystick port on a 386! No internet so I used the help system constantly. Eventually the company kept a pile of 386's stacked as spares because the system ran too fast on a 486.
Re:Show HN: QBasic 4.5 on Android by ryanjshaw on Thursday November 09, 2023 @09:40AM (#38205554)
This is 100% my experience. I stumbled across QBasic in the early 90s (not just 80s OP!), and the help system taught me everything about programming.

In 1997 the internet arrived at my small town in the literal middle of nowhere, and the first thing I did was look for a "demo version" of QuickBasic to move to the next level.

Re:Show HN: QBasic 4.5 on Android by donatj on Thursday November 09, 2023 @10:31AM (#38206257)
> the killer feature ... was the help and reference

So much this. The help in QBasic is how I learned to program at ten years old in a pre-internet world.

A couple years later my friend was trying to push me to learn C and I was sorely disappointed that there was no help, at all.

Re:Show HN: QBasic 4.5 on Android by thatha7777 on Thursday November 09, 2023 @10:56AM (#38206617)
I'm actively working on some kind of "live docs" feature for BabaBASIC.

Though ... I have to wonder (and I'm only half-joking) -- should it just be a ChatGPT integration that can answer questions?

Re:Show HN: QBasic 4.5 on Android by speps on Thursday November 09, 2023 @12:05PM (#38207633)
No, plain old docs
Re:Show HN: QBasic 4.5 on Android by thatha7777 on Thursday November 09, 2023 @12:42PM (#38208173)
'twas just a joke
Re:Show HN: QBasic 4.5 on Android by stuaxo on Thursday November 09, 2023 @12:09PM (#38207702)
Definitely not ChatGPT, even if you put in a thing that any code it ran would be tested somehow for correctness.