Wednesday, June 13, 2018

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

Paavo Helde <myfirstname@osa.pri.ee>: Jun 13 09:27PM +0300

On 12.06.2018 20:33, Daniel wrote:
 
> It's not that the input is "too long", but rather that certain sequences of
> digits, such as "0.1" or "0.2", don't have exact representations as
> doubles. It's the accumulation of these errors within the summation that can produce incorrect digits in the result.
 
Let me play devil's advocate for a change!
 
I can understand the beauty in having a "perfect" function for
floating-point binary-decimal conversion. However, in reality one rarely
has exactly determined floating-point numbers so the usefulness of such
a function remains pretty limited. Typically there can be deviations in
the last digits because of multiple reasons, so nobody cares if these
last digits get converted to decimal absolutely perfectly or not as they
contain only noise anyway.
 
It's true that repeated binary-decimal conversion can cause a large
drift. But that's easy to fix: if it hurts, don't do that! There is no
reason why a number should be converted from binary to decimal and back
thousands of times.
legalize+jeeves@mail.xmission.com (Richard): Jun 13 07:01PM

[Please do not mail me a copy of your followup]
 
Paavo Helde <myfirstname@osa.pri.ee> spake the secret code
>drift. But that's easy to fix: if it hurts, don't do that! There is no
>reason why a number should be converted from binary to decimal and back
>thousands of times.
 
The only case I can think of where this happens, although not for
"thousands of times", is when transporting data between systems in a
text format and the differing systems result in drift in the
floating-point representation because they have different
implementations of "text to floating-point" and "floating-point to
text".
--
"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>
Ian Collins <ian-news@hotmail.com>: Jun 14 08:19AM +1200

On 14/06/18 01:23, Daniel wrote:
>> only specification
 
> Robert Martin has, or as near as, check out the old discussions in
> comp.software.extreme-programming.
 
Links? I'm pretty sure he doesn't make such a silly claim... You have
to start with some sort of requirement, no matter how vague!
 
--
Ian.
SilverSlimer <.m@nsn.s>: Jun 13 11:01AM -0400

>>machine.
 
>Not until they remove the deliberate crippling of the GUI and allow multiple
>concurrent windows.
 
I don't use the iPad myself but work in a private school where every
student uses one. I know that they can multitask with it which seems
fine for most people but I doubt that it can do more than that. It's
too limited for me but it seems to be good enough for a good
proportion of the "e-mail and browsing" population.
 
 
>I used to have an iPad - it was an idiots computer. Replaced it with Android
>which might not be quite so polished but its far superior in features and
>usability.
 
I like Android myself. I financed the first fully open-source cell
phone from Puri.sm to replace my Android once it comes out but I doubt
that I will truly be able to stop using this operating system. For all
of its unethical decisions, Google is very good at creating decent
operating environments.
nospam <nospam@nospam.invalid>: Jun 13 11:49AM -0400

> allowed split window mode and in android 7 & 8 (if the OEM has enabled it,
> samsung has) you can have a proper floating windowing system called freeform
> windows.
 
split window was added to ios several years ago, however, it doesn't
make a lot of sense to have more than two windows on a tablet and
certainly not a phone.
 
nevertheless, *four* apps can currently be run at the same time on an
ipad, although it's not particularly useful:
<https://photos5.appleinsider.com/gallery/21608-24920-IMG_0391-l.jpg>
 
the key is that a tablet is *not* a laptop. it's good for a *different*
set of tasks than a laptop, although there is some overlap.
 
> I used to have an iPad - it was an idiots computer. Replaced it with Android
> which might not be quite so polished but its far superior in features and
> usability.
 
false.
 
nothing on the android side comes anywhere close to an ipad pro with an
apple pencil.
nospam <nospam@nospam.invalid>: Jun 13 11:49AM -0400

> term investment in the OS/X platform which using a fraction of their cash pile
> could be turned into a decent server OS (along with dumping the hideous
> objective-C which should have been strangled at birth).
 
apple's prices are not absurd, the desktop market is shrinking and they
aren't interested in the server market, which is even smaller.
 
mobile is the future.
nospam <nospam@nospam.invalid>: Jun 13 11:49AM -0400

In article <0g82id10dc31l03vf3h2dv5culctip0qci@4ax.com>, SilverSlimer
> >could be turned into a decent server OS (along with dumping the hideous
> >objective-C which should have been strangled at birth).
 
> Agreed. If they could get their worst machines at a $750 price point,
 
you're assuming everyone wants a dirt cheap computer or phone. most do
not.
 
nevertheless, 15 years ago, they released a $499 mac mini.
 
the least expensive ipad is currently $329 and the least expensive
iphone is currently $349, or $139 locked to a carrier (no contract
either way).
 
<https://www.walmart.com/ip/Straight-Talk-Prepaid-Apple-iPhone-SE-32GB-S
pace-Gray/497984946>
 
> I'm sure that they would indeed have a higher market share.
 
chasing market share is foolish.
 
apple is selling everything they can make, often backordered, and
they're on the verge of being the first trillion dollar company.
 
they're doing quite well doing what they're doing.
 
> specified computer. The iPad seems to be the only affordable machine
> and it's arguable as to whether it can really replace a desktop
> machine.
 
it can for many people, and in many cases, an ipad or iphone is their
only computer.
 
mobile is the future.
nospam <nospam@nospam.invalid>: Jun 13 11:49AM -0400

In article <pfpd4p$2bt$1@dont-email.me>, Rick C. Hodgin
 
> > it's up to the developers update their own apps.
 
> I categorically disagree with you. It should be up to the OS vendor
> to maintain backward compatibility.
 
nope. that is simply wrong.
 
developers need to update their apps to maintain compatibility and take
full advantage of new features in new versions of the operating system
and also new hardware.
 
if they don't, their competitors will. that's how the industry works,
and not just software either.
 
backward compatibility is not free.
 
like every company, microsoft's resources are limited.
 
their resources are better spent moving the platform forward than
trying to keep ancient and long obsolete apps running.
 
> purposes of wanting to sell new copies of their OS ... that's about
> the worst kind of unethical behavior you can have toward your
> customers. And I consider your attitude to be ill-informed.
 
you're obviously not a developer.
 
also, if you think microsoft is unethical, why do you continue to use
their products? there are many other choices, some quite good.

> not matter and a decision is being made to ruin your product ...
> I don't know how you can get much worse than that in the software
> industry.
 
then you know absolutely nothing about the software industry.
 
> Things don't have to lose functionality to move forward.
 
at some point, they do.
 
nothing lasts forever.
 
> software built on the 16-bit 8086 CPUs back in the late 70s will
> run on today's hardware if they rely on BIOS, for example, and you
> buy a BIOS-supporting motherboard.
 
good luck on that.
 
the number of people who still want to run 16 bit apps is not enough to
bother supporting them.
 
if a particular app hasn't been replaced with a 32 bit version at a
minimum (and these days, 64 bit), either from the original developer or
another company, then there obviously wasn't much of a demand for
whatever that app did.
 
> New functionality can be added without breaking anything old.
 
not true.
 
many times old functionality must be dropped to move forward.
 
> >> It's the danger with monopolies.
 
> > microsoft no longer has a monopoly.
 
> Technically that's true, but in practice it's not.
 
in practice it definitely is.
 
there are *plenty* of alternatives, more than there ever have been.
 
microsoft is no longer the only game in town, and that's a good thing
for consumers.
 
win10 is the best version of windows yet, although they completely blew
it on mobile. windows phone was a complete failure.
 
> Windows software. You can use WINE and a few others that may or may
> not work. But for the Windows ecosystem, you're stuck with what
> Microsoft gives you.
 
there is no requirement to run windows software.
 
if you don't like what microsoft gives you, vote with your wallet and
get something else.
 
if enough people do that, they'll get the message.
SilverSlimer <.m@nsn.s>: Jun 13 11:59AM -0400

On Wed, 13 Jun 2018 11:49:24 -0400, nospam <nospam@nospam.invalid>
wrote:
 
 
>> Agreed. If they could get their worst machines at a $750 price point,
 
>you're assuming everyone wants a dirt cheap computer or phone. most do
>not.
 
Some people want to pay more for a computer with the expectation that
the model will be lighter, more powerful, have better battery life or
simply look prettier but that is the smaller amount of people.
 
>nevertheless, 15 years ago, they released a $499 mac mini.
 
Which is basically useless if you don't pay additional money for the
monitor, keyboard and mouse.
 
 
>apple is selling everything they can make, often backordered, and
>they're on the verge of being the first trillion dollar company.
 
>they're doing quite well doing what they're doing.
 
With iPhones and iPads, it's hard to argeue their success. They're
rich beyond belief and we will likely never see the company in the
same position they were in around 1997.
 
 
>it can for many people, and in many cases, an ipad or iphone is their
>only computer.
 
>mobile is the future.
 
Agreed, and Apple does very well in that category despite being
_functionally_ inferior to its competition. Of course, not everyone
needs the customization options of Android and simply wants a machine
which does everything they need to do on a daily basis... e-mail,
browsing, media playback.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jun 13 12:00PM -0400

On 6/13/2018 11:49 AM, nospam wrote:
 
>> I categorically disagree with you. It should be up to the OS vendor
>> to maintain backward compatibility.
 
> nope. that is simply wrong.
 
I disagree with you top to bottom, front to back, side to side.
 
> developers need to update their apps to maintain compatibility and take
> full advantage of new features in new versions of the operating system
> and also new hardware.
 
Once an app is written it is a tool. So long as there is no new thing
that's discovered that is actually damaging, such as a fundamental flaw
in the memory allocation unit in use in the app, then there is no reason
to ever have to recompile software that's written, debugged, and deployed.
 
It's probably good business to do so, but it's not a requirement. The
same accounting software written in the 1980s on DOS still runs today
if you don't have newer fancy things you need to keep track of.
 
> if they don't, their competitors will. that's how the industry works,
> and not just software either.
 
That's a business model and the choices you're advocating follow that
model, but it's wrong to require that of people. I'm genuinely sad
for you that you feel otherwise.
 
BTW, anonymous coward "nospam@nospam.invalid" ... you should not be
anonymous. It removes credibility away from your statements and
claims. It makes you a troll at best.
 
--
Rick C. Hodgin
SilverSlimer <.m@nsn.s>: Jun 13 12:15PM -0400

On Wed, 13 Jun 2018 11:49:24 -0400, nospam <nospam@nospam.invalid>
wrote:
 
 
>false.
 
>nothing on the android side comes anywhere close to an ipad pro with an
>apple pencil.
 
Yet a Surface with pen does as good if not a better job.
SilverSlimer <.m@nsn.s>: Jun 13 09:01AM -0400

On Tue, 12 Jun 2018 17:15:03 -0400, "Rick C. Hodgin"
>run on today's hardware if they rely on BIOS, for example, and you
>buy a BIOS-supporting motherboard.
 
>New functionality can be added without breaking anything old.
 
Software made for Windows in 1992 should still work in some way in
2018 IMO. I doubt that too many people are looking to run software
made for 3.1, but if the Windows product is to have continuity, its
legacy apps should be just as functional twenty-six years later. It's
not best for business, but it's best for their reputation to say the
least. I can't imagine a good reason for dropping compatibility as
adding a layer to aid Windows 3.1 or even 9x compatibility is not
likely to take more than about 500MB which is trivial on an operating
system installation today.
 
>Windows software. You can use WINE and a few others that may or may
>not work. But for the Windows ecosystem, you're stuck with what
>Microsoft gives you.
 
The same way that you're stuck with what Apple gives you to run legacy
Mac OS Classic apps (all of which no longer function) or apps from
around 2002.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jun 13 10:02AM -0400

On 6/13/2018 8:54 AM, SilverSlimer wrote:
>> VirtualBox a couple months back and it was impressive.
 
> Would you say that it can replace Windows on a day-to-day basis? Why
> not?
 
For some apps probably. For others no. The API is not yet sufficiently
developed or debugged.
 
> versions from like 2003, but nobody paid money for those projects and
> they therefore have no obligation to keep anything current like
> Microsoft might.
 
 
I'm not aware of functionality that has ceased working in Linux. But,
I don't use it too much for development.
 
--
Rick C. Hodgin
Ian Collins <ian-news@hotmail.com>: Jun 14 08:17AM +1200

On 14/06/18 03:49, nospam wrote:
 
> if they don't, their competitors will. that's how the industry works,
> and not just software either.
 
> backward compatibility is not free.
 
Neither is rebuilding every application if you choose to upgrade your
OS. Neither is being unable to upgrade to a supported OS version
because of legacy applications.
 
> like every company, microsoft's resources are limited.
 
> their resources are better spent moving the platform forward than
> trying to keep ancient and long obsolete apps running.
 
They wouldn't have to. Solaris had (and presumably still does in the
niche Oracle has confined it to) a binary compatibility guarantee. If
an application stuck to the public API, it would work as is in newer
version of the OS. This was good for customers who could upgrade just
the OS and good for developers like me with clients running multiple OS
versions. All I had to do was build on the oldest supported version and
know my stuff would work on all.
 
--
Ian.
woodbrian77@gmail.com: Jun 13 08:40AM -0700

On Wednesday, June 13, 2018 at 1:09:46 AM UTC-5, Ian Collins wrote:
> > that required dynamic exceptions? I guess we will be going
> > back to the future.
 
> I've never seen a ++C implementation...
 
I'm coming from an east const/Hebrew perspective:
http://slashslash.info/2018/02/a-foolish-consistency/
 
https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/
.
 
Brian
Ebenezer Enterprises - In G-d we trust.
https://github.com/Ebenezer-group/onwards
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 13 03:10PM -0400

> On Tuesday, 12 June 2018 16:09:35 UTC+1, James Kuyper wrote:
...
>> Speaking of which - I've taken on a new project. The position
>> description said:
...
>> Desired:
>> • Prior experience with M&S software coding.
 
> Unless you've previously worked for Marks and Spencer (https://www.marksandspencer.com/), I don't see how you can obtain this.
 
In this context, it refers to "Modeling and Simulation". Obviously, it's
too late to gain "prior experience", I'm just looking for ways to make
up for that lack of experience. I've always had a vague interest in M&S,
and some of my hobby programming has involved M&S, but nothing that even
approaches the level of sophistication of the simulations I'll be
working on shortly. I've done no serious study of the field.
Ian Collins <ian-news@hotmail.com>: Jun 14 08:11AM +1200


> A lot of times the STL and std::string is the only reasom people use C++ over
> C. I've seen plenty of C++ code with not a user defined class in sight. Take
> out the STL and string and it would be plain C.
 
The STL formed the basis of the standard library in '98. The STL as was
is no more.
 
--
Ian.
Rosario19 <Ros@invalid.invalid>: Jun 13 07:49PM +0200

i have one region of memory returned from malloc
i would like the default constructor for type T (can be all type, from
int to thistype) is applied to that memory manually without the sys
automatic call the destructor
 
example something as
 
T *p=malloc(sizeof(T));
 
if(p)
{T::p();// call manually the default void argument constructor for p
... // code using p
~T::p(); // call manually the default destructor for p
}
 
but this not compile
 
how to do it? is possible using the default constructor of one object
on memory?
Rosario19 <Ros@invalid.invalid>: Jun 13 07:53PM +0200

On Wed, 13 Jun 2018 19:49:40 +0200, Rosario19 wrote:
 
Re: how apply the default constructor without the sys call the
destructor but manualy call that destructor
 
> ... // code using p
> ~T::p(); // call manually the default destructor for p
> }
 
T *p=malloc(sizeof(T));
 
if(p)
{T::(*p)();// call manually the default void arg constructor for p
... // code using p
~T::(*p)(); // call manually the default destructor for p
}
 
 
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Jun 13 08:01PM +0100

On Wed, 13 Jun 2018 19:49:40 +0200
 
> but this not compile
 
> how to do it? is possible using the default constructor of one object
> on memory?
 
You should use placement new:
https://en.cppreference.com/w/cpp/language/new#Placement_new
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: