Home arrow Forums 09 February 2012  
Main Menu
Home
News
Forums
Downloads
Contact Us
Search i-hacked
Become a Member
- - - - - - -
Computer Components
Consumer Electronics
Electronic Projects
Game Systems
Cell / Phone
Car / Home
Misc
- - - - - - -
Info and Contests
Reviews
About
Login Form





Lost Password?
Latest Edge
 
Advertisement
Privacy Policy
Vote for us in Top 100 Security Sites
Click here to Vote!
Newsflash
I-Hacked Forums  


Let's write quines ... - 2005/03/19 02:20 :quine: /kwi:n/ n. [from the name of the logician Willard
van Orman Quine, via Douglas Hofstadter] A program that generates a
copy of its own source text as its complete output. Devising the
shortest possible quine in some given programming language is a
common hackish amusement. Here is one classic quine:

((lambda (x)
(list x (list (quote quote) x)))
(quote
(lambda (x)
(list x (list (quote quote) x)))))

This one works in LISP or Scheme. It's relatively easy to write
quines in other languages such as Postscript which readily handle
programs as data; much harder (and thus more challenging!) in
languages like C which do not. Here is a classic C quine for ASCII
machines:

char*f="char*f=%c%s%c;main()
{printf(f,34,f,34,10);}%c";
main(){printf(f,34,f,34,10);}

For excruciatingly exact quinishness, remove the interior line
breaks. Some infamous {Obfuscated C Contest} entries have been
quines that reproduced in exotic ways.

---------------------------------------------
Here is my simple batch quine ...
---------------------------------------------

@echo off
goto end
echo Simple BATCH Quine by The Icebreaker!
:end
type quine.bat
  | | The administrator has disabled public write access.

      Topics Author Date
    thread link
Let's write quines ...
TheIcebreaker 2005/03/19 02:20
    thread link
thread linkthread link Re:Let's write quines ...
dmoltr_blink 2005/03/19 07:25
I-Hacked's Most Popular
2006 I-Hacked T-Shirts
 I-Hacked T-Shirts
Have been released, Now with
3 versions!

Check them out here

Latest Articles
Top of Page

If you see information here that you know is inaccurate, out of date, misleading, confusing, or just blatantly wrong, please let us know. Updates and corrections are reviewed and updated as they are received.

 
Disclaimer
I-hacked.com does not take any responsibility with the information presented. Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk. If you blow up your car, home, computer, or anything else -- it's not our fault, use good judgement and play nice.


© I-Hacked.com LLC