Relatedly, here's TLS 1.3 in VB6: https://news.ycombinator.com/item?id=35882985
On another non-compatible but really small Basic, check NMH BASIC 3:
https://www.t3x.org/nmhbasic/index.html
Compile it under Unix (or windows with w64devkit):
cc -o tcvm tcvm.c
Run primes.bas: tcvm basic primes.bas
NMH BASIC III - 7599 BYTES FREE
#3 = primes.bas
OK
load #3
Also, as it's T3X0 code, you might be able to port and run under DOS
and CP/M. Yes, you read it right. By default I didn't compile it to Unix
native 32/64 bit with T3X/0 because it NMH Basic requires a 16 bit machine/interpreter. But if it's cross-compiled to a 16 bit DOS or CP/M, it
will run native.Show up what you can do. Port scoundrel, for instance:
https://codeberg.org/luxferre/scoundrel-ports
I already doing that to JimTCL and it's a piece of cake.
speaking of which, I was pleased to see FORTH in there. not that I've ever used it but I was introduced to it in the early 90s and it's cool to see that it's still useful
really enjoying your site content
Don't get me wrong, if he enjoys writing code in BASIC, I'm not going to tell him to stop having fun. It would be silly to tell some random stranger "You're having fun wrong!" (Even if I totally think he's having fun wrong. Grin). If he's having fun with it, go for it.
But man, I looked at the code and got flashbacks. The bad kind. BASIC was the first language I learned when I was a kid, and it's what taught me programming (because after typing "LOAD WIZARD.BAS", I could type "LIST" instead of typing "RUN" and I could actually see what the program was doing. So I learned by reading other people's code. And The Wizard's Castle was pretty good for a BASIC program: it had subroutines, a multi-dimensional map stored in a single-dimensional array (and an actual function defined to convert X,Y,Z coordinates to an index in the array!), and so on. So I am grateful to BASIC for teaching me programming.
And I never, never, NEVER want to write another line of BASIC code again in my life.
But if he enjoys doing so, good for him. I'll just sit here muttering under my breath "But he's still having fun wrong"... :-)
I'll see if I can port this "Vi" to this flavor of BASIC.
If one is "just" translating something that is idiomatic to a language to something that is not in another, it might take 100x for lines for codes in a way that is terribly hard to understand.
I can't magically speak German because I know a load of abstract language theory.
And this can work the opposite way. If I know small talk, and then read that C++ can do OO code, I could then think about writing X in C++ and OO being the best model. But I then hit problems when the limitations of OO in C++ become apparent.
In my experience, programming in a language is finding what works in that language, not trying to make the language fit what is in your head.
?Illegal function call
OkBy the standard of getting kids started it’s an amazing and wildly successful language.
By any other standard, it is absolutely terrible! It commits every famous programming sin! Stay away! Do not learn from this language! LOL
10 PRINT "THIS IS FINE"
20 GOTO 10Never used them, and yet I can unquestioningly agree. The way you had to number each line in increments of 10 so that you could insert a line 15 later in between lines 10 and 20 was, looking back at it, insane.
I can understand why they did it. In the era of no full-screen text editors, where you just typed each line one at a time into a REPL (not that I knew the term REPL at the time), and it stored the lines in the order of their lines numbers... well, that was the only way to edit your code. Made a mistake on line 20? Type a brand-new line 20 and it will replace the old line 20. Want to insert a line between lines 10 and 20? Type in line 15 and it will go and insert. So you could actually load your program, edit your code at the REPL, and save it.
But man, using an actual visual editor is so, so, SO much better than that system. I'm glad it's on the dust heap of programming history where it belongs. It was a decent option for the time when computers had 4K of RAM, but once it was actually possible to edit code in a full-screen editor, line numbers were no longer useful.
Look at how acceptable C has changed over the years.
In ye old days it was acceptable to just read in any old text without checking bounds, now that is considered harmful.
There are still use cases for hairier parts of C, but that doesn't mean they should be used all the time. Same with goto.
This is a post about my new text editing program yvi.
I like reinventing wheels. At least I do when it comes to making things like art , craft, food, or code. It’s how I learn. And it’s how I can shape tools or work to fit my own mind. I think because my background is in art, and because I didn’t formally learn Computer Science, despite the fact that I teach it, my software has a bit of a handmade feel to it.
As a case in point, I’ve built my own static website creator panblog when I grew frustrated with other more well-known alternatives that were clunky, poorly documented, or bloated pieces of software.
I’m also drawn to programming languages and paradigms that are a bit out of step with the mainstream and especially silicon valley’s current conception of software. For example, I love glue languages, languages and libraries for learners, and am a fan of scripting languages. My favorites are Lua, Bash, Fish, Forth-likes and BASIC.
Last year I spent a couple months researching and writing BASIC, specifically the Yabasic dialect, which is about a quarter century old and continously maintained. While I’ve been recommended by online friends to try out some other variants, I’ve found it easy to use and well-documented. It’s not the greatest for building graphical user interfaces, at least in my experience, but I use L5, or Processing-p5 libraries for that.
For a modern BASIC, it’s quite fun to use. I made my own cyber-hoss racing game , a command line game inspired by the UFO50 and Flash game Quibble Race. I also tinkered with the internals of the text version of The Oregon Trail, and built a clone, a simple version of Dope Wars economic simulation game.
Recently I came across The People’s Permacomputer, a project by Vidak, which led me to the online home for a great active BASIC Programming forum and various linked projects to build a 1970s style computer from scratch. I’ve been using Neovim (and before that, Vim) for years and years. I’ve never made a text editor before. But I decided it could be fun to try to implement my own. Vi seemed like a tall order to implement, but I’ve been using Offpunk, a small simple (arguable what this means) TUI client for browsing the internet including the world wide web and Gemini protocol. It has just a few implemented shortcuts like h/j/kl and g and G and others for moving around. So inspired by this, I thought I could likely build an ULTRA simple editor with a mininum of Vim commands. How hard could it be?
Well, it wasn’t too hard! With Yabasic in a hundred lines of code or so I quickly implemented the basic layout of a minimal blank page and added in those simple Vi commands for moving around and switching between insert and normal modes. I added the ability to open a file or start a new one. And to save. This was satisfying as I was now able to open the actual code for my vi.bas program and poke around and edit it. An early decision I made was what to do about wrapping. I decided to not have it as that simplified my program. As a compromise, you can write as much as you want on a line, but it only displays up to 80 chars, and in the status line at the bottom it shows your line number and character number.

So that become more usable. But then I wanted to be able to navigate forward and backwards by words, ending, jump to the beginning or end of a line, in addition to program start (‘gg’) and end, ‘G’. I also wanted the ability to delete a line with ‘dd’ so I added in multiple characters, the ability to compose commands together, add number combinations (only 1 - 9 currently), a search feature, and the scope of the program grew to about 500 lines. I added ‘u’ for most recent edit/line undo.
Later I added many more commands like ‘S’ (overwrite line), ‘c’ (cut and insert), and more. And I’ve put it to good use, working on coding projects and as a text editor for my writing. This post itself is written in the yvi editor.
At this point, I’m not sure where I should stop, and the program may still continue to evolve, but it’s hit a pretty good point and is usable now. Certainly there are a variety of bugs, and I don’t recommend it for anything important or that would be catastrophic if lost! I’m writing this in yvi itself, and the program seems to have the features implemented that I need to feel useful. I’m proud I’ve built my own text editor, that works well for basic writing and simple programs, and that can be extended.
It may not be beautiful code, but it’s functional and easily alterable. It’s not only the best Vi clone I’ve found written in a BASIC implementation, I think it’s the only one!
You can try it out today.