Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #39610

Re: Extendable structure with inspection

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Extendable structure with inspection
Date 2015-06-06 16:00 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2015Jun6.180030@mips.complang.tuwien.ac.at> (permalink)
References <f17afc56-0260-499e-8314-7495c6ce449a@googlegroups.com> <mksboq$feh$1@dont-email.me> <3eeb9c20-5898-48cf-9979-400ee121b5d4@googlegroups.com> <8021c02c-0a0c-42ef-bc8f-1635f64ae841@googlegroups.com> <5572d1d1$0$21304$e4fe514c@dreader37.news.xs4all.nl>

Show all headers | View raw


albert@spenarnc.xs4all.nl (Albert van der Horst) writes:
>In article <8021c02c-0a0c-42ef-bc8f-1635f64ae841@googlegroups.com>,
> <hughaguilar96@gmail.com> wrote:
>>I wrote an RfD for Forth-200x asking that we have a word that, given the
>>address of a memory-block in the heap, returns its size. This seemed
>>super-easy to me, because the information is already stored (FREE and
>>RESIZE access this information to do what they do). Everybody seemed to
>>like the idea, but then Leon Wagner killed it by saying that he wouldn't
>>implement this in SwiftForth and he didn't understand what it was for.

The SIZE RfD is still listed among the RfDs without CfVs.  I guess we
should do some timeout of RfDs after some time, though.

>In doing so you revealed a problem with the current standardisation
>process. I could easily add a size to my implementation of the allocation
>wordset, and maybe some others. It is certainly useful.
>So we would like to have the word reserved so that wherever it is used
>at least it would mean the same. I appreciate that it is prohibitively
>expensive to supply in a c-based Forth because malloc() can't handle this.

It's not prohibitive, but not so cheap that one does add it without
first seeing the need demonstrated.  What I found surprising is that
it's not just C-based Forths that use the system's malloc() to
implement ALLOCATE.  So it's not just a few systems that would incur
the considerable cost, but pretty much all of them.

>But the above means that it will not be standardised as say a controlled
>word because those systems would have to admit that they can't implement
>it. "We implement the total of the Forth language" would no longer be
>true. So SIZE is kept out of the standard, and although you and I implement
>the same word, its name would be different.

Why would it be different?  If you and Hugh cannot agree on a name
(and probably not on a common specification, either), that's certainly
not the fault of the standardization process; on the contrary, it
would explain why there is no progress in standardizing this feature.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-02 13:29 -0700
  Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-03 06:02 +0000
    Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-03 08:27 -0700
  Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-03 11:30 -0700
    Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-03 20:54 -0700
      Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-04 09:11 +0100
        Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-04 04:43 -0700
          Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-04 20:21 +0100
            Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-04 23:23 -0700
              Re: Extendable structure with inspection "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-06-05 03:40 -0400
              Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-05 15:31 +0100
                Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-05 08:48 -0700
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-05 18:10 +0100
                Re: Extendable structure with inspection albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-06-06 10:46 +0000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-05 17:53 -0700
                Re: Extendable structure with inspection albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-06-06 10:56 +0000
                Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-06 16:00 +0000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-06 19:35 -0700
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-07 10:51 +0100
                Re: Extendable structure with inspection Bernd Paysan <bernd.paysan@gmx.de> - 2015-06-08 23:24 +0200
                SIZE RfD: Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-09 07:56 +0000
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-09 12:09 +0100
                Re: Extendable structure with inspection Bernd Paysan <bernd.paysan@gmx.de> - 2015-06-09 23:25 +0200
              Re: Extendable structure with inspection "Elizabeth D. Rather" <erather@forth.com> - 2015-06-05 07:53 -1000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-05 17:34 -0700
      Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-05 00:40 -0700
  Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-10 12:16 -0700

csiph-web