Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #41106 > unrolled thread
| Started by | malcolm.mclean5@btinternet.com |
|---|---|
| First post | 2016-02-22 06:59 -0800 |
| Last post | 2016-02-23 03:15 -0800 |
| Articles | 20 on this page of 35 — 13 participants |
Back to article view | Back to comp.lang.c++
String integer id malcolm.mclean5@btinternet.com - 2016-02-22 06:59 -0800
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-22 17:30 +0100
Re: String integer id malcolm.mclean5@btinternet.com - 2016-02-22 09:04 -0800
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-22 19:03 +0100
Re: String integer id malcolm.mclean5@btinternet.com - 2016-02-22 13:22 -0800
Re: String integer id Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-22 23:02 +0000
Re: String integer id Öö Tiib <ootiib@hot.ee> - 2016-02-22 15:16 -0800
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 19:54 -0500
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 02:26 +0100
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 20:35 -0500
Re: String integer id legalize+jeeves@mail.xmission.com (Richard) - 2016-02-23 02:31 +0000
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 21:42 -0500
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 04:59 +0100
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-23 08:32 -0500
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 03:34 +0100
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 21:38 -0500
Re: String integer id Google <google@google.com> - 2016-02-22 19:36 -0800
Re: String integer id David Brown <david.brown@hesbynett.no> - 2016-02-23 09:25 +0100
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-23 08:33 -0500
Re: String integer id David Brown <david.brown@hesbynett.no> - 2016-02-23 15:43 +0100
Re: String integer id Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-23 11:21 -0500
Re: String integer id woodbrian77@gmail.com - 2016-02-22 20:48 -0800
Re: String integer id David Brown <david.brown@hesbynett.no> - 2016-02-23 09:16 +0100
Re: String integer id Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-23 18:23 +0200
Re: String integer id David Brown <david.brown@hesbynett.no> - 2016-02-23 22:29 +0100
Re: String integer id Barry Schwarz <schwarzb@dqel.com> - 2016-02-22 11:41 -0800
Re: String integer id Ian Collins <ian-news@hotmail.com> - 2016-02-23 09:13 +1300
Re: String integer id Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-23 00:32 +0200
Re: String integer id legalize+jeeves@mail.xmission.com (Richard) - 2016-02-22 22:39 +0000
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 00:46 +0100
Re: String integer id Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-23 10:01 +0200
Re: String integer id "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 19:15 +0100
Re: String integer id Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-23 21:40 +0200
Re: String integer id Juha Nieminen <nospam@thanks.invalid> - 2016-02-23 09:18 +0000
Re: String integer id malcolm.mclean5@btinternet.com - 2016-02-23 03:15 -0800
Page 1 of 2 [1] 2 Next page →
| From | malcolm.mclean5@btinternet.com |
|---|---|
| Date | 2016-02-22 06:59 -0800 |
| Subject | String integer id |
| Message-ID | <224a55e1-bcba-4063-915d-02f0b53dd294@googlegroups.com> |
I want a flyweight class that is a "string id". That is to say, it consists of a 64 bit number which is also a string of up to seven characters, used for passing about human-readable ids that the machine can process as integers. However how do I write it so that it's easy to make it a constexpr, whilst still being convenient to call. (The ids will mostly be known at compile time, only rarely will you have a situation when the user enters a string and it ends up being turned into a dynamic id). Particularly I would like to be able to switch on the id and have human-readable names in the case conditions.
[toc] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-22 17:30 +0100 |
| Message-ID | <nafctc$sg0$1@dont-email.me> |
| In reply to | #41106 |
On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote: > I want a flyweight class that is a "string id". > That is to say, it consists of a 64 bit number which is also a string of up to seven > characters, used for passing about human-readable ids that the machine can > process as integers. > > However how do I write it so that it's easy to make it a constexpr, whilst still being > convenient to call. (The ids will mostly be known at compile time, only rarely will > you have a situation when the user enters a string and it ends up being turned > into a dynamic id). Is this a correct understanding? • Each 64-bit id is usually chosen by the programmer. • There is a (unspecified) two-way mapping between 64-bit id and 7-character human readable string. • You're asking how to compute the unspecified mapping at compile time. > Particularly I would like to be able to switch on the id and have human-readable names > in the case conditions. Is this a correct understanding: • Particularly you want a `constexpr` string → number computation? Which just seems like a user defined literal. And is this a correct understanding: • You are free to choose a suitable mapping, and the criterion “human-readable” is also a very loose one? Cheers, - Alf
[toc] | [prev] | [next] | [standalone]
| From | malcolm.mclean5@btinternet.com |
|---|---|
| Date | 2016-02-22 09:04 -0800 |
| Message-ID | <623b57e7-5049-45a6-8887-0723228d8355@googlegroups.com> |
| In reply to | #41107 |
On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote: > On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote: > > Is this a correct understanding? > > * Each 64-bit id is usually chosen by the programmer. > > * There is a (unspecified) two-way mapping between 64-bit id and > 7-character human readable string. > > * You're asking how to compute the unspecified mapping at compile time. > The idea is that the id is an unsigned 64 bit integer, which is also an asciiz string of seven characters plus null. So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 * 2**48 and so on. So if there's some question about the ids, you can analyse the binary or print the value out as a string, and you've got a human-meaningul enumeration value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3, 4.
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-22 19:03 +0100 |
| Message-ID | <nafibq$jil$1@dont-email.me> |
| In reply to | #41108 |
On 22.02.2016 18:04, malcolm.mclean5@btinternet.com wrote: > On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote: >> On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote: >> >> Is this a correct understanding? >> >> * Each 64-bit id is usually chosen by the programmer. >> >> * There is a (unspecified) two-way mapping between 64-bit id and >> 7-character human readable string. >> >> * You're asking how to compute the unspecified mapping at compile time. >> > The idea is that the id is an unsigned 64 bit integer, which is also an asciiz string > of seven characters plus null. > So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 * 2**48 and so on. > So if there's some question about the ids, you can analyse the binary or > print the value out as a string, and you've got a human-meaningul enumeration > value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3, 4. Well, that's directly supported by the language, so it's in a sense trivial. Of course it helps to know what to look for, namely user defined literals. I already mentioned that. General discussion of user defined literals in the FAQ: <url: https://isocpp.org/wiki/faq/cpp11-language#udls> Technical info, nearly as good as the standard: <url: http://en.cppreference.com/w/cpp/language/user_literal>. Relevant tips: • For precondition checking you can use the `?:` conditional operator, with e.g. throw statements. And yes that works nicely for compile time checking, because `throw` isn't `constepxr`. • Also, for precondition checking it can be good idea to defer the main work to a separate implementation function (that just assumes valid preconditions). • Remember to cast each `char` value to unsigned. • To check whether you really get a compile time value, use it in a context that requires compile time value. Switch `case` is of course one such context. Others include array size, and just as initialization of a `constexpr` variable. • For a C++11 solution you need to recursion to avoid a nasty complex expression. For C++14 I believe you can use a loop. I'd just use recursion here anyway, because it's very clear for this, and concise. Cheers & hth., - Alf
[toc] | [prev] | [next] | [standalone]
| From | malcolm.mclean5@btinternet.com |
|---|---|
| Date | 2016-02-22 13:22 -0800 |
| Message-ID | <a2856ac5-6a45-4ea7-a9de-2a36f3659c00@googlegroups.com> |
| In reply to | #41109 |
On Monday, February 22, 2016 at 6:03:44 PM UTC, Alf P. Steinbach wrote: > On 22.02.2016 18:04, malcolm.mclean5@btinternet.com wrote: > > On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote: > >> On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote: > >> > >> Is this a correct understanding? > >> > >> * Each 64-bit id is usually chosen by the programmer. > >> > >> * There is a (unspecified) two-way mapping between 64-bit id and > >> 7-character human readable string. > >> > >> * You're asking how to compute the unspecified mapping at compile time. > >> > > The idea is that the id is an unsigned 64 bit integer, which is also an asciiz string > > of seven characters plus null. > > So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 * 2**48 and so on. > > So if there's some question about the ids, you can analyse the binary or > > print the value out as a string, and you've got a human-meaningul enumeration > > value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3, 4. > > Well, that's directly supported by the language, so it's in a sense > trivial. Of course it helps to know what to look for, namely user > defined literals. I already mentioned that. > > General discussion of user defined literals in the FAQ: > <url: https://isocpp.org/wiki/faq/cpp11-language#udls> > > Technical info, nearly as good as the standard: > <url: http://en.cppreference.com/w/cpp/language/user_literal>. > > Relevant tips: > > * For precondition checking you can use the `?:` conditional operator, > with e.g. throw statements. And yes that works nicely for compile time > checking, because `throw` isn't `constepxr`. > > * Also, for precondition checking it can be good idea to defer the main > work to a separate implementation function (that just assumes valid > preconditions). > > * Remember to cast each `char` value to unsigned. > > * To check whether you really get a compile time value, use it in a > context that requires compile time value. Switch `case` is of course one > such context. Others include array size, and just as initialization of a > `constexpr` variable. > > * For a C++11 solution you need to recursion to avoid a nasty complex > expression. For C++14 I believe you can use a loop. I'd just use > recursion here anyway, because it's very clear for this, and concise. > > It's operator "". Great, thanks, that's what I was looking for.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-02-22 23:02 +0000 |
| Message-ID | <874md0uz5w.fsf@bsb.me.uk> |
| In reply to | #41108 |
malcolm.mclean5@btinternet.com writes:
> On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote:
>> On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote:
>>
>> Is this a correct understanding?
>>
>> * Each 64-bit id is usually chosen by the programmer.
>>
>> * There is a (unspecified) two-way mapping between 64-bit id and
>> 7-character human readable string.
>>
>> * You're asking how to compute the unspecified mapping at compile time.
>>
> The idea is that the id is an unsigned 64 bit integer, which is also
> an asciiz string
> of seven characters plus null.
> So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 *
> 2**48 and so on.
> So if there's some question about the ids, you can analyse the binary or
> print the value out as a string, and you've got a human-meaningul enumeration
> value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3,
> 4.
By "print the value as a string", I suspect you mean simply treating a
pointer to the integer as a character pointer. If you want to do that,
you run into trouble with endianness if you build the value
arithmetically (as your example suggest). For little-endian machines
you need the bytes to be packed with the other significance:
template <typename T>
static constexpr T make_id(const char *lit, std::size_t len, T r)
{
return len ? make_id(lit, len - 1, (r << 8) + lit[len-1]) : r;
}
constexpr unsigned long long operator "" _id(const char *lit, std::size_t len)
{
return make_id(lit, len >= sizeof 0ULL ? sizeof 0ULL - 1 : len, 0ULL);
}
I have not been able to come up with a constexpr method that puts the
bytes into an integer in address order.
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2016-02-22 15:16 -0800 |
| Message-ID | <a0503ba6-bfe4-4c63-85bf-758322db04f3@googlegroups.com> |
| In reply to | #41138 |
On Tuesday, 23 February 2016 01:02:37 UTC+2, Ben Bacarisse wrote:
> malcolm.mclean5@btinternet.com writes:
>
> > On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote:
> >> On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote:
> >>
> >> Is this a correct understanding?
> >>
> >> * Each 64-bit id is usually chosen by the programmer.
> >>
> >> * There is a (unspecified) two-way mapping between 64-bit id and
> >> 7-character human readable string.
> >>
> >> * You're asking how to compute the unspecified mapping at compile time.
> >>
> > The idea is that the id is an unsigned 64 bit integer, which is also
> > an asciiz string
> > of seven characters plus null.
> > So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 *
> > 2**48 and so on.
> > So if there's some question about the ids, you can analyse the binary or
> > print the value out as a string, and you've got a human-meaningul enumeration
> > value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3,
> > 4.
>
> By "print the value as a string", I suspect you mean simply treating a
> pointer to the integer as a character pointer. If you want to do that,
> you run into trouble with endianness if you build the value
> arithmetically (as your example suggest). For little-endian machines
> you need the bytes to be packed with the other significance:
>
> template <typename T>
> static constexpr T make_id(const char *lit, std::size_t len, T r)
> {
> return len ? make_id(lit, len - 1, (r << 8) + lit[len-1]) : r;
> }
>
> constexpr unsigned long long operator "" _id(const char *lit, std::size_t len)
> {
> return make_id(lit, len >= sizeof 0ULL ? sizeof 0ULL - 1 : len, 0ULL);
> }
>
> I have not been able to come up with a constexpr method that puts the
> bytes into an integer in address order.
There are no standard trick neither in C nor in C++ to determine
endianness compile time. Any type punning is forbidden in 'constexpr'
functions. For practical purposes Boost header file endian.hpp covers
endianness for large amount of platforms.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 19:54 -0500 |
| Message-ID | <nagaf3$gol$2@jstuckle.eternal-september.org> |
| In reply to | #41140 |
On 2/22/2016 6:16 PM, Öö Tiib wrote:
> On Tuesday, 23 February 2016 01:02:37 UTC+2, Ben Bacarisse wrote:
>> malcolm.mclean5@btinternet.com writes:
>>
>>> On Monday, February 22, 2016 at 4:30:45 PM UTC, Alf P. Steinbach wrote:
>>>> On 22.02.2016 15:59, malcolm.mclean5@btinternet.com wrote:
>>>>
>>>> Is this a correct understanding?
>>>>
>>>> * Each 64-bit id is usually chosen by the programmer.
>>>>
>>>> * There is a (unspecified) two-way mapping between 64-bit id and
>>>> 7-character human readable string.
>>>>
>>>> * You're asking how to compute the unspecified mapping at compile time.
>>>>
>>> The idea is that the id is an unsigned 64 bit integer, which is also
>>> an asciiz string
>>> of seven characters plus null.
>>> So if the id is "charlie" then the id is 99 (ascii c) * 2**56 + 104 *
>>> 2**48 and so on.
>>> So if there's some question about the ids, you can analyse the binary or
>>> print the value out as a string, and you've got a human-meaningul enumeration
>>> value, e.g. "charlie", "andy", "anne" and "eddie" rather than 1, 2, 3,
>>> 4.
>>
>> By "print the value as a string", I suspect you mean simply treating a
>> pointer to the integer as a character pointer. If you want to do that,
>> you run into trouble with endianness if you build the value
>> arithmetically (as your example suggest). For little-endian machines
>> you need the bytes to be packed with the other significance:
>>
>> template <typename T>
>> static constexpr T make_id(const char *lit, std::size_t len, T r)
>> {
>> return len ? make_id(lit, len - 1, (r << 8) + lit[len-1]) : r;
>> }
>>
>> constexpr unsigned long long operator "" _id(const char *lit, std::size_t len)
>> {
>> return make_id(lit, len >= sizeof 0ULL ? sizeof 0ULL - 1 : len, 0ULL);
>> }
>>
>> I have not been able to come up with a constexpr method that puts the
>> bytes into an integer in address order.
>
> There are no standard trick neither in C nor in C++ to determine
> endianness compile time. Any type punning is forbidden in 'constexpr'
> functions. For practical purposes Boost header file endian.hpp covers
> endianness for large amount of platforms.
>
Wrong again. But then I wouldn't expect a troll to understand.
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-23 02:26 +0100 |
| Message-ID | <nagcau$n0j$1@dont-email.me> |
| In reply to | #41143 |
On 23.02.2016 01:54, Jerry Stuckle wrote:
> On 2/22/2016 6:16 PM, Öö Tiib wrote:
>>
>> There are no standard trick neither in C nor in C++ to determine
>> endianness compile time. Any type punning is forbidden in 'constexpr'
>> functions. For practical purposes Boost header file endian.hpp covers
>> endianness for large amount of platforms.
>>
>
> Wrong again.
Öö Tiib is correct. There are no known tricks, and absolutely no
standard or well known ones. The [1] C FAQ mentions a possible trick,
'ABCD' == 0x41424344
but clarifies that
“this isn't reliable, either”
E.g., reportedly some [2] Solaris/SPARC compilers differ in the result
of that expression (or similar expression), on the same platform.
> But then I wouldn't expect a troll to understand.
Again, here you're wrong, possibly a case of mistaken identity.
Cheers & hth.,
- Alf
[1] <url: http://www.c-faq.com/cpp/ifendian.html>
[2] <url: http://stackoverflow.com/a/4275412/464581>
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 20:35 -0500 |
| Message-ID | <nagcrj$nvc$1@jstuckle.eternal-september.org> |
| In reply to | #41144 |
On 2/22/2016 8:26 PM, Alf P. Steinbach wrote: > On 23.02.2016 01:54, Jerry Stuckle wrote: >> On 2/22/2016 6:16 PM, Öö Tiib wrote: >>> >>> There are no standard trick neither in C nor in C++ to determine >>> endianness compile time. Any type punning is forbidden in 'constexpr' >>> functions. For practical purposes Boost header file endian.hpp covers >>> endianness for large amount of platforms. >>> >> >> Wrong again. > > Öö Tiib is correct. There are no known tricks, and absolutely no > standard or well known ones. The [1] C FAQ mentions a possible trick, > > 'ABCD' == 0x41424344 > > but clarifies that > > “this isn't reliable, either” > > E.g., reportedly some [2] Solaris/SPARC compilers differ in the result > of that expression (or similaisr expression), on the same platform. > > >> But then I wouldn't expect a troll to understand. > > Again, here you're wrong, possibly a case of mistaken identity. > > > Cheers & hth., > > - Alf > > [1] <url: http://www.c-faq.com/cpp/ifendian.html> > [2] <url: http://stackoverflow.com/a/4275412/464581> > Wrong again. There are ways, using unions. But I'm not going to get into an argument with a troll. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Date | 2016-02-23 02:31 +0000 |
| Message-ID | <nagg9m$rbp$1@news.xmission.com> |
| In reply to | #41145 |
[Please do not mail me a copy of your followup]
Jerry Stuckle <jstucklex@attglobal.net> spake the secret code
<nagcrj$nvc$1@jstuckle.eternal-september.org> thusly:
>But I'm not going to get into an argument with a troll.
Calling anyone who disagrees with you in the slightest a "troll" is
stupid. *PLONK*
Alf has been a long time contributor to raising the signal of this
newsgroup out of the noise.
If Alf is a troll, then there are no people on this planet discussing
C++ that aren't trolls.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 21:42 -0500 |
| Message-ID | <naggo6$14m$2@jstuckle.eternal-september.org> |
| In reply to | #41146 |
On 2/22/2016 9:31 PM, Richard wrote: > [Please do not mail me a copy of your followup] > > Jerry Stuckle <jstucklex@attglobal.net> spake the secret code > <nagcrj$nvc$1@jstuckle.eternal-september.org> thusly: > >> But I'm not going to get into an argument with a troll. > > Calling anyone who disagrees with you in the slightest a "troll" is > stupid. *PLONK* > > Alf has been a long time contributor to raising the signal of this > newsgroup out of the noise. > > If Alf is a troll, then there are no people on this planet discussing > C++ that aren't trolls. > You're right. I'm not here to learn from idiots or trolls. And I don't care how long someone has been "contributing" to a group - newsgroup, forum or whatever. His *current* "contributions" define whether he is a troll or not. Just because I'm new here does *not* mean I haven't been programming in C++ for a while. In fact, it's been about 28 years. And whether *you* think I know what I'm talking about or not is immaterial to me. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-23 04:59 +0100 |
| Message-ID | <nagl9o$bo3$1@dont-email.me> |
| In reply to | #41149 |
On 23.02.2016 03:42, Jerry Stuckle wrote: > On 2/22/2016 9:31 PM, Richard wrote: >> >> *PLONK* > > Whether *you* think … Richard can't hear you when you post with that mail address, unless someone quotes you, because he's told his newsreader to ignore any posting of yours. That's [1] what the word “plonk” means. Another way to phrase it, based on a particular now archaic technology, is that you've been added to his “killfile” (a kind of spam filter). Signaling the killfile action with a “plonk” is a courtesy to let you know that he will not see your postings, so that you can avoid fruitless efforts to engage him – like the posting I'm replying to. Originally the term “plonk” was very derogatory, evoking associations to “the sound of something solid landing” (and you can guess where). But there was also “plink” for a much more light-weight something landing, so “plonk” paradoxically also indicated some measure of respect. But during the late 1990s the meaning of “plonk” evolved to a more neutral one of just hey, our interactions have become irreparably ungood, I'm opting out of it and I will not even see your postings. Cheers & hth., - Alf Notes: [1] <url: http://www.hacker-dictionary.com/terms/plonk>
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-23 08:32 -0500 |
| Message-ID | <nahmrc$gri$3@jstuckle.eternal-september.org> |
| In reply to | #41151 |
On 2/22/2016 10:59 PM, Alf P. Steinbach wrote: > On 23.02.2016 03:42, Jerry Stuckle wrote: >> On 2/22/2016 9:31 PM, Richard wrote: >>> >>> *PLONK* >> >> Whether *you* think … > > Richard can't hear you when you post with that mail address, unless > someone quotes you, because he's told his newsreader to ignore any > posting of yours. That's [1] what the word “plonk” means. Another way to > phrase it, based on a particular now archaic technology, is that you've > been added to his “killfile” (a kind of spam filter). > So what? I know what plonk means. And quite frankly, I don't give a damn. > Signaling the killfile action with a “plonk” is a courtesy to let you > know that he will not see your postings, so that you can avoid fruitless > efforts to engage him – like the posting I'm replying to. > Again, I don't really give a damn. > Originally the term “plonk” was very derogatory, evoking associations to > “the sound of something solid landing” (and you can guess where). But > there was also “plink” for a much more light-weight something landing, > so “plonk” paradoxically also indicated some measure of respect. But > during the late 1990s the meaning of “plonk” evolved to a more neutral > one of just hey, our interactions have become irreparably ungood, I'm > opting out of it and I will not even see your postings. > > > Cheers & hth., > > - Alf > > > Notes: > [1] <url: http://www.hacker-dictionary.com/terms/plonk> > Gee, we used that way back in the early 80's when usenet was in its infancy. And it wasn't positive then, either. But then I also look at where it's coming from. So frankly, my dear, I don't give a damn. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-23 03:34 +0100 |
| Message-ID | <naggb3$11u$1@dont-email.me> |
| In reply to | #41145 |
On 23.02.2016 02:35, Jerry Stuckle wrote: > On 2/22/2016 8:26 PM, Alf P. Steinbach wrote: >> On 23.02.2016 01:54, Jerry Stuckle wrote: >>> On 2/22/2016 6:16 PM, Öö Tiib wrote: >>>> >>>> There are no standard trick neither in C nor in C++ to determine >>>> endianness compile time. Any type punning is forbidden in 'constexpr' >>>> functions. For practical purposes Boost header file endian.hpp covers >>>> endianness for large amount of platforms. >>> >>> Wrong again. > > Wrong again. There are ways, using unions. That's formally UB and won't compile with recent clang. A similar trick based on pointer arithmetic, `Ptr_b() + (a - Ptr_a())`, won't compile either: the modern compilers are just too good at implementing the IMHO too restrictive language standard. E.g. the standard could have allowed casting to pointer to same size fundamental type, and that would have allowed user defined strongly typed string literals. Which I would like. But alas, it doesn't. > But I'm not going to get into an argument with a troll. You're not here for learning, that much is clear. Cheers, you idiot, :) - Alf
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 21:38 -0500 |
| Message-ID | <nagggm$14m$1@jstuckle.eternal-september.org> |
| In reply to | #41147 |
On 2/22/2016 9:34 PM, Alf P. Steinbach wrote: > On 23.02.2016 02:35, Jerry Stuckle wrote: >> On 2/22/2016 8:26 PM, Alf P. Steinbach wrote: >>> On 23.02.2016 01:54, Jerry Stuckle wrote: >>>> On 2/22/2016 6:16 PM, Öö Tiib wrote: >>>>> >>>>> There are no standard trick neither in C nor in C++ to determine >>>>> endianness compile time. Any type punning is forbidden in 'constexpr' >>>>> functions. For practical purposes Boost header file endian.hpp covers >>>>> endianness for large amount of platforms. >>>> >>>> Wrong again. >> >> Wrong again. There are ways, using unions. > > That's formally UB and won't compile with recent clang. > Wrong again. > A similar trick based on pointer arithmetic, `Ptr_b() + (a - Ptr_a())`, > won't compile either: the modern compilers are just too good at > implementing the IMHO too restrictive language standard. > Again, wrong. > E.g. the standard could have allowed casting to pointer to same size > fundamental type, and that would have allowed user defined strongly > typed string literals. Which I would like. But alas, it doesn't. > > >> But I'm not going to get into an argument with a troll. > > You're not here for learning, that much is clear. > > > Cheers, you idiot, :) > > - Alf > And, of course, everything I find on the internet is the truth, the whole truth, and nothing but the truth. So help me Google. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Google <google@google.com> |
|---|---|
| Date | 2016-02-22 19:36 -0800 |
| Message-ID | <bikncbp1chedujme4uq2uuri6ipje7n95c@4ax.com> |
| In reply to | #41148 |
On Mon, 22 Feb 2016 21:38:02 -0500, Jerry Stuckle <jstucklex@attglobal.net> wrote: >And, of course, everything I find on the internet is the truth, the >whole truth, and nothing but the truth. So help me Google. AI0K JERRY D STUCKLE 9920 BRIXTON LN BETHESDA, MD 20817-1501
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2016-02-23 09:25 +0100 |
| Message-ID | <nah4rj$j9a$1@dont-email.me> |
| In reply to | #41150 |
On 23/02/16 04:36, Google wrote: > On Mon, 22 Feb 2016 21:38:02 -0500, Jerry Stuckle > <jstucklex@attglobal.net> wrote: > >> And, of course, everything I find on the internet is the truth, the >> whole truth, and nothing but the truth. So help me Google. > <snip> I don't know who posted this, but it is inappropriate behaviour. It is fine to condemn a posters style, and it is fine to be so frustrated with childish posts that you killfile them. But it is /not/ fine to post personal information, even if it is already available to anyone with a web browser. In a Usenet group, you accept people as they come, or you argue with them, or you ignore them. Posts like this are harassment.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-23 08:33 -0500 |
| Message-ID | <nahmu3$gri$4@jstuckle.eternal-september.org> |
| In reply to | #41156 |
On 2/23/2016 3:25 AM, David Brown wrote: > On 23/02/16 04:36, Google wrote: >> On Mon, 22 Feb 2016 21:38:02 -0500, Jerry Stuckle >> <jstucklex@attglobal.net> wrote: >> >>> And, of course, everything I find on the internet is the truth, the >>> whole truth, and nothing but the truth. So help me Google. >> > <snip> > > I don't know who posted this, but it is inappropriate behaviour. It is > fine to condemn a posters style, and it is fine to be so frustrated with > childish posts that you killfile them. But it is /not/ fine to post > personal information, even if it is already available to anyone with a > web browser. > > In a Usenet group, you accept people as they come, or you argue with > them, or you ignore them. Posts like this are harassment. > > It's just what is expected from the trolls here. And this one is a very dumb troll, at that. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2016-02-23 15:43 +0100 |
| Message-ID | <nahr1j$4va$1@dont-email.me> |
| In reply to | #41163 |
On 23/02/16 14:33, Jerry Stuckle wrote: > On 2/23/2016 3:25 AM, David Brown wrote: >> On 23/02/16 04:36, Google wrote: >>> On Mon, 22 Feb 2016 21:38:02 -0500, Jerry Stuckle >>> <jstucklex@attglobal.net> wrote: >>> >>>> And, of course, everything I find on the internet is the truth, the >>>> whole truth, and nothing but the truth. So help me Google. >>> >> <snip> >> >> I don't know who posted this, but it is inappropriate behaviour. It is >> fine to condemn a posters style, and it is fine to be so frustrated with >> childish posts that you killfile them. But it is /not/ fine to post >> personal information, even if it is already available to anyone with a >> web browser. >> >> In a Usenet group, you accept people as they come, or you argue with >> them, or you ignore them. Posts like this are harassment. >> >> > > It's just what is expected from the trolls here. And this one is a very > dumb troll, at that. > Trolls, no matter what reasonable and common definition you use, have been very rare in this group (your opinion on who is or is not a troll matters little when it is so contrary to the rest of the group). Amongst the mostly on-topic and helpful posts, we get some pointless posts, some irritating posts, and occasionally rude posts, but seldom trolling posts. No, the post here was /not/ what I expect from people in this group - that is why I react against it. I don't think it really counts as trolling either. I am not sure /what/ it counts as, but I don't like it.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.c++
csiph-web