Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper
14.04.2018 00:06, John Snow wrote: On 04/13/2018 01:44 PM, Vladimir Sementsov-Ogievskiy wrote: will add, as always, thank you for natural rewording) Hm, I have a question: why do you often use double white-space " " between sentences? Is it something meaningful? There is some GREAT DEBATE in the English-speaking world over whether or not this is correct typography. At one point, it was thought that there should be two spaces after every full stop (".") to improve readability. Allegedly, this was most important for physical typesetting on typewriters. Since digital typography has taken off, some people argue that this is a relic and that semantically we ought to be using only one literal space after the full stop, and using various kerning and display parameters to extend the physical buffer between two sentences if desired. Famously in my mind, PEP8 mandates the two spaces after a period style. MLA says "One, unless your professor prefers two." https://style.mla.org/number-of-spaces-after-period/ Chicago Manual of Style mandates one space after the full stop. http://www.chicagomanualofstyle.org/qanda/data/faq/topics/OneSpaceorTwo.html Strunk & White uses one space after the period: https://www.legalwatercoolerblog.com/tag/strunk-and-white/ APA style (American Psychiatric Association) actually requests two spaces after a period for *manuscripts*: https://owl.english.purdue.edu/owl/resource/560/24/ I think it used to be the pedagogical norm to instruct students to type two spaces after a period. Most institutions (Python documentation excluded) do not recommend the practice currently. *cough* So it's not just the programming world that argues about things like "tabs vs spaces." Literary nerds do it too. I'm sure this email will be entirely without controversy. :) Happy Friday, --js Got it, thank you! -- Best regards, Vladimir
Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper
On 04/13/2018 01:44 PM, Vladimir Sementsov-Ogievskiy wrote: > > will add, as always, thank you for natural rewording) Hm, I have a > question: why do you often use double white-space " " between > sentences? Is it something meaningful? There is some GREAT DEBATE in the English-speaking world over whether or not this is correct typography. At one point, it was thought that there should be two spaces after every full stop (".") to improve readability. Allegedly, this was most important for physical typesetting on typewriters. Since digital typography has taken off, some people argue that this is a relic and that semantically we ought to be using only one literal space after the full stop, and using various kerning and display parameters to extend the physical buffer between two sentences if desired. Famously in my mind, PEP8 mandates the two spaces after a period style. MLA says "One, unless your professor prefers two." https://style.mla.org/number-of-spaces-after-period/ Chicago Manual of Style mandates one space after the full stop. http://www.chicagomanualofstyle.org/qanda/data/faq/topics/OneSpaceorTwo.html Strunk & White uses one space after the period: https://www.legalwatercoolerblog.com/tag/strunk-and-white/ APA style (American Psychiatric Association) actually requests two spaces after a period for *manuscripts*: https://owl.english.purdue.edu/owl/resource/560/24/ I think it used to be the pedagogical norm to instruct students to type two spaces after a period. Most institutions (Python documentation excluded) do not recommend the practice currently. *cough* So it's not just the programming world that argues about things like "tabs vs spaces." Literary nerds do it too. I'm sure this email will be entirely without controversy. :) Happy Friday, --js
Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper
21.03.2018 18:05, Eric Blake wrote: On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote: The helper will be reused for bitmaps namespace. Signed-off-by: Vladimir Sementsov-Ogievskiy--- nbd/server.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) +/* Read len bytes and check matching to the pattern. + * @match is set to true on empty query for _LIST_ and for query matching the + * @pattern. @match is never set to false. How about: Read @len bytes, and set @match to true if they match @pattern, or if @len is 0 and the client is performing _LIST_. @match is never set to false. will add, as always, thank you for natural rewording) Hm, I have a question: why do you often use double white-space " " between sentences? Is it something meaningful? At any rate, the refactoring is sane; and comment touchups are trivial, so Reviewed-by: Eric Blake -- Best regards, Vladimir
Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper
On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote: The helper will be reused for bitmaps namespace. Signed-off-by: Vladimir Sementsov-Ogievskiy--- nbd/server.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) +/* Read len bytes and check matching to the pattern. + * @match is set to true on empty query for _LIST_ and for query matching the + * @pattern. @match is never set to false. How about: Read @len bytes, and set @match to true if they match @pattern, or if @len is 0 and the client is performing _LIST_. @match is never set to false. At any rate, the refactoring is sane; and comment touchups are trivial, so Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org