Life Programming
-
PlanDay();
yield to_wishes_of_significant_other;
TryAgainTomorrow();Marc
Testers Wanted!
Latest Article: User Authentication on Ruby on Rails - the definitive how to
My BlogCombined with the first line of your sig, there is a joke in there waiting to be exploited. Unfortunately, I just woke up so someone else will have to come forth... :-O Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
-
Hi friends , lets innovate a new programming language called Life Programming. Describe your lifestyle with a program.
-
All the others are derived.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
Which implies that you had the foresight to know it would be derived. Nothing wrong with a coding skill like that! Clearly the influence of experience. :thumbsup: Now, just to program those lap-monsters - the 4-legged variety. I'll wait for quantum computing before even trying to bother with a simulation and prediction unit for the 2-legged kind..
Make it work. Then do it better - Andrei Straut
-
Hi friends , lets innovate a new programming language called Life Programming. Describe your lifestyle with a program.
DoWhatImThinking()
-
Hi friends , lets innovate a new programming language called Life Programming. Describe your lifestyle with a program.
-
So that is how to get eternal life? :laugh: :laugh: :laugh:
cheers Marco Bertschi
You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff I'm at peace with the world and myself. - Me
-
Hi friends , lets innovate a new programming language called Life Programming. Describe your lifestyle with a program.
-
Its not a serious discussion man , lets hav a fun.
Bikash Prakash Dash wrote:
Its not a serious discussion man
It was my "attempt" at describing my life as a program; what you read was the output. Then again, most 'ere just want the codez, not the details, so;
using System;
class Coffee { /* lot's of sugar */ } class Code { /* On Error Resume 0 */ }
enum ClassesOfLife { Human, Mammal, Fish, Programmer }
private class Life: IDisposable // I ain't that static, just clone me :D
{
bool alive = true; // Life should be alive by default, or it won't run
public ClassesOfLife Class { get; set; }
public bool EOL(int dummy) { return !alive; } // dummy = true :)Code Consume(Coffee\[\] food) { return new Code(); } static void Main(string\[\] args) { Func SomeRandomThing = delegate(int chance) // obfuscated? { return 0 == new Random((int)Environment.TickCount).Next(0, chance); }; using (var Life = new Life() { Class = ClassesOfLife.Programmer }) { while (!Life.EOL(1)) // the intention is to live forever { var food = new Coffee\[\] { new Coffee(), new Coffee() }; if (SomeRandomThing(20)) food = null; var code = Life.Consume(food); if (SomeRandomThing(4)) code = null; // "external events", aka heisenbug if (null == code) Life.alive = false; if (SomeRandomThing(100)) throw new NotImplementedException("No, we still got three days until the deadline, right?"); Console.WriteLine("Heartbeat, @" + Environment.TickCount); } } Console.ReadKey(); } void IDisposable.Dispose() { alive = false; Console.WriteLine("Disposed!"); // be sure to turn of inheritance. }
}
Be warned before running the code that it did not survive it's first code-review. It seems that the code does not reproduce, and thus, does not count as "life" in the way a biologist looks at it.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
I think we'd all be in trouble if there were two... :laugh:
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
-
Bikash Prakash Dash wrote:
Its not a serious discussion man
It was my "attempt" at describing my life as a program; what you read was the output. Then again, most 'ere just want the codez, not the details, so;
using System;
class Coffee { /* lot's of sugar */ } class Code { /* On Error Resume 0 */ }
enum ClassesOfLife { Human, Mammal, Fish, Programmer }
private class Life: IDisposable // I ain't that static, just clone me :D
{
bool alive = true; // Life should be alive by default, or it won't run
public ClassesOfLife Class { get; set; }
public bool EOL(int dummy) { return !alive; } // dummy = true :)Code Consume(Coffee\[\] food) { return new Code(); } static void Main(string\[\] args) { Func SomeRandomThing = delegate(int chance) // obfuscated? { return 0 == new Random((int)Environment.TickCount).Next(0, chance); }; using (var Life = new Life() { Class = ClassesOfLife.Programmer }) { while (!Life.EOL(1)) // the intention is to live forever { var food = new Coffee\[\] { new Coffee(), new Coffee() }; if (SomeRandomThing(20)) food = null; var code = Life.Consume(food); if (SomeRandomThing(4)) code = null; // "external events", aka heisenbug if (null == code) Life.alive = false; if (SomeRandomThing(100)) throw new NotImplementedException("No, we still got three days until the deadline, right?"); Console.WriteLine("Heartbeat, @" + Environment.TickCount); } } Console.ReadKey(); } void IDisposable.Dispose() { alive = false; Console.WriteLine("Disposed!"); // be sure to turn of inheritance. }
}
Be warned before running the code that it did not survive it's first code-review. It seems that the code does not reproduce, and thus, does not count as "life" in the way a biologist looks at it.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
Quote:
Console.WriteLine("Heartbeat, @" + Environment.TickCount);
haha Like this line
-
Without me, many things wouldn't be able to run.
cheers Marco Bertschi
You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff I'm at peace with the world and myself. - Me
I'm sure you meant ntoskrnl.exe or some other versions of Windows kernel.
more from me | GALex: C++ Library for Advanced Genetic Algorithms
-
You don't
Dispose
of me that easily!The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
-
Hi friends , lets innovate a new programming language called Life Programming. Describe your lifestyle with a program.
while (CanCode()) {
Exist();
}
Die();/ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Without me, many things wouldn't be able to run.
cheers Marco Bertschi
You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff I'm at peace with the world and myself. - Me
Well, they wouldn't need to anymore, and they could get rid of the restraining order.
-
Xyzzy
.-. |o,o| ,| \_\\=/\_ .-""-. ||/\_/\_\\\_\\ /\[\] \_ \_\\ |\_/|(\_)|\\\\ \_|\_o\_LII|\_ \\.\_./// / | ==== | \\ |\\\_/|"\` |\_| ==== |\_| |\_|\_| ||" || || |-|-| ||LI o || |\_|\_| ||'----'|| /\_/ \\\_\\ /\_\_| |\_\_\\
plover
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
private partial class myLife {}
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
if(this) dothat(); else if(that) dothis(); else crazy();
-
Well, they wouldn't need to anymore, and they could get rid of the restraining order.
-
if(this) dothat(); else if(that) dothis(); else crazy();
Good grief no! I multitask: "this", "that" and "crazy" are parallel processes wherever possible. ;)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
-
Wish it was that easy, I keep getting a 'Syntax Error' and I won't run!
Dave Find Me On: Web|Facebook|Twitter|LinkedIn
Folding Stats: Team CodeProject
I get a "Invalid operation" exception when I try to jog, does that count?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
-
Good grief no! I multitask: "this", "that" and "crazy" are parallel processes wherever possible. ;)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
in a state of confusion now