Tuesday, April 15, 2008

universe.createInstance()

#include <physical_laws>
#include "constants.h"
#include "cosmic_events.h"

void* universe;

int main(int argc, char** argv)
{
//given our time slicing, this may need to be a custom bit length
long int current_instant = 0;

register_callback(BIG_BANG, argv);

while (COSMOLOGICAL_CONSTANT > -1 && COSMOLOGICAL_CONSTANT <>
{
//probably needs high end system -> hard realtime constraints
render_particles();

current_instant += 1;
recalculate_cosmological_constant(); //haha "constant"
}

if (COSMOLOGICAL_CONSTANT <= -1)
{
register_callback(BIG_CRUNCH);
return -1;
}
else
{
return COSMOLOGICAL_CONSTANT;
}
}

render_particles()
{
foreach (boson b in universe)
{
if (b.observed)
{
b.setToParticle();
}
if (b.dimensional_radix > 4)
{
b.hide();
}
b.render();
}
}

2 comments:

Aurelius said...

. . .

I've written enough snippets of code to know this is witty, but I'm not inclined to attempt comment. I'm skipping down to the posting on selfishness - more my cup o Earl Grey

Josh said...

Nice!

If only the universe was written in Java, we wouldn't have to worry about garbage collection.