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 11:31 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360