Live data from Hacker News

30 years later, QBasic is still the best

nicolasbize.com

241–250 of 308 posts

Re: 30 years later, QBasic is still the best

#241
post #237
post #112

Earlier quoted context omitted.

I think you might be onto something. For my oldest son I tried to help him along in python. Just poking about in the interpreter went great, but pygame overwhelmed him and when his laptop died he never picked-up again where he left-off. For my youngest son I introduced him to awk first. In an editor he would edit the script and then run it in the terminal. I explained how every line goes in order. At first his script…

Python is nice, but pygame is just a wrapper around sdl. I am not surprised it was not appealing. How do you do graphics in awk? If you don't then using js and one of the html5/canvas based game engines might be a reasonable step forward.

The awk script just does terminal escapes, so no real graphics. Canvas is pretty complicated, I'm shying away from that and also since it's time consuming and orthoganal to create pretty pictures for modern hardware. JS is even worse when you try to teach enough to be fancy and portable.

In any case I spent some time on it tonight for my son. I've made a little html file that is a nice harness for him to write JS so he does not have to know much of anything other than innerHTML.

https://github.com/msliczniak/msliczniak.github.io/tree/mast...

Re: 30 years later, QBasic is still the best

#242
post #87

I agree- we should also have just as easy of a way to start off with drawing. Why do we need to install 50 frameworks, tell a window how to spawn, basically create a universe just to start experimenting with creating computer graphics? It's a (Width x Height) matrix of RGB values-- why can't we get a simple way to create a simple 100x100 box for kids to draw in? No reason your son couldn't tell a screen to print colo…

https://processing.org/ I absolutely love Processing. It's a subset of Java with a dead simple IDE. Bonus points for exporting to Android, javascript, and executable jars for the desktop. Comes with excellent examples. The community is generally quite supporting and open as well. And to answer your question "why can't we get a simple way to create a simple 100x100 box for kids to draw in?" Here's the processing code…

Processing is a great and fun way to learn programming! I learned it that way, and I found that it kept my interest cause I could use it in a creative way while it also was easy to use.

Re: 30 years later, QBasic is still the best

#243
post #241
post #237

Earlier quoted context omitted.

Python is nice, but pygame is just a wrapper around sdl. I am not surprised it was not appealing. How do you do graphics in awk? If you don't then using js and one of the html5/canvas based game engines might be a reasonable step forward.

The awk script just does terminal escapes, so no real graphics. Canvas is pretty complicated, I'm shying away from that and also since it's time consuming and orthoganal to create pretty pictures for modern hardware. JS is even worse when you try to teach enough to be fancy and portable. In any case I spent some time on it tonight for my son. I've made a little html file that is a nice harness for him to write JS so…

yeah, i agree canvas is too low level, that's why i suggested one of the game engines that use it under the hood (thus abstracting a lot of the complexity).

Phaser is a pretty decent "batteries-included"-style engine (definitely easier to use than pygame, despite js not being as nice as python).

A good summery/list in general can be found at https://html5gameengine.com/

Re: 30 years later, QBasic is still the best

#244

Earlier quoted context omitted.

Well, Java does have a UI lib of its own and it doesn't make shipping an executable simpler.

This is not about shipping executables. Its about kids being able to sit down and bang out a program, complete with a UI.

Most kids want to make games and have their friends and the world play them. Desktop software isn't dead either. Real artists ship.

Re: 30 years later, QBasic is still the best

#245
I learnt Qbasic not that long ago it was my first taste of programming. However back then I couldn't afford a computer, so I had this Qbasic book and just had to 'imagine' how my programs run.

Fast forward 13ish years and I own my own mac and know more programming languages than most of my workmates :) Although now I try and specialize in just three Rust, Javascript and Python to avoid being the 'master of none'.

Re: 30 years later, QBasic is still the best

#246

Earlier quoted context omitted.

I've been using FreeBASIC for about 10 years and help maintain a 100+kLOC codebase written in it (a game engine). FreeBASIC has multiple dialects; there's the qb dialect that supports most of QB except some audio and real-mode DOS-related commands, and the modern fb dialect, which is all of C plus half of C++ with BASIC syntax. And it does improve on C and C++ in several ways, like much better string support and a "p…

Thanks for the review. Sounds like it's what I used to call an "industrial" BASIC where it has the features and compiler to get real work done. Many people think some toy with a few key words and interpretation when they think BASIC. Yet, I used to do all my hacking in it and Visual Basic 6 for GUI layer. Loved VB6 specifically for rapid iteration: instant load, instant test-run, instant... you name it on P3 400Mhz w…

Yes, I would agree with "industrial", especially since you can link with any C library after translating the headers with SWIG (translations of common libraries like C, winapi and GTK are included with FB). I've never used/don't know VB, but it appears that quite a lot of FB's design is borrowed from it. In recent years FB has been focused on borrowing C++ features instead (and even aiming to be ABI compatible with g++, not sure if that works). E.g. recently added "dim byref" (like a C++ reference variable) and polymorphism + RTTI. Sometimes things move in the other direction, like binary literals new in C++14 :)

Re: 30 years later, QBasic is still the best

#247

Earlier quoted context omitted.

From my experience back when I was 12: once you get ambitious enough in QBasic, you start to wish for some way of organizing the code and making it easier to follow. At that point, an intro to structured programming or OOP is natural. (Probably not functional programming, though, since functional's not very good for games, and what else do you think QBasic is going to be used for?)

QBasic supports subroutines (called SUB for procedures and FUNCTION for functions). You can write very structured code with QBasic; pretty much the only thing it lacks is pointers, but it's a very capable language otherwise.

> pretty much the only thing it lacks is pointers, but it's a very capable...

You can PEEK and POKE arbitrary memory addresses and use CALL ABSOLUTE to call assembly shell code at any address.

I remember typing out a mouse driver shell code in hexadecimal from a magazine. QBasic does not have built in mouse routines and the young me was baffled when you could make that happen with a long string of digits.

Re: 30 years later, QBasic is still the best

#248

Earlier quoted context omitted.

From my experience back when I was 12: once you get ambitious enough in QBasic, you start to wish for some way of organizing the code and making it easier to follow. At that point, an intro to structured programming or OOP is natural. (Probably not functional programming, though, since functional's not very good for games, and what else do you think QBasic is going to be used for?)

QBasic supports subroutines (called SUB for procedures and FUNCTION for functions). You can write very structured code with QBasic; pretty much the only thing it lacks is pointers, but it's a very capable language otherwise.

> pretty much the only thing it lacks is pointers, but it's a very capable...

You can PEEK and POKE arbitrary memory addresses and use CALL ABSOLUTE to call assembly shell code at any address.

I remember typing out a mouse driver shell code in hexadecimal from a magazine. QBasic does not have built in mouse routines and the young me was baffled when you could make that happen with a long string of digits.

Re: 30 years later, QBasic is still the best

#249
post #234
post #230

Earlier quoted context omitted.

> Probably not functional programming, though, since functional's not very good for games Can you elaborate on that? People have actually written games in FP languages ([1], [2]). [1] http://www.cliki.net/game [2] https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

I think this isn't that FP languages themselves are not good for programming games, but that the languages don't really bring much more to the table. Even when writing games in C, you end up writing many things in a very functional way by default. You have some state variables, and on every tick you advance things around in a very defined fashion, and redraw the screen. The "default" pattern for making games is so cl…

Once the Haskell people have figured out lenses properly, you can have all your OOP niceties (that anyone actually cares about).

Re: 30 years later, QBasic is still the best

#250

Earlier quoted context omitted.

My microwave has two knobs. One for power, one for time. It turns on automatically when you turn the timer and turns off automatically (sounding a mechanical bell) when the timer hits zero. I believe the timer is clockwork.

I used one of those microwaves once. Best interface ever, and so much simpler than the high-tech beepy button matrix! Do microwave manufacturers just not realize that they're making their products worse by complicating them? I don't get it.

Knobs are more expensive than buttons?
Post reply on HN