<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">	<channel>		<title>All Blog Comments</title>		<language>en-us</language>		<link>http://preshing.com</link>		<description>All comments from Preshing on Programming</description><item>
<author>Jeff Preshing</author><title>Jeff Preshing - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1099218301</link><description>You&amp;#039;re not doing anything wrong. It&amp;#039;s just not a complete program, since the definition of galaxy::blast isn&amp;#039;t given. </description><pubDate>Sun, 18 Apr 2021 20:45:19 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1099218301</guid></item><item>
<author>Maksadbek</author><title>Maksadbek - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1099174039</link><description>The first example code can&amp;#039;t be linked Clang 12: &lt;a href=&quot;https://godbolt.org/z/evP4sq8EP&quot; target=&quot;_blank&quot;&gt;https://godbolt.org/z/evP4sq8EP&lt;/a&gt; Am I doing anything wrong ? </description><pubDate>Sat, 17 Apr 2021 08:35:46 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1099174039</guid></item><item>
<author>Mario</author><title>Mario - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098692667</link><description>Thank you for the article, it&amp;#039;s very clear with beautiful drawings. </description><pubDate>Thu, 1 Apr 2021 06:35:50 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098692667</guid></item><item>
<author>dbjdbj</author><title>dbjdbj - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098353520</link><description>Was ADL invented so that iostreams user-defined streaming operators are possible? </description><pubDate>Fri, 19 Mar 2021 09:55:44 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098353520</guid></item><item>
<author>ilian</author><title>ilian - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098283048</link><description>Great article! Kudos for including E.Honda! Also would be great if you add some fn() call conventions also. </description><pubDate>Tue, 16 Mar 2021 21:47:58 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098283048</guid></item><item>
<author>Jeff Preshing</author><title>Jeff Preshing - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098273236</link><description>Thanks! The diagrams were made in Inkscape. </description><pubDate>Tue, 16 Mar 2021 12:35:53 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098273236</guid></item><item>
<author>cplusplus.es</author><title>cplusplus.es - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098270675</link><description>Great article and very good explanation. Thanks for sharing with the community! </description><pubDate>Tue, 16 Mar 2021 10:08:45 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098270675</guid></item><item>
<author>Ihar</author><title>Ihar - How C   Resolves a Function Call</title><link>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098264512</link><description>Great Article. What soft/tool/approach did you used for creating such good diagrams/drawings ? </description><pubDate>Tue, 16 Mar 2021 04:12:25 +0000</pubDate><guid>http://127.0.0.1:4000/20210315/how-cpp-resolves-a-function-call#IDComment1098264512</guid></item><item>
<author>Garcha Sprgchma</author><title>Garcha Sprgchma - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091795910</link><description>I am looking more on the API design of IO library, it is very possible that the usage area of plywood may not require such close().  I came to the case with explicit close-as-terminate when tried to do client side of SMTP. It was implemented as open()+stream: open() get different parameters, establishes (or reuses) connection and returns an output stream.  This stream is used to push email to the server, it should have explicit fallible close-as-terminate method to complete the &amp;#039;DATA&amp;#039; submission command and get &amp;#039;250 OK&amp;#039; or error response from the server.    {   ..   output_stream os=smtp.open_submission(sender, recipients, extra_params);   os.write(sizeof(email_bytes), email_bytes);   os.writeEnd(); //fallible close() }  It can&amp;#039;t be placed into destructor because destructor should not throw an exception.  </description><pubDate>Wed, 15 Jul 2020 04:27:55 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091795910</guid></item><item>
<author>Jeff Preshing</author><title>Jeff Preshing - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091739477</link><description>Right now the underlying pipe is closed in the In/OutStream destructor. But I&amp;#039;m open to adding a close() member function (or equivalent) if it exposes useful new functionality. (Everything in Plywood has been implemented on an as-needed basis so far.)    I&amp;#039;d like to understand the problem you&amp;#039;re describing a little better. Can you give an example of a bug that you want to be able to avoid? </description><pubDate>Sun, 12 Jul 2020 19:10:07 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091739477</guid></item><item>
<author>Jeff Preshing</author><title>Jeff Preshing - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091739391</link><description>Hmm, I&amp;#039;ll admit that when I replied, I was thinking about readers (InStream), even though your original question first mentioned StringWriter.    I think you&amp;#039;re right about StringWriters. When the application writes text to a StringWriter, it&amp;#039;s providing all the source string(s), and so the I/O system *could* convert directly from the source string to the temporary output buffer. At least for newline conversion (let&amp;#039;s say).    This would change the API for StringWriter to some extent, and we would have to reserve a few bits from InStream::status to indicate what kind of newline conversion is performed by the StringWriter, but I think it would work. So that might not be a bad suggestion. I&amp;#039;m still not sure it would be easy/worthwhile to eliminate one of the buffers in the StringReader case though. </description><pubDate>Sun, 12 Jul 2020 19:03:13 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091739391</guid></item><item>
<author>Garcha Sprgchma</author><title>Garcha Sprgchma - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091724420</link><description>It is interesting how you are going to design IO stream ending/termination. See - this ubiquitous IO stream concept modelling the _infinite_ data steam. Termination is usually bound with the releasing resource: that is close(), dispose() etc methods. But i think it is not correct - releasing is a no-fail operation and for termination you need to transfer &amp;quot;there are no more data&amp;quot; knowledge to the other side - and like any other transfer/write() it may fail.  Socket&amp;#039;s graceful termination, &amp;quot;you should check result of close() when working with file&amp;quot; etc - for me they are all band-aid to fix this misdesign. So yes i would like to see how this can be done in plywood   </description><pubDate>Sun, 12 Jul 2020 03:27:27 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091724420</guid></item><item>
<author>Ivan Bobev</author><title>Ivan Bobev - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091679260</link><description>&amp;gt; To flip the question back around, how would you expect to eliminate one of the buffers?   It seems to me that the amount of the intermediate memory needed for some types of converters/filters is significantly lower than a whole buffer. For example for removing &amp;#039;\r&amp;#039; character only the current byte is needed and for converting to UTF-8 up to 4 bytes are needed, but it is possible that I totally misunderstood something. </description><pubDate>Thu, 9 Jul 2020 21:12:33 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091679260</guid></item><item>
<author>Jeff Preshing</author><title>Jeff Preshing - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091677987</link><description>That&amp;#039;s a good question. One possible answer is that it&amp;#039;s simple this way. Another possible answer is that the converted data has to go somewhere, and Plywood&amp;#039;s approach is to manage the destination buffer so that the caller doesn&amp;#039;t have to. And while I didn&amp;#039;t mention it in this post, there are functions to help you interpret the data in its &amp;quot;final form&amp;quot;: For example, if you expect to read a binary message that&amp;#039;s N bytes long, you can call &lt;a href=&quot;https:\/\/plywood.arc80.com\/docs\/modules\/runtime\/api\/io\/InStream#tryMakeBytesAvailable&quot; target=&quot;_blank&quot;&gt;InStream::tryMakeBytesAvailable(N)&lt;/a&gt; -- this will make sure that there are always N bytes available to read contiguously in memory starting at curByte, assuming EOF is not encountered.  To flip the question back around, how would you expect to eliminate one of the buffers? For example, what kind of data would you be reading? If you&amp;#039;re reading a line of text, you don&amp;#039;t know how long the line will be until after you&amp;#039;ve read it, so in general, there&amp;#039;s no way to know what size of String to allocate ahead of time. </description><pubDate>Thu, 9 Jul 2020 19:39:54 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091677987</guid></item><item>
<author>Ivan Bobev</author><title>Ivan Bobev - I/O in Plywood</title><link>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091672077</link><description>I cannot understand why in the case of StringWritter adapter a separate buffer is needed for the adapter and the actual stream? Isn&amp;#039;t it possible to do the conversions on the fly and to use only one buffer?  The same question arises for the StringReader case? </description><pubDate>Thu, 9 Jul 2020 12:42:43 +0000</pubDate><guid>http://127.0.0.1:4000/20200708/io-in-plywood#IDComment1091672077</guid></item><item>
<author>Kaja3</author><title>Kaja3 - xkcd Password Generator</title><link>http://preshing.com/20110811/xkcd-password-generator#IDComment1065295443</link><description>You do know they crack passwords based off entering a series of symbols in an order, until they use them up, and then add another character to the sequence. That would take hackers a few weeks, but nonetheless not very long, to crack it. In this case, quantity would surpass quality. And hacked passwords you cannot normally replicate are even better, as password cracking software won&amp;#039;t take into consideration those passwords. </description><pubDate>Wed, 12 Sep 2018 22:41:03 +0000</pubDate><guid>http://preshing.com/20110811/xkcd-password-generator#IDComment1065295443</guid></item><item>
<author>Kaja3</author><title>Kaja3 - xkcd Password Generator</title><link>http://preshing.com/20110811/xkcd-password-generator#IDComment1065295351</link><description>If your password has at least 4 nice, long words, and all the words are relevant to each other, and are based off something you like (ex. timetravellingwashingmachines for Mario and Rabbids: Kingdom Battle fans), you will have no problem memorizing them, and they will score high on this website &lt;a href=&quot;https://howsecureismypassword.net/&quot; target=&quot;_blank&quot;&gt;https://howsecureismypassword.net/&lt;/a&gt; . &lt;a href=&quot;https://howsecureismypassword.net/&quot; target=&quot;_blank&quot;&gt;https://howsecureismypassword.net/&lt;/a&gt; is an online password test that allows you to see how long it takes for hacking software to crack your passcode. (the example i gave was measured to take 3 sextillion years to crack, but i memorized it almost instantly) </description><pubDate>Wed, 12 Sep 2018 22:33:31 +0000</pubDate><guid>http://preshing.com/20110811/xkcd-password-generator#IDComment1065295351</guid></item><item>
<author>Eddie Edwards</author><title>Eddie Edwards - Implementing a Recursive Mutex</title><link>http://preshing.com/20120305/implementing-a-recursive-mutex#IDComment1064792876</link><description>This is a nice idea and it works, but it means the golden path is the recursively-taken case.  The golden path should be the uncontended-nonrecursively-taken case.  Comparing ctx to owner and taking a branch when they&amp;#039;re not equal is a waste of time for this case. </description><pubDate>Wed, 22 Aug 2018 14:28:25 +0000</pubDate><guid>http://preshing.com/20120305/implementing-a-recursive-mutex#IDComment1064792876</guid></item><item>
<author>Jeff Preshing</author><title>Jeff Preshing - Memory Ordering at Compile Time</title><link>http://preshing.com/20120625/memory-ordering-at-compile-time#IDComment1064709203</link><description>Yes, if you make it a configuration option in your own project! Linux has its own configuration option for this: CONFIG_SMP. It&amp;#039;s checked throughout the Linux source code to know whether it&amp;#039;s compiling a kernel that will run on single processor system or multiple processor system. </description><pubDate>Sat, 18 Aug 2018 17:37:20 +0000</pubDate><guid>http://preshing.com/20120625/memory-ordering-at-compile-time#IDComment1064709203</guid></item><item>
<author>Poxma</author><title>Poxma - Memory Ordering at Compile Time</title><link>http://preshing.com/20120625/memory-ordering-at-compile-time#IDComment1064698828</link><description>&amp;quot;The Linux kernel exposes several CPU fence instructions through preprocessor macros such as smb_rmb, and those macros are reduced to simple compiler barriers when compiling for a single-processor system&amp;quot;. When &amp;quot;compiling&amp;quot;, is it possible for the compiler  to known that the program will run in &amp;quot;a single-processor system&amp;quot; ? </description><pubDate>Sat, 18 Aug 2018 05:21:38 +0000</pubDate><guid>http://preshing.com/20120625/memory-ordering-at-compile-time#IDComment1064698828</guid></item>	</channel></rss>