Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Superior ability breeds superior ambition. -- Spock, "Space Seed", stardate 3141.9


computers / comp.os.vms / Re: DEC Basic and dynamic memory ?

SubjectAuthor
* DEC Basic and dynamic memory ?Simon Clubley
+* Re: DEC Basic and dynamic memory ?seasoned_geek
|`* Re: DEC Basic and dynamic memory ?Simon Clubley
| +* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| |`* Re: DEC Basic and dynamic memory ?Simon Clubley
| | `* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| |  `* Re: DEC Basic and dynamic memory ?Simon Clubley
| |   +- Re: DEC Basic and dynamic memory ?Arne Vajhøj
| |   `* Re: DEC Basic and dynamic memory ?Dave Froble
| |    +- Re: DEC Basic and dynamic memory ?Arne Vajhøj
| |    `* Re: DEC Basic and dynamic memory ?Simon Clubley
| |     `- Re: DEC Basic and dynamic memory ?Dave Froble
| +* Re: DEC Basic and dynamic memory ?Dave Froble
| |`- Re: DEC Basic and dynamic memory ?Simon Clubley
| `- Re: DEC Basic and dynamic memory ?Arne Vajhøj
+* Re: DEC Basic and dynamic memory ?Arne Vajhøj
|`* Re: DEC Basic and dynamic memory ?Dave Froble
| +* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| |`* Re: DEC Basic and dynamic memory ?Simon Clubley
| | +* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| | |`* Re: DEC Basic and dynamic memory ?Simon Clubley
| | | +* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| | | |`* Re: DEC Basic and dynamic memory ?Simon Clubley
| | | | +- Re: DEC Basic and dynamic memory ?Arne Vajhøj
| | | | `- Re: DEC Basic and dynamic memory ?Dave Froble
| | | `* Re: DEC Basic and dynamic memory ?Dave Froble
| | |  `* Re: DEC Basic and dynamic memory ?Simon Clubley
| | |   +- Re: DEC Basic and dynamic memory ?Arne Vajhøj
| | |   +- Re: DEC Basic and dynamic memory ?Craig A. Berry
| | |   `* Re: DEC Basic and dynamic memory ?Dave Froble
| | |    `* Re: DEC Basic and dynamic memory ?Arne Vajhøj
| | |     `* Re: DEC Basic and dynamic memory ?Dave Froble
| | |      `- Re: DEC Basic and dynamic memory ?Simon Clubley
| | `* Re: DEC Basic and dynamic memory ?Bill Gunshannon
| |  `- Re: DEC Basic and dynamic memory ?Arne Vajhøj
| `- Re: DEC Basic and dynamic memory ?Arne Vajhøj
+- Re: DEC Basic and dynamic memory ?Dave Froble
+- Re: DEC Basic and dynamic memory ?Stephen Hoffman
`* Re: DEC Basic and dynamic memory ?Richard Maher
 `- Re: DEC Basic and dynamic memory ?VAXman-

Pages:12
Re: DEC Basic and dynamic memory ?

<j5p13cF88pdU1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20470&group=comp.os.vms#20470

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (Bill Gunshannon)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Sun, 30 Jan 2022 21:50:20 -0500
Lines: 16
Message-ID: <j5p13cF88pdU1@mid.individual.net>
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net HHbXGTdajfSZn7hMR6BY8Q0YnAnbEYQRnYfm4ZRVIBIBdMmrOg
Cancel-Lock: sha1:ZAKCupgichHJp0Tn98fNTtq5aYE=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Content-Language: en-US
In-Reply-To: <st78fe$cu9$4@dont-email.me>
 by: Bill Gunshannon - Mon, 31 Jan 2022 02:50 UTC

On 1/30/22 18:54, Simon Clubley wrote:
> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 1/29/2022 12:16 AM, Dave Froble wrote:
>>
>>> Arne, I have difficulty following your code examples.  Is it me, or you?
>>
>
> Well, Arne didn't use line numbers so that may be throwing you. :-)
>

Line Numbers? That is so Microsoft BASIC.... :-)

bill

Re: DEC Basic and dynamic memory ?

<61f75001$0$701$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20472&group=comp.os.vms#20472

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Sun, 30 Jan 2022 21:57:05 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: DEC Basic and dynamic memory ?
Content-Language: en-US
Newsgroups: comp.os.vms
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<j5p13cF88pdU1@mid.individual.net>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <j5p13cF88pdU1@mid.individual.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 15
Message-ID: <61f75001$0$701$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 770cf4ab.news.sunsite.dk
X-Trace: 1643597825 news.sunsite.dk 701 arne@vajhoej.dk/68.9.63.232:59307
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 31 Jan 2022 02:57 UTC

On 1/30/2022 9:50 PM, Bill Gunshannon wrote:
> Line Numbers?  That is so Microsoft BASIC....  :-)

I believe it goes back to Dartmouth Basic. But yes -
GW-Basic (and supposedly BASICA as well) used this.
In all due respect to MS then QBasic/QuickBasic,
Visual Basic and Visual Basic.NET does not have them
(QBasic/QuickBasic supposedy allowed them for
compatibility).

Arne

Re: DEC Basic and dynamic memory ?

<st8o2f$ch7$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20489&group=comp.os.vms#20489

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 13:26:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <st8o2f$ch7$2@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me> <82991c18-6e6f-4fd6-a1f5-faf8492d7938n@googlegroups.com> <st77v4$cu9$3@dont-email.me> <st7c9l$b7u$1@dont-email.me>
Injection-Date: Mon, 31 Jan 2022 13:26:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a62e9b046f46f9d318db962801f8fbe";
logging-data="12839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19B/4oJJizFNe/MNnW/YiI9vC1IWuZB6vg="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:pdA2Zeq/D47yy+NgRu1g3Vgp/vg=
 by: Simon Clubley - Mon, 31 Jan 2022 13:26 UTC

On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
> On 1/30/2022 6:45 PM, Simon Clubley wrote:
>> On 2022-01-28, seasoned_geek <roland@logikalsolutions.com> wrote:
>>>
>>> Oh, you don't like it as a doubly linked list?
>>>
>>> RECORD SOME_RECORD
>>> STRING IN_USE=1%
>>> STRING SOME_KEY_VALUE=15%
>>> INTEGER LEFT_NODE
>>> INTEGER RIGHT_NODE
>>> INTEGER PARENT_NODE
>>> STRING WHOLE_LOT_OF_STUFF=255%
>>> ! other fields
>>> END RECORD
>>>
>>> You can even redimension if need be.
>>
>> If _that's_ how you do a tree in DEC Basic, then yuck, yuck, yuck!!!
>
> Are you trying to show some bias?
>

No. Given Arne's original comments, I approached this with an open mind,
but I have been left seriously unimpressed with how you appear to have
to build a tree structure in Basic.

> Some people show you some very simple uses of the RECORD statement, and because
> they are not fleshed out, you don't see the use. Hey, i do this for
> compensation, cough up some money and I'll write any application you want in Basic.
>

It's not the record. It's how you have to link them together in a linear
backing structure. That would be like trying to create a tree structure
using a Vector as the backing structure in some other programming languages.

> Basically (sic) the RECORD statement is a method of defining structures, and it
> can be very flexible. Also understandable. Can you say that about C?
>

Yes you can, both for C and especially Pascal.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: DEC Basic and dynamic memory ?

<st8ok3$ch7$3@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20491&group=comp.os.vms#20491

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 13:36:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <st8ok3$ch7$3@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me> <61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me> <61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me> <61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me> <61f73556$0$703$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 13:36:03 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a62e9b046f46f9d318db962801f8fbe";
logging-data="12839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zySqVVNctsvYRiYqylg88JPyYWtZqYH0="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:4RxFFxAo7E8u65Y+CKQQkgea17I=
 by: Simon Clubley - Mon, 31 Jan 2022 13:36 UTC

On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>> in Fortran in any language. :-)
>>>>
>>>> Thanks for the demo program Arne.
>>>>
>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>> doing it in C or Pascal.
>>>
>>> Ugly or just unfamiliar?
>>
>> Ugly because of all the tree management stuff you have to do for
>> yourself that you get for free in C or Pascal.
>
> What is all the tree management stuff?
>

When you prune the tree, you have to mark the pruned nodes as deleted
in the backing storage instead of just directly removing them from the
tree and giving the memory back to the language RTL for later reuse.

When you later want to add nodes to the tree, you have to search the
backing storage looking for deleted nodes to reuse.

In addition, you have to grow the backing storage manually when there
are no more spare nodes available and you have to pick values for
initial_size and growth_increment based on your expected application
requirements.

You don't have to do any of this in your code in C or Pascal.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: DEC Basic and dynamic memory ?

<st8pb3$ch7$5@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20496&group=comp.os.vms#20496

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 13:48:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <st8pb3$ch7$5@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me> <82991c18-6e6f-4fd6-a1f5-faf8492d7938n@googlegroups.com> <st77v4$cu9$3@dont-email.me> <61f72543$0$698$14726298@news.sunsite.dk> <st78vs$cu9$5@dont-email.me> <61f728c2$0$703$14726298@news.sunsite.dk> <st79m3$cu9$7@dont-email.me> <st7cq4$e4g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 13:48:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a62e9b046f46f9d318db962801f8fbe";
logging-data="12839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+q3TgmfVlFDq0ZHeKPjcDxHxrrZRPT3+k="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:gRrrt/1gDfDPnXgazhxdKu7h2UE=
 by: Simon Clubley - Mon, 31 Jan 2022 13:48 UTC

On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
> On 1/30/2022 7:14 PM, Simon Clubley wrote:
>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>> On 1/30/2022 7:03 PM, Simon Clubley wrote:
>>>> There's also the required copying of the
>>>> current data every time you grow the tree.
>>>
>>> That is common practice in many languages for dynamic
>>> sized data structures needing linear backing.
>>>
>>
>> But elsewhere you have the choice of whether to use something
>> like a Vector or if you need to build a tree structure yourself.
>>
>> Specifying the growth increment of a linear structure is also
>> a tradeoff but you are not forced to use a linear structure if
>> you can build real trees and that's a better choice.
>>
>> Simon.
>>
>
> Where do you come up with the idea that in Basic the nodes in a tree must be
> linear? They rarely are. There usually are forward and backward pointers in a
> linked list / tree. Logically linear, but not physically linear.
>

Read again David. Arne and I am talking about the backing storage
required by DEC Basic being linear.

> You're not appearing very knowledgeable Simon.
>

I've done this kind of thing quite a few times. There's a reason
why I chose this example to see how it would be implemented in DEC Basic.

So yes, I know exactly what I am talking about.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: DEC Basic and dynamic memory ?

<st8pob$ch7$6@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20497&group=comp.os.vms#20497

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 13:55:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <st8pob$ch7$6@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me> <61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me> <61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me> <61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me> <st7ct6$e4g$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 13:55:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a62e9b046f46f9d318db962801f8fbe";
logging-data="12839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wMs1DYrR2E+JZmZvM0JwIMBqrxZ4/MhY="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:WY2rXh3g0Y5qC7b9fGZ2rtEnajw=
 by: Simon Clubley - Mon, 31 Jan 2022 13:55 UTC

On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>> in Fortran in any language. :-)
>>>>
>>>> Thanks for the demo program Arne.
>>>>
>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>> doing it in C or Pascal.
>>>
>>> Ugly or just unfamiliar?
>>>
>>
>> Ugly because of all the tree management stuff you have to do for
>> yourself that you get for free in C or Pascal.
>>
>> In addition, there's the overhead of copying the tree everytime
>> you run out of allocated spare space and need to extend it.
>
> Bullshit! Just not true.
>

Arne's example makes it very clear that when you run out of spare nodes
in your backing storage in DEC Basic, and hence have to grow the backing
storage by the growth increment, you have to do a copy of the existing data.

How would you grow the existing backing storage without either you or
the DEC Basic RTL doing a copy of the existing data when you extend it
by the growth increment ?

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: DEC Basic and dynamic memory ?

<61f7f4e9$0$706$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20501&group=comp.os.vms#20501

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Mon, 31 Jan 2022 09:40:36 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: DEC Basic and dynamic memory ?
Content-Language: en-US
Newsgroups: comp.os.vms
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<61f73556$0$703$14726298@news.sunsite.dk> <st8ok3$ch7$3@dont-email.me>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <st8ok3$ch7$3@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 55
Message-ID: <61f7f4e9$0$706$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 16bf2ee0.news.sunsite.dk
X-Trace: 1643640042 news.sunsite.dk 706 arne@vajhoej.dk/68.9.63.232:52325
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 31 Jan 2022 14:40 UTC

On 1/31/2022 8:36 AM, Simon Clubley wrote:
> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>> in Fortran in any language. :-)
>>>>>
>>>>> Thanks for the demo program Arne.
>>>>>
>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>> doing it in C or Pascal.
>>>>
>>>> Ugly or just unfamiliar?
>>>
>>> Ugly because of all the tree management stuff you have to do for
>>> yourself that you get for free in C or Pascal.
>>
>> What is all the tree management stuff?
>
> When you prune the tree, you have to mark the pruned nodes as deleted
> in the backing storage instead of just directly removing them from the
> tree and giving the memory back to the language RTL for later reuse.
>
> When you later want to add nodes to the tree, you have to search the
> backing storage looking for deleted nodes to reuse.

Ah - the tree management stuff that was not there.

(it was an add only tree)

You would probably not search for deleted node to reuse. You would
add to the top and then do a selective copying when top reaches
capacity. Almost a GC concept.

> In addition, you have to grow the backing storage manually when there
> are no more spare nodes available and you have to pick values for
> initial_size and growth_increment based on your expected application
> requirements.

It adds a little code.

But the values are not a big issue. It is an extremely widely
used concept.

> You don't have to do any of this in your code in C or Pascal.

There is a little extra code. But not particular scary.

Arne

Re: DEC Basic and dynamic memory ?

<61f7f533$0$706$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20502&group=comp.os.vms#20502

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Mon, 31 Jan 2022 09:41:55 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: DEC Basic and dynamic memory ?
Content-Language: en-US
Newsgroups: comp.os.vms
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <st8pob$ch7$6@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 44
Message-ID: <61f7f533$0$706$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 16bf2ee0.news.sunsite.dk
X-Trace: 1643640115 news.sunsite.dk 706 arne@vajhoej.dk/68.9.63.232:52325
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 31 Jan 2022 14:41 UTC

On 1/31/2022 8:55 AM, Simon Clubley wrote:
> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>> in Fortran in any language. :-)
>>>>>
>>>>> Thanks for the demo program Arne.
>>>>>
>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>> doing it in C or Pascal.
>>>>
>>>> Ugly or just unfamiliar?
>>>>
>>>
>>> Ugly because of all the tree management stuff you have to do for
>>> yourself that you get for free in C or Pascal.
>>>
>>> In addition, there's the overhead of copying the tree everytime
>>> you run out of allocated spare space and need to extend it.
>>
>> Bullshit! Just not true.
>
> Arne's example makes it very clear that when you run out of spare nodes
> in your backing storage in DEC Basic, and hence have to grow the backing
> storage by the growth increment, you have to do a copy of the existing data.
>
> How would you grow the existing backing storage without either you or
> the DEC Basic RTL doing a copy of the existing data when you extend it
> by the growth increment ?

I don't know if it the only way.

But it is one way and it works fine.

Arne

Re: DEC Basic and dynamic memory ?

<st920c$6ce$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20511&group=comp.os.vms#20511

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 10:16:10 -0600
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <st920c$6ce$1@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Jan 2022 16:16:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d2c9e5c5e7696643217358d06a3edb63";
logging-data="6542"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SGzg75fwx3TomZwIRrC3dsEBBj3FO1a4="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.5.1
Cancel-Lock: sha1:j6BnKYCrsCa4hcGPCTNF4iYOUgQ=
In-Reply-To: <st8pob$ch7$6@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Mon, 31 Jan 2022 16:16 UTC

On 1/31/22 7:55 AM, Simon Clubley wrote:
> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>> On 1/30/2022 7:09 PM, Simon Clubley wrote:

>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>> doing it in C or Pascal.
>>>>
>>>> Ugly or just unfamiliar?
>>>>
>>>
>>> Ugly because of all the tree management stuff you have to do for
>>> yourself that you get for free in C or Pascal.
>>>
>>> In addition, there's the overhead of copying the tree everytime
>>> you run out of allocated spare space and need to extend it.
>>
>> Bullshit! Just not true.
>>
>
> Arne's example makes it very clear that when you run out of spare nodes
> in your backing storage in DEC Basic, and hence have to grow the backing
> storage by the growth increment, you have to do a copy of the existing data.
>
> How would you grow the existing backing storage without either you or
> the DEC Basic RTL doing a copy of the existing data when you extend it
> by the growth increment ?

It's DEC BASIC, and it's not going to run on anything but VMS, so the
reasonable thing to do would be to use the RTL routines for tree
handling that Hoff mentioned way upthread. If for some reason you
insist on rolling your own, you could certainly use LIB$GET_VM and
friends to allocate nodes as you need them and have exactly the same
algorithm you would have in C.

The fact that BASIC dynamic memory handling makes porting the compiler
more difficult (the original thread topic) has nothing to do with
whether it's the best thing to use for any particular purpose. For tree
handling, probably not, though it certainly can be done as has been
demonstrated.

Re: DEC Basic and dynamic memory ?

<st92p0$l97$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20514&group=comp.os.vms#20514

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 11:28:45 -0500
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <st92p0$l97$2@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me>
<82991c18-6e6f-4fd6-a1f5-faf8492d7938n@googlegroups.com>
<st77v4$cu9$3@dont-email.me> <61f72543$0$698$14726298@news.sunsite.dk>
<st78vs$cu9$5@dont-email.me> <61f728c2$0$703$14726298@news.sunsite.dk>
<st79m3$cu9$7@dont-email.me> <st7cq4$e4g$1@dont-email.me>
<st8pb3$ch7$5@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 16:29:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae5ed13710ccd4c3c10b0c89063cf886";
logging-data="21799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TDwOqHFVkjFwXkgjBm63B1hsyqAk8HHM="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Z6aOey0gvdm5kPElpC60atF/nsc=
In-Reply-To: <st8pb3$ch7$5@dont-email.me>
 by: Dave Froble - Mon, 31 Jan 2022 16:28 UTC

On 1/31/2022 8:48 AM, Simon Clubley wrote:
> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>> On 1/30/2022 7:14 PM, Simon Clubley wrote:
>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 1/30/2022 7:03 PM, Simon Clubley wrote:
>>>>> There's also the required copying of the
>>>>> current data every time you grow the tree.
>>>>
>>>> That is common practice in many languages for dynamic
>>>> sized data structures needing linear backing.
>>>>
>>>
>>> But elsewhere you have the choice of whether to use something
>>> like a Vector or if you need to build a tree structure yourself.
>>>
>>> Specifying the growth increment of a linear structure is also
>>> a tradeoff but you are not forced to use a linear structure if
>>> you can build real trees and that's a better choice.
>>>
>>> Simon.
>>>
>>
>> Where do you come up with the idea that in Basic the nodes in a tree must be
>> linear? They rarely are. There usually are forward and backward pointers in a
>> linked list / tree. Logically linear, but not physically linear.
>>
>
> Read again David. Arne and I am talking about the backing storage
> required by DEC Basic being linear.

Logically yes, physically no.

>> You're not appearing very knowledgeable Simon.
>>
>
> I've done this kind of thing quite a few times. There's a reason
> why I chose this example to see how it would be implemented in DEC Basic.
>
> So yes, I know exactly what I am talking about.
>
> Simon.
>

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: DEC Basic and dynamic memory ?

<st9315$tks$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20515&group=comp.os.vms#20515

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 11:33:05 -0500
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <st9315$tks$1@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<61f73556$0$703$14726298@news.sunsite.dk> <st8ok3$ch7$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 16:33:42 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae5ed13710ccd4c3c10b0c89063cf886";
logging-data="30364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Q5HpFnJoWyfkSxrdhVAGEzA59NgFZ8Sk="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:clzu7jXzTKRiRVkVspkbZeapv3I=
In-Reply-To: <st8ok3$ch7$3@dont-email.me>
 by: Dave Froble - Mon, 31 Jan 2022 16:33 UTC

On 1/31/2022 8:36 AM, Simon Clubley wrote:
> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>> in Fortran in any language. :-)
>>>>>
>>>>> Thanks for the demo program Arne.
>>>>>
>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>> doing it in C or Pascal.
>>>>
>>>> Ugly or just unfamiliar?
>>>
>>> Ugly because of all the tree management stuff you have to do for
>>> yourself that you get for free in C or Pascal.
>>
>> What is all the tree management stuff?
>>
>
> When you prune the tree, you have to mark the pruned nodes as deleted
> in the backing storage instead of just directly removing them from the
> tree and giving the memory back to the language RTL for later reuse.
>
> When you later want to add nodes to the tree, you have to search the
> backing storage looking for deleted nodes to reuse.

If you're suggesting a linear search, I guess you never considered a stack of
unused nodes upon which one could push and pop nodes.

> In addition, you have to grow the backing storage manually when there
> are no more spare nodes available and you have to pick values for
> initial_size and growth_increment based on your expected application
> requirements.
>
> You don't have to do any of this in your code in C or Pascal.
>
> Simon.
>

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: DEC Basic and dynamic memory ?

<st93bp$55i$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20516&group=comp.os.vms#20516

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 11:38:45 -0500
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <st93bp$55i$1@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 16:39:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae5ed13710ccd4c3c10b0c89063cf886";
logging-data="5298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192yrvfb2u8U3nHh77+fzPdeh4defDoEF0="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:x7eHMHY8y0ZSTL8S+6IvcRt7CPc=
In-Reply-To: <st8pob$ch7$6@dont-email.me>
 by: Dave Froble - Mon, 31 Jan 2022 16:38 UTC

On 1/31/2022 8:55 AM, Simon Clubley wrote:
> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>> in Fortran in any language. :-)
>>>>>
>>>>> Thanks for the demo program Arne.
>>>>>
>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>> doing it in C or Pascal.
>>>>
>>>> Ugly or just unfamiliar?
>>>>
>>>
>>> Ugly because of all the tree management stuff you have to do for
>>> yourself that you get for free in C or Pascal.
>>>
>>> In addition, there's the overhead of copying the tree everytime
>>> you run out of allocated spare space and need to extend it.
>>
>> Bullshit! Just not true.
>>
>
> Arne's example makes it very clear that when you run out of spare nodes
> in your backing storage in DEC Basic, and hence have to grow the backing
> storage by the growth increment, you have to do a copy of the existing data.

Arne tried to provide a simple and quick and dirty example. Doesn't have to be
that way. Would not be that way in well designed code.

The nice thing about links is that the storage does not have to be linear.

> How would you grow the existing backing storage without either you or
> the DEC Basic RTL doing a copy of the existing data when you extend it
> by the growth increment ?

I'd just point to additional storage.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: DEC Basic and dynamic memory ?

<61f81700$0$699$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20520&group=comp.os.vms#20520

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Mon, 31 Jan 2022 12:06:07 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Subject: Re: DEC Basic and dynamic memory ?
Content-Language: en-US
Newsgroups: comp.os.vms
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me>
<st93bp$55i$1@dont-email.me>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <st93bp$55i$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 55
Message-ID: <61f81700$0$699$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7ae93d6e.news.sunsite.dk
X-Trace: 1643648769 news.sunsite.dk 699 arne@vajhoej.dk/68.9.63.232:60323
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 31 Jan 2022 17:06 UTC

On 1/31/2022 11:38 AM, Dave Froble wrote:
> On 1/31/2022 8:55 AM, Simon Clubley wrote:
>> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>>> languages and me with no Basic experience wrote some Basic code -
>>>>>>> that
>>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>>> in Fortran in any language.  :-)
>>>>>>
>>>>>> Thanks for the demo program Arne.
>>>>>>
>>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>>> doing it in C or Pascal.
>>>>>
>>>>> Ugly or just unfamiliar?
>>>>>
>>>>
>>>> Ugly because of all the tree management stuff you have to do for
>>>> yourself that you get for free in C or Pascal.
>>>>
>>>> In addition, there's the overhead of copying the tree everytime
>>>> you run out of allocated spare space and need to extend it.
>>>
>>> Bullshit!  Just not true.
>>
>> Arne's example makes it very clear that when you run out of spare nodes
>> in your backing storage in DEC Basic, and hence have to grow the backing
>> storage by the growth increment, you have to do a copy of the existing
>> data.
>
> Arne tried to provide a simple and quick and dirty example.  Doesn't
> have to be that way.  Would not be that way in well designed code.
>
> The nice thing about links is that the storage does not have to be linear.
>
>> How would you grow the existing backing storage without either you or
>> the DEC Basic RTL doing a copy of the existing data when you extend it
>> by the growth increment ?
>
> I'd just point to additional storage.

I am sure there are other possible designs.

But a single contiguous array is a simple design.

And it seems primitive but it is not as bad as it seems.

Arne

Re: DEC Basic and dynamic memory ?

<st9elk$3v6$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20545&group=comp.os.vms#20545

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Mon, 31 Jan 2022 14:51:45 -0500
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <st9elk$3v6$1@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me>
<61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me>
<61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me>
<61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me>
<st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me>
<st93bp$55i$1@dont-email.me> <61f81700$0$699$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jan 2022 19:52:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae5ed13710ccd4c3c10b0c89063cf886";
logging-data="4070"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Mh2FGJctoj5MASKMJOjDNRBem8/5hRYs="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:aX2cO7A6fCyUcIBZTmY/3St+9vc=
In-Reply-To: <61f81700$0$699$14726298@news.sunsite.dk>
 by: Dave Froble - Mon, 31 Jan 2022 19:51 UTC

On 1/31/2022 12:06 PM, Arne Vajhøj wrote:
> On 1/31/2022 11:38 AM, Dave Froble wrote:
>> On 1/31/2022 8:55 AM, Simon Clubley wrote:
>>> On 2022-01-30, Dave Froble <davef@tsoft-inc.com> wrote:
>>>> On 1/30/2022 7:09 PM, Simon Clubley wrote:
>>>>> On 2022-01-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>> On 1/30/2022 6:54 PM, Simon Clubley wrote:
>>>>>>> On 2022-01-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>>>>>> In this case Simon outlined a problem where Pascal and C are obvious
>>>>>>>> languages and me with no Basic experience wrote some Basic code - that
>>>>>>>> is almost ensure an "unsual style". Or to put it another way: I am
>>>>>>>> (or was) a Fortran programmer and Fortran programmers can program
>>>>>>>> in Fortran in any language. :-)
>>>>>>>
>>>>>>> Thanks for the demo program Arne.
>>>>>>>
>>>>>>> The approach you are forced to use in DEC Basic is way more ugly than
>>>>>>> doing it in C or Pascal.
>>>>>>
>>>>>> Ugly or just unfamiliar?
>>>>>>
>>>>>
>>>>> Ugly because of all the tree management stuff you have to do for
>>>>> yourself that you get for free in C or Pascal.
>>>>>
>>>>> In addition, there's the overhead of copying the tree everytime
>>>>> you run out of allocated spare space and need to extend it.
>>>>
>>>> Bullshit! Just not true.
>>>
>>> Arne's example makes it very clear that when you run out of spare nodes
>>> in your backing storage in DEC Basic, and hence have to grow the backing
>>> storage by the growth increment, you have to do a copy of the existing data.
>>
>> Arne tried to provide a simple and quick and dirty example. Doesn't have to
>> be that way. Would not be that way in well designed code.
>>
>> The nice thing about links is that the storage does not have to be linear.
>>
>>> How would you grow the existing backing storage without either you or
>>> the DEC Basic RTL doing a copy of the existing data when you extend it
>>> by the growth increment ?
>>
>> I'd just point to additional storage.
>
> I am sure there are other possible designs.
>
> But a single contiguous array is a simple design.

Yes, it is, and that is what anyone with any sense would do, if it is adequate
for the job. Most likely needing more is few and far between. But, if needed,
one can go beyond that.

> And it seems primitive but it is not as bad as it seems.

I don't see it as bad in any way.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: DEC Basic and dynamic memory ?

<stbe0r$rre$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=20573&group=comp.os.vms#20573

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: DEC Basic and dynamic memory ?
Date: Tue, 1 Feb 2022 13:53:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <stbe0r$rre$1@dont-email.me>
References: <st1hr5$c5h$1@dont-email.me> <61f49984$0$697$14726298@news.sunsite.dk> <st2ii8$5oj$1@dont-email.me> <61f580e4$0$704$14726298@news.sunsite.dk> <st78fe$cu9$4@dont-email.me> <61f7265c$0$698$14726298@news.sunsite.dk> <st79ce$cu9$6@dont-email.me> <st7ct6$e4g$2@dont-email.me> <st8pob$ch7$6@dont-email.me> <st93bp$55i$1@dont-email.me> <61f81700$0$699$14726298@news.sunsite.dk> <st9elk$3v6$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 1 Feb 2022 13:53:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="dc92612fcf0fc6cfbe9e1ad1838e9249";
logging-data="28526"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VvfHi64XOOkk0m6/4l5xKLT7dPVzT/r4="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:2fgos9uJw2GnPfNDRdqSse4CR34=
 by: Simon Clubley - Tue, 1 Feb 2022 13:53 UTC

On 2022-01-31, Dave Froble <davef@tsoft-inc.com> wrote:
> On 1/31/2022 12:06 PM, Arne Vajhøj wrote:
>> And it seems primitive but it is not as bad as it seems.
>
> I don't see it as bad in any way.
>

If you were used to how much cleaner this stuff is in other languages
(even C), then you would.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor