LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   A program to compute number of days between two dates? (https://www.linuxquestions.org/questions/slackware-14/a-program-to-compute-number-of-days-between-two-dates-4175454050/)

mrclisdue 03-16-2013 09:23 PM

Quote:

Originally Posted by psionl0 (Post 4912082)
Code:

|                                    *
+
|
|
|
|
+                  ----------------------
|                    *      *
|                      *
|                                  *
|
+                              *
|                      *  *  *  *
|          *                    *
|              *    *
|                          **  *
+                *---------------------
|      * *                *
|                  *
|  * *          *
|*  *      *  **
+ *      *
|
|    *
|
|
+------------------*--------------------


I'm sure I can see Bob Dobbs, and perhaps a pipe.

Tho' it could also be a cat, moog synthesizer, or a baby's arm holding an apple.

cheers,

w1k0 03-16-2013 09:28 PM

Quote:

Originally Posted by qweasd (Post 4913096)
I don't think "release" can be put on a real line without taking serious liberties with interpretation, which is why I called it voodoo. My X axis is not a mystery: it's just 13.0 for ver. 13.0, 13.1 for ver. 13.1, etc.

I don’t try to argue with you. I like very much the name “voodoo” that you chose for that type of the the data. When after 1 goes 1.1, and 1.1.2, and then 2.0, but after 4 goes 7, and after 13 goes 13.1, and 13.37, and then 14 it’s complete voodoo. The English language isn’t my native one. Moreover I never learned English language. So I thought “voodoo” is the standard name used in the English language in such a case. Now I know you invented it and I admire that name much more than before. I simply like very much the people which are able to invent something.

Quote:

Originally Posted by qweasd (Post 4913096)
But assigning it this way is just as arbitrary as mapping each release to an integer, or whatever is that you did...

It isn’t whatever. See the descriptions of the axes. X is for the days after Slackware 1.0 and Y is for the days after the previous Slackware release. So both axes display the days. I tried to use the same scale for both axes but the resulting graph was very flat so I gave up and I used the standard scale.

Quote:

Originally Posted by qweasd (Post 4913096)
After all, the version assignment is a random experiment from hell; it is dependent on everything, including this thread. What is your first column anyway?

The first column (X axis): the days since 1993-07-17 (Slackware 1.0 release)*.

The latter column (Y axis): the days since the previous release.

* There’s 121 days till Slackware’s 20th birthday. Let’s celebrate that day when it’ll come!

Quote:

Originally Posted by qweasd (Post 4913096)
And using trend here is also questionable: the correlation coefficient is pretty low, the spread is huge, and so it is far from certain that the mean went up. But for purely gambling purposes I would bet on the trend, probably because I always found pictures very convincing :)

I didn’t plot any trend: qweasd plotted the simple linear regression and allend plotted the regression slope and some standard errors. I don’t consider these plots reasonable or useful.

w1k0 03-16-2013 10:53 PM

Here’s the official graph of the slacky randomized standard deviation coefficient divided by some imaginary number that I imagined almost one hour ago:

Code:

+            **************           
|          **              ****       
|        **                    *       
|      **                      *     
|      *                        *     
+      * ****              ****** ***   
|    *      *************      *  * 
|    *  *                        *  * 
|    *  *                        * * 
|    *  *                        * * 
+    *  *                        * * 
|    *  * ****            ***** *  * 
|    *  *      **        **      *  * 
|    * *  ********    **        * * 
|    ** *    **  **  **  **      * * 
+    ** *    ****        *        *  * 
|    *                    *      *  * 
|    *            *              *  * 
|        *      **      *          *   
|        ****  ***    *  *  **     
+        ***  *******      ****       
|        **      ***    ****    *     
|        * *  *        *    *       
|          * *  ***      *    *       
|              *****          *         
+            **              *         
|    *  *****              *           
|  ***  ****    *        *             
|  ******        *** ***             
|    ***                        by w1k0
+----+----+----+----+----+----+----+----+

The function used to draw that graph is too complicated to be stored on all LinuxQuestions.org servers – I’m sorry!

For mrclisdue, qweasd, and the other guys (male sex) and gals (female sex) as well as for all the asexual creatures (neuter sex) in the whole universe and beyond with the special greetings for the exceptional human being living here and now and named volkerdi (male sex).

w1k0 03-16-2013 11:29 PM

Quote:

Originally Posted by mrclisdue (Post 4913127)
I'm sure I can see Bob Dobbs, and perhaps a pipe.

It seems that the next points on that graph will be the smoke from the pipe: that gives the valuable clue for all the forecasters (it’s enough to monitor the movement of the air molecules and the changes of the temperature to print the next point in advance).

psionl0 03-16-2013 11:38 PM

Quote:

Originally Posted by mrclisdue (Post 4913127)
I'm sure I can see Bob Dobbs, and perhaps a pipe.

I guess stargazing is as good as crystal ball gazing. ;)

w1k0 03-17-2013 03:04 AM

Quote:

Originally Posted by mrclisdue (Post 4913127)
I'm sure I can see Bob Dobbs, and perhaps a pipe.

I have to argue with you a bit because I – on the contrary – am sure that I see the pipe, and perhaps Bob Dobbs.

No offense...

w1k0 03-17-2013 03:39 AM

Some of you may be curious which function I used to draw the nice graph from the post #63. As I mentioned above that function is too complicated to be stored on all LQ machines but I can disclose the shortened version of that function:

Code:

y = f(me)
Unfortunately the current version of gnuplot doesn’t understand that simplified function so you can’t re-draw my graph alone. (Feel free to send the bug report to the gnuplot developers.)

w1k0 03-17-2013 06:38 PM

The trend
 
The data file and the graph from my post #59 show that during each consecutive 1000 days there appeared less and less Slackware Linux releases:

Code:

    0–999: 8
1000–1999: 6
2000–2999: 5
3000–3999: 4
4000–4999: 3
5000–5999: 4
6000–6999: 2
7000–7999: ?

That means that Slackware is very mature Linux distribution now (it ended 18 years three months after 13.37 release).

Didier Spaier 03-18-2013 12:37 AM

There are three kinds of lies: small lies, big lies, and statistics.

eloi 03-18-2013 04:35 AM

Quote:

Originally Posted by Didier Spaier (Post 4913632)
There are three kinds of lies: small lies, big lies, and statistics.

I remember a young friend, he was very keen on science. He felt insulted when I discredited statistics. Be careful, don't criticize idols in front of religious people. :)

w1k0 03-18-2013 10:13 AM

Definition of a statistician: Someone who, if you put his feet in the oven and his head in the freezer, would say, “On the average, I feel just fine”.

schneidz 03-18-2013 12:42 PM

Quote:

Originally Posted by colucix (Post 4911451)
You don't really need a program. In bash you can try something like:
Code:

echo $(( ($(date -ud 20130331 +%s) - $(date -ud 20130314 +%s))/86400 ))
The code might be transformed to a shell function that accepts the two dates as arguments. Just my :twocents:.

^ +1, my stab at it:
Code:

expr `date -d 20130316 +%Y%j` - `date -d 20130319 +%Y%j`
-3


Kallaste 04-26-2013 10:13 PM

Quote:

Originally Posted by w1k0 (Post 4911763)
That’s rather natural idea in such a case. To “predict” the date one can use different methods. The more methods she’ll try the more results she’ll gain. As a result one of these “predictions” will be really close to the actual date of the next release. That’s the whole truth about the predictions and the numerology.

Ambiguity in predictions and a continuous supply of new data in which to look for coincidental similarities doesn't hurt, either. I see it as the Nostradamus effect. Given enough time and enough room for interpretation, any prediction will "come true."


All times are GMT -5. The time now is 06:16 AM.