How many lines of code is Darwinia?

Anything and everything

Moderators: jelco, bert_the_turtle, Chris

thezeus18
level0
Posts: 1
Joined: Thu Sep 07, 2006 12:40 am

How many lines of code is Darwinia?

Postby thezeus18 » Tue Sep 12, 2006 6:31 pm

Hi. I'm a beginning C++ programmer wondering about the amount of work I'm going to have to do. How big is it? And it's in C++, right?
Montyphy
level5
level5
Posts: 6747
Joined: Tue Apr 19, 2005 2:28 pm
Location: Bristol, England

Postby Montyphy » Tue Sep 12, 2006 6:57 pm

Chris is l33t, he wrote it all in 42 lines. 41 of which are comments.
Uplink help: Check out the Guide or FAQ.
Latest Uplink patch is v1.55.
xbskid
level1
level1
Posts: 19
Joined: Sat Dec 17, 2005 6:23 am

Postby xbskid » Sun Oct 08, 2006 5:51 pm

That can technically be true if all of the carriage returns (And probably excess spaces) were removed. Then, technically, it would all be on one line (Granted it would be truncated in most text editors).
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm

Postby martin » Sun Oct 08, 2006 8:41 pm

or write darwinia as a separate subsidiary app and write the supposed version of darwina to be :

Code: Select all

launch_darwinia.exe


tada! one line!
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Mon Oct 09, 2006 2:42 am

Psh... it was one line of Brainfuck.

xander
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Re: How many lines of code is Darwinia?

Postby KingAl » Fri Oct 13, 2006 6:13 am

thezeus18 wrote:And it's in C++, right?


Chris is so l337, he did it straight into machine code.
User avatar
ShepFan
level2
level2
Posts: 86
Joined: Sun Apr 30, 2006 12:51 am
Contact:

Re: How many lines of code is Darwinia?

Postby ShepFan » Sun Oct 15, 2006 12:49 am

KingAl wrote:
thezeus18 wrote:And it's in C++, right?


Chris is so l337, he did it straight into machine code.


Don't laugh! When I was writing commercial games for a big US publisher, 6502 was my second language!

Even less seriously, about the number of lines of code in Darwinia, I refer to the old coding maxims:

(1) Every program contains at least one bug.
(2) Every program can be made one byte smaller.
(3) Therefore, every program can ultimately be reduced to one byte in length.... but it'll be the wrong byte!

-S
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm

Postby martin » Tue Oct 24, 2006 8:56 pm

xander wrote:Psh... it was one line of Brainfuck.

xander


interesting you should say that, wondering what brainfuck was I went to wikipedia, spent a night building brainfuck programs and then spent the next day building an VM/interpreter for BrainExpletive (my own version of brainfuck that is shockingly similar):

[ begin loop
] end loop if value @ pointer is 0
+ add 1 from value @ pointer, if value is 255 then nothing after this point is executed until a ]
- minus 1 from value @ pointer, if value is 0 then nothing after this point is executed until a ]
, get data input from user
. output data in a letter form
/ output data in a numeric form
< decriment memory pointer position
> incriment memory pointer position
? clear output box
# incriment register
~ decriment register
{ open register dependant loop
} end register dependant lopp on register = 0
* put register into memory
\ put memory into register
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
ghostDancer
level2
level2
Posts: 90
Joined: Tue Jul 12, 2005 4:50 am
Location: Land of Confusion
Contact:

Postby ghostDancer » Wed Oct 25, 2006 1:27 am

i allways thought that darwinia was programmed in Intercal, the only language withe famous "come from" statement.

http://catb.org/~esr/intercal/

http://www.99-bottles-of-beer.net/language-intercal-333.html

:shock:
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm

Postby martin » Thu Oct 26, 2006 7:19 pm

interesting code there... :P
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
byrneda
level1
level1
Posts: 21
Joined: Thu Dec 21, 2006 10:47 am
Location: Dublin

At last!

Postby byrneda » Thu Jan 04, 2007 1:33 am

This is probably the best moment to say the following (cause I know *someone* will understand!!)

"
There are only 10 types of people in the world:

- those who understand binary
- and those who don't
"

:wink:
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Thu Jan 04, 2007 2:19 am

Necromancy for the sake of lame, over-cited jokes. Congratulations, sir.
Montyphy
level5
level5
Posts: 6747
Joined: Tue Apr 19, 2005 2:28 pm
Location: Bristol, England

Postby Montyphy » Thu Jan 04, 2007 2:24 am

"There are 10 type of people in this world : Those who know ternary, those who don't, and those who think this is binary"
Uplink help: Check out the Guide or FAQ.

Latest Uplink patch is v1.55.
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Thu Jan 04, 2007 2:27 am

Heh. I was actually about to post that joke in my previous post, but I thought it would be a little hypocritical.
byrneda
level1
level1
Posts: 21
Joined: Thu Dec 21, 2006 10:47 am
Location: Dublin

Postby byrneda » Thu Jan 04, 2007 2:33 am

KingAl wrote:Necromancy for the sake of lame, over-cited jokes. Congratulations, sir.


Cheers mate.
Necromancy?

Return to “General”

Who is online

Users browsing this forum: No registered users and 13 guests