Monday, July 31, 2017

Digest for comp.lang.c++@googlegroups.com - 25 updates in 7 topics

Juha Nieminen <nospam@thanks.invalid>: Jul 31 10:31AM

> Jesus Christ will forgive all who come to Him asking forgiveness.
> He will even forgive vile people. He wants to save us more than
> He wants to judge us because He loves us.
 
Why don't you just go away, you lying hypocrite piece of shit?
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 31 04:55AM -0700

It reads, "Love," Juha. "Love."
 
Much Love,
Rick C. Hodgin
Daniel <danielaparker@gmail.com>: Jul 31 07:54AM -0700

On Tuesday, July 25, 2017 at 7:28:30 AM UTC-4, Rick C. Hodgin wrote:
> Trust in God and God's ways. Live your life for Him.
 
And don't screw anyone unless they're bent over!
Real Troll <Real.Troll@Trolls.com>: Jul 31 05:17PM -0400

On 31/07/2017 15:54, Daniel wrote:
> And don't screw anyone unless they're bent over!
 
Instead of reading that idiot's posts why don't you try to learn
something new:
 
> poorly understood, confusing features of C++ that, in our experience,
> bring more
> grief than benefit.
 
The religious person is here to destroy these newsgroups and there are
people using profanity to indirectly support him in his objectives.
My filter list is getting bigger and bigger. Everybody should do the
same to reduce the traffic on this <and on C newsgroup> newsgroup.
woodbrian77@gmail.com: Jul 31 08:28AM -0700

Shalom
 
I want to join in the reindeer games here:
 
https://github.com/thekvs/cpp-serializers
 
, but when I run make, there's a problem when it tries
to build capnproto. Something about it not being able
to convert a template argument from bool to capnp::Kind.
What to do? Thanks.
 
 
Brian
Ebenezer Enterprises - Ben Shapiro over at dailywire.com
does a good job of figuring out who is telling the truth
and who is lying.
 
http://webEbenezer.net
David Brown <david.brown@hesbynett.no>: Jul 31 06:04PM +0200

> to build capnproto. Something about it not being able
> to convert a template argument from bool to capnp::Kind.
> What to do? Thanks.
 
I would suggest you start by reading
<http://www.catb.org/esr/faqs/smart-questions.html>. Then you might
like to think about whether people in this newsgroup could have the
slightest idea about how to help you with a third party build of a
fourth party library.
 
Following that reality check, you might then try to look at the error
message you got, and perhaps some of the source code. Look at the
readmes, documentation and build instructions, and see if you have
followed them correctly. Try contacting the github project maintainer,
or perhaps the capnproto maintainer.
 
woodbrian77@gmail.com: Jul 31 09:44AM -0700

On Monday, July 31, 2017 at 11:04:44 AM UTC-5, David Brown wrote:
> readmes, documentation and build instructions, and see if you have
> followed them correctly. Try contacting the github project maintainer,
> or perhaps the capnproto maintainer.
 
Hi David,
 
I did read the Readme, but noticed something now that I
didn't do. I'll try to do that and see what happens.
 
 
Brian
woodbrian77@gmail.com: Jul 31 10:10AM -0700


> Hi David,
 
> I did read the Readme, but noticed something now that I
> didn't do. I'll try to do that and see what happens.
 
I tried it now, but get the same problem. What I didn't do
was create a build directory and run cmake and make from
that directory. But now I tried it that way also and get the
same error. Thanks for the suggestion to contact the guy
who developed the benchmark. I sent him an email and asked
him about it.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
woodbrian77@gmail.com: Jul 31 01:52PM -0700

> same error. Thanks for the suggestion to contact the guy
> who developed the benchmark. I sent him an email and asked
> him about it.
 
I posted on a capnproto mailing list and got this reply:
 
It looks like the project you reference is hard-coded to
download Cap'n Proto version 0.5.3. The bug you describe
was fixed in 0.5.3.1 and 0.6.0. I suggest updating the
project to the current release, 0.6.1.
 
---------------------------------------------------------
 
These sorts of problems could be minimized by using
on-line code generators. But I know, that's crazy talk.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
"Öö Tiib" <ootiib@hot.ee>: Jul 31 12:39AM -0700

Leigh, why some people seem to think that they behaving kook does somehow
change anything in any direction in this world? It is just boring and aesthetically
ugly ... and that is it.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 31 05:02PM +0100

On 31/07/2017 08:39, Öö Tiib wrote:
> Leigh, why some people seem to think that they behaving kook does somehow
> change anything in any direction in this world? It is just boring and aesthetically
> ugly ... and that is it.
 
Being blasphemous isn't "kook"; blasphemy being a crime is "kook".
 
/Flibble
scott@slp53.sl.home (Scott Lurndal): Jul 31 12:25PM

>highest (BSR) set bit (a bit with a 1 in it).
 
> BSF: https://c9x.me/x86/html/file_module_x86_id_19.html
> BSR: https://c9x.me/x86/html/file_module_x86_id_20.html
 
$ info gcc --index-search=__builtin_ffs
$ info gcc --index-search=__builtin_clz
David Brown <david.brown@hesbynett.no>: Jul 31 02:36PM +0200

On 31/07/17 14:25, Scott Lurndal wrote:
>> BSR: https://c9x.me/x86/html/file_module_x86_id_20.html
 
> $ info gcc --index-search=__builtin_ffs
> $ info gcc --index-search=__builtin_clz
 
That is a fine mixture between useful and useless information. These
builtins in gcc are certainly useful references for Rick here, but the
best that can be said of "info" is that some people have got used to it
enough to find it useful. Web links will more helpful to most people:
 
<https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fclz>
 
<https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fctz>
 
<https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fffs>
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 31 08:36AM -0400

On 7/31/2017 8:25 AM, Scott Lurndal wrote:
>> BSR: https://c9x.me/x86/html/file_module_x86_id_20.html
 
> $ info gcc --index-search=__builtin_ffs
> $ info gcc --index-search=__builtin_clz
 
Thank you, Scott. I was able to find __builtin_ffs() and
__builtin_clz() here:
 
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
 
Thank you,
Rick C. Hodgin
scott@slp53.sl.home (Scott Lurndal): Jul 31 02:41PM

>builtins in gcc are certainly useful references for Rick here, but the
>best that can be said of "info" is that some people have got used to it
>enough to find it useful.
 
I can't disagree - I find 'info' almost useless. Give me a flat man
page anyday.
David Brown <david.brown@hesbynett.no>: Jul 31 04:58PM +0200

On 31/07/17 16:41, Scott Lurndal wrote:
>> enough to find it useful.
 
> I can't disagree - I find 'info' almost useless. Give me a flat man
> page anyday.
 
Man pages are good for small things. For larger references, I like pdf
files (they are also handy for referencing the exact version of gcc - I
have a dozen or so different versions on my system, for various
targets). But the web page versions are great for references like this.
scott@slp53.sl.home (Scott Lurndal): Jul 31 03:02PM

>files (they are also handy for referencing the exact version of gcc - I
>have a dozen or so different versions on my system, for various
>targets). But the web page versions are great for references like this.
 
$ man large-man-page | col -b > /tmp/b && vim /tmp/b && rm /tmp/b
 
A simple shell function.
Juha Nieminen <nospam@thanks.invalid>: Jul 31 10:41AM

> I think some kind of compiler switch which disables the forward-
> declaration requirement, allowing an additional pass to be run on
> source code to resolve unknown references would be desirable.
 
You can compile a compilation unit into an object file, a statically
linked file, or a dynamically linked file.
 
Even when compiling simply to an object file, the compiler might not,
at that point, have any access to the definition of a function in some
other source of object file. It's only at linking time that all the object
files come together.
 
How exactly is the compiler supposed to create the object file when it
can't see the function being called? This requires more than just a
function pointer to be set later. The parameters need to be put onto
the stack. The compiler can't know, without seeing the function
declaration, how it should put them there (eg. if you give an
int as parameter, but the function takes a double, the compiler
needs to do a conversion; it can't do that if it can't see that the
function is taking a double).
 
It becomes even more complicated with dynamically linked libraries.
Those may not be available at compile or even link time at all,
only at run time.
bartc <bc@freeuk.com>: Jul 31 11:56AM +0100

On 31/07/2017 11:41, Juha Nieminen wrote:
 
> It becomes even more complicated with dynamically linked libraries.
> Those may not be available at compile or even link time at all,
> only at run time.
I think you're posting at cross-purposes.
 
As I understand it, the proposal is about relaxing requirements for
forward declarations of functions in the /same/ translation unit.
 
Not for eliminating declarations of functions in other modules (ie.
pretty much doing away with header files). As those wouldn't be
/forward/ declarations (more sideways ones).
 
So it means being able to write this:
 
-----------------------------
int main(void) { fn(10,20);}
void fn(float a,int b) {}
-----------------------------
 
instead of:
 
-----------------------------
void fn(float,int); // forward declaration of fn
int main(void) { fn(10,20);}
void fn(float a,int b) {}
-----------------------------
 
or:
 
-----------------------------
void fn(float a,int b) {} // re-ordering functions
int main(void) { fn(10,20);}
-----------------------------
 
--
bartc
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 31 08:33AM -0400

On 7/31/2017 6:41 AM, Juha Nieminen wrote:
 
> It becomes even more complicated with dynamically linked libraries.
> Those may not be available at compile or even link time at all,
> only at run time.
 
I do not advocate forward-declarations that are unknown across
object files, but only within a single compilation.
 
In many cases doing this will fail:
 
#include "file1.h"
#include "file2.h"
 
...because there are dependencies in file1.h which require the
information that's declared in file2.h. You must order them as:
 
#include "file2.h"
#include "file1.h"
 
But what can also happen is file1.h and file2.h both have some
dependencies on each other, so that if any members are referenced
the compilation will fail.
 
