This looks really neat. I played around with it a bit and it's very intuitive to use.
If I could make a single request, it would be to be able to have white background. As someone with heavy astigmatism, using the site as is is very difficult, and I can only look at the screen for a few seconds at a time without my vision getting blurry.
I know I can use the color command to change it in the repl, but the editor still uses black background.
Do you have any plans on adding hashtables/dictionaries of any sort to the language? It seems to be above the cutting-off point for some other retro basics I've seen, like QB64. Perhaps it's too complicated to add, but they feel kinda like part of the bedrock of "scripty" languages these days, so it's something I'd definitely add if I was making a BASIC myself, but I understand that different folks take different tacks on stuff like this.
BASIC languages seem to be having a bit of a renaissance year. There have been about (that I know of) 2 or 3 new BASIC languages introduced just this year alone.
I absolutely love the idea of a modern web based BASIC as I can work on the road from anywhere!
I've added a room for this to my BASIC oriented discord, hopefully this doesn't seem spammy it's the only one around on the subject of BASIC in general, as far as I'm aware: https://discord.gg/HQaDgJvbbJ
Not only they were quite productive as dynamic languages, they also had optional typical and AOT compilation, besides the rich libraries for start coding right away.
One thing that many might be unaware is that the original Dartmouth BASIC was actually JIT based, the pure interpreted versions only came to be due to fitting it into 8 bit home computers.
Making that demo was tough but pretty rewarding in the end! I ended up featuring it in the About page of the site because it’s a great intro to what EndBASIC is supposed to be :D
It has no line numbers, fine. But I couldn't figure out how to enter a program since it doesn't present an editor. All my commands were executed in immediate mode.
I probably would have spent a little more time with it if it had been obvious how to enter a program without poring through documentation.
I did load the DEMO program, maybe it was in there, but I missed it.
This is how I learned to code. I cannot imagine throwing a kid in front of a Javascript browser console or modern IDE and say figure it out. This is so awesome -- with the low-res graphics, too! If my kids learn to code, this is how my kids will learn to code.
I tried to move the cursor and then print at that location through the command line. How do you separate two commands on the same line to do this in the repl?
I spent 20+ years in my day job programming in BASIC on OpenVMS without using line numbers or GOTO's. Yet the first thing I did here was fall back to my childhood Sinclair/BBC BASIC of trying 10 PRINT "Hello" 20 GOTO 10
The console is hand-crafted and implemented as an HTML or SDL canvas to support rendering text and graphics at the same time. I haven't implemented text selection nor copy/paste on top of that yet (and it isn't in my list of priorities right now because, well, you didn't have a mouse in the old BASIC interpreters anyway ;) ).
Yeah, there are no line numbers (although 0.3 had them!) nor GOTO. I think this is the main thing I'll add in the upcoming 0.10 because it's what everyone asks for :)
Though I much prefer a unix CLI nowadays (like bash or zsh) and would choose something like Ruby over BASIC in all cases. I felt MS-DOS and QBASIC held me back by not being opensource (thus not allowing me to dig deeper).
"Built entirely in Rust with a minimalist modular design. Open source. Embed the interpreter into your own programs for just 700KB"
Back when QuickBASIC was a thing, 700KB was an enormous amount of memory. The early IBM PCs (which included a BASIC interpreter in ROM) maxed out at 640KB!
I know, I know. And the Amstrad I had with Locomotive Basic only had 128k of RAM and (as I read now) 48kb of ROM -- yet it fit the whole language in there, which was more complete than what EndBASIC currently offers. But things have changed, and I still think that 700kb nowadays is reasonably small all other things considered.
The original BIOSs were for a 8bit/16bit archs. I'm guessing this was measured on a modern arch, and the result would be smaller on a smaller pointer size. I wonder what the size would be if complied for avr.
I first programmed using basica on an IBM dual 5.25 diskette PC but have not been able to find it or an emulator. I did graphics programming with it using commands like line (0,0)-(100,200). I've never been able to find a version if basic that had that graphics capability. I loaded it from Dos typing 'basica'. Anyways, great language to learn on.
> I've never been able to find a version if basic that had that graphics capability.
If you are looking for a retro BASIC, then BBC BASIC had line and filled triangle drawing built in (or it was in the system ROM and BASIC had hooks for it). There was an extension (IIRC separately purchased for the Model A & B, built into the BBC Master) that added rectangles, circles, and ellipses.
BBC Basic was the best of the 8-bit offerings for learning on as it supported named procedures and functions, and a few other structural features (some BASIC implementations at the time didn't even have ELSE with their IF statements). There were significant limitations, but it was massively ahead of the GOTO/GOSUB (which it also had of course) that were your only option in BASIC interpreters on other home micros. It also supported variable names of reasonable length (40 characters IIRC, you could actually use more but any after 40 were silently ignored and you didn't want really long variable names anyway as they would take too much program space to store) where some other BASICs limited you to just a couple of characters. It even had a built-in multi-stage assembler for when you wanted a bit more oomph than interpreted BASIC could offer.
[caveat: one or two of the above features may not have been present in the very original version, though I think they were all in BASIC II that appeared in 1982]
Nice exercise developing an embeddable BASIC interpreter in Rust.
I've experimented with teaching 11-year old school children Python in a single session.
To obtain the immediacy effect that the original poster mentioed (which reportedly were liked by his kids), I use Turtle graphics module inspired by logo (import turtle - see also https://vegibit.com/how-to-move-the-python-turtle/ ).
Here's what you can do in a single two-hour session:
1. First I explained the children how points can be addressed using x and y coordinates (Cartesian coordinate system - which they hadn't had in maths classes at the time). "Each dot has two numbers that indicate where it lives, like house numbers."
2. Then I gave them the task of drawing a house only using straight lines (no curves permitted).
3. Next I asked them to convert the lines that made up their house into Python code based on forward(), right() etc. commands inspired by LOGO (which was, after all, inspired by education work with children ast MIT).
4. Let them try out their program on a computer.
5. Tell them that if they liked this exercise, they should ask for a Rasberry PI from their parents as a Christmas present as an affordable way to get into programming (early).
BASICA (IBM PC-DOS) and GWBASIC (Microsoft MS-DOS) were functionally identical. MS-DOS was just the version of PC-DOS that Microsoft released for non-IBM hardware. Not sure why the basic command was renamed.
ok. Basic. When did you parents learn to read?
I have been programming in BASIC since 1970.
I programmed it through primary school, middle school, jr high school, and high school, and took it in college. Almost all on a HP2000. (five different machines).
[+] [-] jmmv|3 years ago|reply
[+] [-] lokedhs|3 years ago|reply
If I could make a single request, it would be to be able to have white background. As someone with heavy astigmatism, using the site as is is very difficult, and I can only look at the screen for a few seconds at a time without my vision getting blurry.
I know I can use the color command to change it in the repl, but the editor still uses black background.
[+] [-] yumaikas|3 years ago|reply
[+] [-] snorkel|3 years ago|reply
[+] [-] simonmic|3 years ago|reply
[+] [-] mysterydip|3 years ago|reply
[+] [-] tommica|3 years ago|reply
I just edited the bouncing ball example and set "n = 200*200"
[+] [-] guessbest|3 years ago|reply
[+] [-] 97-109-107|3 years ago|reply
[+] [-] nonethewiser|3 years ago|reply
[+] [-] RachelF|3 years ago|reply
[+] [-] behringer|3 years ago|reply
I absolutely love the idea of a modern web based BASIC as I can work on the road from anywhere!
I've added a room for this to my BASIC oriented discord, hopefully this doesn't seem spammy it's the only one around on the subject of BASIC in general, as far as I'm aware: https://discord.gg/HQaDgJvbbJ
[+] [-] pjmlp|3 years ago|reply
Not only they were quite productive as dynamic languages, they also had optional typical and AOT compilation, besides the rich libraries for start coding right away.
One thing that many might be unaware is that the original Dartmouth BASIC was actually JIT based, the pure interpreted versions only came to be due to fitting it into 8 bit home computers.
[+] [-] abnercoimbre|3 years ago|reply
[0] https://media.handmade-seattle.com/endbasic/
[+] [-] jmmv|3 years ago|reply
[+] [-] nsxwolf|3 years ago|reply
I probably would have spent a little more time with it if it had been obvious how to enter a program without poring through documentation.
I did load the DEMO program, maybe it was in there, but I missed it.
[+] [-] wellpast|3 years ago|reply
[+] [-] whitten|3 years ago|reply
[+] [-] jmmv|3 years ago|reply
[+] [-] whitten|3 years ago|reply
[+] [-] hoistbypetard|3 years ago|reply
'10 ? "hello, world"'
it got angry. That violates all my expectations of a BASIC :)
Also, is there a good reason the REPL won't let me select, copy and paste text?
[+] [-] gushie|3 years ago|reply
[+] [-] jmmv|3 years ago|reply
[+] [-] jmmv|3 years ago|reply
https://www.endbasic.dev/docs.html#lang-goto
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] cies|3 years ago|reply
Though I much prefer a unix CLI nowadays (like bash or zsh) and would choose something like Ruby over BASIC in all cases. I felt MS-DOS and QBASIC held me back by not being opensource (thus not allowing me to dig deeper).
[+] [-] anonymousiam|3 years ago|reply
Back when QuickBASIC was a thing, 700KB was an enormous amount of memory. The early IBM PCs (which included a BASIC interpreter in ROM) maxed out at 640KB!
[+] [-] jmmv|3 years ago|reply
[+] [-] yyyk|3 years ago|reply
[+] [-] pjmlp|3 years ago|reply
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] Cyder|3 years ago|reply
[+] [-] dspillett|3 years ago|reply
If you are looking for a retro BASIC, then BBC BASIC had line and filled triangle drawing built in (or it was in the system ROM and BASIC had hooks for it). There was an extension (IIRC separately purchased for the Model A & B, built into the BBC Master) that added rectangles, circles, and ellipses.
BBC Basic was the best of the 8-bit offerings for learning on as it supported named procedures and functions, and a few other structural features (some BASIC implementations at the time didn't even have ELSE with their IF statements). There were significant limitations, but it was massively ahead of the GOTO/GOSUB (which it also had of course) that were your only option in BASIC interpreters on other home micros. It also supported variable names of reasonable length (40 characters IIRC, you could actually use more but any after 40 were silently ignored and you didn't want really long variable names anyway as they would take too much program space to store) where some other BASICs limited you to just a couple of characters. It even had a built-in multi-stage assembler for when you wanted a bit more oomph than interpreted BASIC could offer.
[caveat: one or two of the above features may not have been present in the very original version, though I think they were all in BASIC II that appeared in 1982]
[+] [-] jll29|3 years ago|reply
I've experimented with teaching 11-year old school children Python in a single session.
To obtain the immediacy effect that the original poster mentioed (which reportedly were liked by his kids), I use Turtle graphics module inspired by logo (import turtle - see also https://vegibit.com/how-to-move-the-python-turtle/ ).
Here's what you can do in a single two-hour session:
1. First I explained the children how points can be addressed using x and y coordinates (Cartesian coordinate system - which they hadn't had in maths classes at the time). "Each dot has two numbers that indicate where it lives, like house numbers."
2. Then I gave them the task of drawing a house only using straight lines (no curves permitted).
3. Next I asked them to convert the lines that made up their house into Python code based on forward(), right() etc. commands inspired by LOGO (which was, after all, inspired by education work with children ast MIT).
4. Let them try out their program on a computer.
5. Tell them that if they liked this exercise, they should ask for a Rasberry PI from their parents as a Christmas present as an affordable way to get into programming (early).
[+] [-] einr|3 years ago|reply
https://www.pcjs.org/machines/pcx86/ibm/5170/cga/
When the machine loads up, switch the disk to PC DOS 3.30 (Disk 2), type BASICA and you're in.
[+] [-] lproven|3 years ago|reply
https://robhagemans.github.io/pcbasic/
[+] [-] jhbadger|3 years ago|reply
[+] [-] ForOldHack|3 years ago|reply
Is there a set of test programs for basic?
[+] [-] TheHideout|3 years ago|reply
http://syn9.thehideoutgames.com/
[+] [-] wiz21c|3 years ago|reply
[+] [-] int_19h|3 years ago|reply
https://robhagemans.github.io/pcbasic/
[+] [-] stef-13013|3 years ago|reply
[+] [-] ChicagoDave|3 years ago|reply
[+] [-] bmacho|3 years ago|reply
[+] [-] khazhoux|3 years ago|reply
He did not support '10 PRINT "HELLO"'
He did not implement BASIC.