March 04, 2012
YET ANOTHER top rotation tweak
If you only call a random number generator once, then it's little more than a hash of whatever it uses as a seed. And it isn't necessarily a very good hash. So I decided to stop using that completely.
The new approach for picking an image is to use the number of milliseconds since midnight, with a small amount of numerical tweaking. While I was messing around with it, I saw several images I know I hadn't ever seen before. So I think it'll work better, and have a flatter response curve.
As always, you'll need to force a complete reload of the page, or dump your browser cache, if you want the latest version.
Posted by: Steven Den Beste in Site Stuff at
09:50 PM
| Comments (5)
| Add Comment
Post contains 120 words, total size 1 kb.
1
In two dozen quick reloads, about 80% of the images were completely new to me.
-j
Posted by: J Greely at March 04, 2012 10:28 PM (2XtN5)
2
There's one more small change I'm going to make, and then I think this version will suffice.
Posted by: Steven Den Beste at March 05, 2012 09:27 AM (+rSRq)
3
OK, last update for the time being. The latest version is #22, and it says that in the information popup (mouse hover on the upper left corner).
Posted by: Steven Den Beste at March 05, 2012 09:39 AM (+rSRq)
4
There's something wrong. Sorry; I'll go fix it.
Posted by: Steven Den Beste at March 05, 2012 09:40 AM (+rSRq)
5
OK, all fixed. (Sheesh, that was stupid.)
Posted by: Steven Den Beste at March 05, 2012 09:43 AM (+rSRq)
Hide Comments
| Add Comment
March 02, 2012
Another small change to the top-rotation flash file
I recently noticed that I almost never saw any pictures from Sengoku Otome, even though there are 48 of them out of 994. I had the feeling I'd seen pictures from Maken Ki more often, though there are only about half as many.
It's the damned flash random number again. Sengoku Otome is the last in the list, so it would correspond to highest possible random numbers, and I think the distribution disfavors the very highest part of the continuum. So this morning I had an idea, and made another change to the code, which I think will help. As always, if you want the new one you need to clear your browser cache. It shouldn't be a huge difference, but it may be a little different.
(If you're curious, I multiplied the random number by 7 and then took it modulo 1, in hopes of evening out the distribution a bit more.)
Posted by: Steven Den Beste in Site Stuff at
10:01 AM
| Comments (12)
| Add Comment
Post contains 161 words, total size 1 kb.
1
I think it worked. I'm seeing more of Sengoku Otome now.
Posted by: Steven Den Beste at March 02, 2012 02:52 PM (+rSRq)
2
It's starting to sound a bit like epicycles. Is there any way your Flash can retrieve an external source of randomness to mix in?
-j
Posted by: J Greely at March 02, 2012 03:06 PM (2XtN5)
3
Problem is, I don't know what it would be. The only thing like that reasonably available to me is the time of day, and I'm already using that.
Theoretically it's available at the level of milliseconds but it doesn't really have that granularity. I'm currently using it at the level of seconds.
The current formula is this:
a = (rand()*7) % 1;
b = a * num_pictures;
c = num seconds since midnight;
d = (b + c) % num_pictures;
and then I use d to select it.
That 7 in the first line is what I added today, in hopes of smearing out the curve a bit more.
Posted by: Steven Den Beste at March 02, 2012 03:16 PM (+rSRq)
4
Can you retrieve a URL containing a random number generated elsewhere? It doesn't have to be something like random.org, just the output of a script running periodically somewhere. I don't know what access limits there are in Flash, but injecting the output of any other PRNG should help break up the patterns in the built-in.
-j
Posted by: J Greely at March 02, 2012 04:28 PM (2XtN5)
5
An expert probably could. I don't know how. Actionscript is a black art and most of what I've picked up has just been from messing around, and imitating things I found in other flashes that I decompiled.
What I've got now isn't intolerable, so I'm not rabid to find a solution.
Posted by: Steven Den Beste at March 02, 2012 05:28 PM (+rSRq)
6
Part of the problem is that Adobe's documentation ranks down there with the kind of documentation you get with open source software. It's mostly organized as a reference guide.
There are tutorials, but they're hopeless. I tried working through one of them, and it didn't work the way they said it would.
At least back in the days of flash 8, you got a local copy of the documentation. These days it's on Adobe's web server. Supposedly you can down load them, but when I try it takes forever and never completes.
I wonder if there's a "Stupid guy's guide to Actionscript" available for the Kindle?
Posted by: Steven Den Beste at March 02, 2012 05:53 PM (+rSRq)
Posted by: RickC at March 02, 2012 05:56 PM (/5bLf)
8
The problem here isn't the random number generator. The problem is how it gets seeded. That AS is using the time-of-day as a seed, which is typical.
I'm virtually certain that's how the Math.random() function is getting seeded. So it wouldn't be any different.
Coming up with a reasonable seed is a lot more difficult than you might think. There was a case a few years ago where some supposedly-secure protocol got cracked because it turned out that it was using the time-of-day as part of choosing its session key. So nominally the key search space was unfathomably immense, but in practice it was pretty small if you knew about when the communication session began.
There's a guy, turns out to be the nephew of John Colicos, who claims to have developed a way of creating true random numbers using standard PC hardware. But I doubt that Adobe has licensed it.
Posted by: Steven Den Beste at March 02, 2012 07:01 PM (+rSRq)
9
And I suppose this is the point where I have to say, "I'm not looking for suggestions or advice, folks."
Posted by: Steven Den Beste at March 02, 2012 07:02 PM (+rSRq)
Posted by: benzeen at March 02, 2012 08:05 PM (R9i5E)
11
Apart from the obvious reason, I resisted the temptation to suggest better PRNG algorithms because that doesn't solve the problem of improving the distribution of the first number generated after seeding. The 100000th number will be better with a better PRNG, but not
necessarily the 1st or even the 10th.
Essentially, what he's doing is trying to convert a single not-terribly-random number in the range 0-86400 into a plausibly-diverse index into an array of size N. The built-in PRNG is just a convenient hash function, so that the image generated at time T+1 isn't too similar to the image from time T.
If only ActionScript had a built-in function like CurrentWindSpeedInCanberra()...
-j
Posted by: J Greely at March 02, 2012 08:11 PM (2XtN5)
12
That's exactly right. No matter how you add it up, a pseudo-random-number-generator is just a function applied to the seed, if you only call it once -- which is the case here. The real randomness is the seed, and there just aren't that many things you can use for that.
Back in the DOS days, they used to include things like the current mouse pointer position, and how long it had been since the last character on the serial port, and stuff like that. But you can't really use those any more. (Serial port? What's that?)
The PRNG is just a hash function for the seed value, is what it amounts to.
I suppose I could use the raw time value, and multiply it by something like 137, and then take the modulo by the number of pictures. Maybe I'll do some experimenting.
Posted by: Steven Den Beste at March 02, 2012 08:25 PM (+rSRq)
Hide Comments
| Add Comment
February 14, 2012
Reload removed
The "reload top picture" button seems to have been a problem, so I've removed it. As always, to get the latest version of the chooser flash, you have to do a full reload, or clear your browser cache.
And now I'm going to stop messing with it.
UPDATE: And I don't want to hear any more about bugs. Thank you for not emailing me.
Posted by: Steven Den Beste in Site Stuff at
10:06 AM
| No Comments
| Add Comment
Post contains 66 words, total size 1 kb.
February 12, 2012
Top rotation flash change again
I've made a couple more changes to the flash file. To get the latest version you'll need to flush your browser cache.
There are several changes but only a couple that you'll notice. There's a hotspot in the upper left corner. Mouse-over it, and an information frame appears in the middle. It's debug information for me and meaningless to you, but if you ever get a blank top image, I'd appreciate it if you'd write the numbers down and post them for me.
I also wanted to make it so you could reload the image without reloading the entire page. I tried making a button that did that, but it seems to leak 4K of memory each time, and I can't figure out why. So if you're really inclined to do this, you can right-click the flash and choose "play", and you'll get another image, and you'll leak 4K of memory.
The memory comes back when you close the browser window, and 4K really isn't a lot, but don't abuse it. It may abuse you back again.
UPDATE: I modified it again. The upper right corner is now a button which causes a new image to load.
Posted by: Steven Den Beste in Site Stuff at
10:51 PM
| Comments (15)
| Add Comment
Post contains 202 words, total size 1 kb.
1
Don't necessarily need a full flush--I hate doing that. In Chrome, Shift+F5 will force-reload the whole page including the flash.
Posted by: RickC at February 13, 2012 03:45 PM (/5bLf)
2
Ctrl-F5 works in Firefox.
And crossing the streams: Hitting 'play' got me a grey image!
Total # of images 994
Random Choice 519
Seconds since midnight 58599
[Calculation] 472
Title 10
Choice 21
Posted by: Douglas Oosting at February 13, 2012 04:19 PM (sdWdc)
3
Thanks, Douglas. I think that must have just been a server glitch, a load fail. I have seen that particular picture:

Posted by: Steven Den Beste at February 13, 2012 04:29 PM (+rSRq)
4
Same thing happened to me, btw: gray image with play. Random choice 7, seconds since midnight 67591, mod 6, title 0, choice within title 7.
Posted by: RickC at February 13, 2012 04:47 PM (/5bLf)
5
I see the image flash momentarily before the frame goes grey upon "Play".
Posted by: Pete Zaitcev at February 13, 2012 05:09 PM (G2mwb)
6
Yeah, sometimes that'll happen. It isn't really something I can do anything about, and it doesn't strike me as being a problem, particularly.
Posted by: Steven Den Beste at February 13, 2012 05:28 PM (+rSRq)
7
Sounds like I should put the "reload" button back in, given what I'm seeing here.
Posted by: Steven Den Beste at February 13, 2012 05:29 PM (+rSRq)
8
I'm seeing the grey image every other time I hit play or the button on the upper right. I don't need it to work, but I work in software so I'm filing the bug report out of habit. If no one else encounters this behavior, chalk it up to my machine being wonky and move on.
Posted by: benzeen at February 13, 2012 07:44 PM (R9i5E)
9
I'm getting the same behavior.
Posted by: muon at February 13, 2012 07:56 PM (JXm2R)
10
That's very peculiar, because I'm not having any such problem. I don't have any idea what the problem might be.
As long as you get an image the first time, when you first load the page, then it's doing what it's supposed to do. I guess I would say.
I don't know what to do about this -- except maybe to suggest that you update your flash plugin.
Posted by: Steven Den Beste at February 13, 2012 08:29 PM (+rSRq)
11
It worked fine at first for me, but then it started getting wonky. Now it's the same as benzeen and muon. I tried closing the browser and reopening it, but no such luck. Literally, every other picture is gray. Using Firefox 10.0.1, Flash 11,1,102,55 installed (most recent)
Posted by: ubu at February 13, 2012 08:37 PM (GfCSm)
12
Well, I get an image every first time so you may not consider this a serious issue but I might as well report it: every time I click it (whatever is it in the upper-right corner) I get no-pic/pic/no-pic/pic/no-pic/pic/... and so on, regardless of the picture. I thought it may have been my firefox but I got the same issue with chrome (addon-free)
Posted by: Jaked at February 13, 2012 11:06 PM (KqjLP)
13
Curiouser and curiouser...If I run the swf by itself, everything works fine. If I save the main page, swf, and css to disk, everything works fine. Its only when I load the page from the mee.nu servers that I get the alternating gray image. I am perplexed...
But anyways, yes, the first image always works, and that's all I'll ever actually use (although now that I think about it, might the every-other-image-is-gray be useful for quickly hiding a less-than-work-appropriate picture? Call it a feature!)
Posted by: benzeen at February 13, 2012 11:37 PM (R9i5E)
14
Grey image. numbers were: 994, 49, 28437, 654, 14, 18.
Posted by: amarigatachi at February 14, 2012 04:56 AM (kSykh)
Posted by: Steven Den Beste at February 14, 2012 04:59 AM (+rSRq)
Hide Comments
| Add Comment
February 11, 2012
Updating the top rotation 201202
I'm updating the top rotation, so until further notice it may act strange. (I can't really debug the changes to the flash file any other way.)
UPDATE: OK, fixed.
I just added 286 images to the top rotation:
19 Aika R-16
27 Aika Zero
12 AsoIku OVA
61 Carnival Phantasm
9 Daimaou omake
23 Maken Ki
13 Railgun OVA
18 Sacred Blacksmith
56 Sekirei Pure Engagement
48 Sengoku Otome
There were already 708, so this is only about 30% new stuff. Still, you should see them now and again.
UPDATE: You have to either dump your browser cache or do a forced full reload in order to get the new version of the flash file.
Posted by: Steven Den Beste in Site Stuff at
11:19 PM
| Comments (8)
| Add Comment
Post contains 120 words, total size 1 kb.
1
I didn't see any of the new pics until I emptied my browser cache. Now they're showing up fine.
Posted by: Pixy Misa at February 12, 2012 04:03 AM (PiXy!)
2
Yeah, you have to do that, or force a full reload, in order to get the new version of the flash file.
Posted by: Steven Den Beste at February 12, 2012 05:23 AM (+rSRq)
3
You know what's funny, I just received a frame from Infinite Stratos that I _never_ saw before. What are chances?
Posted by: Pete Zaitcev at February 12, 2012 09:37 AM (G2mwb)
4
I've noticed that, too. Despite my including the time-of-day in the randomizer, I think it still isn't as random as I'd like. Unfortunately, there probably isn't any good solution to that.
Posted by: Steven Den Beste at February 12, 2012 10:00 AM (+rSRq)
5
Of course, it could just be chance. With 708 pictures before, then if they were being randomly chosen, it's highly unlikely you ever saw them all -- unless you spent your entire day reloading this site, and presumably you have more important things to do.
Posted by: Steven Den Beste at February 12, 2012 10:20 AM (+rSRq)
6
Sometimes I sit in a meeting on a muted speakerphone...
Posted by: Pete Zaitcev at February 13, 2012 10:14 AM (G2mwb)
7
Maken-ki came out very well, nicely dynamic pictures. I think I saw about 10 by now.
Posted by: Pete Zaitcev at March 01, 2012 03:58 PM (5OBKC)
8
What I just noticed is that I hardly ever get pictures from Sengoku Otome, despite it having 48 entries. Yet more problems with the random number generator not being all that random. It doesn't seem to be a code bug on my part, as best I can determine, and there probably isn't anything I can do about it.
Posted by: Steven Den Beste at March 01, 2012 05:24 PM (+rSRq)
Hide Comments
| Add Comment
September 24, 2011
Top rotation not updated yet
I thought I'd have enough now for a reasonable update. I took grabs from:
AsoIku OVA
Carnival Phantasm
Sacred Blacksmith
Sekirei Pure Engagement
Sengoku Otome Momoiro Paradox
But I only ended up with 155 images. Maybe I'm too picky. Anyway, I think I'm going to look at Mayo Chiki next.
Posted by: Steven Den Beste in Site Stuff at
07:41 PM
| No Comments
| Add Comment
Post contains 55 words, total size 1 kb.
August 26, 2011
August 20, 2011
We seem to be up again
The entire mee.nu and mu.nu kingdom has been in an alternate universe for the last several hours. I have no facts, but if I had to guess, I'd guess we had a major hardware failure and it took this long to swap in a new server and restore it from backups.
Pixy obviously has been hard at work on this, and applause for that. He got Ace and the Jawas back up first, and that's completely proper. They're paying customers, and I am a freeloader.
Right at the moment I'm still having problems loading things like pictures, but I'm sure that Pixy knows about that and is continuing to work.
So here's an attaboy, Pixy!
UPDATE: And even as I was composing that, he got the rest of it working. Pictures now load properly.
UPDATE: Pixy has posted a status update.
Posted by: Steven Den Beste in Site Stuff at
03:26 PM
| Comments (1)
| Add Comment
Post contains 147 words, total size 1 kb.
1
I was up late last night fixing the main database server at my day job, then got up bright and early (blah!) to head off to the Python conference, only to find that the main mu.nu/mee.nu server had fallen over. Imagine my joy!
In theory everyone would have been back up at the same time, except that there was a corrupt table in the mee.nu database that took a while longer to repair. Once I'd found that, all was well.
The next release of Minx is planned to be distributed - balanced across two or three smaller servers, so that no one outage can take down the whole system.
Posted by: Pixy Misa at August 20, 2011 03:42 PM (PiXy!)
Hide Comments
| Add Comment
August 18, 2011
Next top rotation candidate

Sengoku Otome!!!
It isn't as braindead as I had thought it might be, at least as of the fourth episode. And there's plenty of eye candy with which to augment the top rotation. I've got 29 candidates so far.

Mitsuhide, in particular, is easy on the eyes. But where did she get the glasses from?
It's really a very silly story idea, but that doesn't mean it can't be fun. It's certainly no more silly than Strike Witches, which is one of my favorite shows. I doubt that Sengoku Otome Momoiro Paradox will become another favorite, but going through it hasn't been painful.
Posted by: Steven Den Beste in Site Stuff at
06:19 PM
| Comments (3)
| Add Comment
Post contains 107 words, total size 1 kb.
1
I look forward to seeing them! I suppose the glasses are some kind of "Rule of Hotness" thing.
Posted by: Mauser at August 19, 2011 01:44 AM (cZPoz)
2
The hook is that a lot of the women look like people that our heroine knows from her normal life. Indeed, she keeps recognizing them on first meeting. She knew Ieyasu's name on first meeting, for instance.
As to Mitsuhide, she gets called "Akerin" because that's the nickname of the modern one she looks like -- who is also a glasses girl.
I don't really know what's going on with it. There may be some sort of attempt at explaining it, eventually, but I'm not holding out hope that it will make much sense.
Hey, look! Boobies!
That's all I really need to know.
Posted by: Steven Den Beste at August 19, 2011 07:23 AM (+rSRq)
3
A fun show, and yeah, there is a knda-sorta explanation for things. Though they leave plenty of room for a sequel.
Posted by: Dave Young at August 19, 2011 08:47 AM (FD6YW)
Hide Comments
| Add Comment
August 16, 2011
Top rotation update
I uploaded another zip file of images to augment the top rotation. There are 28 images now from Dog Days, and those get deleted and replaced by 108 new ones. And there are 71 from Hoshizora, so overall it's an increase of about 150.
However, I can't do anything until Pixy waves his magic unpack-the-zip wand. Once he reads his email and that happens, and I know about it, the change to the flash file is quite easy.
(The reason I'm doing it with a zip is because uploading 180 images one-at-a-time is prohibitively painful.)
I've made a shortcut on my desk top to where one of the new images should be, and I check it now and again. So far it's always been a 404, but when it loads, then I'll know.
Way back somewhere I collected a bunch of grabs from Samurai Girls, but the art style on that is freaky and I finally decided not to use them.
UPDATE: High School of the Dead seems to have the kind of character art I want, but dammit, I don't want to go through the silly thing. I'm not a big one for zombies and flying body parts. Not my thing, at all.
UPDATE: I tried watching the first episode of HSoD, and gave up before the OP began.
UPDATE: My next idea for a series to plunder was MM!
But after one episode, um, well, no. Just no.
UPDATE: The magic Pixy wand has been waved, and I've updated the top rotation flash. To be sure you have the new version, you should dump your browser cache.
Posted by: Steven Den Beste in Site Stuff at
06:32 PM
| Comments (10)
| Add Comment
Post contains 272 words, total size 2 kb.
1
I'd be happy to make a pass through the show for you, trying to find appropriate screenys.
Surprisingly, there aren't as many as you might think... too often there are zombies or (ick!) guys around.
Posted by: Wonderduck at August 16, 2011 08:30 PM (KBBJ+)
2
No, that's OK. Thanks anyway.
Posted by: Steven Den Beste at August 16, 2011 08:31 PM (+rSRq)
Posted by: Pixy Misa at August 16, 2011 11:29 PM (PiXy!)
Posted by: Steven Den Beste at August 17, 2011 05:36 AM (+rSRq)
5
I have to admit that this image from MM left me chuckling for quite a while:

But I can't use it, or anything thematically related to it, in the top rotation. And that doesn't really leave a whole lot.
Posted by: Steven Den Beste at August 17, 2011 06:22 AM (+rSRq)
Posted by: metaphysician at August 17, 2011 08:50 AM (hD30M)
7
This show.
The guy is a masochist. He wants to be cured of it. He goes to a group of students at the school who are sort of a club whose mission is to help people, and asks them to help cure him.
The head, that blonde girl, decides that the solution is to hurt him so badly as to scare the hell out of him and make him stop enjoying the pain. Only it doesn't work, and she ends up being something like a dom.
Part of why he wants to be cured is that he saw a girl and became infatuated. He wants to talk to her and maybe woo her. In the first episode he discovers that it's actually his best friend, a guy who loves crossdressing.
So a lot of the first episode was taken up with the blonde girl attacking the guy horrifically, leading to him getting off. (Ahem.)
Seems like nearly everyone in the show is really, really strange. Based on things I've seen elsewhere, the blonde has a phobia about cats and is terrified of them. And there's another girl in the club who may be androphobic. Plus there's a magical girl, who has a magic wand she can zap people with. I think.
It's all really very strange. But there weren't really very many scenes in the first episode appropriate for the top rotation I only took two frame grabs total while watching it.
Posted by: Steven Den Beste at August 17, 2011 09:04 AM (+rSRq)
8
Ah, I thought it was an acryonym.
Posted by: metaphysician at August 17, 2011 09:51 AM (hD30M)
9
Sort of, it is. The show's Japanese name is emu emu. Just as the letter "H" (i.e. "ecchi") is used as a slang reference to hentai, the letter "M" (i.e. "emu") is used as a reference to masochism.
Why it's two m's, I have no idea. Probably if I watched the show that would become clear, but I'm not willing to make that sacrifice.
Posted by: Steven Den Beste at August 17, 2011 09:30 PM (+rSRq)
10
The other M is for Male.
I watched it.. It was bizarre. I don't remember much except they also added a young girl who is a super-genius, and at one point the guy's masochism turns him into some sort of super Seyian (sp?).
Posted by: Mauser at August 18, 2011 01:46 AM (cZPoz)
Hide Comments
| Add Comment
49kb generated in CPU 0.1004, elapsed 0.2123 seconds.
45 queries taking 0.1894 seconds, 131 records returned.
Powered by Minx 1.1.6c-pink.