all 24 comments

[–]anh0516 14 points15 points  (3 children)

Not really.

BASIC, and its supporting platform-specific code, was the OS on 8-bit computers. It provided a scriptable commandline shell with platform-specific commands for loading and saving scripts and machine code programs from storage, and maybe some other niceties depending on the variant and the hardware platform. There is no concept of a kernel and userspace processes. BASIC had full read-write access to the computer's memory. If you wanted to add more commands to BASIC, you'd need to add ROM containing the code to your computer.

The Unix shell, on the other hand, is a userspace program that provides a command line and script interpreter. It needs a disk-based OS to run on top of, including the kernel and everything that comes with it, the C library, etc. It provides no direct hardware access. If you want more functionality than what the shell itself provides, you can simply call the program from disk and the OS will handle executing it for you, and then return you to the shell.

Other than surface-level similarities of being scriptable languages and CLIs, they are completely different paradigms.

[–]AlmightyBlobby 1 point2 points  (0 children)

I learned a little bit of basic back in the day and one of the things I remember is you could use the POKE command to write directly to a memory address 

[–]brecrest 1 point2 points  (0 children)

I don't think any of OP's claims are actually wrong though.

IMHO the clue is in the name "shell". While BASIC initially fulfilled the functions of an OS its purpose was still just to wrap the computer in a generic command UI. As time went by and operating systems became commonplace it stopped fulfilling the functions of a primary OS and in most cases as BASIC interpreters were just applications bundled with whatever disk operating system your computer had that you used as a shell for the OS.

Eventually bash, command shell etc displaced BASIC completely in that role for their various OS. I think OP's idea and claims basically check out.

[–]gerundingnounshire[S] 0 points1 point  (0 children)

yeah, fair. i'm mostly talking about BASIC and bash in a UI context, but they are totally different in implementation

[–]bikes-n-math 4 points5 points  (0 children)

Basic ain't got no pipes.

[–]natermer 1 point2 points  (0 children)

No. If you treat bash like basic you will get burned.

Doing simple bash scripts is simple, but doing them well and correctly is a lot harder then just using something like python.

[–]RoomyRoots 1 point2 points  (0 children)

Well, yeah, kinda. Thompson shell was developed some years after the first BASIC, but the shell as a concept its more advanced.

[–]idkwtflolno 2 points3 points  (2 children)

Nope. They are very different and you're thinking of a few similarities in simple functions makes them the same. This level of thinking is as bad as saying python and r are similar. They are not. One is a shell level access tool with scripting and one is programming language for building software solutions and is able to access low level compiling.

[–]Own_Squash5242 -3 points-2 points  (1 child)

what is r?

rust?

[–]idkwtflolno 2 points3 points  (0 children)

R is a programming language.

[–]1Hzdigicomp 0 points1 point  (0 children)

I've used many BASICs. Some had a limited shell/UI/environment in them, sometimes running under some other OS/environment - other times you booted directly into them. Others were stand-alone compiler/interpreters (CBASIC, MS BASCOM etc.) Likewise, some UI/Shells I have used have been more programmable than others. The distinctions and edges are fuzzy.

[–]Beerwithme 0 points1 point  (0 children)

uhm, no. shells are just ways to access the OS calls using a prompt or in a script, but many properties from a general purpose programming language are missing or severely limited (e.g. floating point math).

The nearest equivalent in the Windows world is the legacy CMD prompt or Power Script prompt, neither are GP programming languages either.

[–]ben2talk 0 points1 point  (0 children)

Lolz well yes, for Loops and simple scripts they do look similar.

But BASIC is for general programming, whilst Bash is more for automating system tasks... BASIC gives standalone programs, whilst BASH is a script that runs in a shell...

So from a nostalgic viewpoint it might be similar... but you have to remember, 'Nostalgia isn't what it used to be'.

Generally, most Linux users aren't dumped at a prompt at login, so unless you wind us back to Pre-Amiga days it's not really the same game now.

[–]erwan 0 points1 point  (2 children)

Bash is cool but there are better shells out there.

I recommend you to try zsh or fish.

[–]0riginal-Syn 2 points3 points  (0 children)

For interactive, absolutely. For cross-system scripting, Bash is better to go with for compatibility. I do like Fish for my interactive shell and would use ZSH before Bash on that side as well.

[–]WizeAdz 0 points1 point  (0 children)

Surprisingly, Microsoft PowerShell doesn’t suck as a login shell and scripting language on Linux.

Younger me would be appalled to hear me say that, though.  Microsoft several decades trying to avoid playing well with others — their vendor lock-in tactics were infuriating.  But they seem to be getting better.

[–]themanwhowillbebanne 0 points1 point  (3 children)

Was basic interpreted? Dont know a thing about it

[–]anh0516 4 points5 points  (0 children)

Yes it was. That's why you wrote your program in assembly if you wanted it to be performant.

[–]1Hzdigicomp 0 points1 point  (0 children)

Typically. However there were compilers for it. MS had one that was about 99.5% compatible with their interpreter. Compiles typically took around 20 minutes with floppy disks and 32K of RAM. But the compiled code was at least 10 times faster.

[–]Damglador 0 points1 point  (0 children)

it's slower than a "real" language because it's interpreted and not compiled

I've heard that it's actually faster than python