Basicprogramming(.org) > Community news and announcements
"New" BASIC (based on MUSL)
Cybermonkey:
A few days ago I came across the MUSL (My Unstructured Scripting Language) interpreter. (https://github.com/wernsey/musl) It is a a small, embeddable BASIC interpreter in C. And it's freaking awesome because it's totally old school. Don't get me wrong, I also like my-basic from Wang but it's growing too fat IMHO and becoming too "modern".
So I just started adding a few functions which are namely ink, paper, cls and locate (based on a Linux conio lib). Yes, it's Linux and console only at the moment.
Oh, btw you can (but need not) use line numbers in your BASIC script.
Classic "Hello World" example:
--- Code: ---CLS
INK 11
LOCATE 25,2
PRINT "Cybermonkey presents:"
FOR i=0 TO 15 DO
INK i
PAPER 15-i
PRINT "Hello World!"
NEXT
--- End code ---
One thing to notice is that the FOR loop looks a bit as if derived from Pascal. Anyway if you won't compile it from source, I attach a Linux x64 binary with the examples and my added functions.
Oh, I forgot to mention that MUSL is also used in the awesome microme project:
Tomaaz:
https://www.youtube.com/watch?v=iyxm8cjMSCo
Aurel:
--- Quote --- I also like my-basic from Wang but it's growing too fat IMHO and becoming too "modern".
--- End quote ---
Yes Cyb ..i agree.
Old ..first version of Wang is minimal...
also "modern" ..it is still just console interpreter, right?
Cybermonkey:
--- Quote from: Aurel on May 11, 2019, 05:55:47 PM ---
--- Quote --- I also like my-basic from Wang but it's growing too fat IMHO and becoming too "modern".
--- End quote ---
Yes Cyb ..i agree.
Old ..first version of Wang is minimal...
also "modern" ..it is still just console interpreter, right?
--- End quote ---
Yes, with "modern" I mean things like OOP and lambda etc.
Tomaaz:
--- Quote from: Cybermonkey on May 11, 2019, 06:26:18 PM ---Yes, with "modern" I mean things like OOP and lambda etc.
--- End quote ---
Lambda? It's very important in Lisp and Lisp is one of the oldest languages.
Navigation
[0] Message Index
[#] Next page
Go to full version