4 ms·
Corral.BAS
- JSR_FDED 1y agoThe book this is from, David Ahl’s More BASIC Computer Games, was hugely influential on me when I was 12. After my parents sent me to bed I’d read it under the covers trying to imagine how the computer would behave at every step. Great times!
- musicale 1y agoIn addition to Dartmouth (which made BASIC available to other schools, including offering remote access), David Ahl evangelized BASIC while working for DEC, and ended up catalyzing the microcomputer revolution (which BASIC was a big part of): https://en.wikipedia.org/wiki/David_H._Ahl https://en.wikipedia.org/wiki/David_H._Ahl
- joombaga 1y agoI hope you share this story with your son https://youtu.be/pDHBqK8gc_E https://youtu.be/pDHBqK8gc_E
- nine_k 1y agoThis shows well what a terrible language BASIC was, and how you can write something interesting in it despite that fact, and despite the teletype nature of the input and output. (I wonder if the web-based interpreter supports INKEY$.)
- musicale 1y ago> This shows well what a terrible language BASIC was BASIC was conceived as a simplified, efficient, interactive equivalent to FORTRAN. Which is to say, it was extremely useful and effective! It met all of its design goals: Simplified: novices could learn the language in an afternoon. Efficient: the language was suitable for fast compilation (as in Dartmouth BASIC, where it compiled and executed the program when you typed "run") and efficient enough that a single 1960s minicomputer could support dozens of interactive BASIC users, and a simple BASIC interpreter could be implemented in a few kilobytes of memory on 1970s microcomputers. Interactive: unlike typical batch FORTRAN environments in the 1960s with decks of punched cards, the BASIC environment supported interactive entry, editing, and debugging as well as interactive execution on a print or display terminal. Equivalent to FORTRAN: Like FORTRAN, BASIC supported algebraic function entry, and was suitable for a wide range of programs. Dartmouth BASIC supported matrix operations for numerical computing as well as string functions for text processing. > A triumphant report by Kemeny and Kurtz indicated that 80 percent of the three incoming first-year classes who had arrived since BASIC’s invention [1964] –would have learned about computers by writing and debugging their programs. > “Anyone who tries to convince a Dartmouth undergraduate either that computers are to be feared or that they are of little use will be met with well-founded scorn,” https://history-computer.com/software/basic-programming-language-guide/ https://history-computer.com/software/basic-programming-lang... BASIC was largely supplanted by other languages, but it continued to evolve into things like Visual BASIC, which became a popular rapid development environment for GUI apps. Modern BASICs support modules, objects, and other features that you might expect. FORTRAN (now Fortran) has continued to evolve, and remains popular as a language for scientific and numerical computing, as it compiles into efficient code for CPUs and GPUs and scales from laptops to supercomputers.
- nine_k 1y agoI'm not objecting! I wrote many thousand lines of both classic BASIC (80, MSX, etc) and Fortran-66 (not even 77). Once I even wrote a BASIC version of some numerical methods assignment in a way that made it trivially easy to translate it to Fortran at the university. Modern Fortran is pretty great in its specific area, and is barely recognizable as a descendant of the ancient Fortran.
- BobbyTables2 1y agoI don’t disagree Basic had a huge impact. But we’re talking about a language that originally had no named parameters in subroutine calls… and no variable scoping. Basic almost makes assembly look good. I think the pendulum had swung too far when Basic was created.
- userbinator 1y agoYou may enjoy this: https://news.ycombinator.com/item?id=35882985 https://news.ycombinator.com/item?id=35882985 TLS 1.3 in VB6.
- nine_k 1y agoVB6 is highly advanced compared to, say, the BASIC-80-like language of the post. VB6 is a normal structured-programming language, more similar to Pascal than to BASIC. The example doesn't even have line numbers! (It does use plenty of GOTO though.)
- yeasku 1y agoAll the codding I did as kid was with QBASIC and a Pascal like language. I think it made it harder to adapt to more modern languages, but at the same time I would have never been able to start with C. I am self taugth and there were no C books around.
- ASalazarMX 1y ago> what a terrible language BASIC was Come on, it was great for the home computers of that era. It is terrible today, but it was great 50 (!) years ago.
- hulitu 1y ago> This shows well what a terrible language BASIC was Much better than python. /s
- canpan 1y agoCoincidentally I implemented a TinyBasic in C recently. Based on DrDobbs journals first issue. I ported HAMURABI over to it (I only have int math and some other parts were different). It is a great weekend project. Recommend.
- busfahrer 1y agoDo you need flex/bison for something like this, or is it small enough that you can take some shortcuts?
- TonyTrapp 1y agoEntire BASIC interpreters were shipped in the very size-constrained ROMs of almost all home computers of the 80s. There was no luxury of parser generators. It's absolutely simple enough that you can write the lexer and parser yourself.
- pjmlp 1y agoWhich, for historical context, is why while Dartmouth BASIC compiled to native before execution, all the 8 bit home computer systems with ROM BASIC were contrained to be plain interpreters. Although those with machines powerful enough to run CP/M, and having disk drives, could enjoy the access to compilers.
- musicale 1y ago> Although those with machines powerful enough to run CP/M, and having disk drives, could enjoy the access to compilers. Like the remarkable Turbo Pascal, which crammed a full IDE into 34KB.
- canpan 1y agoI built it as a plain single C file. You can find DrDobbs journal Vol 1 from 1976 with implementation ideas in the internet archive. It is a very retro approach. Just a fun side project. I am sure there are better ways to do it.
- indigodaddy 1y agoThis reminds me of an HN post about someone who implemented a basic interpreter into his TiddlyWiki site. It was super cool. Can't remember the site name though
- indigodaddy 1y agoFound it https://tiddlywiki-programming.neocities.org/TW_WWWBASIC https://tiddlywiki-programming.neocities.org/TW_WWWBASIC https://youtu.be/kNNjmha5Fzg https://youtu.be/kNNjmha5Fzg
- Kim_Bruning 1y ago#$^#$ How do you win this thing? I try getting close in single steps, it bolts. try getting close in big steps, it bolts. Try getting close, then going full speed the last bit ... it bolts. I get the idea this is a variant on a certain card game (nim?) , but somehow I'm getting the rules wrong?