Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : In Memoriam: Thomas E. Kurtz, 1928–2024
Author | Message | ||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
I haven't noticed mention of the passing of Thomas Kurtz here. Who? One of the co-creators of BASIC. Maybe what we are using now shouldn't have the same name as what was created 60 years ago, but I'm sure many careers came to be because of early exposure to BASIC. The Apple][ was what got me started. Thank you, Thomas Kurtz. ============== I came across the following, which I found interesting: A Sermon concerning the Divinity of Languages; or, Dijkstra considered Racist an epistle from the Rt. Rvd. Pastor Manul Laphroaig, for the Beloved Congregation of the First United Church of the Weird Machines Generating Sounds As you have seen, PEEK (-16336) clicks the speaker of the APPLE ][. POKE -16336,0 will also click the speaker, and any program which repeatedly PEEKs or POKEs the address -16336 will produce a steady tone. Figure 4: Excerpt from Apple ][ Basic Programming (1978) Indulging in some of The Pastor’s Finest, I proclaim to my congregation that there is divinity in every programming language. ———— “But,” they ask, “if there is divinity in all languages, where is the divinity in PHP? Though advertised as a language for beginners, it is impossible for even an expert to code in it securely.” Pouring myself another, I say, “PHP teaches us that memory-safe string concatenation is just as dangerous as any stupid thing a beginner might do in C, but a hell of a lot easier to exploit. My point is not in that PHP is so easy to write, as it isn’t easy to write safely; rather, the divinity of PHP is in that it is so easy to exploit! Verily I tell you, dozens of neighbors who later learned to write good exploits first learned that one program could attack another by ripping off SQL databases through poorly written PHP code. “If a language like PHP introduces so many people to pwnage, then that is its divinity. It provides a first step for children to learn how program execution goes astray, with control and data so easy to mangle.” ———— “But,” they ask, “if there is divinity in all languages, where is the divinity in BASIC? Surely we can mock that hellish language. Its line numbers are ugly, and the gods themselves laugh at how it looks like spaghetti.” Pouring myself another, I proclaim, “The gods do enjoy a good laugh, but not at the expense of BASIC! While PHP is aimed at college brogrammers, BASIC is aimed at children. Now let’s think this through carefully, without jumping to premature conclusions. “BASIC provides a learning curve like a cardboard box, in that when trapped insider a clever child will quickly learn to break out. In the first chapter of a BASIC book, you will find the standard Hello World. 10 PRINT "Hello World" “Groan if you must, but stick with me on this. In the sixth chapter, you will find something like the following gem. 250 REM This cancels ONERR in APPLE DOS 260 POKE 216, 0 “Sit and marvel,” I say, “at how dense a lesson those two lines are. They are telling a child to poke his finger into the brain of the operating system, in order to clear an APPLE DOS disk error. How can C or Haskell or Perl or Python begin to compete with such educational talent? How advanced must you be in learning those languages to rip a constant out of the operating system’s brain, like PEEK(222) to read the error status or POKE 216, 0 to clear it?” A student then asks, “But the code is so disorganized! Professor Dijkstra says that all code should be properly organized, that GOTO is harmful and that BASIC corrupts the youth.” Pouring myself another, I say “Dijkstra’s advice goes well enough if you wish to program software. It is true that BASIC is a horrid language for writing complex software, but consider again the educational value in spaghetti code. “Dijkstra says that a mind exposed to BASIC can never become a good programmer. While I trust his opinions on algorithms, his thoughts on BASIC are racist horse sh*t. “A mind which has *not* been exposed to BASIC will only with great difficulty become a reverse engineer. What does a neighbor who grew up on BASIC spaghetti code think when he first reads unannotated disassembly? As surely as the gostak distims the doshes, he knows that he’s seen worse spaghetti code and this won’t be much of a challenge! “Truly, I am in as much awe of the educational genius of BASIC as I am in awe of the incompetence of the pedagogues who lock children in a room with a literate adult for a decade, finding those children to still be unable or unwilling to read at the end. Lock a child in a room with an APPLE ][ and a book on BASIC, and in short order a reverse engineer will emerge. “There is divinity in all languages, but BASIC might very will be the most important for teaching our profession.” ———— “But,” they ask, “if there is divinity in all languages, where is the divinity in Java?” Pouring myself another, I drink it slowly. “The lesson is over for today.” Visit Vegipete's *Mite Library for cool programs. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2108 |
basically basic is not basic. it's evolved to different versions that are incompatible and not easy to convert. for micro controllers picaxe,greatcowbasic,mmbasic converting programs is not easy. rant |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6757 |
BASIC <geological term: contains little silica> Baginners All-purpose Symbolic Instructional Code Originally designed as a programming language to teach beginners how to increment line numbers. Thanks, Stan Kelly Bootle. :) The problem doesn't lie with BASIC, Stan, it lies with the uncontrolled way in which people have modified it for different platforms. In fact, GCBASIC, MMBasic, Commodore Basic, Apple Basic and BBC Basic are so close to the original BASIC that *at that level* the code is virtually interchangeable providing you stick to single character integers. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
Hi, The 1964 basic did not provide many commands and functions. And honestly these are with minor differences still present in all Basics. The famous 10 Print "Hello World" 20 Goto 10 Is a good example. This will work in any Basic. Differences eroded from the desire to expand basic. Basic wasn't enough. Enhanced it should become, but still called Basic. Hence the lingual differences. One desired better graphics commands, others required advance math functions, some requested IO control functions. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6757 |
Yep. BASIC was never intended to interface to anything. It was designed to be used from a teletype or "glass teletype" (terminal) to teach beginners the very basic steps of processing commands. People forget what the original intention was. It wasn't a programming language at all, it was an educational tool, easier to teach than assembler. All it had to do was read a keyboard and print numbers on the screen. It's very unfair to slate "BASIC" as being a failed programming language. If the code is poor and unstructured is that the fault of the language or the programmer? You can write really bad code in C, assembler, PHP, Java or probably any of the lower level languages - the ones where you can actually get the system to do things rather than only choose commands from a list of "safe" ones. All the above are capable of trashing the OS. They can also be programmed using good structuring, making maintenance easy. "There are three things a man must do before his time is done. Write two lines of APL and make the bu66ers run!" (Devil's DP Dictionary) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 851 |
Since the mid-80s (QuickBasic, TurboBasic), for me, it has been: Brilliantly Advanced Structured Instruction Code I use lots of Basics and I don't care about the syntax differences because there is still nothing better for RAD (rapid application development) I'm not able to become a programming wizard because every day I find myself jumping from pneumatics to hydraulics to electrics to mechanics to business admin. But when I need code, at least I understand good logic/structure and most importantly, safety (I see some scary stuff from PLC "engineers") Not wanting to ruffle any feathers on TBS, I don't talk about SmallBasic but it's an awesome cross-platform interpreter that has a packager (not a compiler). If I want a Windows/Linux/RPi front-end for my Mites, this is what I'll use because I love interpreters. Documentation and support isn't great but hardly required. I have had a lot of fun over the past few decades with those who turn their nose up at Basic because I have been shipping product while they haven't gotten past first base |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 851 |
homa had it covered |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 851 |
Funny how an assembly programmer is well respected |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3797 |
Dijkstra helped a lot to get spaghetti code seen as highly undesirable. His complaint about BASIC was fair in terms of what BASIC was at the time: a stripped-down language made to fit in a resource-poor computer. Now that so many BASICs are not really Basic any more (they've got IF THEN ELSE, WHILE DO, etc), he'd perhaps be happier - not fully happy I imagine because many/most of them have quite poor data structures. (BTW I've seen well-structured assembly language. Its portability sucks, though, and it does take a lot of statements to do what would be only a few lines in a high level language.) John |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
Dijkstra was wrong. All great achievements before him used spaghetti code. In a resource (memory) poor environment this is the way to put much functionality in. Regardless the nice flow charts for the Apollo guidance computer, the actual code was spaghetti. Plenty of examples. Only when give abundant resources, a luxury, you can instruct to not use spaghetti. So his advise is to demand more resources, to avoid spaghetti. And stop about GOTO. At low level every processor has a JMP instruction, and compilers use it abundantly. But writing high level code you are not aware. These are my few Pennie’s to the discussion. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6757 |
Spaghetti code isn't necessarily bad in every case. When you are squeezing a Tiny Basic interpreter into a 1K or (if you are rich) 2K EPROM you'll discover that the richness of mis-using the Z80 registers in a tangle of code gets the job done. :) It may be virtually impossible to support and disassemblers will choke on it, but it's highly unlikely that it will ever be modified or extended anyway. GOTO can be an elegant structure when used correctly. It can make the code much simpler and easy to follow. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 851 |
Totally agree. I have a BASIC compiler that actually translates directly to asm. I wrote a piece of code involving a DO-LOOP and it was all very pretty but the generated asm code gobbled-up way more clocks than I wanted. I re-wrote the BASIC code using a GOTO (label) which translated to a JMP and the asm output was so tight that there was no-way to hand optimize it. |
||||
Print this page |