LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Blogs > MrCode
User Name
Password

Notices

This is the first "blog" of any kind I've ever had, so it's probably not the greatest...

Just a little snippet about me:

I'd like to consider myself relatively tech-savvy; obviously I use Linux (Arch to be precise; K.I.S.S. FTW), and I enjoy learning new things about computers in general (both software and hardware-related).

This blog is mostly just for whenever I feel like telling the world about my experiences with computers/Linux (or just life in general), or just posting for the hell of it.
Rate this Entry

An amusing take on my whole "free will or not" problem

Posted 09-21-2010 at 08:37 PM by MrCode
Updated 12-28-2010 at 08:31 PM by MrCode

This is just something I wrote a little while ago to challenge two things: the reasons behind my existential angst, and my C skills (well, pseudo-C ):

Somwehere buried deep in the source code of mankind...

Code:
int FreeWillCheck(Human* h,char* emotion)
{
	int status = 0; //assume free will exists for now

	if(FreeWillExists() == 0 && //if free will exists
	   FreeWillBelief(h) == 0)  //and you believe free will exists
	{
		InitAgentControl(h);
		
		status = 0;     //you get to shape your life
	}
	else if(FreeWillExists() == 0 && //if free will exists
		FreeWillBelief(h) == -1) //and you believe free will does not exist
	{
		HaltAgentControl(h);
		HaltResponsibility(h);
		InitRationalizationEngine(h,"It was predestined, deal with it.");
		
		status = 1;    //you become lazy and full of excuses
	}
	else if(FreeWillExists() == -1 && //if free will does not exist
		FreeWillBelief(h) == 0)   //and you believe free will exists
	{
		HaltAgentControl(h);
		InitRationalizationEngine(h,"I have free will, I make my choices");

		status = 2;    //you are living an illusion

		if(Satisfied(h,status) == 0)
			emotion = "happy";  //and may be happier
	}
	else if(FreeWillExists() == -1 && //if free will does not exist
		FreeWillBelief(h) == -1)  //and you believe free will does not exist
	{
		HaltAgentControl(h);
		InitReasoningEngine(h,"I make my choices, but they were destined to be what they were");

		status = 3;    //you are correct

		if(Satisfied(h,status) == 0)
			emotion = "happy";  //and may be happier
	}

	return status;
}
Now, this is assuming that there actually are such functions as InitAgentControl() and HaltAgentControl() (really, if free will is illusory, neither of those functions would exist, because they would be impossible and unnecessary, respectively ), and I know you probably can't set a char* directly like that in a user-mode program (it segfaults, right?), but I forget the proper way of doing it, so...

I just thought this might be a somewhat humorous look at my "free will vs.determinism" self-argument. The irony of course (and the intended source of humor, if you didn't get it) is that it's C source code, and therefore is representative of a deterministic process...
Posted in Miscellaneous
Views 24574 Comments 7
« Prev     Main     Next »
Total Comments 7

Comments

  1. Old Comment
    Who wrote the program that predetermines all our thoughts, feelings, and actions?
    Posted 09-22-2010 at 07:48 AM by brianL brianL is offline
  2. Old Comment
    bad code. useless code.
    Posted 09-22-2010 at 09:34 AM by Web31337 Web31337 is offline
  3. Old Comment
    Quote:
    Originally Posted by Web31337
    bad code. useless code.
    Perhaps I should have clarified this in the post, but you do realize that the code isn't really meant to be functional, right? Unless that's a comment on the fact that I still have this issue...in which case, I have good news: it's starting to get better.

    I figure that even if one can't logically support the idea of free will, that doesn't mean that one can't act as if they have it anyway. It's about how you look at life, if you think about it.

    It makes me *happier* to believe that I'm free, so why not believe it, even if it's logically fallacious?
    Posted 09-22-2010 at 01:54 PM by MrCode MrCode is offline
    Updated 09-22-2010 at 01:58 PM by MrCode
  4. Old Comment
    Remember that existentialism is by definition semantics, therefore unnecessary.
    Posted 09-24-2010 at 05:06 AM by lupusarcanus lupusarcanus is offline
  5. Old Comment
    Why are you using -1 == False and 0 == True instead of 0 == False and 1 == True?
    Posted 10-20-2010 at 04:17 PM by MTK358 MTK358 is offline
  6. Old Comment
    Quote:
    Why are you using -1 == False and 0 == True instead of 0 == False and 1 == True?
    I had always taken 0 to be the catch-all "success" code when returning from a function, so that's what I used here. But it's just pseudocode trying to illustrate a more "abstract" point, it's not meant to be usable...
    Posted 10-20-2010 at 07:56 PM by MrCode MrCode is offline
  7. Old Comment
    In almost all languages but shell scripting, non-zero is true and zero is false.
    Posted 12-17-2010 at 11:14 AM by MTK358 MTK358 is offline
 

  



All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration