- Semantics of comma operator - 4 Updates
- comp.lang.c++.moderated update - 3 Updates
- This post showing much we want Rick C hodgin to leave this group - 4 Updates
- Peter Cheung's posts - 1 Update
- Inverse Transubstantiation (Buns) - 3 Updates
Vir Campestris <vir.campestris@invalid.invalid>: Jan 11 09:28PM On 09/01/2018 22:27, Geoff wrote: > It's a text file. The usage appears twice, counting the file > characters first, allocating memory, then rewind and load the file > into the allocated buffer. Seek to end. ftell. Seek to start. Allocate buffer. Read. You don't need to read the file twice. Andy |
"James R. Kuyper" <jameskuyper@verizon.net>: Jan 11 05:01PM -0500 On 01/11/2018 04:28 PM, Vir Campestris wrote: >> characters first, allocating memory, then rewind and load the file >> into the allocated buffer. > Seek to end. ... The C++ standard library function fseek() is defined only by cross-referencing the C standard, and the corresponding iostream facilities have their behavior defined in terms of fseek(). C 2011, 7.21.9.2p3: "A binary stream need not meaningfully support fseek calls with a whence value of SEEK_END". Note that this is NOT 'implementation-defined" behavior, so an implementation is under no obligation to document whether it meaningfully supports SEEK_END. |
legalize+jeeves@mail.xmission.com (Richard): Jan 11 11:00PM [Please do not mail me a copy of your followup] Vir Campestris <vir.campestris@invalid.invalid> spake the secret code >> characters first, allocating memory, then rewind and load the file >> into the allocated buffer. >Seek to end. ftell. Seek to start. Allocate buffer. Read. Isn't it surprising how many people don't know this trick? This method is portable, but a non-portable alternative is to use a filesystem API to obtain the file size (stat in posix, GetFileSize{,Ex} in Windows). In C++17, you can call std::filesystem::file_size as well. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jan 12 12:26AM +0100 On 1/11/2018 11:01 PM, James R. Kuyper wrote: > facilities have their behavior defined in terms of fseek(). > C 2011, 7.21.9.2p3: "A binary stream need not meaningfully support fseek > calls with a whence value of SEEK_END". Shouldn't that be "needs"? > Note that this is NOT 'implementation-defined" behavior, so an > implementation is under no obligation to document whether it > meaningfully supports SEEK_END. It would be interesting to know the (OS or storage) systems where `SEEK_END` can't be relied on in practice. I can't quite grok what it's about. For a pipe or tape drive or non-seekable stream, or generally where the request can't be satisfied, `fseek` will just return non-zero. So what's that "meaningfully" about? Cheers!, - Alf (baffled) |
legalize+jeeves@mail.xmission.com (Richard): Jan 11 08:56PM [Please do not mail me a copy of your followup] Just a quick post to update everyone on the status of comp.lang.c++.moderated. The moderation software appears to be working properly, but it relies on an email->news gateway that has been taken down. I'm working with my ISP to get another email->news gateway established so that we can resume moderation. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Thiago Adams <thiago.adams@gmail.com>: Jan 11 02:15PM -0800 Please can you post the details of this setup in comp Lang c? |
legalize+jeeves@mail.xmission.com (Richard): Jan 11 10:56PM [Please do not mail me a copy of your followup] Thiago Adams <thiago.adams@gmail.com> spake the secret code >Please can you post the details of this setup in comp Lang c? Is there a moderated newsgroup for C? -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
cdalten@gmail.com: Jan 10 04:48PM -0800 I don't know if this is true for all compilers, but the ones that I've helped work on were hard to code. Really hard. Seriously. I remember our one project manager saying he had to back down on what he expected because he felt that some of us were overwhelmed. In particular, the part it question the portion of the optimizer that traversed the abstract syntax tree. |
Manfred <noname@invalid.add>: Jan 11 01:38PM +0100 On 1/10/2018 10:03 PM, David Brown wrote: > some on-topic posts - you contribute nothing but your hatred. I really > don't care what Rick may or may not have done to provoke you - please > take your unpleasantness elsewhere. Agreed, David +1 |
legalize+jeeves@mail.xmission.com (Richard): Jan 11 06:30PM [Please do not mail me a copy of your followup] cdalten@gmail.com spake the secret code >because he felt that some of us were overwhelmed. In particular, the >part it question the portion of the optimizer that traversed the >abstract syntax tree. While I haven't attempted any contributions to the core compiler in the clang source base, I have been impressed with their code organization and general tidyness. That doesn't decrease the intrinsic complexity in the problem domain, but having well organized source code at least takes a whole bunch of things off the table that would detract from understanding. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Lynn McGuire <lynnmcguire5@gmail.com>: Jan 11 03:47PM -0600 On 1/10/2018 3:03 PM, David Brown wrote: > some on-topic posts - you contribute nothing but your hatred. I really > don't care what Rick may or may not have done to provoke you - please > take your unpleasantness elsewhere. +1 Lynn |
bitrex <bitrex@de.lete.earthlink.net>: Jan 11 10:43AM -0500 >> "We have to execute you because ah...transubstantiation! Yeah, >> transubstantiation. That's the ticket" > Rick C. Hodin's mother got cancer and is dead. Thanks god Wow, that's fascinating. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 10 03:51PM -0800 Leigh Johnston wrote: > I am mocking your beliefs because you spam them in this newsgroup. You mock me by impersonating me. You are unable to stand up as Leigh Johnston and speak your opposition viewpoint. You hide behind a "Mr. Flibble" persona, and a pseudo-"Rick C. Hodgin" persona. You are unable to self-identify. You need a mask to move. You don't even know who you are, and you presume to tell me what's right and wrong? It's conduct unbecoming such a remarkable creation of God (you). -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jan 10 11:59PM On 10/01/2018 23:51, Rick C. Hodgin wrote: > You don't even know who you are, and you presume to tell > me what's right and wrong? > It's conduct unbecoming such a remarkable creation of God (you). Oh but I am speaking my opposition viewpoint in the form of satire; comedy is a great (and efficient) way to ridicule the ridiculous. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jan 11 12:01AM On 10/01/2018 23:59, Mr Flibble wrote: > Oh but I am speaking my opposition viewpoint in the form of satire; > comedy is a great (and efficient) way to ridicule the ridiculous. > /Flibble If you want the mockery to stop then all you have to do is stop spamming this technical newsgroup with your religious vomit. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment