From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: even elder races get tired of waiting Date: Mon, 22 Mar 2021 19:29:25 +0100 Message-ID: <87pmzrkpoa.fsf@zoho.eu> References: <87v99lr26w.fsf@zoho.eu> <8735woph4e.fsf@zoho.eu> <87h7l4nnqs.fsf@zoho.eu> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11041"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:wGaRr0ilytCf9lkVzFN1HkHGd+I= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 22 19:30:38 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOPK2-0002lu-2m for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 19:30:38 +0100 Original-Received: from localhost ([::1]:39362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOPK1-0003FM-4X for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 14:30:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOPJ0-0003EU-Fh for help-gnu-emacs@gnu.org; Mon, 22 Mar 2021 14:29:34 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:34030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOPIy-0008S3-U8 for help-gnu-emacs@gnu.org; Mon, 22 Mar 2021 14:29:34 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lOPIx-0001W0-6o for help-gnu-emacs@gnu.org; Mon, 22 Mar 2021 19:29:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128502 Archived-At: 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? are we a simulation? well, if you in the future can do a simulation as good as this/we, let's call it s1 then you can obviously do s2 ... sn as well where n -> (inf.) that many? yes, because the simulations will soon do simulations themselves! so the probability we are The Real McCoy is s -> 0+ in practice zero 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