Quine (programa)

Informatika munduan, ***quine*** bat bere iturburu kode irteera bezala duen programa bat da. Dibertsiotzat, hainbat programatzailek saiatzen dira quine-ik motzena sortzen edozein programazio lengoaian.

Oharra: tranpatzat hartzen da kodea-iturriaren edukia hartzea, eta hau inprimatzea.

## Adibideak 
### C 
```c
#include
char*i="\\#include",n='\n',q='"',*p=
"%s%cchar*i=%c%c%s%c,n='%cn',q='%c',*p=%c%c%s%c,*m=%c%c%s%c%c;%s%c",*m=
"int main(){return!printf(p,i+1,n,q,*i,i,q,*i,q,n,q,p,q,n,q,m,q,n,m,n);}"
;int main(){return!printf(p,i+1,n,q,*i,i,q,*i,q,n,q,p,q,n,q,m,q,n,m,n);}
```

### C# 
```c#
using System;
namespace quine
{
  class Program
  {
    [STAThread]
    static void Main(string[] args)
    {
      string s = "using System;{0}namespace quine{0}{2}{0}{1}class Program{0}{1}{2}{0}{1}{1}[STAThread]{0}{1}{1}static void Main(string[] args){0}{1}{1}{2}{0}{1}{1}{1}string s = {4}{6}{4};{0}{1}{1}{1}Console.Write(s, Environment.NewLine, {4}{5}t{4}, {4}{2}{4}, {4}{3}{4}, {4}{5}{4}{4}, {4}{5}{5}{4}, s);{0}{1}{1}{3}{0}{1}{3}{0}{3}";
      Console.Write(s, Environment.NewLine, "\t", "{", "}", "\"", "\\", s);
    }
  }
}
```

### Scheme 
```scheme
((lambda (x)
        (list x (list (quote quote) x)))
    (quote
        (lambda (x)
            (list x (list (quote quote) x)))))
```

### Lisp 
```lisp
(funcall (lambda (x)
          (append x (list (list 'quote x)))))
        '(funcall (lambda (x) 
                     (append x (list (list 'quote x))))))
```

### Ocaml 
```ocaml
(fun s -> Printf.printf "%s %S" s s) "(fun s -> Printf.printf \"%s %S\" s s)"
```

### Python 
```python
a='a=%s;print a%%`a`';print a%`a`
```

### JavaScript 
```javascript
unescape(q="unescape(q=%22*%22).replace('*',q)").replace('*',q)
```

### Perl 
```perl
$_=q{$_=q{Q};s/Q/$_/;print};s/Q/$_/;print
```
Adibide laburrago bat:
```perl
open+0;print
```
Perl eta shell script-aren konbinazioa:
```perl
perl -le '$n=q{perl -le a$n=q{$x};($_=$n)=~s/\141/\47/g;s/\$x/$n/;printa};($_=$n)=~s/\141/\47/g;s/\$x/$n/;print'
```

### BASIC 
```basic
10 LIST
```

### Pascal 
```pascal
const a='const a=';b='begin write(a,#39,a,#39#59#98#61#39,b,#39#59#10,b) end.';
begin write(a,#39,a,#39#59#98#61#39,b,#39#59#10,b) end.
```

### Brainfuck 
Lerro bakar batean idatzi da irakurketa errazteko:
```brainfuck
->+>+++>>+>++>+>+++>>+>++>>>+>+>+>++>+>>>>+++>+>>++>+>+++>>++>++>>+>>+>++>++>
 +>>>>+++>+>>>>++>++>>>>+>>++>+>+++>>>++>>++++++>>+>>++>+>>>>+++>>+++++>>+>+++
 >>>++>>++>>+>>++>+>+++>>>++>>+++++++++++++>>+>>++>+>+++>+>+++>>>++>>++++>>+>>
 ++>+>>>>+++>>+++++>>>>++>>>>+>+>++>>+++>+>>>>+++>+>>>>+++>+>>>>+++>>++>++>+>+
 ++>+>++>++>>>>>>++>+>+++>>>>>+++>>>++>+>+++>+>+>++>>>>>>++>>>+>>>++>+>>>>+++>
 +>>>+>>++>+>++++++++++++++++++>>>>+>+>>>+>>++>+>+++>>>++>>++++++++>>+>>++>+>>
 >>+++>>++++++>>>+>++>>+++>+>+>++>+>+++>>>>>+++>>>+>+>>++>+>+++>>>++>>++++++++
 >>+>>++>+>>>>+++>>++++>>+>+++>>>>>>++>+>+++>>+>++>>>>+>+>++>+>>>>+++>>+++>>>+
 [->>++++++++++.[+]>>[+++++++++-
 .------------------->-[->]>>]>++++++++++
 +++++++++++++++++++++>>++[->>.
  
';
echo str_replace(1+1,chr(39).$a.chr(39),$a);
?>
```

### PL/I 
```text
%dcl z%z='put edit';proc options(main;q=''''put list(m;do i=1,2;z(q)skip;do j=
1to 78c=substr(m(i),j;if c=q z(c;z(c;end;z(q',';dcl(c,q)char,m(2)char(99)init(
'%dcl z%z=*put edit*;proc options(main;q=''''''''put list(m;do i=1,2;z(q)skip;do j=',
'1to 78c=substr(m(i),j;if c=q z(c;z(c;end;z(q*,*;dcl(c,q)char,m(2)char(99)init(',
```

### PostScript 
```postscript
(dup == {dup cvx exec} pop 8 12 getinterval =)
dup cvx exec
```

### Visual FoxPro 
```visualfoxpro
CLEAR
SET TALK OFF
SET TEXTMERGE ON
\CLEAR
\SET TALK OFF
\SET TEXTMERGE ON
```

## Kanpo estekak