BARBELITH underground
 

Subcultural engagement for the 21st Century...
Barbelith is a new kind of community (find out more)...
You can login or register.


Randomising programs?

 
 
All Acting Regiment
14:33 / 26.09.05
I'm looking for a program that can produce random sets of letters or numbers- or, especially, take a set of images and put them in a random sequence. Does anyone know of such a program, or would it be easy enough to code it myself in, for example, a HTML editor?

I figured those of us who are into chatting with special friends might als ofind something like this useful.
 
 
Smoothly
17:55 / 26.09.05
I figured those of us who are into chatting with special friends might als ofind something like this useful.

Am I the only one wondering what you mean (and feeling distinctly naive as a result)?
 
 
All Acting Regiment
18:17 / 26.09.05
Well, when you throw down a bag of bones or scrabble cards in a ritual to get a message. Uh. I'm sure some other people here have talked about that, but pardon me if I'm talking boggles.
 
 
w1rebaby
18:40 / 26.09.05
It's easy to do in most any programming language, but HTML is not a programming language. I could knock you up something in PHP or Javascript.
 
 
lekvar
18:54 / 26.09.05
Oooh, I'd be interested in something like that, if you're inclined to share, fridge.
 
 
All Acting Regiment
18:56 / 26.09.05
Wow, thanks Fridge. Would we need anything special to run it?
 
 
w1rebaby
19:07 / 26.09.05
Well, for PHP you'd need to have PHP on the server. You wouldn't need anything special for the Javascript but the person visiting the page needs to have Javascript turned on.
 
 
All Acting Regiment
19:10 / 26.09.05
Got those. Would it be something we could download to our own systems?
 
 
grant
19:27 / 26.09.05
Curious: would it be truly random, or "as good as" random?
 
 
w1rebaby
19:34 / 26.09.05
Well, you wouldn't be able to run a PHP script on your own computer unless you were also running a server on that machine. Javascript is executed by the browser so it doesn't matter where it is.

A lot of it is going to depend on what exactly you want to do, but here's a Javascript example. There are all sorts of different things you could do, that's just a very simple thing.
 
 
All Acting Regiment
19:37 / 26.09.05
Wow, that's great Fridge. Would it be possible then to make something in Java where you could choose your own card images, and specify how many to choose? That the way the system could be adapted for running your own card systems or runes.
 
 
w1rebaby
19:39 / 26.09.05
Curious: would it be truly random, or "as good as" random?

Pseudorandom. You can't get a properly random number without a random number generator; they do make them, they use atomic decay. But nobody would notice the difference. There are various ways you can seed random number generators to make them even more random, and I've even heard of people doing things like using other web pages to generate numbers, though that's a bit of an effort....
 
 
Wombat
19:43 / 26.09.05
True randomness can be created using environmental entropy.
(last digit of processor ticks every time a mouse is moved, temperature, keyboard, drive accesses etc...)
First you collect it then post-process it to remove any statistical bias.
 
 
w1rebaby
19:49 / 26.09.05
Whether there is any such thing as "true" randomness is in debate anyway...

Legba, I added some comments to the code and made it easier to change things around if you have different images. If you want the page visitor to be able to choose images and number of images, that's perfectly possible but it would be done in a different way, and be a little more complex.
 
 
All Acting Regiment
20:04 / 26.09.05
Is it possible for others to access the source code and images? I'm thinking in terms of saving them to hardrive?
 
 
w1rebaby
20:30 / 26.09.05
Anybody can save the whole lot wherever they want.
 
 
All Acting Regiment
23:00 / 26.09.05
Sorry to be an idiot but how?
 
 
moonweaver
03:00 / 27.09.05
wow, just got a 'stars and moon' fullhouse on your tarot generator fridge...wouldn't kave an inkling what it means, but i feel all special.
thank you
 
 
w1rebaby
17:57 / 27.09.05
Sorry to be an idiot but how?

Ctrl-S? Right-click and save as?

Uh, don't take this the wrong way, but I think you'd better know this sort of thing before trying to put a web page out there.

To help you though I've zipped up the entire thing and put it up. Download and unpack that and you'll have the whole thing.
 
  
Add Your Reply