🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #623701

Re: The birth of BASIC

#623701
From: Scott Lurndal
Date: Thu, 07 Jun 2018 19:10
52 lines
4536 bytes
usenet@only.tnx (Questor) writes:
>On Wed, 6 Jun 2018 16:58:25 -0400, Peter Flass <peter...@yahoo.com> wrote:
>>Questor <usenet@only.tnx> wrote:
>>> On Mon, 04 Jun 2018 09:19:42 -0400, Dan Espen <dan1...@gmail.com> wrote:
>>>> Peter Flass <peter...@yahoo.com> writes:
>>>>> Gareth's Downstairs Computer
>>>>> <headstone255.but.n...@yahoo.com> wrote:
>>>>>> On 03/06/2018 22:40, Peter Flass wrote:
>>>>>>> 
>>>>>>> Some problems are easily solved by recursion that are significantly more
>>>>>>> complicated otherwise.
>>>>>> 
>>>>>> I would be interested to know some examples, please?
>>>>> 
>>>>> Depth-first search of a binary tree. Top-down parsing.
>>>>> 
>>>>> Anything that requires retracing a path thru a data structure. Without
>>>>> recursion you have to maintain a table to keep track of where you've been
>>>>> and where you're going. Recursion just handles it naturally.
>>>> 
>>>> Yes, but using a table, the application has some way of detecting
>>>> running out of storage.  For example, if the table depth is
>>>> exceeded, the application can attempt to allocate a larger table
>>>> and then fail with a message when storage is exceeded.
>>>> With recursion, you eventually run out of storage but with
>>>> any language I am familiar with it your program just dies.
>>> 
>>> DEC hardware can trap stack overflows (and underflows).  That facility doesn't
>>> always make it into HLLs, nor the ability to do something about them.
>>
>>It's the doing something that's a problem. OS/2 used a "guard page" on the
>>stack (hardware trap). You could set it to trap on accesses to the bottom
>>page or so of the stack, so when the stack was *almost* used up you got
>>notified, in time to do something. Once the stack is full, it's too late.
>
>If you were serious about attempting to recover from a stack overflow, the first
>thing the trap routine would do is exchange the stack pointer for a new one
>pointing to sufficient pre-allocated stack space to attempt obtaining more
>memory for a bigger stack and/or saving important information and exiting
>gracefully.

e.g. sigaltstack for catching SIGSEGV.

>
>You might do this in a language like BLISS or C, and of course assembly.  Not
>so much in FORTRAN or COBOL.
>
>Usually in the course of program development, one gets a sense of how much
>stack space is required for normal operation.  Subsequent overflows or
>underflows are probably the result of a programming error uncovered by an
>obscure condition not encountered during testing.
>
Technical Details
Message-ID: <pqfSC.264852$Hv4.65609@fx39.iad>
Path: mbox-mo1.pugleaf.net!f20-v6ni3686itd.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!news.albasani.net!fu-berlin.de!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post02.iad!fx39.iad.POSTED!not-for-mail
References: <874lisvjda.fsf@usenet.ankman.de> <PcqdnYC22cafaI7GnZ2dnUU78S3NnZ2d@giganews.com> <pf1188$q8f$3@dont-email.me> <358405364.549754306.026362.peter_flass-yahoo.com@news.eternal-september.org> <pf2rlv$kq0$1@dont-email.me> <1147666797.549800491.480189.peter_flass-yahoo.com@news.eternal-september.org> <pf3e9e$738$1@dont-email.me> <5b18165a.2135540@news.dslextreme.com> <385211570.550010674.490472.peter_flass-yahoo.com@news.eternal-september.org> <5b197c80.5476875@news.dslextreme.com>

Show Full Headers
Complete Article Headers
X-Received: by 2002:a6b:ee11:: with SMTP id i17-v6mr1424920ioh.37.1528398615015;        Thu, 07 Jun 2018 12:10:15 -0700 (PDT)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 2002:a6b:7002:: with SMTP id l2-v6ls414542ioc.24.gmail; Thu, 07 Jun 2018 12:10:14 -0700 (PDT)
X-Received: by 2002:a6b:b548:: with SMTP id e69-v6mr1414516iof.70.1528398614345;        Thu, 07 Jun 2018 12:10:14 -0700 (PDT)
MIME-Version: 1.0
Path: mbox-mo1.pugleaf.net!f20-v6ni3686itd.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!news.albasani.net!fu-berlin.de!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post02.iad!fx39.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: sl...@pacbell.net
Subject: Re: The birth of BASIC
Newsgroups: alt.folklore.computers
References: <874lisvjda.fsf@usenet.ankman.de> <PcqdnYC22cafaI7GnZ2dnUU78S3NnZ2d@giganews.com> <pf1188$q8f$3@dont-email.me> <358405364.549754306.026362.peter_flass-yahoo.com@news.eternal-september.org> <pf2rlv$kq0$1@dont-email.me> <1147666797.549800491.480189.peter_flass-yahoo.com@news.eternal-september.org> <pf3e9e$738$1@dont-email.me> <5b18165a.2135540@news.dslextreme.com> <385211570.550010674.490472.peter_flass-yahoo.com@news.eternal-september.org> <5b197c80.5476875@news.dslextreme.com>
Lines: 52
Message-ID: <pqfSC.264852$Hv4.65609@fx39.iad>
X-Complaints-To: ab...@usenetserver.com
NNTP-Posting-Date: Thu, 07 Jun 2018 19:10:13 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 07 Jun 2018 19:10:13 GMT
X-Received-Bytes: 3726
X-Received-Body-CRC: 228177327
Bytes: 4063
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit