🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #623700

Re: The birth of BASIC

#623700
From: Questor
Date: Thu, 07 Jun 2018 18:42
47 lines
4552 bytes
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.

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: <5b197c80.5476875@news.dslextreme.com>
Path: mbox-mo1.pugleaf.net!n13-v6ni16895wmc.0!nntp.google.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.68.MISMATCH!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad!fx01.iad.POSTED!not-for-mail
References: <874lisvjda.fsf@usenet.ankman.de> <fnammmFl3d5U4@mid.individual.net> <pep9gi$ssu$1@dont-email.me> <877enj7cme.fsf@usenet.ankman.de> <2111hdh5qbjo4o6ot3n9cuqfgk1pqdn8ck@4ax.com> <86ad7a17-fbd3-4056-98aa-91e1b38932ce@googlegroups.com> <1778842547.549582573.514335.peter_flass-yahoo.com@news.eternal-september.org> <-8-dnaDqYe0JXo_GnZ2dnUU78bmdnZ2d@giganews.com> <68034291-0143-4693-b8fe-755df7f87322@googlegroups.com> <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>

Show Full Headers
Complete Article Headers
X-Received: by 2002:adf:fe47:: with SMTP id m7-v6mr314451wrs.20.1528397015237;        Thu, 07 Jun 2018 11:43:35 -0700 (PDT)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 2002:a1c:f512:: with SMTP id t18-v6ls485249wmh.10.gmail; Thu, 07 Jun 2018 11:43:34 -0700 (PDT)
X-Received: by 2002:a1c:c181:: with SMTP id r123-v6mr338125wmf.2.1528397014683;        Thu, 07 Jun 2018 11:43:34 -0700 (PDT)
MIME-Version: 1.0
Path: mbox-mo1.pugleaf.net!n13-v6ni16895wmc.0!nntp.google.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.68.MISMATCH!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad!fx01.iad.POSTED!not-for-mail
From: usenet@only.tnx (Questor)
Newsgroups: alt.folklore.computers
Subject: Re: The birth of BASIC
Organization: random access
Reply-To: usenet@only.tnx
Message-ID: <5b197c80.5476875@news.dslextreme.com>
References: <874lisvjda.fsf@usenet.ankman.de> <fnammmFl3d5U4@mid.individual.net> <pep9gi$ssu$1@dont-email.me> <877enj7cme.fsf@usenet.ankman.de> <2111hdh5qbjo4o6ot3n9cuqfgk1pqdn8ck@4ax.com> <86ad7a17-fbd3-4056-98aa-91e1b38932ce@googlegroups.com> <1778842547.549582573.514335.peter_flass-yahoo.com@news.eternal-september.org> <-8-dnaDqYe0JXo_GnZ2dnUU78bmdnZ2d@giganews.com> <68034291-0143-4693-b8fe-755df7f87322@googlegroups.com> <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>
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 48
X-Complaints-To: abu...@dslextreme.com
NNTP-Posting-Date: Thu, 07 Jun 2018 18:43:33 UTC
Date: Thu, 07 Jun 2018 18:42:43 GMT
X-Received-Bytes: 3873
X-Received-Body-CRC: 4008839815
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit