Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Tuesday, December 25, 2007

Christmas

The previous two posts were to emphasize a point, that Jesus is fully God and fully man. At Christmas we celebrate the time when God became a man (stop for a second and consider that! Wow!). Interestingly, it is commonly agreed that Jesus could not of been born in December (the shepherds would not of been in the fields). I have seen compelling evidence for a September date, that would put conception sometime in December...

Sometimes people ask, "Isn't 100% God and 100% man equal to 200%?"

So time for some more code. This using some advanced C++ stuff, so I'll probably need to explain it.

I love the Trinity. It is so basic to proper Christian doctrine. Yet, it is nearly impossible to wrap your brain around. Should we be able to understand an infinite God? At any level?

So God has attributes or properties. In C++, that is a "class":

class God
{
protected:
//God(void); // no constructor, God simply "is"

public:
bool isLove_; // God is love
bool isJust_;
//etc.
};


In C++, we say that one thing is a specialized version of some more general thing using "inheritance" (class Specific : public General, for example class Rectangle : public Shape). So:

class Father : public God // the Father is God
{
};

class HolySpirit : public God // the Holy Spirit is God
{
};

class Jesus : public God, public Man // Jesus is both fully God and fully Man
{
};
// Java lacks multiple inheritance, evidence that it is the language of the devil! :)

So far so good. Now how do we resolve conflicts between being God and being a man? For example:

God does not change (Malachi 3:6).
Men do change (and Jesus grew, Luke 1:80)

The programming term is "adapter". A class which resolves one group of calls into other calls.

For example, there is no function God::change().

Jesus::change()
{
Man::change();
}

God is omniscient, but men are not.

Jesus::isOmniscient()
{
return God::isOmniscient();
}

Etc.

Sunday, May 20, 2007

Code?

What's up with the code? Am I implying God is a big programmer in the sky? That we can get through life by following a program, or set of rules?

No.

I am simply making an analogy. And making some points using (somewhat more) precise language. I find English to be a typical ad hoc standard (i.e. terrible, but everyone uses it :)

So, like any analogy it will be good for making some points, but it will break down in points.

Ok, more code.

So why is it Mormons are not Christians? And why can't we all get to heaven through religions with different gods?

From last post we had:

void Person::repentAndTrust(Jesus*);


The problem is Satan has injected some bad code (probably through a buffer overrun :). Let's see:


lucifer ~ cat >> selfrighteous.h
void Person::repentAndTrust(void*)
{
}
^D
lucifer ~ cl selfrighteous.cpp


Look at him! Using cat to program! And somehow running Microsoft Visual C++ on a UNIX box! This was before he had his account revoked (Luke 10:18).

So what difference does this make? (note, this really will compile, it is a valid overloading) . It means you can put your faith (repentAndTrust) in anything. Unfortunately, without the right Jesus* you get a no-op function... So, let's look at some more code:


class Mormon : public WorksRighteous
{
public:
class Jesus;
};


See, the Mormons have a Jesus too. Problem is, it's not the real one. So repentAndTrust(Mormon::Jesus*) will resolve to the void* function. You can go on and on like this:


repentAndTrust(&Islam::Allah);
repentAndTrust(self);
// I've had people tell me we'll be able to evolve our
// way out of any problem
repentAndTrust(&evolution); // yea, even entropy

Wednesday, April 11, 2007

Some Code

From selfrighteous.h:

namespace Sin
{
static const unsigned Stalin = 4_000_000_000;
static const unsigned Hitler = 3_500_000_000;
static const unsigned Mother_Theresa = 4;
static const unsigned Jesus = 0;
static const unsigned self = 100;
static const unsigned murderer = 1000;
};

void judge(allPeople)
{
threshold = 1000;
// maybe God grades on a curve?
//threshold = allPeople.getAverageSin()
foreach person in allPeople
{
if( person->sin < threshold )
heaven_.push_back();
else
hell_.push_back();
}
};


Unfortunately the actual code looks more like:


void God::judge(allPeople)
{
foreach person in allPeople
if( person->isSaved() )
heaven_.push_back();
else
hell_.push_back();
}

Person::Person(void)
{
saved_ = true; // 2 Samuel 12:23
heart_ = new Heart(Stone);
}

void Person::doSin(void)
{
if( heart_->canConvict() )
{
HolySpirit->grieve();
return;
}

saved_ = false;
}

void Person::repentAndTrust(Jesus*)
{
saved_ = true;

delete heart_; // old is passed away
heart_ = new Heart(HolySpirit);
}