Thursday, September 8, 2016

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

Real Troll <real.troll@trolls.com>: Sep 08 01:50PM -0400

On 25/08/2016 22:02, Ramine wrote:
> Hello...........
 
> Here is the remaining of my invention on artificial intelligence..
 
Ramine,
 
I have now got Delphi starter Edition and C++ Starter Edition (both free
from Embarcadero) so please continue posting your Delphi codes here (or
on C newsgroup - comp.lang.c) so that I can try them in my Delphi.
 
Thank you.
scott@slp53.sl.home (Scott Lurndal): Sep 08 05:54PM

>from Embarcadero) so please continue posting your Delphi codes here (or
>on C newsgroup - comp.lang.c) so that I can try them in my Delphi.
 
>Thank you.
 
Please, do not post delphi code to the C++ group.
Real Troll <real.troll@trolls.com>: Sep 08 03:59PM -0400

On 08/09/2016 18:54, Scott Lurndal wrote:
 
> Please, do not post delphi code to the C++ group.
 
It's better than reading about Jesus!! Do you not think so?
 
Not a single day passes without some idiot telling us about Jesus
Christ. They killed Galileo because he wanted to discuss science while
Christian fundamentalists wanted to talk about religion and to fool the
masses.
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 08 11:09PM +0100

On Thu, 8 Sep 2016 15:59:59 -0400
> Christ. They killed Galileo because he wanted to discuss science
> while Christian fundamentalists wanted to talk about religion and to
> fool the masses.
 
Sorry, your views are no better than Rick's or Brian's if you have such
little concern for the objective facts. "They" didn't kill Galileo: he
died of natural causes. He recanted from Copernicanism in the face of
religious fundamentalism and persecution, in order to avoid death (he
was under permanent house arrest after trial by inquisition, not under
sentence of death).
 
Religious fanaticism of the Rick/Brian kind is certainly annoying
because it shows an egocentric and self-absorbed absence of concern for
the rights of others as represented by the subject matter of this news
group. They basically think that they have a divine licence to ignore
others' rights; but it would be far-fetched to present it as life
threatening. I am pretty certain that the US judicial system would stop
it getting that far.
mark <mark@invalid.invalid>: Sep 08 03:58PM +0200

It doesn't sound like you are using vector functionality. So using a
(unordered) set may be a better choice. It works perfectly fine with
pointers.
Lynn McGuire <lynnmcguire5@gmail.com>: Sep 08 12:45PM -0500

On 9/8/2016 8:58 AM, mark wrote:
> It doesn't sound like you are using vector functionality. So using a (unordered) set may be a better choice. It works perfectly fine
> with pointers.
 
????
 
Thanks,
Lynn
mark <mark@invalid.invalid>: Sep 08 09:59PM +0200

On 2016-09-08 19:45, Lynn McGuire wrote:
>> (unordered) set may be a better choice. It works perfectly fine
>> with pointers.
 
> ????
 
Your removeOwner invalidates vector indices. So I don't see you needing
indexed access.
 
---------------------------------------
std::unordered_set<DataGroup *> owners;
 
int DataItem::removeOwner (DataGroup * ownerDG) {
// average complexity O(1)
owners.erase(ownerDG);
...
}
---------------------------------------
 
If you need to support duplicate entries, there is multiset /
unordered_multiset. What you do loose with set / multiset is the
insertion order.
Lynn McGuire <lynnmcguire5@gmail.com>: Sep 08 03:25PM -0500

On 9/8/2016 2:59 PM, mark wrote:
> ---------------------------------------
 
> If you need to support duplicate entries, there is multiset / unordered_multiset. What you do loose with set / multiset is the
> insertion order.
 
Thanks,
Lynn
Bo Persson <bop@gmb.dk>: Sep 08 05:51PM +0200


>> Must Have for Google Aspirants !!!
 
>> This book is written for helping people prepare for Google Coding Interview. It contains top 20 programming problems frequently asked @Google with detailed worked-out solutions both in pseudo-code and C++(and C++11).
 
> imho coolest tiny book (refresher).
 
Ok, so now Google is going to write up 20 new questions to ask the
applicants.
 
 
Great!
 
 
Bo Persson
Alan Mackenzie <acm@muc.de>: Sep 08 11:42AM

>> source, are available on the CC Mode web page:
 
>> <http://cc-mode.sourceforge.net/>
 
> Will cc-mode ever support Objective-C++?
 
If somebody is prepared to step up and undertake the work, then yes.
Otherwise, no.
 
Speaking personally, I don't envisage having the free time to do this
myself in the foreseeable future. But I would be able to help somebody
else by email.
 
--
Alan Mackenzie (Nuremberg, Germany).
David Brown <david.brown@hesbynett.no>: Sep 08 03:08PM +0200

On 05/09/16 08:16, Juha Nieminen wrote:
>> source, are available on the CC Mode web page:
 
>> <http://cc-mode.sourceforge.net/>
 
> Will cc-mode ever support Objective-C++?
 
Is there much demand for this? As I understand it, Objective-C and
Objective-C++ are almost entirely used for Mac-only and iThingy
software. Emacs is most popular for people doing *nix development. So
are there many people doing iThingy development using emacs as their IDE?
"Öö Tiib" <ootiib@hot.ee>: Sep 07 11:13PM -0700

On Wednesday, 7 September 2016 23:26:20 UTC+3, Real Troll wrote:
 
> > Welcome to my killfile.
 
> How many times have you said this? Is there anybody left for you to
> respond to?
 
I have only seen him announcing it about Jerry and Rick in this
group.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 08 02:16AM +0200

On 07.09.2016 22:19, Vir Campestris wrote:
<>
> UTF-8, and I'm absolutely certain I've done it from an app in the past.
> And yet I can't find the documentation for it anywhere. I wonder if it's
> something that used to work, but doesn't any more?
 
The Windows API level has never supported UTF-8 in consoles. The
behavior has been as if errors are sticky. Output could work till the
first non-ASCII character, but input wouldn't work at all (down at the
API level).
 
In Windows versions before Windows 8, using codepage 65000 would get you
funny "out of memory" and other errors, from e.g. "more" command:
 
[example]
[c:\my\forums\clc++]
> chcp 65000
Active code page: 65000
 
[c:\my\forums\clc++]
> more
Not enough memory.
 
[c:\my\forums\clc++]
> ver
Microsoft Windows [Version 6.1.7601]
[/example]
 
I'm not sure exactly when that was fixed, but as I recall it's not that
same idiotic error message in Windows 10; maybe no error.
 
Windows 10 got a lot of improvements in the console subsystem, including
ordinary shortkeys for copy/paste, unwrapping of wrapped output lines,
and once again support for ANSI escape sequences.
 
However, the escape sequence support isn't quite quite yet, and it
doesn't work with Windows Script Host, apparently because WSH uses
direct Unicode console i/o while (apparently) the escape sequences only
work for byte streams -- which is sort of ironic, that the now almost
deprecated WSH console i/o is not poor enough to get the benefits…
 
 
Cheers!,
 
- Alf
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 08 02:03AM +0200

On 07.09.2016 21:07, Lynn McGuire wrote:
> which has "learning" and "knowledge" among its meanings, is associated
> to the code point U+5B66. Currently, the Unicode standard defines more
> than 1,114,000 code points."
 
Well, there are some gross inaccuracies and misconceptions in that article.
 
"It's worth noting that the C++ standard doesn't specify the size of the
wchar_t type"
 
That's at best an uninformed hope. The standard does narrow it down
sufficiently that all Windows C and C++ compilers are non-conforming.
For conformance a `wchar_t` must be able to represent all code points of
Unicode, i.e., in practice it must be 32 bits, since it can't be 21.
 
The idea of defining a custom exception class to carry an error code, is
ungood. There is `std::system_error` for that purpose. Only if one
desires a non-byte-encoded string, or other additional information, is a
custom exception class indicated, but there's none of that.
 
And using the Windows API for conversion between UTF-8 and UTF-17 is
unnecessary after C++11. It gets more ridiculous when one considers
where the C++ standard library doesn't suffice, i.e. where the API would
be a reasonable choice, namely conversion to/from Windows ANSI. That is,
for some unfathomable reason the author chose as his example of using
the API functions, about the only conversion where the API functions are
not needed.
 
 
Cheers!,
 
- Alf
(who used to read MSDN Magazine at one time, it was all so shiny! and
who is only a one-time Visual C++ MVP, as opposed to the four-time and
nine-times Visual C++ MVP the author used as experts, but hey)
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: