Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Computer Folklore » Has Microsoft commited suicide ...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Has Microsoft commited suicide ... [message #369415 is a reply to message #369380] Sat, 23 June 2018 07:04 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
J. Clarke <jclarke.873638@gmail.com> wrote:
> On Thu, 21 Jun 2018 23:39:17 -0400, Richard Thiebaud
> <thiebauddick2@aol.com> wrote:
>
>> On 06/21/2018 10:48 PM, J. Clarke wrote:
>>> On Thu, 21 Jun 2018 17:47:13 -0400, Peter Flass
>>> <peter_flass@yahoo.com> wrote:
>>>
>>>> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>>> > On 2018-06-20, Charles Richmond <numerist@aquaporin4.com> wrote:
>>>> >
>>>> >> On 6/20/2018 12:30 AM, Quadibloc wrote:
>>>> >>
>>>> >>> On Saturday, April 21, 2018 at 8:35:51 AM UTC-6,
>>>> >>> Gareth's Downstairs Computer wrote:
>>>> >>>
>>>> >>>> ... by its monopolistic attitude towards the PC now
>>>> >>>> that the World and its family are moving en masse to the
>>>> >>>> ARM processors?
>>>> >>>
>>>> >>>> Is the PC also dying in the light of the RPi3, a 64
>>>> >>>> bit processor available for the price of a few bananas?
>>>> >>>
>>>> >>> Although I thought Microsoft was doing just fine with its x86
>>>> >>> orientation - it has a foot in the ARM camp too, but there it
>>>> >>> doesn't offer the ability to run all those old applications...
>>>> >>>
>>>> >>> apparently they agree with you in part at Microsoft.
>>>> >>>
>>>> >>> http://www.theregister.co.uk/2018/06/18/microsoft_e2_edge_wi ndows_10/
>>>> >>
>>>> >> So Microsoft *can* move to other processors! I'd like to see the DEC
>>>> >> Alpha chip updated to the current micron state of the technology...
>>>> >> IMHO we need realistic alternatives to the x86 architecture.
>>>> >
>>>> > Once we have a realistic alternative to Microsoft, the problem
>>>> > solves itself.
>>>> >
>>>>
>>>> We have had realistic alternatives since the 80's. What re need is a
>>>> realistic alternative to the sheeple who won't see it.
>>>
>>> First you need to make a case that it's actually a realistic
>>> alternative. If it makes us replace our current staff with one ten
>>> times the size in order to do manually all the stuff that we now do
>>> using features unique to Windows that are not replicated on other
>>> platforms, then it is not a win.
>>>
>> What features are unique to Windows?
>
> The whole Component Object Model for one thing. There may be
> equivalents on other platforms but if we can't take our existing code
> and plunk it onto the new system and have it work the same way then
> it's a net cost for us.
>

As I said, if it's working there's no money to be made by switching to
something else, even something better.

--
Pete
Re: Has Microsoft commited suicide ... [message #369416 is a reply to message #369382] Sat, 23 June 2018 07:04 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
J. Clarke <jclarke.873638@gmail.com> wrote:
> On Fri, 22 Jun 2018 13:56:09 -0400, Peter Flass
> <peter_flass@yahoo.com> wrote:
>
>> Gareth's Downstairs Computer
>> <headstone255.but.not.these.five.words@yahoo.com> wrote:
>>> On 22/06/2018 11:37, Peter Flass wrote:
>>>>
>>>> Isn't Mono a clone of .net? What does the common runtime do especially that
>>>> other libraries don't? (actual question, not rhetorical)
>>> All the source languages link together.
>>>
>>
>> Sort of like all the gnu languages, the IBM mainframe languages with LE, or
>> all the DEC languages with the common runtime? Leave it to microsoft to
>> claim they invented sunshine.
>
> Except that the gnu languages and LE don't produce binaries that will
> run without further adjustment on an Alpha, an Itanium, a Sparc, and a
> PC, which, in principle, is true of CLR (I say "in principle" because
> I don't know if the versions of Windows that made it to the Alpha and
> Sparc are recent enough to support CLR).
>

In theory they can, although I don't know if any do in practice. ELF
binaries can contain objects for multiple architectures. Or are you talking
about something that's interpreted? That sounds like a spectacular waste if
resources.

--
Pete
Re: Has Microsoft commited suicide ... [message #369421 is a reply to message #369416] Sat, 23 June 2018 09:01 Go to previous messageGo to next message
Andy Leighton is currently offline  Andy Leighton
Messages: 203
Registered: July 2012
Karma: 0
Senior Member
On Sat, 23 Jun 2018 07:04:25 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
> J. Clarke <jclarke.873638@gmail.com> wrote:
>> On Fri, 22 Jun 2018 13:56:09 -0400, Peter Flass
>> <peter_flass@yahoo.com> wrote:
>>
>>> Gareth's Downstairs Computer
>>> <headstone255.but.not.these.five.words@yahoo.com> wrote:
>>>> On 22/06/2018 11:37, Peter Flass wrote:
>>>> >
>>>> > Isn't Mono a clone of .net? What does the common runtime do especially that
>>>> > other libraries don't? (actual question, not rhetorical)
>>>> All the source languages link together.
>>>>
>>>
>>> Sort of like all the gnu languages, the IBM mainframe languages with LE, or
>>> all the DEC languages with the common runtime? Leave it to microsoft to
>>> claim they invented sunshine.
>>
>> Except that the gnu languages and LE don't produce binaries that will
>> run without further adjustment on an Alpha, an Itanium, a Sparc, and a
>> PC, which, in principle, is true of CLR (I say "in principle" because
>> I don't know if the versions of Windows that made it to the Alpha and
>> Sparc are recent enough to support CLR).
>
> In theory they can, although I don't know if any do in practice. ELF
> binaries can contain objects for multiple architectures. Or are you talking
> about something that's interpreted? That sounds like a spectacular waste if
> resources.

Not interpreted but just in time compilation.

Normally with .net the compilation stage runs ngen and compiles the CIL
(common intermediate language) down to native ahead of time and people
deploy that. So it isn't usually the case that you can take the x86
version of a .NET application and run it on another architecture. You can
however choose to take the CIL assembly and run that anywhere there is a CLR
(and appropriate support libraries which is where Mono is sometimes lacking).
I would also note that there are some cases where the JIT version is faster
than the ahead of time compiled ngen output.


--
Andy Leighton => andyl@azaal.plus.com
"We demand rigidly defined areas of doubt and uncertainty!"
- Douglas Adams
Re: Has Microsoft commited suicide ... [message #369427 is a reply to message #369415] Sat, 23 June 2018 11:03 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: J. Clarke

On Sat, 23 Jun 2018 07:04:24 -0400, Peter Flass
<peter_flass@yahoo.com> wrote:

> J. Clarke <jclarke.873638@gmail.com> wrote:
>> On Thu, 21 Jun 2018 23:39:17 -0400, Richard Thiebaud
>> <thiebauddick2@aol.com> wrote:
>>
>>> On 06/21/2018 10:48 PM, J. Clarke wrote:
>>>> On Thu, 21 Jun 2018 17:47:13 -0400, Peter Flass
>>>> <peter_flass@yahoo.com> wrote:
>>>>
>>>> > Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>>> >> On 2018-06-20, Charles Richmond <numerist@aquaporin4.com> wrote:
>>>> >>
>>>> >>> On 6/20/2018 12:30 AM, Quadibloc wrote:
>>>> >>>
>>>> >>>> On Saturday, April 21, 2018 at 8:35:51 AM UTC-6,
>>>> >>>> Gareth's Downstairs Computer wrote:
>>>> >>>>
>>>> >>>>> ... by its monopolistic attitude towards the PC now
>>>> >>>>> that the World and its family are moving en masse to the
>>>> >>>>> ARM processors?
>>>> >>>>
>>>> >>>>> Is the PC also dying in the light of the RPi3, a 64
>>>> >>>>> bit processor available for the price of a few bananas?
>>>> >>>>
>>>> >>>> Although I thought Microsoft was doing just fine with its x86
>>>> >>>> orientation - it has a foot in the ARM camp too, but there it
>>>> >>>> doesn't offer the ability to run all those old applications...
>>>> >>>>
>>>> >>>> apparently they agree with you in part at Microsoft.
>>>> >>>>
>>>> >>>> http://www.theregister.co.uk/2018/06/18/microsoft_e2_edge_wi ndows_10/
>>>> >>>
>>>> >>> So Microsoft *can* move to other processors! I'd like to see the DEC
>>>> >>> Alpha chip updated to the current micron state of the technology...
>>>> >>> IMHO we need realistic alternatives to the x86 architecture.
>>>> >>
>>>> >> Once we have a realistic alternative to Microsoft, the problem
>>>> >> solves itself.
>>>> >>
>>>> >
>>>> > We have had realistic alternatives since the 80's. What re need is a
>>>> > realistic alternative to the sheeple who won't see it.
>>>>
>>>> First you need to make a case that it's actually a realistic
>>>> alternative. If it makes us replace our current staff with one ten
>>>> times the size in order to do manually all the stuff that we now do
>>>> using features unique to Windows that are not replicated on other
>>>> platforms, then it is not a win.
>>>>
>>> What features are unique to Windows?
>>
>> The whole Component Object Model for one thing. There may be
>> equivalents on other platforms but if we can't take our existing code
>> and plunk it onto the new system and have it work the same way then
>> it's a net cost for us.
>>
>
> As I said, if it's working there's no money to be made by switching to
> something else, even something better.

Make a convincing case for the "betterness". One that the people in
the trenches will buy, not one that some manager will buy. Our
systems keep getting more and more and more complex because various
"consultants" keep convincing management that they have something
"better" than our "klunky old COBOL and APL", and so we have a half a
dozen other systems in place supporting various products. A hundred
years from now our systems are going to be a rolling museum of a human
lifetime of computer industry fads.
Re: Has Microsoft commited suicide ... [message #369431 is a reply to message #369421] Sat, 23 June 2018 11:47 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
Andy Leighton <andyl@azaal.plus.com> wrote:
> On Sat, 23 Jun 2018 07:04:25 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
>> J. Clarke <jclarke.873638@gmail.com> wrote:
>>> On Fri, 22 Jun 2018 13:56:09 -0400, Peter Flass
>>> <peter_flass@yahoo.com> wrote:
>>>
>>>> Gareth's Downstairs Computer
>>>> <headstone255.but.not.these.five.words@yahoo.com> wrote:
>>>> > On 22/06/2018 11:37, Peter Flass wrote:
>>>> >>
>>>> >> Isn't Mono a clone of .net? What does the common runtime do especially that
>>>> >> other libraries don't? (actual question, not rhetorical)
>>>> > All the source languages link together.
>>>> >
>>>>
>>>> Sort of like all the gnu languages, the IBM mainframe languages with LE, or
>>>> all the DEC languages with the common runtime? Leave it to microsoft to
>>>> claim they invented sunshine.
>>>
>>> Except that the gnu languages and LE don't produce binaries that will
>>> run without further adjustment on an Alpha, an Itanium, a Sparc, and a
>>> PC, which, in principle, is true of CLR (I say "in principle" because
>>> I don't know if the versions of Windows that made it to the Alpha and
>>> Sparc are recent enough to support CLR).
>>
>> In theory they can, although I don't know if any do in practice. ELF
>> binaries can contain objects for multiple architectures. Or are you talking
>> about something that's interpreted? That sounds like a spectacular waste if
>> resources.
>
> Not interpreted but just in time compilation.
>
> Normally with .net the compilation stage runs ngen and compiles the CIL
> (common intermediate language) down to native ahead of time and people
> deploy that. So it isn't usually the case that you can take the x86
> version of a .NET application and run it on another architecture. You can
> however choose to take the CIL assembly and run that anywhere there is a CLR
> (and appropriate support libraries which is where Mono is sometimes lacking).
> I would also note that there are some cases where the JIT version is faster
> than the ahead of time compiled ngen output.
>
>

As someone said, it sounds like Java, where the bytecode can be generated
from any language if the compiler is set up to handle it.

--
Pete
Re: Has Microsoft commited suicide ... [message #369432 is a reply to message #369427] Sat, 23 June 2018 11:47 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
J. Clarke <jclarke.873638@gmail.com> wrote:
> On Sat, 23 Jun 2018 07:04:24 -0400, Peter Flass
> <peter_flass@yahoo.com> wrote:
>
>> J. Clarke <jclarke.873638@gmail.com> wrote:
>>> On Thu, 21 Jun 2018 23:39:17 -0400, Richard Thiebaud
>>> <thiebauddick2@aol.com> wrote:
>>>
>>>> On 06/21/2018 10:48 PM, J. Clarke wrote:
>>>> > On Thu, 21 Jun 2018 17:47:13 -0400, Peter Flass
>>>> > <peter_flass@yahoo.com> wrote:
>>>> >
>>>> >> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>>> >>> On 2018-06-20, Charles Richmond <numerist@aquaporin4.com> wrote:
>>>> >>>
>>>> >>>> On 6/20/2018 12:30 AM, Quadibloc wrote:
>>>> >>>>
>>>> >>>>> On Saturday, April 21, 2018 at 8:35:51 AM UTC-6,
>>>> >>>>> Gareth's Downstairs Computer wrote:
>>>> >>>>>
>>>> >>>>>> ... by its monopolistic attitude towards the PC now
>>>> >>>>>> that the World and its family are moving en masse to the
>>>> >>>>>> ARM processors?
>>>> >>>>>
>>>> >>>>>> Is the PC also dying in the light of the RPi3, a 64
>>>> >>>>>> bit processor available for the price of a few bananas?
>>>> >>>>>
>>>> >>>>> Although I thought Microsoft was doing just fine with its x86
>>>> >>>>> orientation - it has a foot in the ARM camp too, but there it
>>>> >>>>> doesn't offer the ability to run all those old applications...
>>>> >>>>>
>>>> >>>>> apparently they agree with you in part at Microsoft.
>>>> >>>>>
>>>> >>>>> http://www.theregister.co.uk/2018/06/18/microsoft_e2_edge_wi ndows_10/
>>>> >>>>
>>>> >>>> So Microsoft *can* move to other processors! I'd like to see the DEC
>>>> >>>> Alpha chip updated to the current micron state of the technology...
>>>> >>>> IMHO we need realistic alternatives to the x86 architecture.
>>>> >>>
>>>> >>> Once we have a realistic alternative to Microsoft, the problem
>>>> >>> solves itself.
>>>> >>>
>>>> >>
>>>> >> We have had realistic alternatives since the 80's. What re need is a
>>>> >> realistic alternative to the sheeple who won't see it.
>>>> >
>>>> > First you need to make a case that it's actually a realistic
>>>> > alternative. If it makes us replace our current staff with one ten
>>>> > times the size in order to do manually all the stuff that we now do
>>>> > using features unique to Windows that are not replicated on other
>>>> > platforms, then it is not a win.
>>>> >
>>>> What features are unique to Windows?
>>>
>>> The whole Component Object Model for one thing. There may be
>>> equivalents on other platforms but if we can't take our existing code
>>> and plunk it onto the new system and have it work the same way then
>>> it's a net cost for us.
>>>
>>
>> As I said, if it's working there's no money to be made by switching to
>> something else, even something better.
>
> Make a convincing case for the "betterness". One that the people in
> the trenches will buy, not one that some manager will buy. Our
> systems keep getting more and more and more complex because various
> "consultants" keep convincing management that they have something
> "better" than our "klunky old COBOL and APL", and so we have a half a
> dozen other systems in place supporting various products. A hundred
> years from now our systems are going to be a rolling museum of a human
> lifetime of computer industry fads.
>

It's got to be _a lot_ better to justify the cost of conversion, or else
some hardware/software upgrade has to break one of the components to force
a change.

--
Pete
Re: Has Microsoft commited suicide ... [message #369437 is a reply to message #369431] Sat, 23 June 2018 13:41 Go to previous messageGo to next message
Andy Leighton is currently offline  Andy Leighton
Messages: 203
Registered: July 2012
Karma: 0
Senior Member
On Sat, 23 Jun 2018 11:47:34 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
> Andy Leighton <andyl@azaal.plus.com> wrote:
>> On Sat, 23 Jun 2018 07:04:25 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
>>> J. Clarke <jclarke.873638@gmail.com> wrote:
>>>> On Fri, 22 Jun 2018 13:56:09 -0400, Peter Flass
>>>> <peter_flass@yahoo.com> wrote:
>>>>
>>>> > Gareth's Downstairs Computer
>>>> > <headstone255.but.not.these.five.words@yahoo.com> wrote:
>>>> >> On 22/06/2018 11:37, Peter Flass wrote:
>>>> >>>
>>>> >>> Isn't Mono a clone of .net? What does the common runtime do especially that
>>>> >>> other libraries don't? (actual question, not rhetorical)
>>>> >> All the source languages link together.
>>>> >>
>>>> >
>>>> > Sort of like all the gnu languages, the IBM mainframe languages with LE, or
>>>> > all the DEC languages with the common runtime? Leave it to microsoft to
>>>> > claim they invented sunshine.
>>>>
>>>> Except that the gnu languages and LE don't produce binaries that will
>>>> run without further adjustment on an Alpha, an Itanium, a Sparc, and a
>>>> PC, which, in principle, is true of CLR (I say "in principle" because
>>>> I don't know if the versions of Windows that made it to the Alpha and
>>>> Sparc are recent enough to support CLR).
>>>
>>> In theory they can, although I don't know if any do in practice. ELF
>>> binaries can contain objects for multiple architectures. Or are you talking
>>> about something that's interpreted? That sounds like a spectacular waste if
>>> resources.
>>
>> Not interpreted but just in time compilation.
>>
>> Normally with .net the compilation stage runs ngen and compiles the CIL
>> (common intermediate language) down to native ahead of time and people
>> deploy that. So it isn't usually the case that you can take the x86
>> version of a .NET application and run it on another architecture. You can
>> however choose to take the CIL assembly and run that anywhere there is a CLR
>> (and appropriate support libraries which is where Mono is sometimes lacking).
>> I would also note that there are some cases where the JIT version is faster
>> than the ahead of time compiled ngen output.
>
> As someone said, it sounds like Java, where the bytecode can be generated
> from any language if the compiler is set up to handle it.

Yep pretty much. Both the CLR and JVM are stack-based virtual machines
with a pretty decent JIT (although I think the Java JIT is a bit better).
Java doesn't have AOT (ahead of time) compilation, .NET can have. The
JVM is more of a classic VM in approach. The CLR has support for lots
of stuff - like tail recursion, pointers, new value types and can deal
with generics better. Some of that is due to CLR being implemented
later, some more to do with philosophy. CLR doesn't count as something
innovative in my eye.


--
Andy Leighton => andyl@azaal.plus.com
"We demand rigidly defined areas of doubt and uncertainty!"
- Douglas Adams
Re: Has Microsoft commited suicide ... [message #369439 is a reply to message #369437] Sat, 23 June 2018 14:05 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
Andy Leighton <andyl@azaal.plus.com> wrote:
> On Sat, 23 Jun 2018 11:47:34 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
>> Andy Leighton <andyl@azaal.plus.com> wrote:
>>> On Sat, 23 Jun 2018 07:04:25 -0400, Peter Flass <peter_flass@yahoo.com> wrote:
>>>> J. Clarke <jclarke.873638@gmail.com> wrote:
>>>> > On Fri, 22 Jun 2018 13:56:09 -0400, Peter Flass
>>>> > <peter_flass@yahoo.com> wrote:
>>>> >
>>>> >> Gareth's Downstairs Computer
>>>> >> <headstone255.but.not.these.five.words@yahoo.com> wrote:
>>>> >>> On 22/06/2018 11:37, Peter Flass wrote:
>>>> >>>>
>>>> >>>> Isn't Mono a clone of .net? What does the common runtime do especially that
>>>> >>>> other libraries don't? (actual question, not rhetorical)
>>>> >>> All the source languages link together.
>>>> >>>
>>>> >>
>>>> >> Sort of like all the gnu languages, the IBM mainframe languages with LE, or
>>>> >> all the DEC languages with the common runtime? Leave it to microsoft to
>>>> >> claim they invented sunshine.
>>>> >
>>>> > Except that the gnu languages and LE don't produce binaries that will
>>>> > run without further adjustment on an Alpha, an Itanium, a Sparc, and a
>>>> > PC, which, in principle, is true of CLR (I say "in principle" because
>>>> > I don't know if the versions of Windows that made it to the Alpha and
>>>> > Sparc are recent enough to support CLR).
>>>>
>>>> In theory they can, although I don't know if any do in practice. ELF
>>>> binaries can contain objects for multiple architectures. Or are you talking
>>>> about something that's interpreted? That sounds like a spectacular waste if
>>>> resources.
>>>
>>> Not interpreted but just in time compilation.
>>>
>>> Normally with .net the compilation stage runs ngen and compiles the CIL
>>> (common intermediate language) down to native ahead of time and people
>>> deploy that. So it isn't usually the case that you can take the x86
>>> version of a .NET application and run it on another architecture. You can
>>> however choose to take the CIL assembly and run that anywhere there is a CLR
>>> (and appropriate support libraries which is where Mono is sometimes lacking).
>>> I would also note that there are some cases where the JIT version is faster
>>> than the ahead of time compiled ngen output.
>>
>> As someone said, it sounds like Java, where the bytecode can be generated
>> from any language if the compiler is set up to handle it.
>
> Yep pretty much. Both the CLR and JVM are stack-based virtual machines
> with a pretty decent JIT (although I think the Java JIT is a bit better).
> Java doesn't have AOT (ahead of time) compilation, .NET can have. The
> JVM is more of a classic VM in approach. The CLR has support for lots
> of stuff - like tail recursion, pointers, new value types and can deal
> with generics better. Some of that is due to CLR being implemented
> later, some more to do with philosophy. CLR doesn't count as something
> innovative in my eye.
>
>

But, as usual, M$ did something different just to be different (and
incompatible). Why follow an existing standard (real or de-facto) when you
can define your own "standard"?

--
Pete
Re: Has Microsoft commited suicide ... [message #371838 is a reply to message #367715] Tue, 07 August 2018 23:09 Go to previous messageGo to next message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <20180515143611.5d72be71345c20ede2661a46@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
> On Tue, 15 May 2018 06:22:17 -0700
> Peter Flass <peter_flass@yahoo.com> wrote:
>
>> If you need
>> something other than an exact answer, use floating-point.
>
> I used to demonstrate that with a simple C program that added 0.1
> ten times and failed to get 1 - these days (for some time now) it gets 1
> presumably due to guard bits.
>

Yeah, yeah, old post, but I'm recently catching up on Usenet after an
absence of many months, and I'm curious about this:

Huh. What platform is that on? I use what I'm guessing is a similar
program in some classes I teach to make the point that floating-point
arithmetic doesn't work the way a naive person might think:

#include <stdio.h>
int main(void) {
for (float f = 0.0; f != 1.0; f += 0.1) {
printf("%g\n", f);
}
return 0;
}

Compiled with GCC on a Linux x86 system, this program runs "forever"
(until interrupted). Interesting that you get a different result?

--
B.L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Re: Has Microsoft commited suicide ... [message #371844 is a reply to message #371838] Wed, 08 August 2018 01:54 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 8 Aug 2018 03:09:26 GMT
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:

> In article <20180515143611.5d72be71345c20ede2661a46@eircom.net>,
> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>> On Tue, 15 May 2018 06:22:17 -0700
>> Peter Flass <peter_flass@yahoo.com> wrote:
>>
>>> If you need
>>> something other than an exact answer, use floating-point.
>>
>> I used to demonstrate that with a simple C program that added
>> 0.1 ten times and failed to get 1 - these days (for some time now) it
>> gets 1 presumably due to guard bits.
>>
>
> Yeah, yeah, old post, but I'm recently catching up on Usenet after an
> absence of many months, and I'm curious about this:
>
> Huh. What platform is that on? I use what I'm guessing is a similar

FreeBSD.

> program in some classes I teach to make the point that floating-point
> arithmetic doesn't work the way a naive person might think:
>
> #include <stdio.h>
> int main(void) {
> for (float f = 0.0; f != 1.0; f += 0.1) {
> printf("%g\n", f);
> }
> return 0;
> }
>
> Compiled with GCC on a Linux x86 system, this program runs "forever"
> (until interrupted). Interesting that you get a different result?

Yep that runs forever for me too - but it displays honest looking
numbers. Years ago my program visibly deviated from expectations as well as
failing to stop. Now this one produces stuff like this:

16025.1
16025.2
16025.3
16025.4
16025.5
16025.6
16025.7
16025.8
16025.9
16026

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Has Microsoft commited suicide ... [message #371857 is a reply to message #371844] Wed, 08 August 2018 06:34 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
> On 8 Aug 2018 03:09:26 GMT
> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>
>> In article <20180515143611.5d72be71345c20ede2661a46@eircom.net>,
>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>> On Tue, 15 May 2018 06:22:17 -0700
>>> Peter Flass <peter_flass@yahoo.com> wrote:
>>>
>>>> If you need
>>>> something other than an exact answer, use floating-point.
>>>
>>> I used to demonstrate that with a simple C program that added
>>> 0.1 ten times and failed to get 1 - these days (for some time now) it
>>> gets 1 presumably due to guard bits.
>>>
>>
>> Yeah, yeah, old post, but I'm recently catching up on Usenet after an
>> absence of many months, and I'm curious about this:
>>
>> Huh. What platform is that on? I use what I'm guessing is a similar
>
> FreeBSD.
>
>> program in some classes I teach to make the point that floating-point
>> arithmetic doesn't work the way a naive person might think:
>>
>> #include <stdio.h>
>> int main(void) {
>> for (float f = 0.0; f != 1.0; f += 0.1) {
>> printf("%g\n", f);
>> }
>> return 0;
>> }
>>
>> Compiled with GCC on a Linux x86 system, this program runs "forever"
>> (until interrupted). Interesting that you get a different result?
>
> Yep that runs forever for me too - but it displays honest looking
> numbers. Years ago my program visibly deviated from expectations as well as
> failing to stop. Now this one produces stuff like this:
>
> 16025.1
> 16025.2
> 16025.3
> 16025.4
> 16025.5
> 16025.6
> 16025.7
> 16025.8
> 16025.9
> 16026
>

One thing I learned about float is never to test for strict equality. The
loop should stop if f is between 0.9e0 and 1.1e0, however the C syntax
goes. The other thing I learned about float is to try not to use float.

Of course the problem here is that the format is binary, while a naive
programmer expects decimal. Decimal floating-point would handle this OK.

--
Pete
Re: Has Microsoft commited suicide ... [message #371858 is a reply to message #371857] Wed, 08 August 2018 07:59 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On Wed, 8 Aug 2018 06:34:16 -0400
Peter Flass <peter_flass@yahoo.com> wrote:

> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>> On 8 Aug 2018 03:09:26 GMT
>> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>>
>>> program in some classes I teach to make the point that floating-point
>>> arithmetic doesn't work the way a naive person might think:
>>>
>>> #include <stdio.h>
>>> int main(void) {
>>> for (float f = 0.0; f != 1.0; f += 0.1) {
>>> printf("%g\n", f);
>>> }
>>> return 0;
>>> }
>>>

> One thing I learned about float is never to test for strict equality. The
> loop should stop if f is between 0.9e0 and 1.1e0, however the C syntax
> goes. The other thing I learned about float is to try not to use float.

Of course that bit of code is explicitly to show why.

> Of course the problem here is that the format is binary, while a naive
> programmer expects decimal. Decimal floating-point would handle this OK.

True but decimal floating point would have similar problems with
adding 1/3 every time round the loop.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Has Microsoft commited suicide ... [message #371901 is a reply to message #371844] Wed, 08 August 2018 22:28 Go to previous messageGo to next message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <20180808065423.c56a3b810f9f8a5c471d0614@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
> On 8 Aug 2018 03:09:26 GMT
> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>
>> In article <20180515143611.5d72be71345c20ede2661a46@eircom.net>,
>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>> On Tue, 15 May 2018 06:22:17 -0700
>>> Peter Flass <peter_flass@yahoo.com> wrote:
>>>
>>>> If you need
>>>> something other than an exact answer, use floating-point.
>>>
>>> I used to demonstrate that with a simple C program that added
>>> 0.1 ten times and failed to get 1 - these days (for some time now) it
>>> gets 1 presumably due to guard bits.
>>>
>>
>> Yeah, yeah, old post, but I'm recently catching up on Usenet after an
>> absence of many months, and I'm curious about this:
>>
>> Huh. What platform is that on? I use what I'm guessing is a similar
>
> FreeBSD.
>
>> program in some classes I teach to make the point that floating-point
>> arithmetic doesn't work the way a naive person might think:
>>
>> #include <stdio.h>
>> int main(void) {
>> for (float f = 0.0; f != 1.0; f += 0.1) {
>> printf("%g\n", f);
>> }
>> return 0;
>> }
>>
>> Compiled with GCC on a Linux x86 system, this program runs "forever"
>> (until interrupted). Interesting that you get a different result?
>
> Yep that runs forever for me too

So the program you have that stops -- can you post its code?


> - but it displays honest looking
> numbers. Years ago my program visibly deviated from expectations as well as
> failing to stop. Now this one produces stuff like this:
>
> 16025.1
> 16025.2
> 16025.3
> 16025.4
> 16025.5
> 16025.6
> 16025.7
> 16025.8
> 16025.9
> 16026
>

I admit that I rigged the game a bit using %g for the output format.
Replace that with %.10f and it's clearer why the loop doesn't stop.

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Re: Has Microsoft commited suicide ... [message #371902 is a reply to message #371858] Wed, 08 August 2018 22:29 Go to previous messageGo to next message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <20180808125908.038cdf747311ecdc920788e0@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
> On Wed, 8 Aug 2018 06:34:16 -0400
> Peter Flass <peter_flass@yahoo.com> wrote:
>
>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>> On 8 Aug 2018 03:09:26 GMT
>>> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>>>
>>>> program in some classes I teach to make the point that floating-point
>>>> arithmetic doesn't work the way a naive person might think:
>>>>
>>>> #include <stdio.h>
>>>> int main(void) {
>>>> for (float f = 0.0; f != 1.0; f += 0.1) {
>>>> printf("%g\n", f);
>>>> }
>>>> return 0;
>>>> }
>>>>
>
>> One thing I learned about float is never to test for strict equality. The
>> loop should stop if f is between 0.9e0 and 1.1e0, however the C syntax
>> goes. The other thing I learned about float is to try not to use float.
>

Yup.

> Of course that bit of code is explicitly to show why.
>

Yup.

>> Of course the problem here is that the format is binary, while a naive
>> programmer expects decimal. Decimal floating-point would handle this OK.
>

Yup.

> True but decimal floating point would have similar problems with
> adding 1/3 every time round the loop.
>

Well, but you'd have a different problem trying to add 1/3 every time
around the loop. :-) (Anyone know of a programming language that
has a native type for rational numbers?)

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Re: Has Microsoft commited suicide ... [message #371910 is a reply to message #371902] Thu, 09 August 2018 02:23 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 9 Aug 2018 02:29:05 GMT
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:

> Well, but you'd have a different problem trying to add 1/3 every time
> around the loop. :-) (Anyone know of a programming language that
> has a native type for rational numbers?)

No but I think most programmers with a maths bent have written a
library or two at one time or another, sometimes using an arbitrary
precision integer implementation as the base which is slow but doesn't
break or error while there's memory available.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Has Microsoft commited suicide ... [message #371914 is a reply to message #371901] Thu, 09 August 2018 02:36 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 9 Aug 2018 02:28:20 GMT
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:

> In article <20180808065423.c56a3b810f9f8a5c471d0614@eircom.net>,
> Ahem A Rivet's Shot <steveo@eircom.net> wrote:

>> Yep that runs forever for me too
>
> So the program you have that stops -- can you post its code?

Not any more, I had a habit of writing it from memory every time I
caught someone using float when they didn't need it. I don't think it
differed from yours apart from using %f which produces the familiar mess.

It is very possible that the stopping was a transient thing on
whatever version I was using at the time that can no longer be produced. I
stopped demonstrating the effect after making very sure it didn't work any
more.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Has Microsoft commited suicide ... [message #371918 is a reply to message #371902] Thu, 09 August 2018 04:52 Go to previous messageGo to next message
Anssi Saari is currently offline  Anssi Saari
Messages: 327
Registered: January 2012
Karma: 0
Senior Member
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> writes:

> Well, but you'd have a different problem trying to add 1/3 every time
> around the loop. :-) (Anyone know of a programming language that
> has a native type for rational numbers?)

Python. Here's a simple example, a loop that counts from 0 to 2 with 1/3
increments.

import fractions as f

i = f.Fraction('1/3')
j = 0

while j <= 2:
print("Hello Fraction %s" % j)
j += i

This prints out:

Hello Fraction 0
Hello Fraction 1/3
Hello Fraction 2/3
Hello Fraction 1
Hello Fraction 4/3
Hello Fraction 5/3
Hello Fraction 2

See https://docs.python.org/3/library/fractions.html for the docs.
Re: Has Microsoft commited suicide ... [message #371928 is a reply to message #371902] Thu, 09 August 2018 12:09 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
> In article <20180808125908.038cdf747311ecdc920788e0@eircom.net>,
> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>> On Wed, 8 Aug 2018 06:34:16 -0400
>> Peter Flass <peter_flass@yahoo.com> wrote:
>>
>>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>>> On 8 Aug 2018 03:09:26 GMT
>>>> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>>>>
>>>> > program in some classes I teach to make the point that floating-point
>>>> > arithmetic doesn't work the way a naive person might think:
>>>> >
>>>> > #include <stdio.h>
>>>> > int main(void) {
>>>> > for (float f = 0.0; f != 1.0; f += 0.1) {
>>>> > printf("%g\n", f);
>>>> > }
>>>> > return 0;
>>>> > }
>>>> >
>>
>>> One thing I learned about float is never to test for strict equality. The
>>> loop should stop if f is between 0.9e0 and 1.1e0, however the C syntax
>>> goes. The other thing I learned about float is to try not to use float.
>>
>
> Yup.
>
>> Of course that bit of code is explicitly to show why.
>>
>
> Yup.
>
>>> Of course the problem here is that the format is binary, while a naive
>>> programmer expects decimal. Decimal floating-point would handle this OK.
>>
>
> Yup.
>
>> True but decimal floating point would have similar problems with
>> adding 1/3 every time round the loop.
>>
>
> Well, but you'd have a different problem trying to add 1/3 every time
> around the loop. :-) (Anyone know of a programming language that
> has a native type for rational numbers?)
>

Interpress used a lot of things expressed as rational numbers. You could
always use fixed-point with one decimal place (or more).

--
Pete
Re: Has Microsoft commited suicide ... [message #371998 is a reply to message #371914] Fri, 10 August 2018 22:00 Go to previous messageGo to next message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <20180809073636.c496d1b20f7e21d54830d3d4@eircom.net>,
Ahem A Rivet's Shot <steveo@eircom.net> wrote:
> On 9 Aug 2018 02:28:20 GMT
> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:
>
>> In article <20180808065423.c56a3b810f9f8a5c471d0614@eircom.net>,
>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>
>>> Yep that runs forever for me too
>>
>> So the program you have that stops -- can you post its code?
>
> Not any more, I had a habit of writing it from memory every time I
> caught someone using float when they didn't need it. I don't think it
> differed from yours apart from using %f which produces the familiar mess.
>
> It is very possible that the stopping was a transient thing on
> whatever version I was using at the time that can no longer be produced. I
> stopped demonstrating the effect after making very sure it didn't work any
> more.
>

Rats -- I was really kind of curious. Oh well! Another unsolved
mystery I guess.

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Re: Has Microsoft commited suicide ... [message #371999 is a reply to message #371918] Fri, 10 August 2018 22:00 Go to previous messageGo to next message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <vg3y3dfyl9d.fsf@coffee.modeemi.fi>, Anssi Saari <as@sci.fi> wrote:
> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> writes:
>
>> Well, but you'd have a different problem trying to add 1/3 every time
>> around the loop. :-) (Anyone know of a programming language that
>> has a native type for rational numbers?)
>
> Python. Here's a simple example, a loop that counts from 0 to 2 with 1/3
> increments.
>
> import fractions as f
>
> i = f.Fraction('1/3')
> j = 0
>
> while j <= 2:
> print("Hello Fraction %s" % j)
> j += i
>
> This prints out:
>
> Hello Fraction 0
> Hello Fraction 1/3
> Hello Fraction 2/3
> Hello Fraction 1
> Hello Fraction 4/3
> Hello Fraction 5/3
> Hello Fraction 2
>
> See https://docs.python.org/3/library/fractions.html for the docs.
>

Python. I probably should have guessed! Thanks. But, um, your
loop condition is <= rather than ==, which -- well, it appears from
experiment that changing that to == doesn't change the result, but
it would be more convincing / closer to the original with ==, no?

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Re: Has Microsoft commited suicide ... [message #372000 is a reply to message #371928] Fri, 10 August 2018 22:01 Go to previous message
blmblm@myrealbox.com is currently offline  blmblm@myrealbox.com
Messages: 219
Registered: July 2012
Karma: 0
Senior Member
In article <934484241.555523686.161708.peter_flass-yahoo.com@news.eternal-september.org>,
Peter Flass <peter_flass@yahoo.com> wrote:
> blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> wrote:

[ snip ]

>> Well, but you'd have a different problem trying to add 1/3 every time
>> around the loop. :-) (Anyone know of a programming language that
>> has a native type for rational numbers?)
>>
>
> Interpress used a lot of things expressed as rational numbers. You could
> always use fixed-point with one decimal place (or more).
>

"Interpress"? [ pause for Web search ] Oh. Interesting.

But fixed-point decimal doesn't solve the general problem (of adding 1/n
that can't be exactly represented). Just sayin'?

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
Pages (18): [ «    3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: KDF9 emulation
Next Topic: System recovered from Princeton/Melinda backup/archive tapes
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Mar 28 18:07:37 EDT 2024

Total time taken to generate the page: 0.06662 seconds