| ▲ | Building my own Vi text editor in BASIC(leetusman.com) |
| 20 points by zeech a day ago | 6 comments |
| |
|
| ▲ | rmunn 29 minutes ago | parent | next [-] |
| 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"... :-) |
| |
| ▲ | icedchai 14 minutes ago | parent [-] | | I haven't written BASIC since I was a teenager! The more "modern" basics, without line numbers, were a definite improvement. I went from AppleSoft to AmigaBasic and QuickBasic. | | |
| ▲ | rmunn 8 minutes ago | parent [-] | | > The more "modern" basics, without line numbers, were a definite improvement. Never 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. |
|
|
|
| ▲ | JSR_FDED 13 minutes ago | parent | prev | next [-] |
| It’s a great learning project, and there’s nothing like building your own tools. |
|
| ▲ | globalnode an hour ago | parent | prev [-] |
| 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 |
| |
| ▲ | keithnz an hour ago | parent [-] | | I vibe coded my own SQL query tui client mostly for myself, when I wanted vim editing mode, I just asked for it, and it just worked for a huge amount of common vim editing motions/actions. I did have to prompt it to add a few more when things when I noticed they were missing. Sort of makes this kind of stuff trivial. However, coding it yourself is a great mental exercise |
|