🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #669

Re: “The end of software secrecy is almost upon

#669
From: Chris M. Thomasson
Date: Wed, 04 Nov 2026 10:48
41 lines
3735 bytes
On 10/27/2026 11:36 AM, Scott Lurndal wrote:
> Peter Flass <Peter@Iron-Spring.com> writes:
>> On 10/27/26 08:00, James Kuyper wrote:
>>> On 2026-10-26 17:45, Lawrence D’Oliveiro wrote:
>>>> On Mon, 26 Oct 2026 13:26:38 -0700, Chris M. Thomasson wrote:
>>> [restore snippage]>> On 2026-10-25 23:39, Lawrence D’Oliveiro wrote:
>>>>>> On Sun, 25 Oct 2026 19:11:48 -0700, Chris M. Thomasson wrote:
>>>>>>
>>>>>>> A caller provided buffer is normal with a lot of API's out there.
>>>>>>
>>>>>> No it isn’t. It’s not a good way to manage things, anyway: instead of
>>>>>> solving the resource-allocation problem once and for all in the
>>>>>> library API, you are pushing the burden onto all the client code, each
>>>>>> one of which has to solve it for itself.
>>>>>>
>>>>>> That’s a dumb way to design things.
>>>
>>>>> HUH? How do you call say, fread without a user provided buffer?
>>>>
>>>> Relevance being?
>>>
>>> fread() uses a caller-provided buffer, which, according to your previous
>>> comment, "push[es] the burden onto all the client code, each one of
>>> which has to solve it for itself", so according to you, "That's a dumb
>>> way to design things"..If that isn't your actual opinion of fread(),
>>> your comments need to be at least a little more nuanced to avoid
>>> applying to fread().
>>
>> The difference is that the size of the buffer for fread() is the maximum
>> you want/expect to read. The size of an object is the size it is, not
>> necessarily what you expect. If you don't provide enough space you will
>> truncate.
> 
> Which isn't a significant issue with fread, since the underlying stdio
> buffer (or kernel file cache or terminal driver buffer) will hold the
> unread information for the next call to fread.
> 
> fread(3) is basically obsolete for most high-performance applications
> which map the file directly into the process address space (mmap).

Ditto.
Technical Details
Message-ID: <11cf2hi$irnr$8@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11amvre$15far$1@dont-email.me> <11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me> <11bd6ed$ttau$1@dont-email.me> <11bejnh$1eab6$1@dont-email.me> <11berc9$1ge43$1@dont-email.me> <11bm2kg$2d3a$1@dont-email.me> <11bm7mf$3thd$1@dont-email.me> <11bmctb$5l5h$1@dont-email.me> <11bmi1p$78mo$1@dont-email.me> <11bod1u$ugib$2@dont-email.me> <11bohmi$10aqu$2@dont-email.me> <11bqe9q$1k0hc$1@dont-email.me> <11bqk7c$1mc11$2@dont-email.me> <4b6ES.2085$y_V1.536@fx12.iad>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers
Subject: Re: “The end of software secrecy is almost upon
Date: Wed, 4 Nov 2026 02:48:17 -0800
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <11cf2hi$irnr$8@dont-email.me>
References: <11amvre$15far$1@dont-email.me> <11bbqns$fe31$1@dont-email.me>
 <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me>
 <11bd6ed$ttau$1@dont-email.me> <11bejnh$1eab6$1@dont-email.me>
 <11berc9$1ge43$1@dont-email.me> <11bm2kg$2d3a$1@dont-email.me>
 <11bm7mf$3thd$1@dont-email.me> <11bmctb$5l5h$1@dont-email.me>
 <11bmi1p$78mo$1@dont-email.me> <11bod1u$ugib$2@dont-email.me>
 <11bohmi$10aqu$2@dont-email.me> <11bqe9q$1k0hc$1@dont-email.me>
 <11bqk7c$1mc11$2@dont-email.me> <4b6ES.2085$y_V1.536@fx12.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 04 Nov 2026 10:48:18 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="618235"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/WPArcvULJ87enVBHBDRKELiVYAFnDRLk="; posting-host="65c3a1436ea8c08eef11f4b712204354"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1rIA4fUVhvCD88ohhymj/CFP4Pk= sha256:S+S/A1g33a+OtdSNWFGDihbAPM9x9zA+ewzCAGhVYc4=
	sha1:TqagkCNWPBsjlvZuTexIs7LbQRk= sha256:R29u2ZVTNbx80W20N6B9ot7X7hbR+Rfi2DRVJrS9XkQ=
In-Reply-To: <4b6ES.2085$y_V1.536@fx12.iad>
Content-Language: en-US