News for hackers. Stuff that matters.

Ask HN: What's a modern equivalent of QBASIC?

I loved QBASIC as a kid. The ability to write a few lines of code and get something as simple as a word on the screen, flashing in a variety of colours was like magic. What's a modern equivalent of that that kids could play with and get excited about coding (I'm not talking about drag and drop platforms like Scratch)
( 24 comments | 19 points | on HN )
Re:Ask HN: What's a modern equivalent of QBASIC? by dragonbonheur on Saturday September 30, 2017 @05:52AM (#15372071)
Logged in just to answer this.

It is QB64 or FreeBASIC or GAMBAS if you're coding for Raspberry Pi and Linux. Not Python. Not Javascript. Not Ruby.

If you're looking to transition from scratch to actually shipping apps, give Stencyl a try for free. Stencyl allows you to ship HTML5 and Flash apps (it's general purpose enough)and games <ith its free version.

Don't let your kids get stuck with the command line with Python.

See -

www.QB64.net

www.freebasic.net

gambas.sourceforge.net

See also monkeycoder.co.nz for yet another modern BASIC dialect.

You can get BlitzPlus and Blitz3D here -https://blitzresearch.itch.io/

And you can get Blitzmax (which also runs on Linux) here- https://www.syntaxbomb.com/index.php?topic=7.0

Re:Ask HN: What's a modern equivalent of QBASIC? by CyberFonic on Saturday September 30, 2017 @04:05AM (#15371821)
Python with PyGame !

I think that Python language when used with PyGame is even more fun for beginning programmers than QBasic was. With PyGame you can get some pretty nifty graphics working quickly and also sound, music, etc. It is easy to write simple games with it too. For more older students it is easy to experiment with various physics problems.

Re:Ask HN: What's a modern equivalent of QBASIC? by O1111OOO on Saturday September 30, 2017 @05:08AM (#15371962)
Not modern but there's the GW-Basic clone[0] (x-platform, actively developed). Also, the docs[1] are incredible:

[0] http://robhagemans.github.io/pcbasic/

[1] http://robhagemans.github.io/pcbasic/doc/

Re:Ask HN: What's a modern equivalent of QBASIC? by w84death on Saturday September 30, 2017 @06:52AM (#15372246)
Re:Ask HN: What's a modern equivalent of QBASIC? by quickthrower2 on Saturday September 30, 2017 @01:58AM (#15371471)
Javascript isn't a bad bet. It's a complicated language for beginners (in comparison to BASICs) but you could teach a subset. `alert('hello');` is a nice start of course. You can just write your program in notepad, save with .html extension and you are done.
Re:Ask HN: What's a modern equivalent of QBASIC? by hhhxyxyy on Saturday September 30, 2017 @04:28PM (#15374841)
If current software language trends were dystopian then JavaScript would be the McDonald’s of languages. Fast but terrible for you.
Re:Ask HN: What's a modern equivalent of QBASIC? by jamesmp98 on Saturday September 30, 2017 @04:51PM (#15374916)
But no matter how much you hate it, you always come back
Re:Ask HN: What's a modern equivalent of QBASIC? by quickthrower2 on Sunday October 01, 2017 @01:05AM (#15376486)
Then you regret it as you endure extreme pain in the colon.
Re:Ask HN: What's a modern equivalent of QBASIC? by shoo on Sunday October 01, 2017 @07:08AM (#15377288)
Back in the day, after learning QBASIC I got hold of a copy of Dark Basic somewhere -- roughly a proprietary basic language for windows with bindings for input, sound, graphics and so on. Apparently these days it is open source: https://www.thegamecreators.com/product/dark-basic-pro-open-...

After learning about arrays I got very excited and cobbled together a space-invaders game in Dark Basic with particle effects where all simulation data was stored in one giant table. Pretty amusing in retrospect. Arrays sure beat having to hand-name each variable in code. Dark Basic was great. Also a good playground for doing little 2D physics games / simulations. It was a lot of fun to do this at the same time as learning highschool trig/physics as you can actually use this knowledge to build something.

After that I went down the C/C++/OpenGL/DirectX spiral and didn't produce anything playable/useful for years (engine development, hah).

After that I went down the early Java-era path and was able to start making playable application again (memory management + a standard library - oh my).

edit: these days i write/maintain python applications. i tried python + pygame for game development a few years ago. honestly python doesnt seem like a great language for game development. e.g. how do you actually ship an application? all the py2exe style approaches to packaging/bundling are essentially hacks. pygame didn't seem like such a performant/easy framework for input/sound/graphics etc.

Re:Ask HN: What's a modern equivalent of QBASIC? by Someone on Saturday September 30, 2017 @07:21PM (#15375497)
You will get few kids excited about programs that run on a character screen nowadays, so any starting program will require quite a bit of boilerplate that sets up an interesting environment.

Swift Playgrounds on iOS has that, and allows you to inspect some (most? All?) of the source of that boilerplate code.

I wish it ran on Mac OS, because it currently is too limited for ‘real’ work.

The ‘lessons’ are nice, though. For example, there is a playground using ARKit now)

Re:Ask HN: What's a modern equivalent of QBASIC? by nanis on Saturday September 30, 2017 @02:30AM (#15371570)
One option is to use one of the emulators[1] for 80s home computers. For example, while too late to the scene, Spectrum 128K had easy to manipulate audio and graphics via BASIC. Side A of the Horizons tape < http://www.worldofspectrum.org/infoseekid.cgi?id=0009230 > that came with the original Spectrum was a great intro to hardware.

There is also ZX Spectrum Next < https://www.specnext.com/shop/ > which brings all the immediate mode goodness in a modern package.

[1]: E.g., http://fuse-emulator.sourceforge.net/

Re:Ask HN: What's a modern equivalent of QBASIC? by meredydd on Saturday September 30, 2017 @08:10PM (#15375678)
We've run several workshops for kids with our online Python IDE + GUI builder for web apps (https://anvil.works). So far, it's been great every time.

We avoid boilerplate, so they can get text and images on the screen with their first line of code. And because what they build is a real web app, they can just send the link to their friends/parents to show them what they built.

I think that's the magic recipe for kids - short time to first result, and make sure they can show others once they've done it. (Conveniently, this also works on adults...)

I'm happy to share our workshop teaching materials if you're interested - just drop me an email.

Re:Ask HN: What's a modern equivalent of QBASIC? by bilgus on Saturday September 30, 2017 @03:18AM (#15371697)
For windows: Autoit in the last 10 years it has really become a powerful language or if you really want basic I think MS brought it back as Small Basic http://smallbasic.com/
Re:Ask HN: What's a modern equivalent of QBASIC? by dragonwriter on Saturday September 30, 2017 @02:45AM (#15371605)
Python, Rebol (sure, it's fairly stale, but that's not really relevant to the question), any of the maintained Logo derivatives...

What we lack, now, is a computer that boots up into one of those options and comes with a nice programming guide for it.

Re:Ask HN: What's a modern equivalent of QBASIC? by billconan on Saturday September 30, 2017 @01:58AM (#15371472)
I think it's python.
Re:Ask HN: What's a modern equivalent of QBASIC? by blumomo on Saturday September 30, 2017 @02:20AM (#15371534)
Agreed. Only that Python has more to offer one you've mastered the basics beyond print, if and looping.
Re:Ask HN: What's a modern equivalent of QBASIC? by fellippeheitor on Saturday September 30, 2017 @06:08AM (#15372129)
QB64 is a modern extended BASIC programming language that retains QB4.5/Qbasic compatibility and compiles native binaries for Windows, Linux and macOS. qb64.org qb64.net
Re:Ask HN: What's a modern equivalent of QBASIC? by doronrotem on Monday October 02, 2017 @09:52AM (#15383811)
In theory, why not ruby? (ruby-lang.org)

But in practice, from seeing what gets my son excited:

1. Windows Script Host

2. Html

3. If you are ready to do some drag-and-drop: Unity3d.com - it is free for trial and there are online tutorials on youtube etc, and you create a game, which is exciting.

Re:Ask HN: What's a modern equivalent of QBASIC? by stewbrew on Saturday September 30, 2017 @01:53AM (#15371465)
Smalltalk (pharo etc.)? E.g. Squeak has/had some special widgets for small kids. IIRC they also used it to teach programming to kids.

If they're older, I would probably go with javascript. The browser is the new terminal.

Re:Ask HN: What's a modern equivalent of QBASIC? by aidos on Saturday September 30, 2017 @05:13AM (#15371974)
I've actually just popped on here this morning to ask a similar question!

https://news.ycombinator.com/item?id=15371973

Re:Ask HN: What's a modern equivalent of QBASIC? by pakl on Saturday September 30, 2017 @01:47AM (#15371451)
Great question... Probably processing.org
Re:Ask HN: What's a modern equivalent of QBASIC? by zhte415 on Saturday September 30, 2017 @11:04AM (#15373148)
Many have suggested Python, but why not VBA? It is sitting in your PC already assuming you use Windows.
Re:Ask HN: What's a modern equivalent of QBASIC? by bananicorn on Monday October 02, 2017 @07:17AM (#15383020)
if you're on Windows or Mac, you can give red-lang[0] a try, on linux there are no GUI-bindings as of yet, but i've heard it works with WINE.

http://www.red-lang.org/

Re:Ask HN: What's a modern equivalent of QBASIC? by KineticTroi on Saturday September 30, 2017 @03:44PM (#15374682)
FreeBASIC