one of the reasons qbasic was so successful was because it came preinstalled on your OS and it came with everything. input, text, graphics, sound, even "music" through the PLAY command, even a built in help catalogue detailing how it all worked

the only way to get that same experience today is to use a fantasy console

the other reason qbasic was likely so popular was that it avoids the billion dollar mistake: it did not have null as a concept. everything was a value or treated like a value, and for non-value types the default was simply empty (a string of size 0, an array with 0 records)
treating everything as a value type had the additional happy benefit that garbage collection was absolutely trivial

@eniko Is it possible to have usable zero values in a language with generic types?

fn f<T>() {
// what would we need to do to know the zero value for <T>?
let x: T;
...
}

iiuc, in Go, people generally try to design their types so that the zero struct is meaningfully zero-ish, but that depends on mutual cat herding by the community.

@mvsamuel @eniko
In Rust you represent that with traits

fn foo<T: Default>() {
let x = T::default();
...
}

@mvsamuel i think it's possible but a language would have to be designed around it, i think

@eniko Does qbasic have pointers?

I'm more familiar with the Commodore 8-bit BASICs (which were also MS BASICs), and they had no pointers. Only floats, strings, ints, and arrays of any of those types. Storing stuff in memory directly (ie: via peeks and pokes) wasn't unheard of.

@xenomachina nope, no pointers at all. which made stuff like implementing a stack very annoying
@eniko yeah, we went from creative & sciences oriented machines (desktops) to locked-in consumption driven devices (mobiles)
@bug It's way worse. A lot of desktops don't even come pre-installed with tools to actually make stuff. They haven't for decades at this point!
@Tijn @bug I really want to make a mobile device with built-in programming features and high user empowerment.

If I only had the drive to actually start. Fuck depression.

@bug
even on desktops and workstations you have to get your programming tools from somewhere on most OSes.

@eniko

@oblomov @bug yeah, desktops aren't really much better for this in the modern day
@oblomov @bug @eniko When I tell you that breaking into the CompSci space as a child was actually SO MUCH HARDER because of these changes. Literally felt like I was resurfacing old magic that intentionally was being withheld from me because the machines didn't have tool pre-installed.

@bug I think it was already happening on desktops long before the widespread adoption of mobile computers. Compare, for example the quality of Linux man pages to something like OpenBSD—and conversely, their respective ease of installation. There's a cultural difference between those communities in how they value quality, completeness, and correctness vs. features, compatibility, and performance.

@eniko

@eniko I think the closest languages for this today would be something like perl or python, which are available OOTB on nearly every Linux and (I think?) macOS machine, although the multimedia bindings do not.
@oblomov python graphics/sound/windowing/input stuff is real crufty nowadays
@eniko @oblomov This is why Ren'py is my bestie.
@eniko I think inclusive environments ebb and flow with the rate of growth of computers' capabilities. Keeping the balance between an environment that feels naturally cohesive and the breadth of platform capabilities it supports is really difficult and computing only comes to a point where they stew long enough to unify well occasionally.

@eniko

The PLAY command was great, so much so I reimplemented it for .NET at one point: https://github.com/tannergooding/play

Not quite the same since we can't output directly to a PC speaker on modern computers, but it works :D

GitHub - tannergooding/play: A library for playing music similar to the QBASIC 'PLAY' command.

A library for playing music similar to the QBASIC 'PLAY' command. - GitHub - tannergooding/play: A library for playing music similar to the QBASIC 'PLAY' command.

GitHub

@eniko

JavaScript is kinda that

@486timetable kiiiiiiiiinda but javascript is gargantuan and hard to use

@eniko

If you're willing to apply QBASIC mindset, JavaScript is sweet and easy.

It's the habit of frameworks and package managers that get people messed up.

@eniko not only was it pre-installed, but it was also stupid-easy to learn. QBASIC was my first programming language and I started learning it when I was 7.
@eniko It frustrates me how close the modern browser is to being that — it supports sound, text, graphics, 3D, gamepads, even cameras and accellerometers... but it's unusable. And the JS community seem determined to make it even more complicated and then use machine learning to fix the complexity.
@andrewt yeah, and even if you make something that works consistently across major browsers and apis now, there's no telling when some browser regression will introduce issues. Ask me how I know :/
@eniko I think there could be a good fantasy console like library to wrap all this stuff but you'd still have to download that, and an editor and... It'd need a whole ide bundling in to really work. That could be cool though, like build a game in this app and it'll run on anything with a browser (ps, pls keep this one dependency up to date to make sure it keeps working, sorry)
@andrewt I mean if you take something like pico 8 or tic 80 you basically get that (since they have a web export)
@eniko yeah, I really like pico8. But I'd like to also have something with a similar design that let me use the whole computer — not every project works with a two-button gamepad in 128×128 with harsh CPU limits. I mean I realise the old Basic systems had similar limitations but there's no reason we *have to* now.
@andrewt yeah. Fair. I've dreamed of making something like that myself but time/energy/money...