Earlier quoted context omitted.
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.
I only use BASIC with line numbers, mostly GW-BASIC and pcbasic. Without numbers it just feels like Lua or python or any other scripting language, but worse? The line numbers BASICs come with their own almost-REPL (IDE?) that I find quite nice (or at least fun) to work in. Maybe mostly nostalgia, but it is the only reason for me to use BASIC at all. I have some basic-mode installed to edit BASIC code in emacs, but I…
Building my own Vi text editor in BASIC
41–50 of 53 posts
Re: Building my own Vi text editor in BASIC
#42Earlier quoted context omitted.
Laughing agreement. I’m very sentimental for BASIC. By 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
Classic Basic (line numbers, GOTO) resembles 1960s/1970s FORTRAN before it adopted structured programming. The idea when BASIC was invented in Dartmouth in the 1960s that it would be a good introduction to programming for students who might have to learn FORTRAN. The thing is, when BASIC was at its most popular (1980s home computers) FORTRAN itself had moved on from "spaghetti code".
I also started programming in BASIC, and moved on to Pascal when I discovered Turbo Pascal around 1983, which also happened to be the language most of my CS classes used a year later when I switched majors from foundering in EE to excelling in CS.
I still have a bunch of my BASIC programs from the day.
Re: Building my own Vi text editor in BASIC
#43Earlier quoted context omitted.
What's interesting about it precisely that despite the equivalence (Turing machines and all that) the difficulty to do one thing is a language versus another is what make it prohibitively hard. 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've had the unfortunate exercise of copying an API from pure android java to typescript because "they are similar". It goes against best practices and creates all kinds of weirdness resulting in a finished product which is almost the same but far enough away you could just as well have designed a better API in a few hours from scratch (the real complexity is in the backend of the code, not the interface fortunately)…
PS: the used here could be the next HN thread I opened, https://news.ycombinator.com/item?id=48047826
Re: Building my own Vi text editor in BASIC
#44One who has a true mastery of programming should be able to write any program in any language, or at least see how to do so, because one thinks in terms more abstract than language-specific constructs yet is able to map them to any language. Relatedly, here's TLS 1.3 in VB6: https://news.ycombinator.com/item?id=35882985
But you still need to know the language specific constructs. 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…
Programming in a language is finding what works in that language, you're right, but programming at all is trying to get what's in your head into the computer.
Re: Building my own Vi text editor in BASIC
#45Earlier quoted context omitted.
But you still need to know the language specific constructs. 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…
That's true, but the point the GP was getting at is, if you want to make a program that does xyz, you can do that in any complete language provided you have the mathematical reasoning to figure out how to make it happen. Whether you do that in an object-oriented manner because the language you're using makes that easy, or with some other paradigm. Programming in a language is finding what works in that language, you'…
Yes you have to understand the problem and state the solution, and that is a prerequisite to 'mastery' but I don't think that's everything that's required.
And this is just talking about the algorithm level. Is Ed equivalent to Emacs? They both do the same thing. Is a complicated solution that demonstrates your mastery better than a simple solution?
Re: Building my own Vi text editor in BASIC
#46One who has a true mastery of programming should be able to write any program in any language, or at least see how to do so, because one thinks in terms more abstract than language-specific constructs yet is able to map them to any language. Relatedly, here's TLS 1.3 in VB6: https://news.ycombinator.com/item?id=35882985
Re: Building my own Vi text editor in BASIC
#47In 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 le…
Re: Building my own Vi text editor in BASIC
#48In 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 le…
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.
Using AmigaBasic or other polished Basics doesn't seem very different than using something like Python.
Re: Building my own Vi text editor in BASIC
#49cant 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
Re: Building my own Vi text editor in BASIC
#50Earlier quoted context omitted.
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.
Yeah, AmigaBasic especially was when I felt that all the rough edges were sanded off, and it felt like a real language. Using AmigaBasic or other polished Basics doesn't seem very different than using something like Python.