Raised This Month: $ Target: $400
 0% 

Quine (self-replicating program) in amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KoST
Senior Member
Join Date: Jul 2005
Old 05-23-2007 , 01:40   Quine (self-replicating program) in amxx
Reply With Quote #1

this little amxx script outputs its own source..
Code:
#include <amxmodx> new s[]="#include <amxmodx>%cnew s[]=%c%s%c;public plugin_init()server_print(s,10,34,s,34)";public plugin_init()server_print(s,10,34,s,34)
http://en.wikipedia.org/wiki/Quine_%28computing%29
__________________
KoST is offline
Juba_PornBorn
BANNED
Join Date: Apr 2007
Location: Caracas
Old 05-23-2007 , 01:57   Re: Quine (self-replicating program) in amxx
Reply With Quote #2

Let me see if I get it straight. A quine is a program that repets himself generating a never ending loop and the main objective is to make it has smal has posible?
Juba_PornBorn is offline
Send a message via MSN to Juba_PornBorn
KoST
Senior Member
Join Date: Jul 2005
Old 05-23-2007 , 02:14   Re: Quine (self-replicating program) in amxx
Reply With Quote #3

it doesn't loop, it just outputs its source code to server console.
if you now copy & paste the output to a new sma file and compile it you will get the exact same result again.
__________________
KoST is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-23-2007 , 11:53   Re: Quine (self-replicating program) in amxx
Reply With Quote #4

lol @ sawce. I'm assuming that's where you got the idea to do this from?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 05-23-2007 , 13:56   Re: Quine (self-replicating program) in amxx
Reply With Quote #5

Heh... Weiiird
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-23-2007 , 17:34   Re: Quine (self-replicating program) in amxx
Reply With Quote #6

Quote:
Originally Posted by Zenith77 View Post
lol @ sawce. I'm assuming that's where you got the idea to do this from?
yeah, sawce aroused my interest
__________________
KoST is offline
BAILOPAN
Join Date: Jan 2004
Old 05-23-2007 , 20:02   Re: Quine (self-replicating program) in amxx
Reply With Quote #7

Most excellent!
__________________
egg
BAILOPAN is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-24-2007 , 10:34   Re: Quine (self-replicating program) in amxx
Reply With Quote #8

thx bail
__________________
KoST is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode