Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #150513 > unrolled thread
| Started by | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| First post | 2020-03-12 20:18 +0000 |
| Last post | 2020-04-07 09:35 +0200 |
| Articles | 20 on this page of 74 — 20 participants |
Back to article view | Back to comp.lang.c
How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-12 20:18 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-12 20:26 +0000
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-12 20:30 +0000
Re: How to div only once to get remainder and quotient? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-03-12 20:40 -0700
Re: How to div only once to get remainder and quotient? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-03-12 16:38 -0400
Re: How to div only once to get remainder and quotient? richard@cogsci.ed.ac.uk (Richard Tobin) - 2020-03-12 20:44 +0000
Re: How to div only once to get remainder and quotient? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-03-12 17:00 -0400
Re: How to div only once to get remainder and quotient? richard@cogsci.ed.ac.uk (Richard Tobin) - 2020-03-13 09:35 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 11:12 +0100
Re: How to div only once to get remainder and quotient? scott@slp53.sl.home (Scott Lurndal) - 2020-03-12 22:16 +0000
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-12 22:39 +0000
Re: How to div only once to get remainder and quotient? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-03-12 19:51 -0400
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 00:47 +0000
Re: How to div only once to get remainder and quotient? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-03-12 23:02 -0400
Re: How to div only once to get remainder and quotient? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-03-12 20:39 -0700
Re: How to div only once to get remainder and quotient? scott@slp53.sl.home (Scott Lurndal) - 2020-03-13 15:00 +0000
Re: How to div only once to get remainder and quotient? Spiros Bousbouras <spibou@gmail.com> - 2020-03-14 08:35 +0000
Re: How to div only once to get remainder and quotient? jak <nospam@please.ty> - 2020-03-12 21:55 +0100
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-12 21:56 +0000
Re: How to div only once to get remainder and quotient? jak <nospam@please.ty> - 2020-03-12 23:26 +0100
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-12 21:11 +0000
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-12 21:57 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-12 22:23 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 01:05 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 11:33 +0100
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 11:03 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 14:31 +0100
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 15:12 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 18:03 +0100
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 18:01 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 19:06 +0100
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 19:12 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 13:34 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 15:00 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 20:34 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-13 21:41 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-14 01:47 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-14 12:24 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-14 16:35 +0000
Re: How to div only once to get remainder and quotient? Bart <bc@freeuk.com> - 2020-03-14 18:05 +0000
Re: How to div only once to get remainder and quotient? already5chosen@yahoo.com - 2020-03-13 03:52 -0700
Re: How to div only once to get remainder and quotient? Guillaume <message@bottle.org> - 2020-03-13 16:41 +0100
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-13 16:07 +0000
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-13 18:10 +0100
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-13 19:32 +0000
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-03-13 16:08 -0400
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-13 20:50 +0000
Re: How to div only once to get remainder and quotient? jameskuyper@stellarscience.com - 2020-03-13 16:05 -0700
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-13 23:42 +0000
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-03-13 19:59 -0400
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-14 00:07 +0000
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-03-13 20:27 -0400
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-14 01:37 +0000
Re: How to div only once to get remainder and quotient? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-04-02 07:45 -0700
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-02 08:09 -0700
Re: How to div only once to get remainder and quotient? gazelle@shell.xmission.com (Kenny McCormack) - 2020-04-02 16:03 +0000
Re: How to div only once to get remainder and quotient? Öö Tiib <ootiib@hot.ee> - 2020-04-04 04:31 -0700
Invitations (Was: How to div only once to get remainder and quotient?) gazelle@shell.xmission.com (Kenny McCormack) - 2020-04-04 17:04 +0000
Re: Invitations (Was: How to div only once to get remainder and quotient?) Öö Tiib <ootiib@hot.ee> - 2020-04-07 00:10 -0700
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-03-13 14:30 -0400
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-13 20:54 +0000
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 23:10 +0000
Re: How to div only once to get remainder and quotient? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-03-13 20:18 -0400
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-14 00:34 +0000
Re: How to div only once to get remainder and quotient? Francis Assissi <invalid@invalid.invalid> - 2020-03-14 01:47 +0000
Re: How to div only once to get remainder and quotient? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-03-13 14:39 -0600
Re: How to div only once to get remainder and quotient? felix@palmen-it.de (Felix Palmen) - 2020-03-13 22:10 +0100
Re: How to div only once to get remainder and quotient? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-03-13 16:26 -0600
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-14 16:41 +0100
Re: How to div only once to get remainder and quotient? felix@palmen-it.de (Felix Palmen) - 2020-03-14 17:00 +0100
Re: How to div only once to get remainder and quotient? David Brown <david.brown@hesbynett.no> - 2020-03-15 13:39 +0100
Re: How to div only once to get remainder and quotient? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-13 23:07 +0000
Re: How to div only once to get remainder and quotient? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-03-14 12:13 -0600
Re: How to div only once to get remainder and quotient? Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-07 09:35 +0200
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | already5chosen@yahoo.com |
|---|---|
| Date | 2020-03-13 03:52 -0700 |
| Message-ID | <5f742a85-91bc-4e65-a20c-3b2ca730a504@googlegroups.com> |
| In reply to | #150513 |
On Thursday, March 12, 2020 at 10:19:05 PM UTC+2, Francis Assissi wrote:
> The following code serves to convert a decimal number to binary,
> but this conversion requires dividing twice: once to get quotient,
> another to get the remainder. Is there a function to get both in a
> single operation like it is possible with Assembly?
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> #define LENGTH 32
>
> int main(void)
> {
> int number = 1234567890;
> char bin_string[LENGTH] = {0};
> char *ptr = bin_string + LENGTH - 1;
>
> memset(bin_string, '0', LENGTH);
> *ptr = '\0';
> --ptr;
> while(number > 0 && ptr > bin_string) {
> *ptr = '0' + number % 2;
> number /= 2;
> --ptr;
> }
> puts(bin_string);
> exit(EXIT_SUCCESS);
> }
Just don't worry about it.
All suggestions down the thread will make your code slower rather than faster than original.
Compiler are stupid, indeed, but not THAT stupid to not figure out what to do in your particular case. The only small help from you that can sometimes be useful to compiler is, in case you are sure that 'number' is always positive, to define it as 'unsigned int' instead of 'int'.
BTW, the code above converts *number* to binary string. Not a *decimal number*, just a number without qualification. In practice, on all machines that you are likely to ever care about, it would be a binary number.
[toc] | [prev] | [next] | [standalone]
| From | Guillaume <message@bottle.org> |
|---|---|
| Date | 2020-03-13 16:41 +0100 |
| Message-ID | <r4g9ka$5mu$1@gioia.aioe.org> |
| In reply to | #150513 |
Le 12/03/2020 à 21:18, Francis Assissi a écrit : > The following code serves to convert a decimal number to binary, > but this conversion requires dividing twice: once to get quotient, > another to get the remainder. Is there a function to get both in a > single operation like it is possible with Assembly? > (...) > *ptr = '0' + number % 2; > number /= 2; > (...) First thing to ask yourself is: what for? Any decent optimizing compiler will aggregate this into a single operation if the target's instruction set allows it. Your question may be general, but better yet here: you're only dividing by 2, so there are simpler ways of doing this, you don't even need a proper divide. Whether this will be more efficient once compiled or not completely depends on the compiler, compile options and target. C is not assembly. You're trying to micro-optimize. It often serves no purpose except making code harder to read, and compilers these days are much better at this that you seem to think. In other words, you're wasting your time. Just my 2 cents.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-13 16:07 +0000 |
| Message-ID | <r4gb45$87o$2@dont-email.me> |
| In reply to | #150550 |
> C is not assembly. You're trying to micro-optimize. Actually, I asked for a function instead of an optimized approach because I expect the optimization to happen somewhere, but after posting I realized a macro would be better, unless the compiler can take care of that if it is only a function. The real goal is to convert a number to a string representing a number of different base, binary just happened to be what I had in mind at the time. The fact that implementations does exactly what I did for div() is disappointing.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2020-03-13 18:10 +0100 |
| Message-ID | <r4gepf$bmv$1@dont-email.me> |
| In reply to | #150551 |
On 13/03/2020 17:07, Francis Assissi wrote: >> C is not assembly. You're trying to micro-optimize. > Actually, I asked for a function instead of an optimized approach because > I expect the optimization to happen somewhere, but after posting I > realized a macro would be better, unless the compiler can take care of > that if it is only a function. The real goal is to convert a number to a > string representing a number of different base, binary just happened to > be what I had in mind at the time. The fact that implementations does > exactly what I did for div() is disappointing. > I am not trying to be insulting here, but your understanding of C, assembly, cpus, and compilers is seriously out-of-date (or missing entirely). Don't use macros here. Don't use functions here. Don't use library calls. Don't faff around with "x & 1", "x >>= 1", or other nonsense. Write the code clearly in an obvious way. Make sure your compiler's optimisation is enabled. Then relax, sure in the knowledge that you could not possibly have ended up with more efficient object code (for the part of the code in question). Everything else you have been thinking about, everything else people have suggested that is contrary to this, is at best useless - and at worst, directly counter-productive. The "div" library functions made sense 20 or 30 years ago, perhaps. They have long ago been outdated as cpus and compilers have improved.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-13 19:32 +0000 |
| Message-ID | <r4gn3o$87o$3@dont-email.me> |
| In reply to | #150553 |
I am pretty certain this excerpt: >> Actually, I asked for a function instead of an optimized approach >> because I expect the optimization to happen somewhere, but after >> posting I realized a macro would be better, Especially in this excerpt: >> unless the compiler can take care of that if it is only a function. Even more blatantly in this excerpt: >> I expect the optimization to happen somewhere, Clearly suggests that optimization is not necessarily done by the program I write, the library, or the compiler, just one of these. The macro part came after I read the first answer. In short, you are trying to warn me about something I am aware of already.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-03-13 16:08 -0400 |
| Message-ID | <r4gp7q$mj3$1@dont-email.me> |
| In reply to | #150558 |
On 3/13/20 3:32 PM, Francis Assissi wrote: > I am pretty certain this excerpt: >>> Actually, I asked for a function instead of an optimized approach >>> because I expect the optimization to happen somewhere, but after >>> posting I realized a macro would be better, > Especially in this excerpt: >>> unless the compiler can take care of that if it is only a function. > Even more blatantly in this excerpt: >>> I expect the optimization to happen somewhere, > Clearly suggests that optimization is not necessarily done by the program > I write, the library, or the compiler, just one of these. The macro part > came after I read the first answer. Well, I didn't see anything that David wrote which suggested that he thought that you had incorrect ideas about where the optimizations would be done. Rather, he suggested that you have incorrect ideas about the likelihood of a compiler performing that optimization. > In short, you are trying to warn me about something I am aware of already. David was warning you against wasting time worrying about the unlikely possibility that a compiler might fail to perform this optimization. He was also warning you against writing unclear code in the belief that you had to write unclear code to deal with that unlikely possibility. None of the things you wrote and quoted above does anything to dispel the impression that you have given us, which is that you are worrying far too much about that possibility.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-13 20:50 +0000 |
| Message-ID | <r4grn0$61g$1@dont-email.me> |
| In reply to | #150559 |
> Well, I didn't see anything That was to David, not specifically you or the group.
[toc] | [prev] | [next] | [standalone]
| From | jameskuyper@stellarscience.com |
|---|---|
| Date | 2020-03-13 16:05 -0700 |
| Message-ID | <ae00e4d2-b0c3-43c6-9e87-7fb979d764bc@googlegroups.com> |
| In reply to | #150562 |
On Friday, March 13, 2020 at 4:50:49 PM UTC-4, Francis Assissi wrote: > > Well, I didn't see anything > That was to David, not specifically you or the group. If you don't want others participating in a private discussion, use e-mail, not usenet. Open discussion is what usenet is for.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-13 23:42 +0000 |
| Message-ID | <r4h5p2$h2c$1@dont-email.me> |
| In reply to | #150568 |
Yeah, but I answered in usenet, not e-mail.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-03-13 19:59 -0400 |
| Message-ID | <r4h6p8$j16$1@dont-email.me> |
| In reply to | #150571 |
On 3/13/20 7:42 PM, Francis Assissi wrote: > Yeah, but I answered in usenet, not e-mail. Yes, and when you answer in usenet, you are inviting the general public to participate in your discussion. If you don't want to issue such an invitation, don't post your answer to the internet.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-14 00:07 +0000 |
| Message-ID | <r4h77k$h2c$2@dont-email.me> |
| In reply to | #150572 |
> On 3/13/20 7:42 PM, Francis Assissi wrote: >> Yeah, but I answered in usenet, not e-mail. > > Yes, and when you answer in usenet, you are inviting the general public > to participate in your discussion. If you don't want to issue such an > invitation, don't post your answer to the internet. I tried to be subtle, I will be less subtle now. Nowhere in the post you replied to indicates that I am opposed to others participating in the discussion, I answered him in usenet, not e-mail.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-03-13 20:27 -0400 |
| Message-ID | <r4h8d9$slo$1@dont-email.me> |
| In reply to | #150573 |
On 3/13/20 8:07 PM, Francis Assissi wrote: ... > I tried to be subtle, I will be less subtle now. > Nowhere in the post you replied to indicates that I am opposed to others > participating in the discussion, I answered him in usenet, not e-mail. > If that wasn't your intended meaning when you wrote > That was to David, not specifically you or the group. then there was simply no reason to write that. Your failure to properly annotate quoted material, while annoying, didn't prevent me from figuring out who you were responding to, and nothing I said should have given you the impression that I didn't know that.
[toc] | [prev] | [next] | [standalone]
| From | Francis Assissi <invalid@invalid.invalid> |
|---|---|
| Date | 2020-03-14 01:37 +0000 |
| Message-ID | <r4hch3$h2c$4@dont-email.me> |
| In reply to | #150575 |
I will be even less subtle. I posted that in usenet, a place for open discussion where anyone can get in the middle of the discussion, there are a lot of people reading posts randomly, but despite my action of posting on usenet it isn't immediately obvious for reasons unknown to me that I am not opposed to anyone getting in the middle of the discussion, but that does not mean I won't tell someone that the message was directed at someone due to the content of the post being better understood by the person in question. > then there was simply no reason to write that. Let me correct you, you *think* there was no reason to write that, the reason behind that post will (with great chance) be picked up by James and (with great chance) make sense to James, but (with great chance) it won't be picked up by you or the rest of the group and will (with great chance) make no sense to you or the rest of the group. The message directed to David was (hopefully) taken in the best terms possible, the message directed to James was (hopefully) taken in the best terms possible, the message directed to you was (hopefully) taken in the best terms possible. This message will (with great chance) be understood by you, but (with great chance) will not be understood by the group.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2020-04-02 07:45 -0700 |
| Message-ID | <86a73u6j55.fsf@linuxsc.com> |
| In reply to | #150572 |
James Kuyper <jameskuyper@alumni.caltech.edu> writes: > On 3/13/20 7:42 PM, Francis Assissi wrote: > >> Yeah, but I answered in usenet, not e-mail. > > Yes, and when you answer in usenet, you are inviting the general public > to participate in your discussion. No I am not. I'm aware that my postings may be read by the general public, and I accept that I cannot prevent anyone who reads usenet from posting a followup, but that isn't the same as my inviting them to do so.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-04-02 08:09 -0700 |
| Message-ID | <ec03ad41-569b-4001-869c-7acfeeb1b922@googlegroups.com> |
| In reply to | #150952 |
On Thursday, April 2, 2020 at 10:45:57 AM UTC-4, Tim Rentsch wrote: > James Kuyper <jameskuyper@alumni.caltech.edu> writes: ... > > Yes, and when you answer in usenet, you are inviting the general public > > to participate in your discussion. > > No I am not. I'm aware that my postings may be read by the > general public, and I accept that I cannot prevent anyone > who reads usenet from posting a followup, but that isn't > the same as my inviting them to do so. I will concede the likelihood that you're unaware of the invitation that is implicit in the fact that you're posting this to a public forum.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2020-04-02 16:03 +0000 |
| Message-ID | <r652c3$lbc$1@news.xmission.com> |
| In reply to | #150952 |
In article <86a73u6j55.fsf@linuxsc.com>, Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: >James Kuyper <jameskuyper@alumni.caltech.edu> writes: > >> On 3/13/20 7:42 PM, Francis Assissi wrote: >> >>> Yeah, but I answered in usenet, not e-mail. >> >> Yes, and when you answer in usenet, you are inviting the general public >> to participate in your discussion. > >No I am not. I'm aware that my postings may be read by the >general public, and I accept that I cannot prevent anyone >who reads usenet from posting a followup, but that isn't >the same as my inviting them to do so. He (Kuyper) means "invite" in the slangy sense, like when someone says "If you leave your valuables in your unlocked car, you're just inviting someone to steal them". Pretty common usage, but of course, no one actually thinks that you sent out hand engraved invitations to the thieves of the world to come and share in your bounty. That's the sense in which Kuyper was speaking. -- If Jeb is Charlie Brown kicking a football-pulled-away, Mitt is a '50s housewife with a black eye who insists to her friends the roast wasn't dry.
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2020-04-04 04:31 -0700 |
| Message-ID | <0218e44f-21c7-4f1e-8c25-cbba933fba8d@googlegroups.com> |
| In reply to | #150959 |
On Thursday, 2 April 2020 19:03:25 UTC+3, Kenny McCormack wrote: > In article <86a73u6j55.fsf@linuxsc.com>, > Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: > >James Kuyper <jameskuyper@alumni.caltech.edu> writes: > > > >> On 3/13/20 7:42 PM, Francis Assissi wrote: > >> > >>> Yeah, but I answered in usenet, not e-mail. > >> > >> Yes, and when you answer in usenet, you are inviting the general public > >> to participate in your discussion. > > > >No I am not. I'm aware that my postings may be read by the > >general public, and I accept that I cannot prevent anyone > >who reads usenet from posting a followup, but that isn't > >the same as my inviting them to do so. > > He (Kuyper) means "invite" in the slangy sense, like when someone says "If > you leave your valuables in your unlocked car, you're just inviting someone > to steal them". Pretty common usage, but of course, no one actually thinks > that you sent out hand engraved invitations to the thieves of the world to > come and share in your bounty. > > That's the sense in which Kuyper was speaking. There is major difference. Leaving your valuables in unlocked car is passive inactivity of protecting those valuables that can be called "invitation" in rather metaphorical sense. Posting argumentative opinions and ideas in Usenet is active invitation for responses in direct sense. People who do not want discussion of their ideas and opinions do not post those in Usenet.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2020-04-04 17:04 +0000 |
| Subject | Invitations (Was: How to div only once to get remainder and quotient?) |
| Message-ID | <r6aenc$7m9$1@news.xmission.com> |
| In reply to | #151010 |
In article <0218e44f-21c7-4f1e-8c25-cbba933fba8d@googlegroups.com>, à ö Tiib <ootiib@hot.ee> wrote the obvious and superficial comment thusly: ... >Posting argumentative opinions and ideas in Usenet is active >invitation for responses in direct sense. People who do not >want discussion of their ideas and opinions do not post those >in Usenet. Yeah, that's the obvious comment to make, but the reality is a little deeper. See, the thing is - it used to be that if you wanted to enter into a private conversation between yourself and one other person, you would "take it to email". That was an integral part of the Usenet culture. However, a decade or so ago, a**holes starting spamming Usenet, and the result is that email was destroyed. Very few people now post to Usenet with valid email addresses (I still do, but I'm old school), so, effectively, you can't use that avenue anymore. The result is that you now have to post to the public board stuff which really belongs in private email. There are many sociological effects of this - I will not bore you with the details at this time, but they are available upon request - but the real takeaway is that people *should* respect the fact that they are not really invited to the party, even though it is being posted and carried out in public. They don't do this (as we have seen upthread here), but they *should*. Note also that the same phenomenem is playing out in web forums (GUI oriented Usenet-alikes) - where the various privacy laws that are being enacted around the globe are causing boards to remove the "private message" capability from their boards. As with Usenet, this forces people to carry out their private business in public. On one board that I use, in particular, the lack of PM really screws things up. It can get embarrassing, but, again, it would be better if people were more understanding of the fact that we live in a different world than we did 20 years ago. -- It's all Al Gore's fault...
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2020-04-07 00:10 -0700 |
| Subject | Re: Invitations (Was: How to div only once to get remainder and quotient?) |
| Message-ID | <4323eb39-cd93-43b1-88f2-eacbb5bc453d@googlegroups.com> |
| In reply to | #151014 |
On Saturday, 4 April 2020 20:04:52 UTC+3, Kenny McCormack wrote: > In article <0218e44f-21c7-4f1e-8c25-cbba933fba8d@googlegroups.com>, > Öö Tiib <ootiib@hot.ee> wrote the obvious and superficial comment thusly: > ... > >Posting argumentative opinions and ideas in Usenet is active > >invitation for responses in direct sense. People who do not > >want discussion of their ideas and opinions do not post those > >in Usenet. > > Yeah, that's the obvious comment to make, but the reality is a little deeper. > > See, the thing is - it used to be that if you wanted to enter into a > private conversation between yourself and one other person, you would "take > it to email". That was an integral part of the Usenet culture. However, a > decade or so ago, a**holes starting spamming Usenet, and the result is that > email was destroyed. There are several ways to bypass that. The ways can be are less convenient than to press reply privately button indeed. OTOH that is inadequate complaint in technical forum that wasn't for housewives at first place. > Very few people now post to Usenet with valid email > addresses (I still do, but I'm old school), so, effectively, you can't use > that avenue anymore. The result is that you now have to post to the public > board stuff which really belongs in private email. In general it is interesting plague. My Usenet e-mail address does not really work indeed since of spam and too rare occasions of anything of substance I do look into that inbox maybe few times in a year and can likely miss whatever in it was important anyway. My work e-mail is better since that I read several times per week but even there are issues that spam filters sometimes filter too lot or not enough. Same happens with others. So lot of personal communications have switched to instant messaging style and people even announce it over IM that they sent mail of some importance. > There are many > sociological effects of this - I will not bore you with the details at this > time, but they are available upon request - but the real takeaway is that > people *should* respect the fact that they are not really invited to the > party, even though it is being posted and carried out in public. They > don't do this (as we have seen upthread here), but they *should*. Still telling that this is private conversation that takes place in public technical forum is admitting that poster himself is inept and/or impolite. People who want but can not find ways to converse privately are inept and people who did not make any attempts anyway to find more appropriate channels are impolite. > > Note also that the same phenomenem is playing out in web forums (GUI > oriented Usenet-alikes) - where the various privacy laws that are being > enacted around the globe are causing boards to remove the "private message" > capability from their boards. As with Usenet, this forces people to carry > out their private business in public. On one board that I use, in > particular, the lack of PM really screws things up. It can get > embarrassing, but, again, it would be better if people were more > understanding of the fact that we live in a different world than we did 20 > years ago. Yes, but it is compensated by fact that in current world there are lot more possibilities to discuss things privately than there was 20 years ago.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-03-13 14:30 -0400 |
| Message-ID | <r4gjfu$dg6$1@dont-email.me> |
| In reply to | #150551 |
On 3/13/20 12:07 PM, Francis Assissi wrote: >> C is not assembly. You're trying to micro-optimize. > Actually, I asked for a function instead of an optimized approach because > I expect the optimization to happen somewhere, but after posting I > realized a macro would be better, unless the compiler can take care of > that if it is only a function. The real goal is to convert a number to a > string representing a number of different base, binary just happened to > be what I had in mind at the time. The fact that implementations does > exactly what I did for div() is disappointing. Why do you find it disappointing? Have you checked what that code compiles down to? If an implementation can compile clear understandable code into highly efficient assembly, on what grounds are you disappointed?
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | comp.lang.c
csiph-web