Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   wtf is a quine??? (https://thetfp.com/tfp/tilted-technology/36451-wtf-quine.html)

cheerios 11-19-2003 06:15 PM

wtf is a quine???
 
: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.

last fun coding trivia of the night, but LOOK at some of this code... it's f'in awesome.
http://www.nyx.net/~gthompso/quine.htm

charliex 11-19-2003 06:36 PM

yep i find hackerish amusment doing quines etc , i've been messing brainf*** recently.

yotta 11-23-2003 09:51 PM

I wrote one on my TI-89 in high school :)

nanofever 11-23-2003 10:16 PM

Quote:

Originally posted by yotta
I wrote one on my TI-89 in high school :)
Think of all the time you wasted, you could of been playing tetris.

yotta 12-03-2003 01:56 AM

Quote:

Originally posted by nanofever
Think of all the time you wasted, you could of been playing tetris.
I did plenty of that too.

Bloodslick 12-03-2003 07:00 AM

Fuck Tetris, you could've been playing Breakout!!!

feelgood 12-03-2003 07:10 AM

Quote:

One day, several years ago, I came across an article in an old Byte on "self-reproducing programs".
Self-reproducing programs? Kinda sounds like a worm to me...

Pragma 12-03-2003 11:19 AM

Self-reproducing programs (aka: quines) are programs that, when run, output their source code. Nothing at all like viruses or worms.

Realizm 12-03-2003 12:27 PM

Wow.. that is sweet. Now if only I could understand how to do it.

cheerios 12-03-2003 05:00 PM

that's about what I said, Realizm ;)

omega2K4 12-05-2003 01:52 PM

Quote:

Originally posted by Bloodslick
Fuck Tetris, you could've been playing Breakout!!!
WORD. Breakout and Pac-Man were my favorites. I had a scaled down version of Street Fighter II with only Ken, and Ryu as characters, AND you could play with 2 people using that link cable thingy.

ratbastid 12-05-2003 03:18 PM

Code:

#!/usr/bin/perl
open A, "<$0";
while (&lt;A&gt;) { print; }

Is it cheating to use an interpreted language, pick up your own script file and print it? That's a pretty short quine! And it's embeddable! Stick it in ANY Perl script to turn that script into a quine.

I've just invented the Universal Quine! There's a PhD somewhere with my name on it!

Pragma 12-05-2003 03:49 PM

ratbastid, I'm fairly sure that the PhD with your name on it stands for "Piled high and Deep" :D

Latch 12-05-2003 05:54 PM

ratbastid, I thought you'd come out with a Perl quine... but that has to be cheating... ;)

MexicanOnABike 12-05-2003 08:20 PM

i did some of those... good old times. and i also played alot of tetris! :)

TheFirstDuffMan 12-06-2003 07:28 PM

Here's a quine in C:
Quote:

char*f="char*f=%c%s%c;main()
{printf(f,34,f,34,10);}%c";
main(){printf(f,34,f,34,10);}
Here's a polygot quine in C and TCL(works in both)
Quote:

#define set char*f=
#define F
#define proc main(){
set F "#define set char*f=
#define F
#define proc main(){
set F %c%s%c;
proc /* {} {}
puts -nonewline %cformat %cF 34 %cF 34 91 36 36]
set a {*/printf(f,34,f,34,91,36,36);}
";
proc /* {} {}
puts -nonewline [format $F 34 $F 34 91 36 36]
set a {*/printf(f,34,f,34,91,36,36);}
There's a way to make a quine in any language that supports strings, search google if you want.


All times are GMT -8. The time now is 06:03 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73