Malloc, Free and Update – Chapter 1

Ever wondered why things eventually fall into place, why people don’t always get what they want and why everything in life is so unpredictable ? Well this is all because a great programmer programmed us and our surroundings. It all started with a simple program – “Hello World” . It was not a simple one though, like the ones human programmers write but rather a complex one which executed for a billion years. Finally the program returned true and the world was created. But now she (the programmer) wanted something more than just masses of densely packed debris dancing around¬† a menacing fireball. She wanted a program in which different entities had their own identity. These entities would talk to each other, learn from each other and above all peacefully share resources with each other. However she did not want to create each entity manually, rather she just wanted to monitor them.

So she kickstarted it by creating a couple of base entities. These entities had their own set of memory, basic functions to interact with the environment and a dozen of abstract models which needed to be implemented. But what set The programmer apart from human programmers was that she successfully managed to write the three golden methods – “curiosity” , “logical_reasoning” and “emotional_systhesis”. She then created another program with which would create the environment needed for the entities to survive. She wrote a bunch of event handlers for the environment and a few¬† abstract methods for the entity – environment interaction. With this she linked the two programs together, cross compiled them for various targets and burnt them onto their respective platforms. “Earth” was one such platform. It offered a variety of peripherals and maintained a comfortable core temperature for the programs to run on.

The entities soon began to implement their abstract methods and learnt to use the three golden methods – curiosity, emotional_synthesis and logical_reasoning in an efficient manner. It was not long before the entities started writing their own methods using the three golden methods provided to them. They soon implemented the abstract method – “procreate” and started creating other entities based on a set of predefined, non changeable rules. This was exactly what The programmer wanted – entities which could create entities, entities which could learn from their actions and entities which could program themselves to adapt to the ever-changing environment.

With this one of the prime laws of programming was broken – ” No program can check the logic of another program “.