logoalt Hacker News

Building my own Vi text editor in BASIC

26 pointsby zeechlast Tuesday at 5:18 PM10 commentsview on HN

Comments

rmunntoday at 12:38 AM

In BASIC? Why? Why would you do that to yourself?

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"... :-)

fortran77today at 2:09 AM

There's a little BASIC resurgance now. I've been having fun with this https://github.com/ReuvenSwirsky/erlbasic "Erlang BASIC" which implements a mini-computer style time sharing BASIC system in Erlang. There's a beta of it online now, running a more advanced version than the branch on github, that I'm having a lot of fun with.

I'll see if I can port this "Vi" to this flavor of BASIC.

fitsumbelaytoday at 1:12 AM

awesome project and cv.

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

JSR_FDEDtoday at 12:54 AM

It’s a great learning project, and there’s nothing like building your own tools.

globalnodeyesterday at 11:42 PM

cant tell if vibecoded or not, function comments seem slightly redundant, either way its a cool idea, cant wait to see the language server written in basic also :D

show 1 reply