Worst random numbers ever!
Blitz3D Forums/Blitz3D Programming/Worst random numbers ever!
| ||
I've seen some baffling bugs, but this one is something special. |
| ||
Whoa... That Mark is a sneaky one! Now did he tell you about that, or did you find it yourself? And just how the heck did he do that? I hope it isn't significantly impacting performance. :-) |
| ||
Weird... pleminary tests seem to indicate that it's closely related to this bug. |
| ||
BUG? It shows BlitzMax!!!, hahhaah, Awesome! |
| ||
I found something similar.. |
| ||
Funny thing is with r,g and b = rand(0,0) displays a clear pic! |
| ||
LOL! This must've been planned in the last upgrade... Best April Fool's Day thingy so far though :) |
| ||
Did get me thinking however about seeds and how they pull numbers from the pseudo-list depending on criteria defined by 'Rand' I knocked up this quick prog which dowes give some interesting values (look at the values compared the parameters defined)Const seed = 10 SeedRnd seed x=Rand(1,20) y=Rand(1,20) z=Rand(1,50) Print x+" "+y+" "+z SeedRnd seed x=Rand(-20,1) y=Rand(-20,1) z=Rand(-50,1) Print x+" "+y+" "+z SeedRnd seed Print Rand(100) SeedRnd seed Print Rand(1,100) SeedRnd seed Print Rand(0,100) SeedRnd seed Print Rand(0,101) SeedRnd seed Print Rand(-1,100) WaitKey() |
| ||
Good one guys! |
| ||
Oh you guys suck. :-) Good job, you fooled me. I can't think of anyone who has before. :-) |
| ||
Hey those things are cool - I want a "puki" one. Someone do me one |
| ||
OK for Puki: |
| ||
MINE WORKS!!!! MINE WORKS!!!! HA, HA - I RULE THE WORLD!!! S A U S A G E S!!! A Larging we will go, a Larging we will go, snoop doop, puppy poop, a Larging we will go!!! puppage |
| ||
Hehe, classic! |
| ||
heh took me a little bit to figure it out :) |
| ||
Does larging mean walking around with your chest puffed out and your arms curled inwards with clenched fists, like Popeye? Cause I could see Puki doing that, with a vaccum sealed puppy clenched under his right armpit, and a large sausage clenched between his teeth, one and hanging out, like a floppy cigar an inch and a half in diameter. |
| ||
Mine worked |
| ||
...okay, this is very strange. The only difference I can see between the first program and Puki's program is what seed was used. But if I plug that seed into the first program, it doesn't work. I copied Puki's source from above into Blitz and then it works. What gives?? |
| ||
Question Everything. Heh... |
| ||
What gives?? Could be your CPU can not process the necessary instructions correctly. This particlular feature that has seemingly been built into the Random number generator may rely on some undocumented Intel instructions such as LEG - Load encryption generator ER - Test encryption register DEM - Double encryption multiply AIN - Adjust Indexed Negation and so on. I understand they intended these for high level fractal compression and encryption of visual and other data using a special register subsytem called RUBES, but they never quite got that working properly due to timing issues with certain core configurations. |
| ||
My original post has passed its freshness date but still holds some appeal. There was an explanation, but some kind hearted moderator has removed it. This means newcomers can still experience the awe and mystery. |
| ||
They are mystified at my 'Godness' - how could one so Large be included within Blitz3D. I am the sausage-meister. puppage beyond large |
| ||
I will continue to laugh at this :D |
| ||
Email me the answer! I must know! I don't see any difference between Rob's two code postings, so why do different things appear? ADDITION: I found that replacing r = Rand(50,150) with r = Rand(50,100) in Floyd's code makes the effect even easier to see. BUT I'M NO CLOSER TO UNDERSTANDING WHY THIS IS HAPPENING! AARGH!!! ADDITION 2: I don't know what's wrong with me; this isn't that big a deal, BUT IT'S DRIVING ME INSANE! |
| ||
I've emailed you Joe, you're gonna kick yourself ;) |
| ||
Can you forward to me? I want to kick myself too. |
| ||
Hehe, no problem Pickles - email sent ;) |
| ||
mmm, look for the secret, it is easy, the first post with the explanation was mine, but i am happy a moderator has erased it. look well, thing are not what they appear... |
| ||
This is a gas! Luckily I posted the code in notepad for quick review before attempting to run it. You guys crack me up. |
| ||
My leg is numb from kicking :) |
| ||
Thanks Viper *sobs with a mixture of relief and exasperation* |
| ||
The idea for this came years ago when I saw a warning about virus files with sneaky names. There was a .exe lurking in the name, but you couldn't see it. I knew the same trick could be the basis for a 'code joke'. The combination of April Fool's Day and the impending release of BlitzMax for Windows inspired me to, at long last, implement the joke. |
| ||
The little things we don't notice... |
| ||
Very nice ;) |
| ||
What joke? - mine bloody worked - it is NOT a trick - "puki" is in B3D's rendering engine thing. Don't mock the Large. |
| ||
Maybe there are two hidden lines in the code? Nice joke It almost Had me fooled! |
| ||
>Maybe there are two hidden lines in the code? I'm not saying you are slow, but everyone realized what was going on about 5 months ago:) Andy |
| ||
this is the first time I see this sence I was looking at the blitz newsLetter as Current News!!!! Yes and I am shure everybody got it ;). |
| ||
hey folks, can someone email me too..I wanna kick myself tooo.... :)) |
| ||
*Oh crap i just got it* lol... |
| ||
WOOOOAAAAHHHHH.... ... nice one.... |
| ||
You got me for a good few minutes & cup of tea later. What option do use use with this board's CODE tag then? |
| ||
http://www.blitzbasic.com/faq/faq_entry.php?id=2 |
| ||
doh :) Thanks |