Thursday 29 July 2010

Are We Gluing Coffee Pots? - and Lots of Randomness


My latest parcel of purchases from Greece arrived the other day. This consisted of:

Detective Novels - Two novels by Giannis Maris. He was Greece's answer to Agatha Christie, writing stories prolifically in the 50's, 60's and 70's. His detective is Captain Bekas.

An Audiobook - I've never ever listened to an audiobook, so this is an experiment. The book itself is apparently a classic of early 20th Century Greek literature.

An old Dictionary - This was published in 1969, and is a dictionary of the old formal Greek that was abolished in the 1970s. It might be useful for reading older non-fiction works, though to be honest I mainly got it because I like dictionaries.

The Greeklish Dictionary - This isn't actually a dictionary, but a rather strange book consisting of modern idiomatic Greek phrases literally translated into English. I managed to find some of them (including "Are we gluing coffee pots?") in dictionaries, though you really need to come across them in actual use to understand them properly. Others, such as "Shit high and gaze", I have no idea about.


I was up until 4am last night (or should I say this morning?). Not because I was busy looking up strange Greek phrases, but because I had discovered a random web site. Appropriately named random.org, it is a site that provides randomness. It's run by a computer scientist at Dublin University, and it's the ideal place to go if you want to roll dice, toss coins, pick cards, generate lottery tickets, or run prize draws or electronic gambling (depending on which authority regulates your business).

It all started in 1997, when Mads Haar connected a $10 radio to an old Sun computer and started playing static through it. The radio was deliberately not tuned to any station and had to be cheap because the more expensive models tend to filter out the static. Contrary to what Windows users might believe, computers aren't very good at being random, since they're designed to behave in a predictable manner. If you want your computer to run games where real money is involved (or strip poker), then the last thing you want is any kind of predictability.

These days, he's got six radios and much more powerful servers, and is able to generate the equivalent of 18,000 coin tosses a second. If you go onto his site, you get a million bits free, and a daily top-up of 200,000 bits (up to the million bit limit).

I got the site to shuffle a pack of cards for me. This used up 335 bits. Of course, I then had to do some calculations to work out the least number of bits you need to do such a shuffle. Wouldn't you? I came up with 226, and then spent more time when I should have been sleeping trying to work out what they're doing that uses 335. Actually, if you keep shuffling it uses different amounts - other shuffles produced 322 and 401.

It's only now that I've written all this down that I realise two things. One is how sad all of this makes me sound, and the other is why the reality of computer shuffling might not work like the theory. At which point I'll have to leave this fascinating tale. I've got a card shuffling program to write.

"We'll say them", as they say in Greek...

5 comments:

Jean Knee said...

I stay awake at night pondering:

Am I going to sleep tonight? Will I wake up at 3:00 am? Will I fall asleep with the light on and then later it willcause me to wake up. Shhould I take a sleeping pill? If I do will I be tired tomorrow? What is the latest time I can take it and still have time to actually sleep? Are the dogs going to bark and wake me up? If they do will I be awake enoughh to throw water on them so they won't bark again or will I be too sleepy to get up but not sleepy enough to actually sleep? Wonder what Brian's doing?

Jean Knee said...

at least you're actually doing something

Unknown said...

Shit high and gauze sounds like a 70s cop show.

How you, you well?

Bee said...

Well, I'm awake right now and it's 1:15. I just finished sending my CV to a place I hope will give me a chance to prove my awesomeness. Cross your fingers and toes!

Super Happy Girl said...

"Shit high and gaze" She is definitely doing it.

I see a lot of math in your blog Brian.
A lot.