EndBASIC
endbasic.dev
endbasic.dev
DX is a pretty low level API though. Unreal and Unity exist for a reason.
That's a choice. The hardware still supports it. It is still possible (and fast-ish and simple) to do graphics by blitting pixels.
I consider GPU acceleration a form of premature optimization - it adds complexity unnecessarily in many cases.
Here's my library for doing that on Windows and X11. https://github.com/abainbridge/deadfrog-lib
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.
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.
20 GOTO 10
Some form of jumping or function calls is the main feature that will drive the next release.
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?
COLOR r,g,b
Or add CSS like functions: COLOR rgba(…)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.
LOCATE 5, 5: PRINT "Hi"
should do the trick.
'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?
10 print "hello"
has GOT to be the leader.
https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na...
Yes indeed. The docs for VMS are great. Really cool environment.
On an unrelated note, have you seen this video yet?
I'm not surprised that the system lasted that long! VMS is legendary.
I've looked through the documentation for OpenVMS BASIC and it does seem like it was a nice platform.
The entire VMS system appears to be quite a comfy environment to have worked in. (DCL, help system, documentation, standard libraries, multiple languages (Pascal, C, BASIC))
10 PRINT "BOOBS" 20 GOTO 10
in all the department stores where I grew up...
The BBC Micro had a very similar mechanism.
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!
GFX_LINE 100, 100, 200, 200
GFX_RECTF 300, 300, 400, 500
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_...
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]
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.
Is there a set of test programs for basic?
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.
You know your project better than I do but unless there's something I don't understand going on, it really shouldn't be that hard.
You can also keep both backends around and just build a basic VM evaluator and start compiling simple expressions at a time to the VM version. I don't want to give you suggestions if you already know all that but also happy to chat if you are looking for a good plan. :D
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.
Unfortunately it then requires an editor, otherwise how do you overwrite/change a line?
With modern UI, there's pretty much no reason to do that, of course; with a retro style UI, there might be some marginal use.
(Also, supporting line numbers and line-oriented GOTO/GOSUB means you can directly use any of the libraries or classic code in that style; unwinding GOSUB/RETURN into named subs is trivial enough if it is otherwise clean, but unwinding GOTO-heavy code without having a working starting point isn't pleasant.)
PROCEDURE printfoo(bar%)
PRINT "foo: " + bar%
RETURN
FUNCTION double(number%)
RETURN number% * 2
ENDFUNC
' Prints "foo: 8"
printfoo(double(4))Personally I think SUB ... END SUB and FUNCTION ... END FUNCTION are the clearest syntax.
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.