News for hackers. Stuff that matters.
Re:EndBASIC by jmmv on Thursday September 14, 2023 @10:32PM (#37517566)
Hey, author of EndBASIC here. Surprised to see this bubble up to the front page again :D Previous discussion from June 2022 in: https://news.ycombinator.com/item?id=37495166

I did significant work on the project back then until Jan 2023... but I haven’t had a chance to work on it at all since then -- another side project (https://endtracker.azurewebsites.net/) is keeping me busy in my scarce free time. I still have many plans to work on this though, and they are itching because working on EndBASIC is super fun.

My next addition will probably be to pick up the Raspberry Pi I have around here and a tiny LCD I bought specifically for EndBASIC, and then make the console show up on it. Up next might be audio, or a “boot to EndBASIC” disk image for the Pi. We’ll see. Open to ideas.

More details in the about page (https://www.endbasic.dev/about.html) or in the EndBASIC section of my blog (https://jmmv.dev/tags/endbasic/).

Otherwise... AMA!

Re:EndBASIC by jamiek88 on Thursday September 14, 2023 @11:07PM (#37517818)
AMA: How do you plan to go about the 'boot to basic' aspiration? Do you have a plan in your mind yet?

I'd be super interested in this.

I'd love to have or contribute to a computer that is instant on almost like the old BBC B's and Spectrum that opens to a basic interpreter but also gives you assembly access for those times basic just won't do. This should vibe with your DOS environment too.

There's no reason we couldn't have a BASIC ecosystem around that kinda like pico-8 but hardware.

With constraints comes creativity!

Thanks!!

Re:EndBASIC by jmmv on Thursday September 14, 2023 @11:41PM (#37518055)
Ideally I'd like to do a baremetal build... but... that's a ton of effort. In particular because of the cloud storage features, which would require network drivers, TCP/IP, and the like.

So the easiest plan of attack is to build an image with a Linux kernel and essentially put EndBASIC as the init process. Obviously not exactly like this, because needs to be some sort of setup steps and tools to get the network going and the like, but there is no need for much more. Eventually though, you'd even imagine built-in BASIC commands to deal with the WiFi, bypassing the need for external tools.

As for assembly, I have conflicting thoughts there. Since I moved the interpreter to bytecode at the end of last year, I _do_ want to expose direct access to the "assembly" language and memory from the interpreter (PEEK and POKE!). But due to the multiplatform and didactic nature of EndBASIC, exposing the underlying assembly (x86, arm, etc.) doesn't seem the right idea. What I'm thinking is to compile to WASM everywhere, and leverage the WASM VM in the browser and implement a simple one for the console. But the other alternative is RISC-V...

Re:EndBASIC by jamiek88 on Friday September 15, 2023 @12:21AM (#37518385)
Thanks for sharing your thoughts.

Yeah bare metal is hard that's why it made me sit up a bit when I read your comment.

PEEK AND POKE was precisely what I was thinking of!

I guess there could be a layer of psuedo-assembly that has a common target across platforms but easier said than done. WASM is interesting and RISC-V just got my mind racing which lead to thinking about FPGA's etc!

Sorry, getting a bit carried away these are just thoughts not requests :D

but how cool would it be to have a RISC-V processor either on or coupled with an FPGA for 'ROM' that booted directly into Endbasic and gave bare metal access.

You're talking full time team there though probably or certainly someones life work.

EDIT: Sorry I somehow missed your second paragraph re: linux init etc which makes a ton of sense.

A long time ago a crazy friend and I tried to write a wifi 'driver' for BBC basic using the socklib library and got surprisingly far (in emulation).

Re:EndBASIC by ithkuil on Friday September 15, 2023 @03:17AM (#37519609)
Perhaps a unikernel based on something like mirageos or another unikernel people would suggest here?
Re:EndBASIC by jmmv on Friday September 15, 2023 @08:57AM (#37522232)
Perhaps. Or https://en.wikipedia.org/wiki/Rump_kernel also comes to mind.
Re:EndBASIC by _joel on Friday September 15, 2023 @10:12AM (#37523240)
It's elixir, but this provides a lot of nice tooling https://nerves-project.org/
Re:EndBASIC by logicalshift on Friday September 15, 2023 @07:29AM (#37521416)
RISC OS is still available for the Raspberry Pi. You get to basic by pressing F12 and typing ‘BASIC’, and it has a built-in ARM assembler already - the manuals are all available online, there’s a BASIC manual and the Programmers Reference Manual for the whole OS.

(It’s exactly like a BBC B because this is the same version of BASIC, ported to ARM, it even emulates some of the hardware because back in the day they wanted to make software run without porting)

In theory typing ‘*CONFIGURE LANGUAGE 20’ (BASIC being module 20) should make it into a machine that boots straight to BASIC but when I tried it just now it just ignores the setting because the keyboard drivers aren’t loaded soon enough.

Re:EndBASIC by asicsp on Friday September 15, 2023 @04:35AM (#37520142)
Re:EndBASIC by jmmv on Friday September 15, 2023 @08:27AM (#37521935)
Oh yes, thanks. Bad copy/paste late at night.
Re:EndBASIC by anta40 on Friday September 15, 2023 @08:20AM (#37521863)
"but it can also feel lacking in some scenarios"

Just curious: what features are available in QB but not available (yet) in EB?

Re:EndBASIC by jmmv on Friday September 15, 2023 @08:31AM (#37521975)
Many, really. QuickBASIC is very complete. You can easily install it in DosBOX to take a look, or download QB64 (https://qb64.com/) for a similar but more modern experience.

Some specifics that are in my mind as "must haves" are user-defined functions, file I/O, records (aka structs), syntax checking / interactive help in the editor...