Shop OBEX P1 Docs P2 Docs Learn Events
The Birth of BASIC — Parallax Forums

The Birth of BASIC

Interesting details of BASIC's birth & development at Dartmouth College in the 1960s. I bet a video about Chip's development of PBASIC would be equally fascinating to us Parallax fanboys.

«1

Comments

  • "...at the time, we didn't know it was supposed to be impossible." Gotta love it!

    Thanks for posting, Erco. That was a fascinating documentary.

    *8)
  • Thanks Eric, I enjoyed the video in your link.
  • Brought back memories of standing in line to get on the terminal at high school in ealy 70's. We were time sharing on a IBM360 at the university in town. I remember having to call them and have them mount our tape.
  • I haven't seen it, but I remember trying to grok BASIC on a time sharing setup at a community college that was trying to understand me, they didn't. Oddly enough at one point Westchester County was a UNIVAC shop, I suspect that they've become a different shop now. That college was, and still is, located there. They do have an amazing library though.
  • It was the first language I learned in High School. Took the farmer out of me and made me an electronic engineer.

    Mike
  • I like PureBasic, a modern, compiled, cross-platform Basic.
    Its got a Visual Designer if one wants VB6-like programming, and emits extremely small .exe's .
    Even has a free demo which does not time out for small 20-30KB programs.

    I still love when people get snobbish on Basic, and go on about either C/++, Java/Script, etc.

    I don't believe the vast majority of programs actually need some form of OOP, or a lot of the more esoteric paradigmatic whachamacallits.

    Many may, however most seem to use it because its whats taught and they force it.
  • My biggest problem with BASIC is that all of the implementations are different and at least somewhat incompatible with each other.
  • I don't miss these end70er's 4-12k ROM implementations of Microsoft BASIC on 8bitters with 1 or 2 letter variable names and more features missing than implemented.

    http://www.moria.de/~michael/bas is definitely worth a closer look.
  • ercoerco Posts: 20,254
    Any one who doesn't love BASIC can just GOTO blazes!

    JK... some people (Dijkstra) think GOTOs are bad... may lead to spaghetti code...

    Me, I like BASIC, GOTO, and spaghetti!

    https://stackoverflow.com/questions/46586/goto-still-considered-harmful
  • erco wrote: »
    Any one who doesn't love BASIC can just GOTO blazes!

    JK... some people (Dijkstra) think GOTOs are bad... may lead to spaghetti code...

    Me, I like BASIC, GOTO, and spaghetti!

    https://stackoverflow.com/questions/46586/goto-still-considered-harmful
    Did somebody say "spaghetti"? Yum

  • ercoerco Posts: 20,254
    Spaghetti-Gos!
  • WhitWhit Posts: 4,191
    LOVE that documentary.
  • erco wrote: »
    JK... some people (Dijkstra) think GOTOs are bad... may lead to spaghetti code...
    And into what does the compiler turn non spaghetti code? Code with JUMPs!

    Nah! There is no bad GOTO, there only is bad documentation and crippled languages. Line numbers instead of labels made writing readable code harder but it could be compensated and often ended in a comments to code ratio of 3:1 or even "better".

    "Modern" languages aren't GOTO free, they just disguise it a bit better.

    Comment, comment, comment and document!

    Use literate programming! Explain your code! Then no GOTO is a problem.
  • ercoerco Posts: 20,254
    Here's my 26-GOTO program which at least looks cool running on the simulation screen.

  • frank freedmanfrank freedman Posts: 1,975
    edited 2020-04-08 08:52
    Quite the history. But Prof. Kemeny's 20 year look ahead statement seems pretty prophetic. Based on this video (rather a thin thing to base an assumption on for sure), I don't think anything today would have surprised him, good or bad. This was really a great fill in the blank of where BASIC came from.

    Also, don't paint only BASIC with the GOTO brush. COBOL can be every bit as bad or worse. I went through a course sequence on IBM370 (JCL,assembler/COBOL)at CHUB institute in late 80s, a sort of ITT tech run by and primarily for the benefit of a similarly named insurance company (who probably liked the idea they could skim their pick of graduates whose performance they could evaluate before hire). And COBOL could be just as hideously loaded up with GOTOs. And COBOL programmers had a lot more time to get creative with GOTO......
  • I've been doing tons of Excel VBA for the last year or two to automate most of my work on this engagement.

    The standard is to use Public Functions, however I started using GoSub recently in place of that.
    Granted, most of these routines are only used inside their own macros. However its nice not to have to declare public scope variables, and have my program take a serious diet and looking slim with the gosub routines down below the macro end sub statement.

    If I think back to my Apple II days, then yes Goto and Gosubs were used to jump around in the main() more often then not, however thats called being a novice.
    Gosubs and Goto are built into every proc, so calling them dumb is.. rather dumb.

    Just need to be somewhat consistent in their use.
    Spending sometimes a fair bit of extra time trying to figure out how to code around unique situations in the name of No Goto/Gosub is almost form over function.
  • koehler wrote: »
    I like PureBasic, a modern, compiled, cross-platform Basic.
    Its got a Visual Designer if one wants VB6-like programming, and emits extremely small .exe's .
    Even has a free demo which does not time out for small 20-30KB programs.

    I still love when people get snobbish on Basic, and go on about either C/++, Java/Script, etc.

    I don't believe the vast majority of programs actually need some form of OOP, or a lot of the more esoteric paradigmatic whachamacallits.

    Many may, however most seem to use it because its whats taught and they force it.

    PureBasic is a really nice product. I have a license and have done a couple of small things with it. Unfortunately it has way too many differences for the sake of being different from VB, and I would have to rewrite tens or even hundreds of thousands of lines of legacy code to switch, and VB still works both on Windows (better than early versions of .NET) and in emulation via Wine. It is nice that PB can make DLL's and services, and I even used it to make a little DLL to solve VB's mysterious lack of support for integer shift and rotate functions.
  • I just watched the video last night. If you haven't seen it, please be sure to. The life story of John Kemeny (née János György Kemény), alone, makes it worth watching. Some of his math lectures were recorded and presented in brief in the video. I hope to access them in their entirety. If anyone can provide links to any of them, I would be eternally grateful.

    -Phil
  • yeti wrote: »
    I don't miss these end70er's 4-12k ROM implementations of Microsoft BASIC on 8bitters with 1 or 2 letter variable names and more features missing than implemented.
    IBM 5100 basic (1975) had an apparent "design by committee" feature. String variables were fixed at 18 characters. Supposedly (according to the IBM Field Engineer) because the average size of string variables in other code was this length. So, they saved 1 byte per string (not having to save the length value).
    Some programs packed multiple flags per string to save space & variables. Ugly code, but it worked.
    But the real pain was when you needed more than 18 characters, like for a name. Then you had to use 2 or more strings. And for input, you had to prompt the user like this (where "v" represents a down arrow):

    ENTER LAST NAME (MAX 25 CHARACTERS)
    "vvvvvvvvvvvvvvvvvv","vvvvvvv"

    "WATSON","" would be a typical entry. Not exactly user friendly.

    Not only did the user have to split the name after the 18th character... they also had to enter the double quotes and commas. With a flashing screen if they didn't get the syntax correct. And, for names with apostrophes, you had to double the character... which meant that the prompt no longer lined up with the input data.

    They did fix this with the 5110.

    P.S. The variables names were single characters with an optional single digit (A, A0, etc.)

  • Erco,

    GOTO's are bad in BASIC but you see them all the time in Assembly as Branches or Jumps.

    Don't forget that PBASIC 1.0 commonly used GOTO Main to create a main loop similar to what a lot of Assembly programs do.
  • There are so many ways to do infinite loops in a modern BASIC, e.g. in fastspin's BASIC you can do:
    10 print "hello"
    20 goto 10
    
    or
    do
      print "hello"
    loop
    
    or even
    sub forever(f as sub())
      f()
      forever(f)
    end sub
    forever([:print "hello!":])
    

    The first one is the most "intuitively obvious" to a newcomer, but the other two have their uses (recursion is great if you want to try to prove that your program works correctly!)
  • hmm - wouldn't the recursion example trash the stack at some point?

    curious,

    Mike
  • msrobots wrote: »
    hmm - wouldn't the recursion example trash the stack at some point?

    curious,

    Mike
    Tail recursion is often turned into iteration by optimizing compilers. I imagine that FastSpin will do this.

  • yetiyeti Posts: 818
    edited 2020-04-09 16:21
    msrobots wrote: »
    hmm - wouldn't the recursion example trash the stack at some point?
    `grep`ing through a clone of the repository:
    $ grep -irl 'tail recursion' spin2cpp
    spin2cpp/doc/basic_tutorial.md
    
  • David Betz wrote: »
    msrobots wrote: »
    hmm - wouldn't the recursion example trash the stack at some point?

    curious,

    Mike
    Tail recursion is often turned into iteration by optimizing compilers. I imagine that FastSpin will do this.

    That's correct, the tail recursion gets turned by the compiler into a GOTO. So the stack will never overflow

  • ercoerco Posts: 20,254
    As a college freshman (BSME, Virginia Tech), I had a single FORTRAN class, absolutely loved it (I see FORTRAN & BASIC nearly the same). Computer punch cards, yada yada yada. Worst thing was we freshmen couldn't run our program card decks ourselves. Had to rubber band the 12 punch cards together and give to the prof, who would return our decks & green/white stripe paper printouts the following day. Certainly a slow way to debug a program!

    The reason? A previous freshman had a program error (GOTO?) which resulted in an infinite "paper advance" loop, which caused the giant industrial fanfold printer to "shoot a parabolic arc of paper" rapidly across the room, sending people diving for cover. :) "That guy" ruined it for everyone.
  • erco wrote: »
    As a college freshman (BSME, Virginia Tech), I had a single FORTRAN class, absolutely loved it (I see FORTRAN & BASIC nearly the same). Computer punch cards, yada yada yada. Worst thing was we freshmen couldn't run our program card decks ourselves. Had to rubber band the 12 punch cards together and give to the prof, who would return our decks & green/white stripe paper printouts the following day. Certainly a slow way to debug a program!

    The reason? A previous freshman had a program error (GOTO?) which resulted in an infinite "paper advance" loop, which caused the giant industrial fanfold printer to "shoot a parabolic arc of paper" rapidly across the room, sending people diving for cover. :) "That guy" ruined it for everyone.
    I stuck with FORTRAN and never learned COBOL because I noticed that all of the students in the COBOL classes walked around with big boxes of punched cards. The FORTRAN students had decks that were usually not more than an inch or so thick. I'm not sure if that was because COBOL is so much more verbose or if it was because the COBOL students had big data sets along with their programs. Maybe some of each.

  • localrogerlocalroger Posts: 3,451
    edited 2020-04-09 20:28
    I took the last course in FORTRAN offered at my community college which required us to submit punched cards for the DEC PDP-10. The next semester even freshmen got access to the VAX CRT terminals. I did all my projects first in BASIC, on my home computer, and converted to FORTRAN when done. My last program refused to compile. I brought it to the professor who examined it and told me that yes, I had done it correctly and it should run, and he would give me credit for it.

    Ever since then I have been the guy who will find the bug in your development system.

    Which brings me to why I use VB6 for all new PC development even today. It is perfectly functional on every version of Windows and the WINE emulator and so completely finished and debugged that it doesn't need support from its creator. (this cannot at all be said for any version of .NET, by the way.) There is in fact only one bug I have ever found in VB6. If you create a complex data structure which includes variable length string elements, declare an array of that type, and pass one element of that array to another function as an non-array argument of that type, this works in the IDE but fails in a compiled executable, with the function receiving blank data. But if you create a standalone (even local) variable of the type, assign the array element to that variable, and pass that standalone non-array variable to the function, it works.

    This drove me crazy the first time it bit me. Today I regard it as the single flaw in a fine Persian rug, which is there because only God is allowed to be perfect.
  • ercoerco Posts: 20,254
    localroger wrote: »
    I did all my projects first in BASIC, on my home computer, and converted to FORTRAN when done.

    Localroger that : My Dad was into TRS-80s. He had a few (maybe computer hoarding is in my DNA) and loaned me one towards the end of my class. What a difference and luxury that CRT made! I briefly considered switching to Computer Science, but my heart was in mechanical engineering.

  • localroger wrote: »
    I took the last course in FORTRAN offered at my community college which required us to submit punched cards for the DEC PDP-10. The next semester even freshmen got access to the VAX CRT terminals. I did all my projects first in BASIC, on my home computer, and converted to FORTRAN when done. My last program refused to compile. I brought it to the professor who examined it and told me that yes, I had done it correctly and it should run, and he would give me credit for it.

    Ever since then I have been the guy who will find the bug in your development system.

    Which brings me to why I use VB6 for all new PC development even today. It is perfectly functional on every version of Windows and the WINE emulator and so completely finished and debugged that it doesn't need support from its creator. (this cannot at all be said for any version of .NET, by the way.) There is in fact only one bug I have ever found in VB6. If you create a complex data structure which includes variable length string elements, declare an array of that type, and pass one element of that array to another function as an non-array argument of that type, this works in the IDE but fails in a compiled executable, with the function receiving blank data. But if you create a standalone (even local) variable of the type, assign the array element to that variable, and pass that standalone non-array variable to the function, it works.

    This drove me crazy the first time it bit me. Today I regard it as the single flaw in a fine Persian rug, which is there because only God is allowed to be perfect.
    When I learned FORTRAN there were no home computers. However, I did get to take a Teletype ASR-33 home once and could log into the university computer and run BASIC that way.

Sign In or Register to comment.