User talk:Dont/Random

It doesn't seem to generate a new number unless you do a hard refresh. Also, wow, not so random within a small time interval (I seemed to keep rolling 4s and 9s when I posted this). I guess that's what you get for basing it off the clock. -- Mafaraxas ( talk ) 12:17, 20 August 2008 (EDT)
 * he did point out that it's based off the current second :P It works perfectly though if I use it once a second. (though it obviously will never generate something truly random like 4 - 2 - 9 - 5 etc) But it probably does the job it's supposed to do and that is to give one random number. Feel free to make one yourself though if you can find a way to make it truly random :P  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 12:47, 20 August 2008 (EDT)
 * edit: i found this on wiki, might be of some help?  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 12:49, 20 August 2008 (EDT)
 * Yeah, random generators get values from millisecond, something you cannot get with wikicode. Those also run a few calculations to generate more random numbers. As for no new numbers, it's the nature of wiki, the server's cache needs to be purged. I created it originally for random welcome messages, since I include the template on different pages it will give different messages every time. ~ ĐONT * SYSOP  12:50, 20 August 2008 (EDT)
 * @Saz: I'm not sure that can handle algorithms. ~ ĐONT * SYSOP   12:58, 20 August 2008 (EDT)
 * I generally suck at maths and I failed it in school so don't ask me :P Anyway, glad you're giving the random things a try anyway and happy to keep you busy mate ;o)  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 13:02, 20 August 2008 (EDT)

@Mafaraxas: Oh I see what are you trying to do. You could do something like this:

~ ĐONT * SYSOP  13:07, 20 August 2008 (EDT)
 * (moar ec) ye, just noticed it's because the timestamp seems to have weird delays sometimes even when you purge the cache, which was where I was getting the 4s and 9s from. We could probably do more to make the code random; maybe use division/multiplication of timestamps or something instead of just taking the last two digits of the timestamp.  Though I'm not sure how much strain that'd put on the server... probably not too much. -- Mafaraxas  ( talk ) 13:14, 20 August 2008 (EDT)
 * I'm guessing servers have srs powers, a small math thing should hardly strain it. Unless you're like... making it a page long.  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 13:15, 20 August 2008 (EDT)
 * Well, it's just that the timestamp is a 14-digit number; multiplying and dividing on that scale can get a little intense... though I'm probably overreacting. -- Mafaraxas ( talk ) 13:17, 20 August 2008 (EDT)
 * But... It's a computer QQ . You could probably drop some of those numbers too, worst case scenario.  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 13:24, 20 August 2008 (EDT)
 * The problem with multiplication or division is that it needs a really complicated formula to work properly. For example when multiplicating minute and second, the last number will always be even if the minute or second is even. ~ ĐONT * SYSOP  13:39, 20 August 2008 (EDT)
 * Just leave it as is tbh. Since it's meant for the welcome thing we talked about, it won't be used more than once a second anyway. Unless you're starting to get freaky.  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 13:41, 20 August 2008 (EDT)
 * But I like solving problems :< ... I guess I'll just make a better RNG on a seperate page.-- Mafaraxas ( talk ) 14:06, 20 August 2008 (EDT)
 * Start fixing then ^^  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 12:58, 21 August 2008 (EDT)
 * but I have other things to doo *whine whine* -- Mafaraxas ( talk ) 13:02, 21 August 2008 (EDT)
 * no u don't o: !  — şąɀɀƴ  ƿooɧ [[Image:PinkNautical.jpg]] 13:02, 21 August 2008 (EDT)