One 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
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.
Building my own Vi text editor in BASIC
31–40 of 53 posts
Re: Building my own Vi text editor in BASIC
#32On 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.
Re: Building my own Vi text editor in BASIC
#33One 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
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.
Re: Building my own Vi text editor in BASIC
#34Earlier quoted context omitted.
even smart people say dumb things sometimes.
like "goto considered harmful" when all assembly language depends on it
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.
Re: Building my own Vi text editor in BASIC
#35Re: Building my own Vi text editor in BASIC
#36In 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…
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
Re: Building my own Vi text editor in BASIC
#37In 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.
Re: Building my own Vi text editor in BASIC
#38In 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.
Re: Building my own Vi text editor in BASIC
#39Earlier 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 had a little crisis at 12 when I went from BASIC to Pascal: how was that supposed to work without line numbers? The statements were just floating around without structure!
After all these decades, I finally learned that I wasn't the only one who struggled with line numbers from BASIC to Pascal. Thanks, buddy!
Re: Building my own Vi text editor in BASIC
#40In 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…
Awww. I downloaded the ECMA-55 standard from 1978 about a year ago and wrote an interpreter in C to be compliant with its "Minimal BASIC". I then had fun typing in code from old computer magazines. So much nostalgic fun.