Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Off-Topic > pointers to multidimensional arrays in C
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
20.Sep: FOURTH CHAPTER IN `HISTORY OF...` PUBLISHED
13.Sep: NEWS ON THE FLY
06.Sep: APOLYTON DONATES TO HURRICANE RELIEF

bottom of page
   - CIVILIZATION 3 $9.99 - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - ALPHA CENTAURI + ALIEN CROSSFIRE (laptop collection) from $19.99 - ALPHA CENTAURI PC $9.99 -->
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:24
  Old Post 15-02-2005 05:39 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#31 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by Kuciwalker
I'm using data in memory for random numbers. And St Leo answered my question.


Yet more irrefutable proof of my greatness.

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:24
  Old Post 15-02-2005 05:40 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#32 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by Kuciwalker


It's equivalent to finding out what'll happen if you hook a reflector up to a nightlight that turns off when light hits a sensor on it...


Except that mine was interesting and useful

Plus I didn't actually do it.

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:24
  Old Post 15-02-2005 05:43 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#33 Report this post to a moderator
Lose 30 kilos (of popups)

You do realise that taking numbers out of memory is one of the worst ways to generate pseudorandomness, right? The probability of correlation is ridiculously high.

Kuciwalker is offline Kuciwalker
Emperor
of Schmooism
Feb 2001
time: 00:24
  Old Post 15-02-2005 05:44
Edit/Delete Message Reply w/Quote
#34 Report this post to a moderator
Remove this text

I'm not trying to write a good RNG.

Asher is offline Asher
King
Calgary, Alberta
Nov 1999
time: 22:24
  Old Post 15-02-2005 05:47 Visit Asher's homepage!
Edit/Delete Message Reply w/Quote
#35 Report this post to a moderator
Suffering from ads?

quote:
Originally posted by KrazyHorse
You do realise that taking numbers out of memory is one of the worst ways to generate pseudorandomness, right? The probability of correlation is ridiculously high.

He's not necessarily taking numbers, he could just be taking random bitstreams and interpreting them as numbers.

It still sucks though.

Kuciwalker is offline Kuciwalker
Emperor
of Schmooism
Feb 2001
time: 00:24
  Old Post 15-02-2005 05:48
Edit/Delete Message Reply w/Quote
#36 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

I'm doing it mostly to see what the teacher says when he sees my code.

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:24
  Old Post 15-02-2005 05:48 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#37 Report this post to a moderator
Lose 30 kilos (of popups)

I was assuming that he was, actually (though I know I didn't put it that way).

The point stands....

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:24
  Old Post 15-02-2005 05:49 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#38 Report this post to a moderator
Full PM-box? Change here!

quote:
Originally posted by Kuciwalker
I'm doing it mostly to see what the teacher says when he sees my code.


If he stabs you in the face you will have gotten what you deserve.

Asher is offline Asher
King
Calgary, Alberta
Nov 1999
time: 22:24
  Old Post 15-02-2005 05:54 Visit Asher's homepage!
Edit/Delete Message Reply w/Quote
#39 Report this post to a moderator
Support Apolyton, buy Civilization 2

http://www.ioccc.org/main.html

Guess what this code does:

code:
#include 
#include 
#include 

#define _			;double
#define void			x,x
#define case(break,default)	break[O]:default[O]:
#define switch(bool) 		;for(;xint##if?
#define true			(--void++)
#define false			(++void--)

char*O=" <60>!?\\\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int
main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1]
=booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
)));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
[O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}

Kuciwalker is offline Kuciwalker
Emperor
of Schmooism
Feb 2001
time: 00:24
  Old Post 15-02-2005 05:55
Edit/Delete Message Reply w/Quote
#40 Report this post to a moderator
Lose 30 kilos (of popups)

Adds two numbers?

Urban Ranger is offline Urban Ranger
Apolyton Duke of Off-Topic

Donate to the Red Cross
The City State of Noosphere, CPA special envoy
May 1999
time: 13:24
  Old Post 15-02-2005 06:51
Edit/Delete Message Reply w/Quote
#41 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Oh no. Now I remember why I hate C. Buried memories of horrible events.

Well, I actually don't really hate C. It's just that if you give people a tool they can be sloppy with, they will.

quote:
Originally posted by KrazyHorse
If he stabs you in the face you will have gotten what you deserve.


BlackCat is offline BlackCat
Warlord

Jul 2004
time: 05:24
  Old Post 15-02-2005 07:24
Edit/Delete Message Reply w/Quote
#42 Report this post to a moderator
Enter the AD-FREE zone

quote:
Originally posted by Kuciwalker
I'm doing it mostly to see what the teacher says when he sees my code.


That may be the most obscure way to try to win a darwin award. That teacher may actually get a reward by weeding you out.

Whoha is offline Whoha
King
The TOC is supposed to be classified guys...
Dec 2001
time: 23:24
  Old Post 15-02-2005 08:17
Edit/Delete Message Reply w/Quote
#43 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by Asher
http://www.ioccc.org/main.html

Guess what this code does:
code:
#include 
#include 
#include 

#define _			;double
#define void			x,x
#define case(break,default)	break[O]:default[O]:
#define switch(bool) 		;for(;xint##if?
#define true			(--void++)
#define false			(++void--)

char*O=" <60>!?\\\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int
main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1]
=booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
)));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
[O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}



it makes baby Jesus cry. But not as much as the first program that I wrote(and subsequently stripped the enter characters out of):76 gotos, everything in main, 11 lines of code that are really, really long.

Last edited by Whoha on 15-02-2005 at 08:27

reds4ever is offline reds4ever
Prince
of the Spion Kop
Mar 2001
time: 05:24
  Old Post 15-02-2005 08:21
Edit/Delete Message Reply w/Quote
#44 Report this post to a moderator
Remove this text

quote:
Originally posted by Kuciwalker
I'm doing it mostly to see what the teacher says when he sees my code.


"You f$%king muppet?"

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:24.
Apolyton Time is 00:24.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0488 seconds (88.71% PHP - 11.29% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net