Hacker News new | past | comments | ask | show | jobs | submit login
Commodore Basic as a Scripting Language for Unix and Windows – Now Open Source (pagetable.com)
22 points by FlyMoreRockets on Feb 28, 2021 | hide | past | favorite | 13 comments



I'd prefer the C128 BASIC. It had graphics and sound commands. That would be good to hook up SDL2 and make something interesting.

You could do the same for C64 basic but that was all peeks/pokes or something like SIMON's BASIC. These are doable using this project's C runtime if you chose to extend it such.

Interesting.

What about the license? Is Microsoft going to attack if you dare actually use this in a commercial or hobby project? Maybe.


> You could do the same for C64 basic but that was all peeks/pokes

That was my beef with C64 BASIC. Once you start peeking and poking in order to do anything interesting, are you really programming in BASIC?


Yeah, the whole peek/poke thing turned BASIC into a slow assembly language scripting language rather than actual BASIC language support. Still, it likely made the transition to assembly programming a little more straightforward for many.


> What about the license? Is Microsoft going to attack if you dare actually use this in a commercial or hobby project? Maybe.

Although they legally could, I really doubt they are going to start suing hobbyists. The legal expense and negative PR would outweigh any possible benefit.

(Commercial uses are a bigger risk, but even there, unless it gets to a certain scale, they probably won’t bother.)


Just chiming in with my experience in terms of Basic. I started with TRS-80 Coco 2 basic (Microsoft), then Amstrad CPC-464 (Microsoft), then Amiga (AMOS), then to PC with QBX 7.1, finally ended up in Visual Basic 1.0 - then all the way to VB end of life. Then Realbasic on the Mac.

My major friction with basic was OS integration. The Amstrad had "call", "peek" and "poke" which allowed you to call Z80 assembly, read and write to memory respectively. Ever since the amstrad doing anything outside of the interpreter which required OS calls or the like was extremely painful - mostly because of the lack of compatible types (byte, word and so-on). Making a call, passing parameters, and getting data back was always a nightmare that required a C wrapper or assembly work-around. It was a black art for the basic programmer. Back in the day I felt like an imposter; compiling my basic applications, statically linking libraries in the link and compressing and obfuscating... purely to hide my lack of skill... I was an imposter ;-)

Both QBX and VB had a healthy third-party library market, and I recall licensing some great QBX libraries for SVGA support back in the day (I was making through-the-window display systems with a capacitive switch I designed). VB was a little better, I recall relying on IP-Works for projects that required TCP/IP support. DLL distribution could be a pain if not handled right. Realbasic had MonkeyBread software's libraries for OS level integration.

So... hopefully I've established some credentials for being a Basic-head back in the day ;-) Which leads me to a recent experience with Basic that absolutely blew my mind and made me rethink my entire position as an old basic programmer.

Back in the day it was pure shame for me to be a basic programmer. It was slow, interpreted, and anyone in the Amiga community that was leet in any way could code in 68000 and basic programmers were lamers. It was the same all the way back and I've always felt like I was a second citizen back in the day... not only from my leet peers, but also from the OS vendors that treated basic programmers in the same way (BTW I'm over all that lamer stuff these days, I learned assembly for the TRS-80 and wrote a game over covid... my 10 year old self was vindicated!)...

But back to the main point... BBC BASIC! Over covid I got into RiskOS (always wanted an Acorn Archimedes) and played with BBC Basic. OMG! You can do ANYTHING at an OS level with this language, total first party support for all OS api's. Although these days I can program as a generalist in C and the rest; I can't help thinking that RiskOS and the BBC micro did it absolutely right in terms of the basic language. And perhaps this is why basic wasn't really taken seriously was everything to do with Microsoft... why wasn't basic given the same 1st party treatment as it is on RiscOS?

Apologies if my post seems a bit confusing - just a bit of catharsis on a Sunday morning :-) Interested to hear about other peoples opinions... I'm playing with the idea of a basic to Erlang translator... old habits die hard :-)


BBC micros were kind of special from all reports - I never used one. Apparently they had the ability to have an auxiliary processor added, RAM expansion etc etc. By all accounts they were well made and powerful.

BBC Basic had all the goodies for graphics and sound. Anyone up to make a version that compiles to C like this CBMBASIC project?


Shout out to PC-BASIC[1] which can be scripted across all three platforms in the style of GW-BASIC (as well, via SDL, supporting graphics and sound and all of those goodies).

[1] http://robhagemans.github.io/pcbasic/


I wrote a trivial BASIC interpreter too, in golang:

https://github.com/skx/gobasic


Been so long (we) forgot most of the syntax?

https://www.c64-wiki.com/wiki/C64-Commands

There's are links to the etext version (and many more, even the Transactor Archive) on this page:

http://www.devili.iki.fi/Computers/Commodore/C64/Programmers...


2008?

I guess this is interesting in a hobbyist/historian kind of mindset, which I totally understand, but Commodore Basic really wasn't one of the more interesting Basics out there, even for its time. My first computer was a C64 and I remember how frustrated I was at its Basic (with which I wrote my first program!) because it was primitive even compared to the ones included in other home computers of the time.

PS: to be fair, last time I said this on HN someone reminded me that the awesome game Sid Meier's Pirates! was written in C64 basic!


I remember being frustrated at Atari Basic (edited to remove reference to Microsoft Basic) for the Atari 8 bit computers as well. There was some instruction that worked differently (or didn't work) and so some of the programs I typed in from the books didn't work and I didn't have the skills to understand how to fix them at the time.

It was http://www.vintage-basic.net/games.html but I seem to recall there being a version with a red cover, though that might be just be faulty memories.


The Atari 8 bit had its own BASIC (Atari BASIC).

While Microsoft BASIC was available for the Atari 8 bit machines, it didn't come with them. You had to buy it separately. Not many did.


Holy cow; you're right. I always knew it as Atari BASIC, then later (apparently mistakenly) learned that it was made by Microsoft. I was referring to Atari BASIC above, not realizing my error.

Thank you!

I also had Basic-A+ from OSS. I seem to recall it had a few slight convenience items (and better disk commands), but that I wished I hadn't spent the exorbitant amount of money it cost me as a 12 year old.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: