[~ot] why is programming so fun?

BCS ao at pathlink.com
Sun Jun 1 22:25:10 PDT 2008


Reply to Me,

> Circa. 1980. Doing some work for my college professor on a
> 'fully-configured' (48K) Apple ][ (kept locked in a cupboard because
> it ws so expensive!), the proffesor came up with the idea that as all
> 6502 op-codes were 8-bit and there were very few adressing modes,
> filling the (then massive) 48K with legal, randomly generated machine
> code and jumping to the start address, it shouldn't take long to
> recreate VisiCalc, or something more remarkable.
> 
> The program to generate the prgrams tooks less than 4k. It took some
> effort to cause the trapping address to be saved to floppy disk, but
> we did that. Then the next generation could reload the non-trapping
> code from floppy, append new random code to the end, and iterate. That
> program ran for an entire 8 week period over summer holidays. Our main
> fear was that the cleaner we had arranged to swap the second (data)
> floppy on a (week) daily basis would forget, and we would miss an
> amazing program.
> 
> The result: After 8 weeks and 40 floppys, we failed to create a single
> program that ran for more than 2k of machine code before trapping.
> 
> A few years later when I related the story to a friend (autodiadactic
> genius), he compared the scenario to switching a TV to a untuned
> channel and watching the patterns created by the white noise. He
> suggested that if, in the course of my life time, I ever saw a picture
> of something recognisable, form, that was the equivalent of our
> "remarkable program".
> 
> He calculated the odds using an HP-41C. and then attempted to write
> the number on a piece of A4 paper. He started out using fairly
> standard sized handwritten zeros, but ended up with tiny, almost
> dot-sized ones. Needless to say. it was a very large number. He then
> tried to describe the time it would take for the energy contained in
> the solar system to decay to zero...I didn't understand.
> 

The chances of life happening by chance are something like that, if not worse. 
You could probably calculated a relative number for it with quantum physics 
and/or information theory and/or string theory or some such. IIRC there is 
a theory about how much info can be in a given volume.





More information about the Digitalmars-d mailing list