Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Nonsense. Space is blue and birds fly through it. -- Heisenberg


devel / comp.lang.c / Re: on why declare a struct with a single array in it

SubjectAuthor
* on why declare a struct with a single array in itMeredith Montgomery
+* Re: on why declare a struct with a single array in itGuillaume
|`* Re: on why declare a struct with a single array in itBen Bacarisse
| `* Re: on why declare a struct with a single array in itDavid Brown
|  `* Re: on why declare a struct with a single array in itpozz
|   `* Re: on why declare a struct with a single array in itDavid Brown
|    `* Re: on why declare a struct with a single array in itManfred
|     `* Re: on why declare a struct with a single array in itpozz
|      +* Re: on why declare a struct with a single array in itManfred
|      |`- Re: on why declare a struct with a single array in itMeredith Montgomery
|      `* Re: on why declare a struct with a single array in itDavid Brown
|       `* Re: on why declare a struct with a single array in itGuillaume
|        `* Re: on why declare a struct with a single array in itKeith Thompson
|         `* Re: on why declare a struct with a single array in itScott Lurndal
|          +* Re: on why declare a struct with a single array in itKeith Thompson
|          |+* Re: on why declare a struct with a single array in itDavid Brown
|          ||+- Re: on why declare a struct with a single array in itBart
|          ||`* Re: on why declare a struct with a single array in itKeith Thompson
|          || +* Re: on why declare a struct with a single array in itBart
|          || |+* Re: on why declare a struct with a single array in itRichard Damon
|          || ||`* Re: on why declare a struct with a single array in itDavid Brown
|          || || +* Re: on why declare a struct with a single array in itManfred
|          || || |`* Re: on why declare a struct with a single array in itDavid Brown
|          || || | +* Re: on why declare a struct with a single array in itManfred
|          || || | |+* Re: on why declare a struct with a single array in itDavid Brown
|          || || | ||`* Re: on why declare a struct with a single array in itMalcolm McLean
|          || || | || `- Re: on why declare a struct with a single array in itDavid Brown
|          || || | |+- Re: on why declare a struct with a single array in itBart
|          || || | |`* Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | +* Re: on why declare a struct with a single array in itBart
|          || || | | |+- Re: on why declare a struct with a single array in itDavid Brown
|          || || | | |`* Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | | +* Re: on why declare a struct with a single array in itBart
|          || || | | | |+- Re: on why declare a struct with a single array in itBart
|          || || | | | |`* Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | | | `- Re: on why declare a struct with a single array in itBart
|          || || | | | +- Re: on why declare a struct with a single array in itChris M. Thomasson
|          || || | | | `* Re: on why declare a struct with a single array in itKenny McCormack
|          || || | | |  `* Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | |   `* Re: on why declare a struct with a single array in itKenny McCormack
|          || || | | |    +* Re: on why declare a struct with a single array in itDick
|          || || | | |    |+* Re: on why declare a struct with a single array in itKenny McCormack
|          || || | | |    ||`- Re: on why declare a struct with a single array in itMalcolm McLean
|          || || | | |    |+- Re: on why declare a struct with a single array in itDavid Brown
|          || || | | |    |`* Re: on why declare a struct with a single array in itRobert Latest
|          || || | | |    | `- Re: on why declare a struct with a single array in itKenny McCormack
|          || || | | |    `* Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | |     +* Re: on why declare a struct with a single array in itKenny McCormack
|          || || | | |     |`- Re: on why declare a struct with a single array in itTim Rentsch
|          || || | | |     `- Re: on why declare a struct with a single array in itKeith Thompson
|          || || | | `- Re: on why declare a struct with a single array in itKeith Thompson
|          || || | `* Re: on why declare a struct with a single array in itGuillaume
|          || || |  `* Re: on why declare a struct with a single array in itBart
|          || || |   `- Re: on why declare a struct with a single array in itKeith Thompson
|          || || `- Re: on why declare a struct with a single array in itChris M. Thomasson
|          || |+* Re: on why declare a struct with a single array in itRichard Damon
|          || ||`- Re: on why declare a struct with a single array in itBart
|          || |+* Re: on why declare a struct with a single array in itJoe Pfeiffer
|          || ||`* Re: on why declare a struct with a single array in itBart
|          || || +* Re: on why declare a struct with a single array in itJoe Pfeiffer
|          || || |`- Re: on why declare a struct with a single array in itBart
|          || || `- Re: on why declare a struct with a single array in itChris M. Thomasson
|          || |`- Re: on why declare a struct with a single array in itBart
|          || +* Re: on why declare a struct with a single array in itGuillaume
|          || |+- Re: on why declare a struct with a single array in itBart
|          || |`- Re: on why declare a struct with a single array in itChris M. Thomasson
|          || `* Re: on why declare a struct with a single array in itDavid Brown
|          ||  `- Re: on why declare a struct with a single array in itChris M. Thomasson
|          |`- Re: on why declare a struct with a single array in itScott Lurndal
|          `- Re: on why declare a struct with a single array in itKenny McCormack
+* Re: on why declare a struct with a single array in itJorgen Grahn
|`- Re: on why declare a struct with a single array in itGuillaume
+- Re: on why declare a struct with a single array in itKaz Kylheku
`* Re: on why declare a struct with a single array in itAnton Shepelev
 `- Re: on why declare a struct with a single array in itMeredith Montgomery

Pages:123
Re: on why declare a struct with a single array in it

<86pmq47pvb.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19331&group=comp.lang.c#19331

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 10 Dec 2021 01:47:52 -0800
Organization: A noiseless patient Spider
Lines: 88
Message-ID: <86pmq47pvb.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <smmdcc$1n62$1@gioia.aioe.org> <87pmr5qih6.fsf@bsb.me.uk> <smmhhg$bfh$1@dont-email.me> <sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me> <sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me> <sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org> <87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad> <874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me> <875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me> <KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me> <sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me> <sneuje$1qm$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="94ee63d76223a75d29f96ac519efdd3f";
logging-data="13838"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gNc1+DQC+yqz1iH74cI+HJMnkGqEYzg8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:RadoPAi/TKgUk5SmMLrur8tfRm4=
sha1:A0uowboaRuVf//lNC8Cb2lODbgo=
 by: Tim Rentsch - Fri, 10 Dec 2021 09:47 UTC

Manfred <noname@add.invalid> writes:

> On 11/21/2021 9:51 PM, David Brown wrote:
>
>> On 21/11/2021 19:32, Manfred wrote:
>>
>>> On 11/21/2021 2:51 PM, David Brown wrote:
>>>
>>>> On 21/11/2021 02:44, Richard Damon wrote:
>>>>
>>>>> On 11/20/21 7:19 PM, Bart wrote:
>>>>>
>>>>>> It doesn't make sense.
>>>>
>>>> I don't want to make a habit of it, but I agree with Bart here :-)
>>>>
>>>>> Maybe not to you, but I would sure hate to have to keep track of all
>>>>> that data, and would likely just wrap this dumb malloc with something
>>>>> smarter.
>>>>
>>>> And that is /fine/. For those few cases where it might be inconvenient
>>>> to know the size at deallocation time, make a wrapper so that the size
>>>> is tracked. If you need that functionality, write the code and pay the
>>>> price - others that don't need the heap to record their allocation sizes
>>>> shouldn't have to pay for your needs. It is no different from malloc
>>>> and calloc - if you want the convenience of zeroing the memory, you can
>>>> use calloc, but if you don't want it you can use malloc and not pay for
>>>> the extra effort.
>>>>
>>>> Of course it is too late to make such untracked-size heap functions the
>>>> standard for C - I see it as an unlucky choice made long ago. After
>>>> all, if you had "malloc_untracked" and "free_untracked" then it would be
>>>> a simple matter to implement traditional C "malloc" and "free" on top
>>>> of it.
>>>
>>> The problem I see with this is that it assumes one and only type of
>>> metadata information to be associated to the pointer, specifically the
>>> block size.
>>
>> No. It merely relieves the heap implementation from having to store the
>> size of the allocation. Any other metadata (such as for tracking free
>> space lists, or handling efficient multi-threaded access) will still be
>> needed.
>
> But it means that the implementation has to manage memory blocks based
> on size instead of something else - if it had to store anything else
> with the pointer, delegating the size to the programmer would be
> pointless
> One alternative that pops to mind is a pointer to the next block,
> however this might work, or nothing at all and a lookup table, or
> anything else I couldn't think of right now, since I am not designing
> the allocator, which the committee does not design either.
> I think it makes sense that the language defines the interface
> strictly to fulfill the requirements, and keep as much as possible of
> the design internal to the implementation.
>
> Moreover, the requested size (used by the user) may be different from
> the actual size (used by the allocator), which poses some consistency
> issues - but that's a side note.
>
>>> I believe there are countless implementations of malloc out there, and I
>>> guess this might not be the case, or it may be the case today but not
>>> tomorrow.
>>> The point is that if you set the interface to be pointer+size you also
>>> put constraints on the implementation, on top of the extra burden for
>>> the programmer.
>>
>> How could this suggestion impose any constraints on the implementation?
>> The interface for getting the memory is the same (albeit with a
>> different name, in order to keep compatibility with existing code), and
>> the interface for freeing memory gives the implementation more
>> information. It would be perfectly possible (though a little unhelpful)
>> for an implementation of the "_untracked" functions to be :
>>
>> #define malloc_untracked(size) malloc(size)
>> #define free_untracked(ptr, size) free(ptr)
>>
>> An implementation can do better, given this new information, but there
>> are no new limitations or restrictions.
>
> Well, requiring the programmer to keep track of the block size is a
> significant programming overhead - if it is unused, it's a significant
> waste I'd rather not pay for.

Anyone who seriously proposes having to supply a size argument to
free memory for a general purpose allocator like malloc() either
hasn't bothered to think or doesn't know how to think. Kind of
par for the course for the long-running Bart and David show.

Re: on why declare a struct with a single array in it

<sovbmf$b13$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19333&group=comp.lang.c#19333

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 10 Dec 2021 10:55:12 +0000
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <sovbmf$b13$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmdcc$1n62$1@gioia.aioe.org>
<87pmr5qih6.fsf@bsb.me.uk> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 10 Dec 2021 10:55:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7f7f51c0331f99670658e9c95a8c4df1";
logging-data="11299"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GW04UJoB/EvuM/1n2q+E/+nR1zCcoWcc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:RSQK1p2R8NghDg7akaFiY4XaKGc=
In-Reply-To: <86pmq47pvb.fsf@linuxsc.com>
 by: Bart - Fri, 10 Dec 2021 10:55 UTC

On 10/12/2021 09:47, Tim Rentsch wrote:
> Manfred <noname@add.invalid> writes:
>
>> On 11/21/2021 9:51 PM, David Brown wrote:

>>> An implementation can do better, given this new information, but there
>>> are no new limitations or restrictions.
>>
>> Well, requiring the programmer to keep track of the block size is a
>> significant programming overhead - if it is unused, it's a significant
>> waste I'd rather not pay for.
>
> Anyone who seriously proposes having to supply a size argument to
> free memory for a general purpose allocator like malloc() either
> hasn't bothered to think or doesn't know how to think. Kind of
> par for the course for the long-running Bart and David show.

Well, that is your opinion. You haven't really given any of the
advantages of having this extra overhead in the allocator that a program
may not want or need for any or all of its allocations.

For example, some programs may never need to free memory until they
terminate.

Re: on why declare a struct with a single array in it

<11f9344a-7d81-49c3-be8e-2e7c1b46468dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19335&group=comp.lang.c#19335

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:64c:: with SMTP id a12mr26211857qtb.312.1639138877793;
Fri, 10 Dec 2021 04:21:17 -0800 (PST)
X-Received: by 2002:a05:6214:1d05:: with SMTP id e5mr24974200qvd.3.1639138877593;
Fri, 10 Dec 2021 04:21:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Fri, 10 Dec 2021 04:21:17 -0800 (PST)
In-Reply-To: <snfrib$uje$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:b090:7488:3547:2d25;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:b090:7488:3547:2d25
References: <86tughjjm7.fsf@levado.to> <smmdcc$1n62$1@gioia.aioe.org>
<87pmr5qih6.fsf@bsb.me.uk> <smmhhg$bfh$1@dont-email.me> <sn5pcl$pru$1@dont-email.me>
<sn5qji$3ri$1@dont-email.me> <sn5rc0$1i81$1@gioia.aioe.org>
<sn5ukn$2ir$1@dont-email.me> <sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <snfrib$uje$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <11f9344a-7d81-49c3-be8e-2e7c1b46468dn@googlegroups.com>
Subject: Re: on why declare a struct with a single array in it
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Fri, 10 Dec 2021 12:21:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Malcolm McLean - Fri, 10 Dec 2021 12:21 UTC

On Monday, 22 November 2021 at 10:31:52 UTC, David Brown wrote:
>
> And can you give examples of where you have a pointer to a block of
> memory but do not know the size of the memory?
>
The only example I can think of is where you are passed a compressed
data stream, and the "end of data" marker is retrieved as part of the
decompression.
However normally you would pass about a "memory size" parameter
anyway, just to guard against truncated data.

Re: on why declare a struct with a single array in it

<sovlhn$fbq$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19339&group=comp.lang.c#19339

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 10 Dec 2021 14:43:19 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <sovlhn$fbq$2@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmdcc$1n62$1@gioia.aioe.org>
<87pmr5qih6.fsf@bsb.me.uk> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <snfrib$uje$1@dont-email.me>
<11f9344a-7d81-49c3-be8e-2e7c1b46468dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 10 Dec 2021 13:43:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e6922e9419930dfefefc48fcdba2e419";
logging-data="15738"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WCn8134a8wpCxIkFBIVOEuo1P0YuaeN8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:bVAXL16P2mLSKqRfiFdMvePuGgs=
In-Reply-To: <11f9344a-7d81-49c3-be8e-2e7c1b46468dn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Fri, 10 Dec 2021 13:43 UTC

On 10/12/2021 13:21, Malcolm McLean wrote:
> On Monday, 22 November 2021 at 10:31:52 UTC, David Brown wrote:
>>
>> And can you give examples of where you have a pointer to a block of
>> memory but do not know the size of the memory?
>>
> The only example I can think of is where you are passed a compressed
> data stream, and the "end of data" marker is retrieved as part of the
> decompression.

Fair enough - that's a reasonable example.

> However normally you would pass about a "memory size" parameter
> anyway, just to guard against truncated data.
>

Indeed.

And whichever part of the code is responsible for allocating the memory,
knows the size of the buffer. I think it is not unreasonable for this
size to be communicated to whatever part of the code is responsible for
deallocating the memory (which may or may not be the bit that does the
decompressing).

Re: on why declare a struct with a single array in it

<sovm1b$k3i$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19340&group=comp.lang.c#19340

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 10 Dec 2021 14:51:38 +0100
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <sovm1b$k3i$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmdcc$1n62$1@gioia.aioe.org>
<87pmr5qih6.fsf@bsb.me.uk> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
<sovbmf$b13$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 10 Dec 2021 13:51:39 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e6922e9419930dfefefc48fcdba2e419";
logging-data="20594"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hAvdqyIZSujQGD3/EgUfWNK23Phyi3Bo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:PnzsAS7/VFRX/ApUGT0K2tB5KkQ=
In-Reply-To: <sovbmf$b13$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 10 Dec 2021 13:51 UTC

On 10/12/2021 11:55, Bart wrote:
> On 10/12/2021 09:47, Tim Rentsch wrote:
>> Manfred <noname@add.invalid> writes:
>>
>>> On 11/21/2021 9:51 PM, David Brown wrote:
>
>>>> An implementation can do better, given this new information, but there
>>>> are no new limitations or restrictions.
>>>
>>> Well, requiring the programmer to keep track of the block size is a
>>> significant programming overhead - if it is unused, it's a significant
>>> waste I'd rather not pay for.
>>
>> Anyone who seriously proposes having to supply a size argument to
>> free memory for a general purpose allocator like malloc() either
>> hasn't bothered to think or doesn't know how to think.  Kind of
>> par for the course for the long-running Bart and David show.
>
> Well, that is your opinion. You haven't really given any of the
> advantages of having this extra overhead in the allocator that a program
> may not want or need for any or all of its allocations.

Remember, this is Tim posting. It's just another drive-by
shot-the-messenger (and perhaps innocent bystanders) post, coming along
weeks after most people have forgotten about the thread. If you are
lucky, you'll get a reply containing nothing but sarcasm, cryptic
messages, and patronising insults sometime next year.

He used to post interesting things, and had insights into details of C
and the standards that most others missed. Maybe he still could, but he
sees to prefer to play the grumpy old man and wave his Zimmer frame at
people who disturb his slumber.

(And yes, I know he'll ignore this post. He has burned that bridge, and
many others, long ago.)

>
> For example, some programs may never need to free memory until they
> terminate.
>
>

Re: on why declare a struct with a single array in it

<871r2kb8cp.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19343&group=comp.lang.c#19343

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 10 Dec 2021 10:52:38 -0800
Organization: None to speak of
Lines: 14
Message-ID: <871r2kb8cp.fsf@nosuchdomain.example.com>
References: <86tughjjm7.fsf@levado.to> <87pmr5qih6.fsf@bsb.me.uk>
<smmhhg$bfh$1@dont-email.me> <sn5pcl$pru$1@dont-email.me>
<sn5qji$3ri$1@dont-email.me> <sn5rc0$1i81$1@gioia.aioe.org>
<sn5ukn$2ir$1@dont-email.me> <sn6iam$n5t$1@dont-email.me>
<sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com>
<Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="b669a5611549520704c9fe5a579bad30";
logging-data="24466"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19K3pQuBNGiW7JKGpBs0VqC"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:fmpZ/rh3/OtnnW44ya/v/e9a+VM=
sha1:4o2LK39qvK+FmHX3MFSFfDXgjL0=
 by: Keith Thompson - Fri, 10 Dec 2021 18:52 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
[...]
> Anyone who seriously proposes having to supply a size argument to
> free memory for a general purpose allocator like malloc() either
> hasn't bothered to think or doesn't know how to think. Kind of
> par for the course for the long-running Bart and David show.

Tim, it's sad to see this kind of crap from you. I remember when you
had interesting things to say here.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: on why declare a struct with a single array in it

<86h7bf6vhd.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19356&group=comp.lang.c#19356

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sat, 11 Dec 2021 06:56:30 -0800
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <86h7bf6vhd.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <smmhhg$bfh$1@dont-email.me> <sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me> <sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me> <sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org> <87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad> <874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me> <875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me> <KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me> <sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me> <sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com> <sovbmf$b13$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="601297b613a158a006ae67e40d920115";
logging-data="5373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kyQ6pTYWS4mZTUPF0f3I9Uuj/ePArozE="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:vI3n09o6eyXeNmcKnn4bKtOWqo0=
sha1:7jF58rbatY2cGhMriZ3kkpVGhYs=
 by: Tim Rentsch - Sat, 11 Dec 2021 14:56 UTC

Bart <bc@freeuk.com> writes:

> On 10/12/2021 09:47, Tim Rentsch wrote:
>
>> Manfred <noname@add.invalid> writes:
>>
>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>
>>>> An implementation can do better, given this new information, but there
>>>> are no new limitations or restrictions.
>>>
>>> Well, requiring the programmer to keep track of the block size is a
>>> significant programming overhead - if it is unused, it's a significant
>>> waste I'd rather not pay for.
>>
>> Anyone who seriously proposes having to supply a size argument to
>> free memory for a general purpose allocator like malloc() either
>> hasn't bothered to think or doesn't know how to think. Kind of
>> par for the course for the long-running Bart and David show.
>
> Well, that is your opinion.

More accurately, it is my belief.

> You haven't really given any of the
> advantages of having this extra overhead in the allocator that a
> program may not want or need for any or all of its allocations.

In point of fact, I haven't said anything at all about what is
needed to implement either kind of allocator interface.

Why don't you write and post code that implements the sort
of interface you are advocating, so there can be meaningful
discussion about it?

Re: on why declare a struct with a single array in it

<sp2i63$qh3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19357&group=comp.lang.c#19357

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sat, 11 Dec 2021 16:04:20 +0000
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <sp2i63$qh3$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
<sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 11 Dec 2021 16:04:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ea9b54600d74872405bddab5e910fad5";
logging-data="27171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tzJOeIYeGybGoWiU1B7xhl9fVvUAbkp8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:rDa8HIM2vlC9gQ0ug9OQqZFBzVM=
In-Reply-To: <86h7bf6vhd.fsf@linuxsc.com>
 by: Bart - Sat, 11 Dec 2021 16:04 UTC

On 11/12/2021 14:56, Tim Rentsch wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 10/12/2021 09:47, Tim Rentsch wrote:
>>
>>> Manfred <noname@add.invalid> writes:
>>>
>>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>>
>>>>> An implementation can do better, given this new information, but there
>>>>> are no new limitations or restrictions.
>>>>
>>>> Well, requiring the programmer to keep track of the block size is a
>>>> significant programming overhead - if it is unused, it's a significant
>>>> waste I'd rather not pay for.
>>>
>>> Anyone who seriously proposes having to supply a size argument to
>>> free memory for a general purpose allocator like malloc() either
>>> hasn't bothered to think or doesn't know how to think. Kind of
>>> par for the course for the long-running Bart and David show.
>>
>> Well, that is your opinion.
>
> More accurately, it is my belief.
>
>> You haven't really given any of the
>> advantages of having this extra overhead in the allocator that a
>> program may not want or need for any or all of its allocations.
>
> In point of fact, I haven't said anything at all about what is
> needed to implement either kind of allocator interface.
>
> Why don't you write and post code that implements the sort
> of interface you are advocating, so there can be meaningful
> discussion about it?

It's a big job, and there are many ways of doing it, so I'm not going to
attempt it here.

Basically, instead of free(p), you might typically write newfree(p,
size(*p)) instead, when p points to an object where the compiler knows
the size (eg. to a struct). Otherwise you need to keep track of it.

The only such implementation I have is part of my language's runtime,
and was optimised for interpreters. It uses special allocators for
objects up to 2KB, using pools obtained with malloc, and calls malloc
directly (but with sizes pre-rounded to my own prefered limits) for
larger blocks.

And it is not in C. If I use a generated-C version of it and apply it to
the Binary Trees benchmark, then it is 4 times as fast as using plain
malloc/free using Windows/msvcrt, and about 2.5 times as fast under WSL.

Regular version using malloc+free:

https://github.com/sal55/langs/blob/master/binary.c

Version using my allocator for tree nodes (note lots of ugly generated C
code; this is not up for discussion, only the results):

https://github.com/sal55/langs/blob/master/binary2.c

(Benchmark code starts line 194; it differs on two lines from the other
version: using pc_alloc for malloc, and pc_free for free.)

Re: on why declare a struct with a single array in it

<sp2mqu$ltt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19358&group=comp.lang.c#19358

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sat, 11 Dec 2021 17:23:43 +0000
Organization: A noiseless patient Spider
Lines: 86
Message-ID: <sp2mqu$ltt$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
<sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com>
<sp2i63$qh3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 11 Dec 2021 17:23:42 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ea9b54600d74872405bddab5e910fad5";
logging-data="22461"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nzG6mqAeWcO8vHPqvTu0BqnazFapf93o="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:CrJ8ZFt2+zGo0HJefEal6doDZpw=
In-Reply-To: <sp2i63$qh3$1@dont-email.me>
 by: Bart - Sat, 11 Dec 2021 17:23 UTC

On 11/12/2021 16:04, Bart wrote:
> On 11/12/2021 14:56, Tim Rentsch wrote:
>> Bart <bc@freeuk.com> writes:
>>
>>> On 10/12/2021 09:47, Tim Rentsch wrote:
>>>
>>>> Manfred <noname@add.invalid> writes:
>>>>
>>>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>>>
>>>>>> An implementation can do better, given this new information, but
>>>>>> there
>>>>>> are no new limitations or restrictions.
>>>>>
>>>>> Well, requiring the programmer to keep track of the block size is a
>>>>> significant programming overhead - if it is unused, it's a significant
>>>>> waste I'd rather not pay for.
>>>>
>>>> Anyone who seriously proposes having to supply a size argument to
>>>> free memory for a general purpose allocator like malloc() either
>>>> hasn't bothered to think or doesn't know how to think.  Kind of
>>>> par for the course for the long-running Bart and David show.
>>>
>>> Well, that is your opinion.
>>
>> More accurately, it is my belief.
>>
>>> You haven't really given any of the
>>> advantages of having this extra overhead in the allocator that a
>>> program may not want or need for any or all of its allocations.
>>
>> In point of fact, I haven't said anything at all about what is
>> needed to implement either kind of allocator interface.
>>
>> Why don't you write and post code that implements the sort
>> of interface you are advocating, so there can be meaningful
>> discussion about it?
>
> It's a big job, and there are many ways of doing it, so I'm not going to
> attempt it here.
>
> Basically, instead of free(p), you might typically write newfree(p,
> size(*p)) instead, when p points to an object where the compiler knows
> the size (eg. to a struct). Otherwise you need to keep track of it.
>
> The only such implementation I have is part of my language's runtime,
> and was optimised for interpreters. It uses special allocators for
> objects up to 2KB, using pools obtained with malloc, and calls malloc
> directly (but with sizes pre-rounded to my own prefered limits) for
> larger blocks.
>
> And it is not in C. If I use a generated-C version of it and apply it to
> the Binary Trees benchmark, then it is 4 times as fast as using plain
> malloc/free using Windows/msvcrt, and about 2.5 times as fast under WSL.
>
>
> Regular version using malloc+free:
>
> https://github.com/sal55/langs/blob/master/binary.c
>
> Version using my allocator for tree nodes (note lots of ugly generated C
> code; this is not up for discussion, only the results):
>
> https://github.com/sal55/langs/blob/master/binary2.c

[Note needs 64-bit target]

> (Benchmark code starts line 194; it differs on two lines from the other
> version: using pc_alloc for malloc, and pc_free for free.)

Note that for this benchmark, the size of the 'treenode' struct, 20
bytes [on x64] is rounded up to 32 bytes for both allocators (in the
case of malloc, the extra space is likely used for the size as well as
for alignment).

So both use the same amount of memory.

If I increase the struct to 32 bytes in the user program, then malloc
will I think use 48 bytes per allocation; pc_alloc still uses 32 bytes.

On Windows that doesn't make much difference (I don't know the maximum
memory in use, maybe it's not that high).

On WSL however, it makes the malloc-based version 20% slower, so taking
3 times as long as the pc_alloc version.

Re: on why declare a struct with a single array in it

<sp311h$jtr$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19364&group=comp.lang.c#19364

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sat, 11 Dec 2021 12:17:52 -0800
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <sp311h$jtr$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <smmhhg$bfh$1@dont-email.me>
<sn5pcl$pru$1@dont-email.me> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
<sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 11 Dec 2021 20:17:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5e397175519a55d5acd045d9882c215e";
logging-data="20411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UhD31vuVXdelzZNiD0BCH98V1pku/3bQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Cancel-Lock: sha1:v6228meYeildh9qBD5N7n4EWSRg=
In-Reply-To: <86h7bf6vhd.fsf@linuxsc.com>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 11 Dec 2021 20:17 UTC

On 12/11/2021 6:56 AM, Tim Rentsch wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 10/12/2021 09:47, Tim Rentsch wrote:
>>
>>> Manfred <noname@add.invalid> writes:
>>>
>>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>>
>>>>> An implementation can do better, given this new information, but there
>>>>> are no new limitations or restrictions.
>>>>
>>>> Well, requiring the programmer to keep track of the block size is a
>>>> significant programming overhead - if it is unused, it's a significant
>>>> waste I'd rather not pay for.
>>>
>>> Anyone who seriously proposes having to supply a size argument to
>>> free memory for a general purpose allocator like malloc() either
>>> hasn't bothered to think or doesn't know how to think. Kind of
>>> par for the course for the long-running Bart and David show.
>>
>> Well, that is your opinion.
>
> More accurately, it is my belief.
>
>> You haven't really given any of the
>> advantages of having this extra overhead in the allocator that a
>> program may not want or need for any or all of its allocations.
>
> In point of fact, I haven't said anything at all about what is
> needed to implement either kind of allocator interface.

I am quite fond of the reap interface:

https://people.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf

>
> Why don't you write and post code that implements the sort
> of interface you are advocating, so there can be meaningful
> discussion about it?
>

Re: on why declare a struct with a single array in it

<sp4ros$1p0q9$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19369&group=comp.lang.c#19369

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sun, 12 Dec 2021 13:00:12 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sp4ros$1p0q9$1@news.xmission.com>
References: <86tughjjm7.fsf@levado.to> <86pmq47pvb.fsf@linuxsc.com> <sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com>
Injection-Date: Sun, 12 Dec 2021 13:00:12 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1868617"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 12 Dec 2021 13:00 UTC

In article <86h7bf6vhd.fsf@linuxsc.com>,
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
....
>> Well, that is your opinion.

>More accurately, it is my belief.

There is no difference between an opinion and a belief.

The two words are virtually synonymous.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Seriously

Re: on why declare a struct with a single array in it

<861r2h7pu4.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19371&group=comp.lang.c#19371

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sun, 12 Dec 2021 08:25:23 -0800
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <861r2h7pu4.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <86pmq47pvb.fsf@linuxsc.com> <sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com> <sp4ros$1p0q9$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="52dee2417da2788e9c7fc8c78c748ef1";
logging-data="30669"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5QBIn5pTw7TKSM5hpU9hBM1CGk3Tjr2c="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:EPrKzRGWJORRAMDIBDKjB3pdh68=
sha1:td9bFhvnOdGIgJRdJ61sOKC6weI=
 by: Tim Rentsch - Sun, 12 Dec 2021 16:25 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:

> In article <86h7bf6vhd.fsf@linuxsc.com>,
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
> ...
>
>>> Well, that is your opinion.
>>
>> More accurately, it is my belief.
>
> There is no difference between an opinion and a belief.

There is in the way that I use these two words.

Re: on why declare a struct with a single array in it

<sp5c2k$1p856$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19374&group=comp.lang.c#19374

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sun, 12 Dec 2021 17:38:28 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sp5c2k$1p856$1@news.xmission.com>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com> <sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com>
Injection-Date: Sun, 12 Dec 2021 17:38:28 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1876134"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 12 Dec 2021 17:38 UTC

In article <861r2h7pu4.fsf@linuxsc.com>,
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>gazelle@shell.xmission.com (Kenny McCormack) writes:
>
>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>> ...
>>
>>>> Well, that is your opinion.
>>>
>>> More accurately, it is my belief.
>>
>> There is no difference between an opinion and a belief.
>
>There is in the way that I use these two words.

Give me an example of how you could have an opinion about something and not
have it be your belief.

And/or vice versa.

--
You are again heaping damnation upon your own head by your statements.

- Rick C Hodgin -

Re: on why declare a struct with a single array in it

<sp5p0u$l4g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19377&group=comp.lang.c#19377

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: thiebaud...@aol.com (Dick)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Sun, 12 Dec 2021 16:19:26 -0500
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <sp5p0u$l4g$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com>
<sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com>
<sp5c2k$1p856$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Dec 2021 21:19:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4d18b96a10ffb85e967edb5dab872292";
logging-data="21648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XKQ81+4F26eYoX7LeO1EsVPsf4Mgq2q4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:2ilIQ7ekjLWuwi6uHVVMQGU83yg=
In-Reply-To: <sp5c2k$1p856$1@news.xmission.com>
Content-Language: en-US
 by: Dick - Sun, 12 Dec 2021 21:19 UTC

On 12/12/21 12:38 PM, Kenny McCormack wrote:
> In article <861r2h7pu4.fsf@linuxsc.com>,
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>
>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>> ...
>>>
>>>>> Well, that is your opinion.
>>>>
>>>> More accurately, it is my belief.
>>>
>>> There is no difference between an opinion and a belief.
>>
>> There is in the way that I use these two words.
>
> Give me an example of how you could have an opinion about something and not
> have it be your belief.
>
> And/or vice versa.
>
There's a difference in how most people use the words.

Re: on why declare a struct with a single array in it

<sp6uu2$1q2vn$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19380&group=comp.lang.c#19380

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Mon, 13 Dec 2021 08:06:26 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sp6uu2$1q2vn$1@news.xmission.com>
References: <86tughjjm7.fsf@levado.to> <861r2h7pu4.fsf@linuxsc.com> <sp5c2k$1p856$1@news.xmission.com> <sp5p0u$l4g$1@dont-email.me>
Injection-Date: Mon, 13 Dec 2021 08:06:26 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1903607"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 13 Dec 2021 08:06 UTC

In article <sp5p0u$l4g$1@dont-email.me>, Dick <thiebauddick2@aol.com> wrote:
>On 12/12/21 12:38 PM, Kenny McCormack wrote:
>> In article <861r2h7pu4.fsf@linuxsc.com>,
>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>>
>>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>>> ...
>>>>
>>>>>> Well, that is your opinion.
>>>>>
>>>>> More accurately, it is my belief.
>>>>
>>>> There is no difference between an opinion and a belief.
>>>
>>> There is in the way that I use these two words.
>>
>> Give me an example of how you could have an opinion about something and not
>> have it be your belief.
>>
>> And/or vice versa.
>>
>There's a difference in how most people use the words.

But, nobody can say what that difference is...

Anyway, I say otherwise, but for reasons beyond the scope of this post.

--
Elect a clown, expect a circus.

Re: on why declare a struct with a single array in it

<sp70ic$j7p$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19382&group=comp.lang.c#19382

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Mon, 13 Dec 2021 09:34:19 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <sp70ic$j7p$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com>
<sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com>
<sp5c2k$1p856$1@news.xmission.com> <sp5p0u$l4g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 13 Dec 2021 08:34:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="eeeec74601fe8fc9b3a109e1e804c591";
logging-data="19705"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JJlr85jfZeQAiiQoQmwoIUU0cvVGKRdE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:PLta3oYVVLSBBksJg/IM/mJpMRM=
In-Reply-To: <sp5p0u$l4g$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 13 Dec 2021 08:34 UTC

On 12/12/2021 22:19, Dick wrote:
> On 12/12/21 12:38 PM, Kenny McCormack wrote:
>> In article <861r2h7pu4.fsf@linuxsc.com>,
>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>>
>>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>>>> ...
>>>>
>>>>>> Well, that is your opinion.
>>>>>
>>>>> More accurately, it is my belief.
>>>>
>>>> There is no difference between an opinion and a belief.
>>>
>>> There is in the way that I use these two words.
>>
>> Give me an example of how you could have an opinion about something
>> and not
>> have it be your belief.
>>
>> And/or vice versa.
>>
> There's a difference in how most people use the words.

The more relevant point would be how Tim differentiates between the
words. Clearly it was important to him. Equally clearly, people have
subtly different ideas about what the words mean to /them/, and whether
there is a significant difference between them. (There is,
unfortunately, no standards document for the English language.)

If Tim wants more people to appreciate what exactly he meant, then he'll
have to elaborate. If he doesn't care about what others think (and my
guess is that Kenny was added to Tim's naughty list long before I was),
he'll not bother.

Re: on why declare a struct with a single array in it

<c1b7db0f-55a6-4424-ab8f-687e19dc10e9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19383&group=comp.lang.c#19383

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:1088:: with SMTP id a8mr43494970qtj.653.1639387852326;
Mon, 13 Dec 2021 01:30:52 -0800 (PST)
X-Received: by 2002:ac8:6619:: with SMTP id c25mr43994264qtp.390.1639387852177;
Mon, 13 Dec 2021 01:30:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 13 Dec 2021 01:30:51 -0800 (PST)
In-Reply-To: <sp6uu2$1q2vn$1@news.xmission.com>
Injection-Info: google-groups.googlegroups.com; posting-host=81.143.231.9; posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 81.143.231.9
References: <86tughjjm7.fsf@levado.to> <861r2h7pu4.fsf@linuxsc.com>
<sp5c2k$1p856$1@news.xmission.com> <sp5p0u$l4g$1@dont-email.me> <sp6uu2$1q2vn$1@news.xmission.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c1b7db0f-55a6-4424-ab8f-687e19dc10e9n@googlegroups.com>
Subject: Re: on why declare a struct with a single array in it
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 13 Dec 2021 09:30:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 35
 by: Malcolm McLean - Mon, 13 Dec 2021 09:30 UTC

On Monday, 13 December 2021 at 08:06:37 UTC, Kenny McCormack wrote:
> In article <sp5p0u$l4g$1...@dont-email.me>, Dick <thieba...@aol.com> wrote:
> >On 12/12/21 12:38 PM, Kenny McCormack wrote:
> >> In article <861r2h7...@linuxsc.com>,
> >> Tim Rentsch <tr.1...@z991.linuxsc.com> wrote:
> >>> gaz...@shell.xmission.com (Kenny McCormack) writes:
> >>>
> >>>> In article <86h7bf6...@linuxsc.com>,
> >>>> Tim Rentsch <tr.1...@z991.linuxsc.com> wrote:
> >>>> ...
> >>>>
> >>>>>> Well, that is your opinion.
> >>>>>
> >>>>> More accurately, it is my belief.
> >>>>
> >>>> There is no difference between an opinion and a belief.
> >>>
> >>> There is in the way that I use these two words.
> >>
> >> Give me an example of how you could have an opinion about something and not
> >> have it be your belief.
> >>
> >> And/or vice versa.
> >>
> >There's a difference in how most people use the words.
> But, nobody can say what that difference is...
>
> Anyway, I say otherwise, but for reasons beyond the scope of this post.
>
You don't get exact synonyms in a natural language. One form always acquires
certain overtones that the other lacks. It may be archaic, or associated with a
different dialect, or it might have a subtle shade of meaning.

"Opinions" are less serious, less stable and deep seated than beliefs. So
"his Buddhist beliefs" but not "his Buddhist opinions", unless you wish to question
the seriousness of someone's Buddhism.

Re: on why declare a struct with a single array in it

<j1pj4fFq3mbU3@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19398&group=comp.lang.c#19398

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: boblat...@yahoo.com (Robert Latest)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: 13 Dec 2021 18:53:03 GMT
Lines: 17
Message-ID: <j1pj4fFq3mbU3@mid.individual.net>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com>
<sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com>
<sp5c2k$1p856$1@news.xmission.com> <sp5p0u$l4g$1@dont-email.me>
X-Trace: individual.net KonKG2WmepwCvHdffBpPhw0JiOu2umvZyBaRh53SriAyxvJ7Fa
Cancel-Lock: sha1:ja7TZc8VlBgSa4kfWTh2goQAC/w=
User-Agent: slrn/1.0.3 (Linux)
 by: Robert Latest - Mon, 13 Dec 2021 18:53 UTC

Dick wrote:
>>>>>> Well, that is your opinion.
>>>>>
>>>>> More accurately, it is my belief.
>>>>
>>>> There is no difference between an opinion and a belief.
>>>
>>> There is in the way that I use these two words.
>>
>> Give me an example of how you could have an opinion about something and not
>> have it be your belief.
>>
>> And/or vice versa.
>>
> There's a difference in how most people use the words.

Is that your opinion or your belief?

Re: on why declare a struct with a single array in it

<sp8b0u$1qnvg$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19399&group=comp.lang.c#19399

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Mon, 13 Dec 2021 20:38:54 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sp8b0u$1qnvg$1@news.xmission.com>
References: <86tughjjm7.fsf@levado.to> <sp5c2k$1p856$1@news.xmission.com> <sp5p0u$l4g$1@dont-email.me> <j1pj4fFq3mbU3@mid.individual.net>
Injection-Date: Mon, 13 Dec 2021 20:38:54 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1925104"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 13 Dec 2021 20:38 UTC

In article <j1pj4fFq3mbU3@mid.individual.net>,
Robert Latest <boblatest@yahoo.com> wrote:
>Dick wrote:
>>>>>>> Well, that is your opinion.
>>>>>>
>>>>>> More accurately, it is my belief.
>>>>>
>>>>> There is no difference between an opinion and a belief.
>>>>
>>>> There is in the way that I use these two words.
>>>
>>> Give me an example of how you could have an opinion about something and not
>>> have it be your belief.
>>>
>>> And/or vice versa.
>>>
>> There's a difference in how most people use the words.
>
>Is that your opinion or your belief?

Apparently, both.

And that's basically my point.

Anyway, and for what it's worth, I basically reserve the word "belief" for
matters of religion (where, by religion, I actually mean any situation
where people believe a thing with no evidence). Anything else is an
opinion.

And, in terms of the words, I would use, I would usually say "Well, I think
that ...". Very rarely, would I say "I believe that ..." (unless I was in
the area of religion).

--
The last time a Republican cared about you, you were a fetus.

Re: on why declare a struct with a single array in it

<86v8zq460v.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19412&group=comp.lang.c#19412

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Wed, 15 Dec 2021 00:38:24 -0800
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <86v8zq460v.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com> <sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com> <sp5c2k$1p856$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="87e29f815fda23c6ea6c6dd22211e8ad";
logging-data="12712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0uegFNrdYDa9wudSkf3rWZYsR3pQs7Do="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:Hb/cS+wio5IWmDbYMGP90h6syKk=
sha1:xCiPZ962GmKZmDl6KdndbMLxOFk=
 by: Tim Rentsch - Wed, 15 Dec 2021 08:38 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:

> In article <861r2h7pu4.fsf@linuxsc.com>,
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>
>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>> ...
>>>
>>>>> Well, that is your opinion.
>>>>
>>>> More accurately, it is my belief.
>>>
>>> There is no difference between an opinion and a belief.
>>
>> There is in the way that I use these two words.
>
> Give me an example of how you could have an opinion about
> something and not have it be your belief.
>
> And/or vice versa.

Don't you think it would be better first to try to find out the
sense in which I mean the two words, rather than steering the
discussion towards a pointless and futile argument?

Re: on why declare a struct with a single array in it

<spcj3c$1ss42$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19414&group=comp.lang.c#19414

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Wed, 15 Dec 2021 11:21:16 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <spcj3c$1ss42$1@news.xmission.com>
References: <86tughjjm7.fsf@levado.to> <861r2h7pu4.fsf@linuxsc.com> <sp5c2k$1p856$1@news.xmission.com> <86v8zq460v.fsf@linuxsc.com>
Injection-Date: Wed, 15 Dec 2021 11:21:16 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1994882"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Wed, 15 Dec 2021 11:21 UTC

In article <86v8zq460v.fsf@linuxsc.com>,
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>gazelle@shell.xmission.com (Kenny McCormack) writes:
>
>> In article <861r2h7pu4.fsf@linuxsc.com>,
>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>
>>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>>
>>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>>> ...
>>>>
>>>>>> Well, that is your opinion.
>>>>>
>>>>> More accurately, it is my belief.
>>>>
>>>> There is no difference between an opinion and a belief.
>>>
>>> There is in the way that I use these two words.
>>
>> Give me an example of how you could have an opinion about
>> something and not have it be your belief.
>>
>> And/or vice versa.
>
>Don't you think it would be better first to try to find out the
>sense in which I mean the two words, rather than steering the
>discussion towards a pointless and futile argument?

I have been doing exactly that - trying to get you to explain how, in your
terms, the words differ in meaning.

My own view is that while the words are effectively synonyms, people tend
to use each of them in different contexts. As I said earlier, to me, a
"belief" is an opinion not backed by evidence. Usually, these "beliefs"
are in the general area of religion - you know, virgin births, talking
snakes, 6Kyo Earth, etc.

--
To be evangelical is to spend every waking moment hovering around
two emotional states: fear and rage. Evangelicals are seriously the
angriest and most vicious bunch of self-pitying, constantly-moaning
whinybutts I've ever encountered.

Re: on why declare a struct with a single array in it

<86r1ad4td2.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19421&group=comp.lang.c#19421

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Wed, 15 Dec 2021 10:26:33 -0800
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <86r1ad4td2.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <861r2h7pu4.fsf@linuxsc.com> <sp5c2k$1p856$1@news.xmission.com> <86v8zq460v.fsf@linuxsc.com> <spcj3c$1ss42$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="87e29f815fda23c6ea6c6dd22211e8ad";
logging-data="1613"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+a9E4d8jmQejkglO3NN5FrfL1hllSRRBI="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:E0Ipbo5XwvSFMQ5miPDEgrBLC6Y=
sha1:Cjkfxv2I5mjrpo71dLrAri35/M8=
 by: Tim Rentsch - Wed, 15 Dec 2021 18:26 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:

> In article <86v8zq460v.fsf@linuxsc.com>,
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>
>>> In article <861r2h7pu4.fsf@linuxsc.com>,
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>>
>>>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>>>
>>>>> In article <86h7bf6vhd.fsf@linuxsc.com>,
>>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>>>>> ...
>>>>>
>>>>>>> Well, that is your opinion.
>>>>>>
>>>>>> More accurately, it is my belief.
>>>>>
>>>>> There is no difference between an opinion and a belief.
>>>>
>>>> There is in the way that I use these two words.
>>>
>>> Give me an example of how you could have an opinion about
>>> something and not have it be your belief.
>>>
>>> And/or vice versa.
>>
>> Don't you think it would be better first to try to find out the
>> sense in which I mean the two words, rather than steering the
>> discussion towards a pointless and futile argument?
>
> I have been doing exactly that - trying to get you to explain how,
> in your terms, the words differ in meaning.

Ahh. In that case, I believe that every even number greater than
two is the sum of two primes.

Re: on why declare a struct with a single array in it

<87mtl19074.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19422&group=comp.lang.c#19422

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Wed, 15 Dec 2021 10:45:19 -0800
Organization: None to speak of
Lines: 14
Message-ID: <87mtl19074.fsf@nosuchdomain.example.com>
References: <86tughjjm7.fsf@levado.to> <86h7bf6vhd.fsf@linuxsc.com>
<sp4ros$1p0q9$1@news.xmission.com> <861r2h7pu4.fsf@linuxsc.com>
<sp5c2k$1p856$1@news.xmission.com> <86v8zq460v.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="fe374b8d16ad3bae417678ef037ed6c6";
logging-data="13538"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gHmTCLyLt6W2iZtn5dwr3"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:AC9innF8V04sSg/ha6YSPnO2YZs=
sha1:WvUqq28+gPv6ktdEzhpQS1kdj+o=
 by: Keith Thompson - Wed, 15 Dec 2021 18:45 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
[...]
> Don't you think it would be better first to try to find out the
> sense in which I mean the two words, rather than steering the
> discussion towards a pointless and futile argument?

No, because you've passed up numerous opportunities to explain what
you mean. If you had wanted to avoid "a pointless and futile
argument", you could have done so easily.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: on why declare a struct with a single array in it

<86zgnpp665.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20068&group=comp.lang.c#20068

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 21 Jan 2022 05:30:42 -0800
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <86zgnpp665.fsf@linuxsc.com>
References: <86tughjjm7.fsf@levado.to> <sn5qji$3ri$1@dont-email.me> <sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me> <sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org> <87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad> <874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me> <875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me> <KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me> <sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me> <sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com> <sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com> <sp2i63$qh3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="9bbd2bd2338bc444f9d0c408d9cb7c1c";
logging-data="20633"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18l61BPf52ZdLBP/8BFYGQ8+tZfaBt1SP4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:CdeOt3iAl8nSV6gxo5uqrgnTDb8=
sha1:4gMWAqUxfLQkHV5WxtDpSWYoPFQ=
 by: Tim Rentsch - Fri, 21 Jan 2022 13:30 UTC

Bart <bc@freeuk.com> writes:

> On 11/12/2021 14:56, Tim Rentsch wrote:
>
>> Bart <bc@freeuk.com> writes:
>>
>>> On 10/12/2021 09:47, Tim Rentsch wrote:
>>>
>>>> Manfred <noname@add.invalid> writes:
>>>>
>>>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>>>
>>>>>> An implementation can do better, given this new information, but there
>>>>>> are no new limitations or restrictions.
>>>>>
>>>>> Well, requiring the programmer to keep track of the block size is a
>>>>> significant programming overhead - if it is unused, it's a significant
>>>>> waste I'd rather not pay for.
>>>>
>>>> Anyone who seriously proposes having to supply a size argument to
>>>> free memory for a general purpose allocator like malloc() either
>>>> hasn't bothered to think or doesn't know how to think. Kind of
>>>> par for the course for the long-running Bart and David show.
>>>
>>> Well, that is your opinion.
>>
>> More accurately, it is my belief.
>>
>>> You haven't really given any of the
>>> advantages of having this extra overhead in the allocator that a
>>> program may not want or need for any or all of its allocations.
>>
>> In point of fact, I haven't said anything at all about what is
>> needed to implement either kind of allocator interface.
>>
>> Why don't you write and post code that implements the sort
>> of interface you are advocating, so there can be meaningful
>> discussion about it?
>
> It's a big job, and there are many ways of doing it, so I'm not
> going to attempt it here. [summary results from a non-C
> environment]

Yes, as usual you aren't interested in a meaningful discussion.
Just the usual bait-and-switch to offtopic.

Re: on why declare a struct with a single array in it

<ssedlm$2tb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20069&group=comp.lang.c#20069

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: on why declare a struct with a single array in it
Date: Fri, 21 Jan 2022 13:49:44 +0000
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <ssedlm$2tb$1@dont-email.me>
References: <86tughjjm7.fsf@levado.to> <sn5qji$3ri$1@dont-email.me>
<sn5rc0$1i81$1@gioia.aioe.org> <sn5ukn$2ir$1@dont-email.me>
<sn6iam$n5t$1@dont-email.me> <sn8kq9$tep$1@gioia.aioe.org>
<87czmwosiq.fsf@nosuchdomain.example.com> <Y2UlJ.79170$ya3.75666@fx38.iad>
<874k87q35r.fsf@nosuchdomain.example.com> <snaq53$voh$1@dont-email.me>
<875ysmjsfz.fsf@nosuchdomain.example.com> <snc3a0$6gs$1@dont-email.me>
<KvhmJ.55056$np6.2360@fx46.iad> <snditr$7l1$1@dont-email.me>
<sne3b7$1mre$1@gioia.aioe.org> <snebg4$jtk$1@dont-email.me>
<sneuje$1qm$1@gioia.aioe.org> <86pmq47pvb.fsf@linuxsc.com>
<sovbmf$b13$1@dont-email.me> <86h7bf6vhd.fsf@linuxsc.com>
<sp2i63$qh3$1@dont-email.me> <86zgnpp665.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 Jan 2022 13:49:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="92f87da41fcb802c7497fc7390a91dd7";
logging-data="2987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qVreUyh+W5ZwnvCbkoRTFM6J7vJVgp5A="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:+lxLL16fWMDu+0F3MMuc21K2vrg=
In-Reply-To: <86zgnpp665.fsf@linuxsc.com>
 by: Bart - Fri, 21 Jan 2022 13:49 UTC

On 21/01/2022 13:30, Tim Rentsch wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 11/12/2021 14:56, Tim Rentsch wrote:
>>
>>> Bart <bc@freeuk.com> writes:
>>>
>>>> On 10/12/2021 09:47, Tim Rentsch wrote:
>>>>
>>>>> Manfred <noname@add.invalid> writes:
>>>>>
>>>>>> On 11/21/2021 9:51 PM, David Brown wrote:
>>>>>>
>>>>>>> An implementation can do better, given this new information, but there
>>>>>>> are no new limitations or restrictions.
>>>>>>
>>>>>> Well, requiring the programmer to keep track of the block size is a
>>>>>> significant programming overhead - if it is unused, it's a significant
>>>>>> waste I'd rather not pay for.
>>>>>
>>>>> Anyone who seriously proposes having to supply a size argument to
>>>>> free memory for a general purpose allocator like malloc() either
>>>>> hasn't bothered to think or doesn't know how to think. Kind of
>>>>> par for the course for the long-running Bart and David show.
>>>>
>>>> Well, that is your opinion.
>>>
>>> More accurately, it is my belief.
>>>
>>>> You haven't really given any of the
>>>> advantages of having this extra overhead in the allocator that a
>>>> program may not want or need for any or all of its allocations.
>>>
>>> In point of fact, I haven't said anything at all about what is
>>> needed to implement either kind of allocator interface.
>>>
>>> Why don't you write and post code that implements the sort
>>> of interface you are advocating, so there can be meaningful
>>> discussion about it?
>>
>> It's a big job, and there are many ways of doing it, so I'm not
>> going to attempt it here. [summary results from a non-C
>> environment]
>
> Yes, as usual you aren't interested in a meaningful discussion.
> Just the usual bait-and-switch to offtopic.

WTF?

You asked me to write and post code, and I wrote and posted code, and IN
C. (Which, since it was 6 weeks ago, has now been removed in a periodic
clean-up.)

What exactly did you want, a completed, production-ready memory
allocation scheme? The scheme I demonstrated was one I was already using
myself, and I show that it gave significant improvements over regular
malloc/free.

I notice you didn't post any code..

And what topic did I switch to? The sub-topic was memory allocators, and
my code demonstrated an allocator using caller-retained size into to
signicantly improve an allocation benchmark.

You're a fucking idiot.

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor