Thursday, September 5, 2019

Digest for comp.lang.c++@googlegroups.com - 22 updates in 6 topics

Szyk Cech <szykcech@spoko.pl>: Sep 05 10:05PM +0200

Hello!
 
I search few minutes Internet without success.
 
My question is:
Is this any reasonable solution which allow to render HTML in NCurses
apps?!?
I want to write app with commandline and Qt or NCurses interface.
It will be nice if I can display some basic tags in Qt and NCurses
without conversions...
 
Thanks in advance. Best regards.
Szyk Cech
Ben Bacarisse <ben.usenet@bsb.me.uk>: Sep 05 09:29PM +0100


> My question is:
> Is this any reasonable solution which allow to render HTML in NCurses
> apps?!?
 
There are console-only browsers like w3m, links and lynx so the end
result is possible. I don't know if any of these actually use NCurses,
but if any do, there may be a separable rendering library out there.
 
--
Ben.
dickey@invisible-island.net: Sep 05 03:27PM -0700

On Thursday, September 5, 2019 at 4:29:35 PM UTC-4, Ben Bacarisse wrote:
 
> There are console-only browsers like w3m, links and lynx so the end
> result is possible. I don't know if any of these actually use NCurses,
> but if any do, there may be a separable rendering library out there.
 
w3m uses termcap (a low-level interface); links (and those derived from it such as links2, elinks) are hard-coded, lynx uses curses (ncurses for instance).
 
For a "separable rendering library" useful with a text-browser: good luck finding that.
 
Rendering html is actually irrelevant to both C++ and ncurses...
Bonita Montero <Bonita.Montero@gmail.com>: Sep 05 03:03AM +0200

> std::sort(values, values+5, std::greater());
 
Doesn't work for me.
As I excpected VC++ as well as g++ require a template parameter.
Juha Nieminen <nospam@thanks.invalid>: Sep 05 09:50PM

>> std::sort(values, values+5, std::greater());
 
> Doesn't work for me.
> As I excpected VC++ as well as g++ require a template parameter.
 
It appears that gcc has been slow to implement automatic template
parameter deduction of this caliber. It only works from gcc 9
forwards. It doesn't work on previous versions of gcc.
 
It does work on the current version of clang (I haven't tested
which is the first version that added support).
 
As for the answer to the question, I think I understand it now.
 
std::greater is currently declared as
 
template<typename T=void>
struct greater;
 
This means that the C++17 automatic template parameter deduction
will make it std::greater<void> when no parameter is specified.
 
std::greater<void> in turn has a specialization that has a
templated operator(), which allows it to compare any types.
Manfred <noname@add.invalid>: Sep 05 05:17PM +0200

On 9/3/2019 10:35 PM, Scott Lurndal wrote:
> highway" programmer; someone with strongly held, but poorly justified
> positions who won't mesh well with any competent programming
> team.
 
My impression too.
This is nowhere near my experience of a "very capable programmer"
 
 
> True or not, it's not necessary to share these impressions,
It may be worth when it's about wrong statements being pushed as lessons
of truth.
The fact is that it is obviously impossible (and to a point thus
pointless) to correct every mistake that is published on the internet.
 
it doesn't
> the arguments are sound, it shouldn't be necessary to supplement them with
> statements about how stupid or pig headed the other person is. Or as they say,
> when Peter talks about Paul, we learn more about Peter than we do about Paul.
 
It may be worth noting that it is Bonita herself that enjoys insulting
the interlocutor in the first place.
Daniel <danielaparker@gmail.com>: Sep 05 09:03AM -0700

On Thursday, September 5, 2019 at 11:17:16 AM UTC-4, Manfred wrote:
 
> It may be worth [it]
 
I don't think so, civility matters. Even the C++ heavyweights, the heaviest of
heavy, have been the recipients of derogatory comments on this group, and most
no longer come here. It's unnecessary, arguments speak for themselves,
derogatory comments drive people away. And as Bonita is possibly the only
member of the female persuasion still active on this group, I think it would
be a shame if that happened. Personally I find Bonita's posts a welcome breath
of fresh air, I may be a minority of one, but perhaps not.
 
Daniel
legalize+jeeves@mail.xmission.com (Richard): Sep 05 04:55PM

[Please do not mail me a copy of your followup]
 
Paavo Helde <myfirstname@osa.pri.ee> spake the secret code
>> comparisons are to C.
 
>This is because the low-level bugs presumably solved by Rust, like
>out-of-bounds access and memory leaks, are pretty much non-issues in C++.
 
Agreed. I find it interesting that all these proponents of other
languages keep pointing to problems that C++ has solved decades ago as
the reason why we need their language.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
legalize+jeeves@mail.xmission.com (Richard): Sep 05 04:56PM

[Please do not mail me a copy of your followup]
 
Bonita Montero <Bonita.Montero@gmail.com> spake the secret code
 
>C++ simply hasn't any significant advantage over C on such tiny
>projects.
 
Many embedded developers would disagree. Take a look at Kvasir, for
example.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
Daniel <danielaparker@gmail.com>: Sep 05 11:07AM -0700

On Thursday, September 5, 2019 at 12:56:44 PM UTC-4, Richard wrote:
> >projects.
 
> Many embedded developers would disagree. Take a look at Kvasir, for
> example.
 
Still, I think it would be uncontroversial to say that C is still the #1
choice over C++ for firmware/embedded system development? When every byte
counts?
 
Daniel
Manfred <noname@add.invalid>: Sep 05 08:18PM +0200

On 9/5/2019 6:03 PM, Daniel wrote:
> On Thursday, September 5, 2019 at 11:17:16 AM UTC-4, Manfred wrote:
 
>> It may be worth [it]
Bad grammar, sorry about that.
 
> heavy, have been the recipients of derogatory comments on this group, and most
> no longer come here. It's unnecessary, arguments speak for themselves,
> derogatory comments drive people away.
 
I agree entirely, point by point.
And it is for that exact reason that I dislike when Bonita addresses
others as "mega-idiot" or "liar" (or any of the other N! epithets she
has thrown in here).
As I wrote elsewhere, freedom of speech is a precious value. It should
not be wasted this way.
 
And as Bonita is possibly the only
> member of the female persuasion still active on this group, I think it would
> be a shame if that happened.
 
Agreed on this too, I would rather prefer she learned some politeness,
thus allowing for the conversation to keep to a proper level.
I am convinced that civil language is much more likely to carry
interesting ideas, even (or maybe expecially?) in the context of pure
technical stuff.
 
Personally I find Bonita's posts a welcome breath
scott@slp53.sl.home (Scott Lurndal): Sep 05 07:23PM


>Still, I think it would be uncontroversial to say that C is still the #1
>choice over C++ for firmware/embedded system development? When every byte
>counts?
 
It would be uncontroversial to say that both C and C++ are used in firmware
and embedded system development.
 
However, your "every byte counts" addendum is unncessary, as C++ code can
be just as 'dense' as C code when written with the target in mind.
 
After working on two C++ operating systems (can't get closer to bare
metal) and two C++ hypervisors (again, bare metal) both of which are
quite performance sensitive, I can state with some authority that C++
is perfectly viable alternative to C. Just avoid certain C++ features
(exceptions, rtti, dynamic allocation) that might degrade performance.
 
class encapsulation alone is sufficient (i.e. C with classes).
Daniel <danielaparker@gmail.com>: Sep 05 01:28PM -0700

On Thursday, September 5, 2019 at 12:55:10 PM UTC-4, Richard wrote:
 
> I find it interesting that all these proponents of other
> languages keep pointing to problems that C++ has solved decades ago as
> the reason why we need their language.
 
We can dream of something better than C++ :-) Something less ad hoc and more aesthetically pleasing.
 
Best regards,
Daniel
James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 05 05:16PM -0400

On 9/5/19 12:03 PM, Daniel wrote:
> derogatory comments drive people away. And as Bonita is possibly the only
> member of the female persuasion still active on this group, I think it would
> be a shame if that happened.
 
I don't think Bonita's noticeably female, as far as her posts to this
newsgroup are concerned. I mean that in two senses: content and style.
As far as content is concerned, the subject of this newsgroup doesn't
depend upon gender, and we seldom discuss anything that would reveal a
person's gender. As far as style is concerned, there's nothing
particularly feminine about Bonita's style of discussion. If anything,
her confrontational approach fits male stereotypes better than female ones.
 
> Personally I find Bonita's posts a welcome breath
> of fresh air, I may be a minority of one, but perhaps not.
 
Personally, it seems to me that she is knowledgeable of only a small
range of different platforms, and thinks that what she knows about those
platforms necessarily applies to all other platforms. That wouldn't be
so bad if she were open to learning about the other environments that
are different from the ones she's familiar with, but she isn't. I've
seldom seen anyone with such an extreme combination of certainty and
close-mindedness about computers (politics and religion are a different
matter - in those areas, such a combination is not particularly rare).
Daniel <danielaparker@gmail.com>: Sep 05 02:40PM -0700

On Thursday, September 5, 2019 at 5:16:39 PM UTC-4, James Kuyper wrote:
particularly feminine about Bonita's style of discussion.
 
> If anything,
> her confrontational approach fits male stereotypes better than female ones.
 
Well, there is such a thing as a spunky female. But I'll leave it at that,
and say no more.
 
Best regards,
Daniel
Manfred <noname@add.invalid>: Sep 05 02:12PM +0200

On 9/4/2019 8:59 PM, Ian Collins wrote:
 
> I'm not sure which one is correct in this case!
 
> Cheers,
> Ian.
 
To me, it looks like gcc is the correct one.
"Öö Tiib" <ootiib@hot.ee>: Sep 05 08:24AM -0700

On Thursday, 5 September 2019 15:12:56 UTC+3, Manfred wrote:
 
> > Cheers,
> > Ian.
 
> To me, it looks like gcc is the correct one.
 
It may be unsure and so it is bad that only clang warns about it.
The [dcl.init.list] has felt ambiguous since 2011 and so
gcc, clang, MSVC and ICC have had slight differences with
those initializer_lists.
Current issue seems to be about differences of interpretation
of "list has a single element" special cases in it.
Manfred <noname@add.invalid>: Sep 05 08:52PM +0200

On 9/5/2019 5:24 PM, Öö Tiib wrote:
> those initializer_lists.
> Current issue seems to be about differences of interpretation
> of "list has a single element" special cases in it.
 
Thanks for the link.
Indeed the wording seems ambiguous, and even the examples in (1.10) are
of limited help:
int a = {1};
...
return { "Norah" }; // return list of one element
 
What would be the rationale to distinguish between these two cases?
 
Reading on, you probably mean clause (3.8). Here the examples focus on
the constructor syntax only, but indeed there is a problem on where a
single object or a list of one object is initialized.
Daniel <danielaparker@gmail.com>: Sep 05 01:23PM -0700

On Thursday, September 5, 2019 at 11:24:51 AM UTC-4, Öö Tiib wrote:
 
> those initializer_lists.
> Current issue seems to be about differences of interpretation
> of "list has a single element" special cases in it.
 
This appears to be the issue
 
https://wg21.cmeerw.net/cwg/issue1589
 
There is a suggested resolution that applies to 1589 in
 
https://wg21.cmeerw.net/cwg/issue1467
 
Anyone can tell me what is status "cd4"?
 
Thanks,
Daniel
Manfred <noname@add.invalid>: Sep 05 08:21PM +0200

On 9/4/2019 4:47 PM, Pavel wrote:
> tried. E.g. the currently-uncommented in my example definition generates
> the methods with the prototypes shown in the original post (1st and 3rd
> of which are different from the above).
 
FWIW gcc 9.1.1 behaves the same way.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 04 10:49PM -0700

On 9/1/2019 10:09 PM, Robert Wessel wrote:
>> words, right?
 
> Yes. CDSG does a compare and swap on a 128-bit value stored in a pair
> of (64-bit) registers with a quadword in memory.
 
Ohhhh nice! Was not aware of the CDSG. Is it like CMPXCHG16B on an x64
system, sounds identical? Well, what about the hyper strange:
 
cmp8xchg16 on the Itanium/ Itanic? Wow. This is a odd ball...
 
 
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 04 11:04PM -0700

On 9/1/2019 10:59 PM, Chris M. Thomasson wrote:
 
>> Myth!? No. Its real.
 
> Ask over on comp.arch... The CAS is the initials of the person who
> invented it. IBM!
 
For those who are interested, here is a link to some deeper context:
 
https://groups.google.com/d/topic/comp.arch/1zNPUHo8YoI/discussion
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.

No comments: