help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: even elder races get tired of waiting


From: Emanuel Berg
Subject: Re: even elder races get tired of waiting
Date: Mon, 22 Mar 2021 19:29:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

> Maybe you should first define what is meant with
> `days-from-date'. [...]

OK, well, hit me then, what should the definition be?

This is for practical use, how many days till my date with
Sandra Bullock - because maybe some things need to be
arranged? ... No? Okay, bad example

But it is also data for the sake of date because it is
interesting at least to a "datadyrkare" like me
(untranslatable Swedish pun), e.g. I did
"Artificial Intelligence" at Uppsala University 2012-05-30,
that was 8y 9m 20d ago.

Now I used 'time-from' (zsh, not Elisp) BTW [1]

> (require 'cl-lib)
> (defun days-from-date (d1 d2)
>   (let*((sep     "-")
>         (d1-data (cl-map 'list #'string-to-number (split-string d1 sep)))
>         (d2-data (cl-map 'list #'string-to-number (split-string d2 sep)))
>         (y1      (car   d1-data))
>         (m1      (cadr  d1-data))
>         (d1      (caddr d1-data))
>         (y2      (car   d2-data))
>         (m2      (cadr  d2-data))
>         (d2      (caddr d2-data)) )
>     (days-from y1 m1 d1 y2 m2 d2) ))
> ;; (days-from-date "2021-03-19" "2021-04-20") ; 31
>
> Gives me 32 now.

? 31!

> (defun days-from (y1 m1 d1 y2 m2 d2)
>   (let*((s-then (float-time (encode-time 0 0 0 d1 m1 y1)))
>         (s-now  (float-time (encode-time 0 0 0 d2 m2 y2)))
>         (s-diff (- s-now s-then)) )
>     (string-to-number (format-seconds "%d" s-diff) )))
> ;; (days-from 2021 03 19 2021 04 20) ; 31
>
> Now the above gives me 32 in this moment March 22 10:40 EAT,
> how comes? It was giving me 31 before.

31! ??? Glitch in the Matrix?

    <incal> are we a simulation? well, if you in the future
            can do a simulation as good as this/we, let's call
            it s1
    <incal> then you can obviously do s2 ... sn as well
    <incal> where n -> (inf.)
    <incal> that many? yes, because the simulations will soon
            do simulations themselves!
    <incal> so the probability we are The Real McCoy is s -> 0+
    <incal> in practice zero
    <incal> now tell me, what IS wrong with this reasoning?

[1] https://dataswamp.org/~incal/conf/.zsh/time

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]