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.
I've filed https://github.com/endbasic/endbasic/issues/181 to track.
I just edited the bouncing ball example and set "n = 200*200"
https://github.com/endbasic/endbasic/blob/ac3eb5622a6db0beb4...
I've thought about adding other ways of specifying colors, like COLOR "#aabbcc". Would that be useful/interesting?
The current wasm file that's downloaded is just about 1MB!
Alternatively, we would buy a library from companies selling developer tools.
If you wanted to get really fancy you might have used something like JETSAM which gave you a single key-value db in a file.
Some form of jumping or function calls is the main feature that will drive the next release.
20 GOTO 10
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.
In the first place (not growing up using BASIC) I don't understand how BASIC got so big as a programming language for beginners (even kids) without a GC.
Or maybe my searches just haven't turned up the right implementation or something.
I have the same issue with (Free)Pascal but I'm less surprised there because it's not like (apparently, since like I said this wasn't me) everyone as a kid learned to game program with Pascal the same way they did with BASIC.
8 bit home micros lacked more complex data structures.
And when they migrated to 16 bits, and grew structures, usually you couldn't do indirection with pointers/references, only have a single level of array of structures. For anything more complex you had to use indexes.
Pointers were only use for low level coding, changing specific memory locations.
Then by the time of VB and Real Basic, proper GC was already widespread among modern BASIC dialects.
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.
'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?
https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na...
10 PRINT "BOOBS" 20 GOTO 10
in all the department stores where I grew up...
10 print "hello"
has GOT to be the leader.
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).
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!
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]
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).
https://el.media.mit.edu/logo-foundation/resources/software_...
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.
GFX_LINE 100, 100, 200, 200
GFX_RECTF 300, 300, 400, 500
Is there a set of test programs for basic?
I'd 100% skip the line numbers and GOTO/GOSUB and build those two things. I grew up PDP BASIC and then VAX BASIC and the procedural aspect is what made it a great platform to write code. the line number/GOTO stuff is great for nostalgia, but a dead end for good coding practices.
PROCEDURE printfoo(bar%)
PRINT "foo: " + bar%
RETURN
FUNCTION double(number%)
RETURN number% * 2
ENDFUNC
' Prints "foo: 8"
printfoo(double(4))Unfortunately it then requires an editor, otherwise how do you overwrite/change a line?
Although, to be honest, in the spirit of making this a true "retro-computer", the idea of compiling the code into a custom bytecode is incredibly tempting. It'd be super fun to build, and also... that'd enable a DISASM command of some kind to dump arbitrary memory, as well as PEEK/POKE! Tons of work though.
https://github.com/skx/gobasic
Being standalone it doesn't have the graphic support or the interactivity, but it was still a fun project to work upon.
loop: print "boobies"
goto loop
That's all you need, much cleaner.He did not support '10 PRINT "HELLO"'
He did not implement BASIC.