Re: Can't Avoid That Shit Rust - Even On Gentoo

Liste des GroupesRevenir à col misc 
Sujet : Re: Can't Avoid That Shit Rust - Even On Gentoo
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.advocacy comp.os.linux.misc
Date : 30. Sep 2024, 08:56:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vddlik$254hd$12@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Pan/0.160 (Toresk; )
On 30 Sep 2024 07:21:49 GMT, rbowman wrote:

On Mon, 30 Sep 2024 06:03:29 -0000 (UTC), Lawrence D'Oliveiro wrote:
 
Fun fact: I was reworking an old perpetual-calendar program I first
wrote back in 1980, to use Fortran 90, a few months ago. And I found a
bug in my algorithm that never showed up in any years from the 20th
century, but did manifest itself in the 21st century.
 
Y2K rides again...

No, it wasn’t that. I had a full four digits for the year number (even
back then, I had this hazy premonition ...). The bug actually manifested
itself from 2004 onwards.

Here’s the patch that fixed the Fortran-90 version:

    diff --git a/calend.f90 b/calend.f90
    index e172fd5..dcbfdc3 100644
    --- a/calend.f90
    +++ b/calend.f90
    @@ -48,14 +48,12 @@ contains
                 idx = idx + 1
                 res = mod(yr, divs(idx))
                 yr = yr / divs(idx)
    -            if (res == 0) then
    +            if (flip_leap .and. res == 0) then
    +                leap = .not. leap
                     rem = rem - l
                 else
                     flip_leap = .false.
                 end if
    -            if (flip_leap) then
    -                leap = .not. leap
    -            end if
                 if (yr == 0) &
                     exit
                 rem = rem + yr * l

Date Sujet#  Auteur
29 Sep 24 * Re: Can't Avoid That Shit Rust - Even On Gentoo38186282@ud0s4.net
29 Sep 24 `* Re: Can't Avoid That Shit Rust - Even On Gentoo37Lawrence D'Oliveiro
30 Sep 24  `* Re: Can't Avoid That Shit Rust - Even On Gentoo36186282@ud0s4.net
30 Sep 24   +* Re: Can't Avoid That Shit Rust - Even On Gentoo32Lawrence D'Oliveiro
30 Sep 24   i`* Re: Can't Avoid That Shit Rust - Even On Gentoo31rbowman
30 Sep 24   i +* Re: Can't Avoid That Shit Rust - Even On Gentoo29186282@ud0s4.net
30 Sep 24   i i+- Re: Can't Avoid That Shit Rust - Even On Gentoo1rbowman
30 Sep 24   i i`* Re: Can't Avoid That Shit Rust - Even On Gentoo27candycanearter07
30 Sep 24   i i +* Re: Can't Avoid That Shit Rust - Even On Gentoo12Lawrence D'Oliveiro
1 Oct 24   i i i`* Re: Can't Avoid That Shit Rust - Even On Gentoo11John Dallman
1 Oct 24   i i i `* Re: Can't Avoid That Shit Rust - Even On Gentoo10Lawrence D'Oliveiro
1 Oct 24   i i i  `* Re: Can't Avoid That Shit Rust - Even On Gentoo9John Dallman
1 Oct 24   i i i   +* Re: Can't Avoid That Shit Rust - Even On Gentoo4Lawrence D'Oliveiro
1 Oct 24   i i i   i+- Re: Can't Avoid That Shit Rust - Even On Gentoo1John Dallman
1 Oct 24   i i i   i`* 64-bit time on 32-bit Windows NT (was: Re: Can't Avoid That Shit Rust - Even On Gentoo)2Nuno Silva
1 Oct 24   i i i   i `- Re: 64-bit time on 32-bit Windows NT1Richard Kettlewell
1 Oct 24   i i i   `* Re: Can't Avoid That Shit Rust - Even On Gentoo4186282@ud0s4.net
2 Oct 24   i i i    +* Re: Can't Avoid That Shit Rust - Even On Gentoo2186282@ud0s4.net
2 Oct 24   i i i    i`- Re: Can't Avoid That Shit Rust - Even On Gentoo1Richard Kettlewell
2 Oct 24   i i i    `- Re: Can't Avoid That Shit Rust - Even On Gentoo1The Natural Philosopher
1 Oct 24   i i +- Re: Can't Avoid That Shit Rust - Even On Gentoo1rbowman
1 Oct 24   i i +- Re: Can't Avoid That Shit Rust - Even On Gentoo1186282@ud0s4.net
1 Oct 24   i i +- Re: Can't Avoid That Shit Rust - Even On Gentoo1Joel
2 Oct 24   i i `* Re: Can't Avoid That Shit Rust - Even On Gentoo11186282@ud0s4.net
2 Oct 24   i i  +- Re: Can't Avoid That Shit Rust - Even On Gentoo1Farley Flud
2 Oct 24   i i  `* Re: Can't Avoid That Shit Rust - Even On Gentoo9Lawrence D'Oliveiro
3 Oct 24   i i   `* Re: Can't Avoid That Shit Rust - Even On Gentoo8186282@ud0s4.net
3 Oct 24   i i    `* Re: Can't Avoid That Shit Rust - Even On Gentoo7Lawrence D'Oliveiro
4 Oct 24   i i     `* Re: Can't Avoid That Shit Rust - Even On Gentoo6186282@ud0s4.net
4 Oct 24   i i      +* Re: Can't Avoid That Shit Rust - Even On Gentoo4candycanearter07
4 Oct 24   i i      i`* Re: Can't Avoid That Shit Rust - Even On Gentoo3Cy DeMillion
5 Oct 24   i i      i `* Re: Can't Avoid That Shit Rust - Even On Gentoo2Joel
8 Oct 24   i i      i  `- Re: Can't Avoid That Shit Rust - Even On Gentoo1%
4 Oct 24   i i      `- Re: Can't Avoid That Shit Rust - Even On Gentoo1Lawrence D'Oliveiro
30 Sep 24   i `- Re: Can't Avoid That Shit Rust - Even On Gentoo1Lawrence D'Oliveiro
30 Sep 24   `* Re: Can't Avoid That Shit Rust - Even On Gentoo3186282@ud0s4.net
30 Sep 24    `* Re: Can't Avoid That Shit Rust - Even On Gentoo2Lawrence D'Oliveiro
30 Sep 24     `- Re: Can't Avoid That Shit Rust - Even On Gentoo1186282@ud0s4.net

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal