You know the saying about monkeys and typewriters? What if one used a random number generator to create a valid binary executable? Sure, most of them would crash, but maybe you'd get something interesting eventually?
Name:
Anonymous2009-12-08 0:14
Yeah, I never believed that saying. I doubt there's enough time available in the universe to type Shakespeare at random. I'm sure some asshole at MIT has already done a paper on how he calculated out how long it would take, factoring in reasonable limitations for a given monkey's wpm, mechanical timings on the typewriter, and likelihood that a given generated word would end up as English.
>>5
PS: that's assuming you don't have magical monkeys and typewriters. Though if you manage to find an infinite amount of either and get them together you'd need some sort of godhax in the first place.
>>10
10 bytes isn't quite enough (2^80 = 1208925819614629174706176, 2 orders of magnitude short, assuming ~15 billion years) but you're right, 64kb is overkill.
Maybe it was Planck seconds? It's been a while and I don't really remember clearly. Planck seconds really would drive the point home that a lot of time is needed to exhaust even a tiny search space.
>>1
Instead of generating random gibberish, you could try to define a set of valid instructions, and have it generate valid, but possibly meaningless code, combine that with some genetic programming, and you might even get something useful, if the fitness function is decent.
Name:
Anonymous2009-12-08 7:35
My /bin/ed is 40260 bytes long. There are only few than 2.53·1036358 possible binaries that long. It's a matter of t*** Stack overflow
>>14 without doing nothing
ain't not gonna do nobody no harm no-how!
Name:
Anonymous2009-12-08 9:21
I know what you mean. It's like that time when I piped /dev/urandom to perl, and the resultant program happened to remove my home directory.
Name:
Anonymous2009-12-08 9:52
For ym PhD dissertation I used random bbcode programs generated by an random number generator.
Name:
Anonymous2009-12-08 11:54
>>1
Please read ``Volatiles Are Miscompiled, and What to Do about It,´´ by Eide and Regehr. In it is an application for random programs, and references to other material on random programs.
Name:
Anonymous2009-12-08 12:11
>>19
That reminds me there was a random bbcode generator somebody was using a while ago. Sometimes it did generate interesting patterns.
>>18
The thing about Perl is that there are more random sequences that represent valid, meaningful (if not useful) programs. Perl is considered extremely dangerous for this reason.
Name:
Anonymous2009-12-08 14:39
Perl is considered extremely dangerous for this reason.
You might even say, Perl considered harmful, amirite?
>>34
Get a random character source and just filter out all ]s that have no matching [, and close all remaining [s. Then use an implementation that ignores non-BF ops. Done.
Name:
Anonymous2009-12-08 16:41
guys, just to reafirm are the monkeys we're talking about here are monkeys as in monachus or niggers? Why is it important? You can train monkeys to work with the typewritter but niggers will just lay all day eating bananas.
>>40
"The majority of the competitors"? Only on the nano hill, where length is limited to 6 instructions. Last time I checked the tiny hill (20 instructions) was still a fight between evolution and design, and bigger hills were dominated by designed warriors.