My goal in removing the requirement of having forward-declaration
is to resolve this issue so that something needs only be defined
somewhere in the compilation, and not before it's first referenced.
 
Many other languages have done away with the forward-declaration
requirement. It seems to be a proper thing for a compiler running
on modern hardware in 2017.
 
There's nothing to prevent a compiler from NOT implementing the
relaxation, and to maintain things as they are. In fact, I think
it would be essential for this relaxation to be only a feature
that can be turned on, and not a default feature.
 
Thank you,
Rick C. Hodgin
Juha Nieminen <nospam@thanks.invalid>: Jul 31 10:30AM

> People do not earn their way into Heaven. It is the free gift of
> God to all who will receive Jesus, receive His sacrifice, and ask
> Him to forgive their sin.
 
You did not answer my post. Why? Because you know you are a liar and a
hypocrite.
 
You think that your words are magic, but they are not. They are nothing
but you being a condescending smug lying hypocrite.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 31 04:53AM -0700

Juha, you can find all kinds of failures with me. I am just
a man. But I'm not advocating me, nor my words, but
rather Jesus and His words.
 
You'll be unable to find fault with Him, or His words.
I need Him to forgive me just like everybody else does.
 
Thank you,
Rick C. Hodgin
"Öö Tiib" <ootiib@hot.ee>: Jul 31 05:03AM -0700

Rick, why some people seem to think that they behaving kook does somehow
change anything in any direction in this world? It is just boring and aesthetically
ugly ... and that is it.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 31 08:28AM -0400

On 7/31/2017 8:03 AM, Öö Tiib wrote:
> Rick, why some people seem to think that they behaving kook does somehow
> change anything in any direction in this world? It is just boring and aesthetically
> ugly ... and that is it.
 
I know. People only look at the person giving the message and,
because they are just a person like them, are able to label them
summarily with disparaging names like "kook" or "hypocrite."
 
They don't seem to realize the messenger is not the message, but
the one they're pointing to is the message.
 
That inability to receive the root message is the source of ALL
of the confusion involved. It breaks my heart because people
are willing to sacrifice hearing the true message and intent of
the message because they judge the messenger on his merits, and
the messengers unwaveringly come up short. It's such a loss.
 
-----
I do not advocate Rick. Or any other pastor, preacher,
evangelist, or teacher. I would not point you to them for any
salvation or true help. I would point you only to Jesus Christ.
And then, after you have found merit in Jesus Christ, I would
point you to others who can help teach you those things He first
taught us, but only then under the direct, purposeful, and focused
scrutiny of a discerning heart, one who compares anything we might
say with the true and foundational words of Jesus Christ. What we
teach must align with His teachings, or else they have no merit,
and are to be rebuked. But if they do align with His teachings,
then it is as though He is teaching you directly ... He's just
doing so through us and our conveyance of His message for you.
 
Thank you,
Rick C. Hodgin
red floyd <no.spam@its.invalid>: Jul 30 08:57PM -0700


> Brian
> Ebenezer Enterprises - Be joyful, patient and faithful.
> http://webEbenezer.net
 
Fuck off. And, he's not swearing as the bible defines it, so fuck
off again.
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.

Digest for comp.programming.threads@googlegroups.com - 6 updates in 6 topics

rami18 <coco@coco.com>: Jul 30 05:10PM -0400

Hello....
 
 
Read this:
 
Here is the Neural Episodic Control paper:
 
https://arxiv.org/abs/1703.01988
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 30 04:32PM -0400

Hello...
 
 
Read this:
 
Google's new AI learns nearly as fast as humans
 
"Neural episodic control demonstrates dramatic improvements in the speed
of learning for a wide range of environments," he says, "critically, our
agent is able to rapidly latch onto highly successful strategies as soon
as they are experienced, instead of waiting for many steps of optimisation."
 
 
Read more about Neural episodic control:
 
http://www.globalfuturist.org/2017/03/googles-new-ai-learns-nearly-as-fast-as-humans/
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 30 03:40PM -0400

Hello....
 
Read this:
 
Google DeepMind publishes breakthrough Artificial General Intelligence
architecture
 
Read this very interesting webpage:
 
http://www.globalfuturist.org/2017/03/bad-news-for-jobs-fabled-artificial-general-intelligence-could-arrive-much-earlier-than-expected/
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 30 03:20PM -0400

Hello....
 
 
Read this:
 
Google's DeepMind Is Teaching AI How to Think Like a Human
 
Read more here:
 
https://motherboard.vice.com/en_us/article/9k5j47/google-deepmind-artificial-intelligence-neural-net-discovery
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 30 02:29PM -0400

Hello...
 
 
Read this:
 
Michio Kaku - Earth in the Year 2030
 
Look at this video:
 
https://www.youtube.com/watch?v=g4TQT0c2X8Y
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 30 01:54PM -0400

Hello...
 
Read this:
 
DeepMind Cofounder : The Frontier in Artificial Intelligence (AI):
General-purpose Learning AGI
 
Please look at this very interesting video:
 
https://www.youtube.com/watch?v=Ui7dLJT5Kp0
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
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.programming.threads+unsubscribe@googlegroups.com.

Sunday, July 30, 2017

Digest for comp.lang.c++@googlegroups.com - 10 updates in 4 topics

Real Troll <real.troll@trolls.com>: Jul 29 08:26PM -0400

On 29/07/2017 23:13, David Brown wrote:
 
> I'd be surprised if it helped Mr. Flibble with his irritation over
> Rick, however.
 
If he is irritated by certain Rick then he should filter him out. In his
case he is actually responding to him so there is a symptom of mental
problem.
 
>> are displaying here.
 
> I was going to take exception to this comment - then I noticed the
> name of the poster!
 
Well research has shown that gay men and women have serious mental
problems. Even that openly known homosexual by the name of Stephen Fry
had some mental problem and he missed his shows because he ran away to
South America for treatment!!!. I suggest search the web and you'll see
the full story.
David Brown <david.brown@hesbynett.no>: Jul 30 04:24PM +0200

On 30/07/17 02:26, Real Troll wrote:
> had some mental problem and he missed his shows because he ran away to
> South America for treatment!!!. I suggest search the web and you'll see
> the full story.
 
This is not really the place for such a topic, so I am not going to go
into details or a long discussion. But here are a few key points:
 
1. People who are oppressed, bullied, ostracised, and pushed by their
society, family, culture, or religion into trying to live and act in a
way contrary to their nature are much more likely to suffer
psychological problems than those who fit in with their peers.
 
Thus if there is a higher proportion of psychological problems amongst
homosexuals, it is due (at least primarily) to homophobic people and
societies around them - not the homosexuality.
 
2. Even with their higher rates of psychological problems than
heterosexuals, the rates of serious problems are far too low to say
"homos generally have mental problems".
 
3. People who are willing to be open about one unusual aspect about
their personality are more likely to be willing to be open about other
unusual aspects. The opposite also applies. Thus amongst the people
with psychological issues, people who are open about being homosexual
are more likely to be open about their psychological problems. This
will skew simple statistics.
 
4. Stephen Fry is extremely intelligent, and a professional comedian.
These are both characteristics with a strong correlation with increased
risk of psychological problems - completely independently of his sexuality.
 
 
Now, I know you made these comments just to provoke a response - you
are, after all, the /Real Troll/. But I don't like seeing such bigotry
passing without correction.
woodbrian77@gmail.com: Jul 30 07:59AM -0700

On Friday, July 28, 2017 at 5:34:48 PM UTC-5, Mr Flibble wrote:
 
Leigh, please don't swear here. Tia.
 
 
Brian
Ebenezer Enterprises - Be joyful, patient and faithful.
http://webEbenezer.net
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 30 04:59PM +0100

On 30/07/2017 15:24, David Brown wrote:
 
> Now, I know you made these comments just to provoke a response - you
> are, after all, the /Real Troll/. But I don't like seeing such bigotry
> passing without correction.
 
+1
 
/Flibble
Real Troll <Real.Troll@Trolls.com>: Jul 30 04:10PM -0400

> On Friday, July 28, 2017 at 5:34:48 PM UTC-5, Mr Flibble wrote:
 
> Leigh, please don't swear here. Tia.
 
Please note he is gay and with serious mental problems. According to
David Brown, he became mentally disturbed because he was bullied for
being gay. Please read the entire thread to see what has happened to him.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 30 09:37PM +0100

On 30/07/2017 21:10, Real Troll wrote:
 
> Please note he is gay and with serious mental problems. According to
> David Brown, he became mentally disturbed because he was bullied for
> being gay. Please read the entire thread to see what has happened to him.
 
As trolls go that is quite a good one.
 
/Flibble
David Brown <david.brown@hesbynett.no>: Jul 30 11:33PM +0200

On 30/07/17 22:37, Mr Flibble wrote:
>> being gay. Please read the entire thread to see what has happened to
>> him.
 
> As trolls go that is quite a good one.
 
Yes - it was quite a neat and concise misreading and misrepresentation
of what I wrote. I hope Brian does not believe it - he dislikes you
enough as it is, without provoking his homophobia!
woodbrian77@gmail.com: Jul 30 10:32AM -0700

On Friday, July 28, 2017 at 5:35:46 PM UTC-5, Richard wrote:
> blog post. The flags enum example was particularly useful. He also
> shows how it cleans up a whole bunch of crufty things like having to use
> IDL compilers or the Qt moc compiler, making them entirely unnecessary
 
Anyone who thinks on-line code generation is not here
to stay needs counseling.
 
 
> them through the language working group in the standards body.
 
> One advantage of the approach advocated by Herb Sutter is that if you
> don't like these metaclasses, you're not paying for them in any way.
 
I think other alternatives capture the essence of C++
better, but it will be interesting to see how it unfolds.
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
jt@toerring.de (Jens Thoms Toerring): Jul 30 10:57AM

> void operator=(T value) { *address = value; }
> };
> }
 
I've played around with this bit but get a problem when I
try to do e.g,
 
ReadWriteRegister<uint16_t, 0x1000> rwr;
 
The compiler complains that it can't convert the integer constant
to 'volatile T *const'. One way around may be to use 'intptr_t' in
the second template parameter and then do the appropriate casts on
it where needed.
 
Another thing is that the address may not always a compile
time constant, it might be e.g. obtained via a function call
and thus unsuitable as a template parameter.
 
Here's my take on this, trying to support both cases:
 
template<typename T>
class RegisterBase
{
protected:
RegisterBase(T * address) : m_address(address) {}
T read() const { return *m_address; }
T write(T value) { return *m_address = value; }
 
private:
volatile T * m_address;
};
 
template<typename T>
struct ReadOnlyRegister : public RegisterBase<T>
{
ReadOnlyRegister(intptr_t address)
: RegisterBase<T>(reinterpret_cast<T *>(address))
{}
 
ReadOnlyRegister(void const * address)
: RegisterBase<T>(const_cast<T *>(reinterpret_cast<T const *>(address)))
{}
 
operator T () const { return this->read(); }
T operator = (T) = delete;
};
 
template<typename T>
struct WriteOnlyRegister : public RegisterBase<T>
{
WriteOnlyRegister(intptr_t address)
: RegisterBase<T>(reinterpret_cast<T *>(address))
{}
 
WriteOnlyRegister(void * address)
: RegisterBase<T>(reinterpret_cast<T *>(address))
{}
 
operator T () const = delete;
T operator = (T value) { return this->write(value); }
};
 
template<typename T>
struct ReadWriteRegister : RegisterBase<T>
{
ReadWriteRegister(intptr_t address)
: RegisterBase<T>(reinterpret_cast<T *>(address))
{}
 
ReadWriteRegister(void * address)
: RegisterBase<T>(reinterpret_cast<T *>(address))
{}
 
operator T () const { return this->read(); }
T operator = (T value) { return this->write(value); }
};
 
I.e. the address is not a template parameter but is passed to the
constructor. You thus should be able to use it like this
 
#defined STAT_FLAGS_ADDR 0x10ea
ReadOnlyRegister<uint16_t> state_flags(STATE_FLAGS_ADDR)
 
as well as
 
extern unsigned char * reg_base(void);
#define STATE_FLAGS_OFFSET 0xea
 
ReadOnlyRegister<uint16_t> state_flags(reg_base() + STATE_FLAGS_OFFSET);
 
Another possibly interesting addition might be to be able to
set other than the default methods for reading and writing.
On some systems I've worked with certain registers where
"protected" in that you couldn't write directly to them but
this required that you first wrote certain values to some
other register with a certain timing, before a write to the
"real" register had an effect (to protect some important set-
tings fron getting overwritten inadvertently).
 
> I'm interested to hear if anyone else has done something similar
> and how you approached the problem.
 
Sorry, got no chance to use C++ in embedded programming yet, it
always had to be C...
Best regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
David Brown <david.brown@hesbynett.no>: Jul 30 01:29AM +0200

On 30/07/17 00:26, Rick C. Hodgin wrote:
 
> If not, I propose new unary operators:
 
> ?<< for BSF, as it scans up to find the first 1 bit
> >>? for BSR, as it scans down to find the first 1 bit
 
Why not just have functions to do the job? An operator does not give
you any advantages here - it's just some cryptic symbols instead of a
nice named function.
 
If you want to propose that there should be functions like "ffs", "clz",
"ctz" (find first zero, count leading zeros, count trailing zeros) in
the standard library, then that would be fair enough. A common
implementation could be done in straight C, and an implementation could
use optimal implementations with bsf and bsr instructions on an x86
target. (Most processors have something similar - see the Wikipedia
page for examples.)
 
In the meantime, many compilers have extensions or built-ins that
implement these functions.
 
<https://en.wikipedia.org/wiki/Find_first_set>
 
If your compile supports a better inline assembly syntax, you can use
that to define the function. In gcc, you could use this as the
equivalent to your "lowest_bit" function:
 
static inline __attribute__((const, always_inline))
int bsf(unsigned int x) {
unsigned int b;
asm("bsf %[b], %[x]" : [b] "=r" (b) : [x] "r" (x));
return b;
}
 
Some might say it is a little ugly and hard to comprehend (and few would
deny that), but it's the kind of thing you write once then hide away in
a header somewhere rather than in application code. And it lets you use
"bsf" optimally - no extra mov, ret, call, etc.
 
 
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.

Saturday, July 29, 2017

Digest for comp.lang.c++@googlegroups.com - 16 updates in 4 topics

Real Troll <real.troll@trolls.com>: Jul 28 08:20PM -0400

On 28/07/2017 23:34, Mr Flibble wrote:
 
> Oh shit I've said fuck oh fuck I've said shit!
 
I hope you are feeling better now.
 
Now go and take your meds before you go completely mad and stop using
computers for a few days.
 
I have decided to use my kill-switch until you are better mentally.
Are you homo sexual? Homos generally have mental problems like you are
displaying here.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 01:49PM +0100

On 28/07/2017 23:41, Rick C. Hodgin wrote:
 
>> https://www.youtube.com/watch?v=..
 
>> [SNIP]
 
> Anyone can use profanity, Leigh. Anyone can be vulgar and
 
Anyone can and should use profanity.
 
> cruel and hateful and mean. You just need to open your mouth
> and out it spews, pick a target and attack.
 
Oh and I was targeting who exactly? Sorry but playing the victim just
doesn't wash mate.
 
 
> It takes someone stronger, more focused, more purposed, to NOT
> do those things. And it takes someone of wisdom to not do
> them for the right reasons.
 
Swearing is a good thing not a bad thing; watch this short video of
Stephen Fry on the joys of swearing:
 
https://www.youtube.com/watch?v=s_osQvkeNRM
 
 
> How strong are you, Leigh? How wise?
 
Stronger and wiser than you it seems.
 
/Flibble
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 29 06:02AM -0700

On Saturday, July 29, 2017 at 8:50:13 AM UTC-4, Mr Flibble wrote:
> > and out it spews, pick a target and attack.
> Oh and I was targeting who exactly? Sorry but playing the victim just
> doesn't wash mate.
 
My comment was toward an arbitrary target, meaning it's easy to be
vulgar and cruel and hateful and mean ... a person need only look
around them in any direction, pick out their target, and then go
forth spewing such filth at them. And to pick another target and
do the same. It requires no constraint to spew venom and hate.
It actually is a full embracing of the filth that exists in our
sinful flesh, to grab hold of those evil natural tendencies in our
sinful flesh, and then just run with them.
 
If you want to live in that world where everybody is being vulgar
and cruel and hateful and mean toward one another, Leigh ... then
all I can do is pray for you because that is not the world God calls
us to, nor is it the world we should desire for ourselves, our own
children and families, or our neighbors. Only the enemy of God calls
us to that world of hate, Leigh.
 
Surely you must see this, Leigh?
 
Thank you,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 02:13PM +0100

On 29/07/2017 14:02, Rick C. Hodgin wrote:
> It actually is a full embracing of the filth that exists in our
> sinful flesh, to grab hold of those evil natural tendencies in our
> sinful flesh, and then just run with them.
 
I repeat my question: who was I targeting exactly with my profanity? If
you hit your thumb with a hammer and swear who are you targeting? If
you swear at no one in particular (just for shits and giggles, as is the
case here) who are you targeting?
 
Playing the victim is egregious mate.
 
 
> If you want to live in that world where everybody is being vulgar
> and cruel and hateful and mean toward one another, Leigh ... then
 
But I didn't target any individual with my profanity; a point which you
appear to miss.
 
> us to, nor is it the world we should desire for ourselves, our own
> children and families, or our neighbors. Only the enemy of God calls
> us to that world of hate, Leigh.
 
God doesn't exist and my name is Flibble.
 
 
> Surely you must see this, Leigh?
 
See what? That you are wrong as usual?
 
/Flibble
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 29 06:26AM -0700

On Saturday, July 29, 2017 at 9:13:39 AM UTC-4, Mr Flibble wrote:
> > sinful flesh, to grab hold of those evil natural tendencies in our
> > sinful flesh, and then just run with them.
 
> I repeat my question: who was I targeting exactly with my profanity?
 
It is self-evident. You took time and effort to direct your focus on
the steps necessary to approach this world stage of Usenet, to then
type out letter-by-letter, word-by-word, your intended message. It
wasn't an accidental brush across the keyboard where you mistyped the
word "sit" or "duck" ... but it was deliberate.
 
Who were you targeting? Everybody. You were broadcasting, Leigh. And
you were doing it for no reason other than to just to spew what's all
welled up inside your heart.
 
> Playing the victim is egregious mate.
 
(1) I am not playing a victim here. My point is in reply to your
actions.
 
(2) I saw a skit one time containing a teacher in a class who asked the
student what they thought of something, and the student replied that he
thought it was "egregious." The teacher didn't know what that word meant
and went and looked it up. The teacher made a remark about the negative
connotations of the word egregious, to which the student corrected the
person and said that the word egregious had changed meaning over time.
That it wasn't always used in a negative connotation, but that originally
it meant "remarkable" or "extraordinary":
 
https://books.google.com/books?id=z3kKAAAAIAAJ&pg=PP5#v=onepage&q=egregious&f=false
 
-----
It's interesting how the things of man change over time. The same
is not true of the things of God, because what God has laid down is
foundational and permanent.
 
I ask you to investigate this, Leigh. You'll find that there are a
great many things we've all been taught in this world which are just
not true, helpful, or in any way uplifting toward right paths of life.
You'll come to find that Jesus has given us the right path of life,
and it is manifold and expressive in and through the redeemed us (as
by the born again, forgiven-of-sin, nature), for we are woven in to
His creation purposefully. But sin, being the enemy, prevents us
from contributing rightly to that creation because the things which
well up in our fallen-in-sin hearts are naturally harmful.
 
What Jesus offers us is full restoration, and a real life purpose
both here in this world, and in the age to come after we leave
this world.
 
Thank you,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 03:29PM +0100

On 29/07/2017 14:26, Rick C. Hodgin wrote:
> type out letter-by-letter, word-by-word, your intended message. It
> wasn't an accidental brush across the keyboard where you mistyped the
> word "sit" or "duck" ... but it was deliberate.
 
Ergo I wasn't targeting an individual so no harm done.
 
 
> Who were you targeting? Everybody. You were broadcasting, Leigh. And
> you were doing it for no reason other than to just to spew what's all
> welled up inside your heart.
 
Correct, I wasn't targeting an individual so again no harm done.
 
 
>> Playing the victim is egregious mate.
 
> (1) I am not playing a victim here. My point is in reply to your
> actions.
 
Your actions indicate otherwise.
 
[SNIP tldr]
 
/Flibble
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 29 08:05AM -0700

On Saturday, July 29, 2017 at 10:29:29 AM UTC-4, Mr Flibble wrote:
> Ergo I wasn't targeting an individual so no harm done.
 
You affect everyone, Leigh. You ooze this type of identity from
yourself and you taint those around you with its effects.
 
You are doing bad things which harm people. If that matters to
you at all then stop.
 
Thank you,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 04:53PM +0100

On 29/07/2017 16:05, Rick C. Hodgin wrote:
> yourself and you taint those around you with its effects.
 
> You are doing bad things which harm people. If that matters to
> you at all then stop.
 
Being personally "harmed" by profanity that isn't even targeted at you
personally is most definitely playing the victim, Rick. I thought you
said you weren't doing that?
 
/Flibble
David Brown <david.brown@hesbynett.no>: Jul 30 12:13AM +0200

On 29/07/17 02:20, Real Troll wrote:
 
> I hope you are feeling better now.
 
Swearing has been demonstrated to make people feel better - at least in
the case of acute pain. (Try hitting your thumb with a hammer a few
times, with and without swearing. The swearing helps.)
 
I'd be surprised if it helped Mr. Flibble with his irritation over Rick,
however.
 
 
 
> Are
> you homo sexual? Homos generally have mental problems like you are
> displaying here.
 
I was going to take exception to this comment - then I noticed the name
of the poster!
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 29 03:35PM -0700

Profanity does not give any kind of release for us. It serves as a
substitute for a real release that comes from the time required to
naturally recover from the event.
 
What it does do is introduce sin into our lives. It has a creation
made in the very image and likeness of God using profanity, spewing
profane things from the very mouth that was created to honor God.
 
It is only natural that the fallen-in-sin world would teach that
using profanity is a positive thing, and employ it readily. But it
does not serve any positive thing. It is only damaging, hurtful,
and leads to increasing ungodliness:
 
http://biblehub.com/kjv/2_timothy/2-16.htm
16 But shun profane and vain babblings: for they will increase
unto more ungodliness.
 
The enemy of this world wants your soul destroyed in Hell. Jesus
wants to forgive your sin without judgment, thereby saving your
soul from Hell. The world teaches you profanity is okay. Jesus
teaches that it is not holy and only increases unto more ungodliness.
 
Thank you,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 11:41PM +0100

On 29/07/2017 23:35, Rick C. Hodgin wrote:
> wants to forgive your sin without judgment, thereby saving your
> soul from Hell. The world teaches you profanity is okay. Jesus
> teaches that it is not holy and only increases unto more ungodliness.
 
Jesus "Bastard" Christ never existed. Also, fuck off Rick.
 
/Flibble
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 29 06:26PM -0400

Are there C language operator equivalents of the feature given by
Intel's x86 instructions BSF (bit scan forward) and BSR (bit scan
reverse)? They return the bit position of the lowest (BSF) or
highest (BSR) set bit (a bit with a 1 in it).
 
BSF: https://c9x.me/x86/html/file_module_x86_id_19.html
BSR: https://c9x.me/x86/html/file_module_x86_id_20.html
 
If not, I propose new unary operators:
 
?<< for BSF, as it scans up to find the first 1 bit
>>? for BSR, as it scans down to find the first 1 bit
 
Sample usage:
 
// BSF equivalent operator usage: bits = x?<<;
// BSR equivalent operator usage: bits = >>?x;
 
unsigned int lowest_bit(unsigned int x)
{
unsigned int bits;
 
// Equivalent of:
// bits = x?<<;
_asm {
bsf eax,x
mov bits,eax
}
// Return indicates the lowest bit position that has a 1
return(bits);
}
 
unsigned int highest_bit(unsigned int x)
{
unsigned int bits;
 
// Equivalent of:
// bits = >>?x;
_asm {
bsr eax,x
mov bits,eax
}
// Return indicates the highest bit position that has a 1
return(bits);
}
 
int main(int argc, char* argv[])
{
unsigned int i;
 
 
// Display the bit position of each of these values (1 << i)
for (i = 0; i < 32; i++)
printf("Highest bit in %u = %u\n", 1 << i,
highest_bit(1 << i));
 
return 0;
}
 
Thank you,
Rick C. Hodgin
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jul 29 01:44AM +0200

On 29.07.2017 00:35, Richard wrote:
 
> Having a compiler enforce what it means for something to be an
> interface is a solution to all these problems that arise from a lack
> of self discipline.
 
One nice feature of C++ interfaces is that they can include shallow
public non-virtual wrapper methods for the private or protected virtual
methods. For example, a public method can check preconditions and
possibly also some postcondition. Java lacks this nicety.
 
Then we already have two kinds of interfaces: pure Java-style, with only
virtual methods, and C++ style, with a mix.
 
But wait, Java-style... Then one needs to use virtual inheritance to
support inherit-in-an-implementation. I hope Herb's thing doesn't
enforce that: usually people find the virtual inheritance cost unacceptable.
 
 
Cheers!,
 
- Alf
David Brown <david.brown@hesbynett.no>: Jul 30 12:06AM +0200

On 29/07/17 00:35, Richard wrote:
> we would just use C. But we don't, we value the extra checks that the
> type system of C++ can provide and we lean on that to prevent
> ourselves from getting sloppy in this regard.
 
Like many features in C++, there is a lot here that could be of some
interest to many people, but major use-cases (like a good "interface"
metaclass) involves a lot more thought, testing, discussion, knowledge
and experience than most developers can provide. But that's okay -
that's why we have a standard library.
 
What proportion of C++ programmers could honestly say they could make a
full implementation of std::unique_ptr, or std::move ? They are
implemented using normal C++11, with features like templates, classes,
overloading, rvalue references, etc., that can be useful for many
programmers.
 
The same, I think, applies to metaclasses. When they hit the standards,
they will be accompanied by a set of standard metaclasses like
interface, value, literal, flags_enum, etc. No one will expect "normal"
C++ programmers to write their own interface metaclasses.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 02:24PM +0100

.. or OMFG (Oh My Fucking God) or Whore Mary Mother Of Bastard Christ
are examples of the best kind of profanity: blasphemy.
 
Blasphemy is something that should be encouraged and celebrated. The
fact that some backward countries still kill people for committing the
"crime" of blasphemy is all the more reason for us who have the freedom
from living in more enlightened places to be blasphemous.
 
Personally I like to blaspheme because I am a militant atheist and I
like to grind the gears of the theistic fucktards.
 
/Flibble
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 29 02:36PM +0100

On 29/07/2017 14:24, Mr Flibble wrote:
> from living in more enlightened places to be blasphemous.
 
> Personally I like to blaspheme because I am a militant atheist and I
> like to grind the gears of the theistic fucktards.
 
I feel that:
 
Whore Mary Cunt Mother of Bastard Jesus "Bat Shit Crazy" Christ
 
might have been more appropriate; blasphemy tends to be more effective
when used with greater invective.
 
/Flibble
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.

Digest for comp.programming.threads@googlegroups.com - 4 updates in 4 topics

rami18 <coco@coco.com>: Jul 28 06:34PM -0400

Hello....
 
 
Read this:
 
Deep Learning in AI: The History, The Present and The Future
 
Look at this video:
 
https://www.youtube.com/watch?v=irN_UrirRgg
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 28 03:20PM -0400

Hello...
 
 
Read this:
 
China has long been the largest market for semiconductors, accounting
for over 50% of the global market for the last five years. China is now
on track to become the largest semiconductor manufacturer in the next
few years.
 
Read more here:
 
http://www.semiconductorintelligence.com/china-to-become-largest-semiconductor-producer/
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 28 03:17PM -0400

Hello...
 
Read this:
 
IQ GEOGRAPHY IN CHINA
 
Jiangsu province of China has a mean IQ of 108
 
Shanghai province of China has a mean IQ of 108
 
Zhejiang province of China has a mean IQ of 107
 
Anhui province of China has a mean IQ of 107
 
Beijing province of China has a mean IQ of 107
 
Gansu province of China has a mean IQ of 107
 
 
Read more here:
 
https://theslittyeye.wordpress.com/2011/11/19/iq-geography-in-china/
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
rami18 <coco@coco.com>: Jul 28 02:46PM -0400

Hello....
 
Read this:
 
Deep Learning Machine Beats Humans in IQ Test
 
Read more here:
 
https://www.technologyreview.com/s/538431/deep-learning-machine-beats-humans-in-iq-test/
 
 
 
Thank you,
Amine Moulay Ramdane.
 
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
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.programming.threads+unsubscribe@googlegroups.com.