Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -281,7 +281,7 @@
" ML-99. ".
03 FILLER PIC X(40) VALUE
" ".
03 FILLER PIC X(40) VALUE
lang Ada>with Ada.Text_IO;procedure Self is Q:Character:='"';A:String:="with Ada.Text_IO;procedure Self is Q:Character:=' 03 FILLER PIC X(40) VALUE
" CLOSE OUTPUT-FILE. ".
03 FILLER PIC X(40) VALUE
" ".

View file

@ -1,2 +1,2 @@
"print . dup"
print . dup
"!print !. dup"
!print !. dup

View file

@ -0,0 +1,2 @@
a = <<"a = ~p~n:io.fwrite(a,[a])~n">>
:io.fwrite(a,[a])

View file

@ -1 +1 @@
$_=q{print"\$_=q{$_};eval"};eval
open 0; print <0>;

View file

@ -1,47 +1 @@
{local$_=q{
{
package Quine;
use strict;
use warnings;
our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g;
my $head = '{local$_=q' . "\x7B\n";
my $tail = 'print"{local\$_=q{$_};eval}\n"' . "\x7D;eval}\n";
sub new {
my $class = shift;
my $quine = $head . shift;
my $ret = shift || 1;
my $ln = ( $quine =~ tr/\n/\n/ );
$ln++;
$quine .= "return $ret if caller(1)or(caller)[2]!=$ln;$tail";
bless \$quine, $class;
}
sub from_file {
my ( $class, $fn, $ret ) = @_;
local $/;
open my $fh, '<', $fn or die "$fn : $!";
my $src = <$fh>;
close $fh;
$class->new( $src, $ret );
}
sub quine { ${ $_[0] } }
=head1 NAME
Quine - turn your perl modules/apps into a true quine!
=head1 VERSION
$Id: Quine.pm,v 0.2 2010/09/15 20:23:53 dankogai Exp dankogai $
=head1 SYNOPSIS
use Quine;
print Quine->from_file("woot.pl")->quine;
print Quine->from_file("moot.psgi", '$app')->quine;
=cut
}
return 1 if caller(1);print"{local\$_=q{$_};eval}\n"};eval}
$_=q{print"\$_=q{$_};eval"};eval

View file

@ -0,0 +1,47 @@
{local$_=q{
{
package Quine;
use strict;
use warnings;
our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g;
my $head = '{local$_=q' . "\x7B\n";
my $tail = 'print"{local\$_=q{$_};eval}\n"' . "\x7D;eval}\n";
sub new {
my $class = shift;
my $quine = $head . shift;
my $ret = shift || 1;
my $ln = ( $quine =~ tr/\n/\n/ );
$ln++;
$quine .= "return $ret if caller(1)or(caller)[2]!=$ln;$tail";
bless \$quine, $class;
}
sub from_file {
my ( $class, $fn, $ret ) = @_;
local $/;
open my $fh, '<', $fn or die "$fn : $!";
my $src = <$fh>;
close $fh;
$class->new( $src, $ret );
}
sub quine { ${ $_[0] } }
=head1 NAME
Quine - turn your perl modules/apps into a true quine!
=head1 VERSION
$Id: Quine.pm,v 0.2 2010/09/15 20:23:53 dankogai Exp dankogai $
=head1 SYNOPSIS
use Quine;
print Quine->from_file("woot.pl")->quine;
print Quine->from_file("moot.psgi", '$app')->quine;
=cut
}
return 1 if caller(1);print"{local\$_=q{$_};eval}\n"};eval}

View file

@ -0,0 +1,11 @@
$ cat reproducing.py
File "reproducing.py", line 1
File "reproducing.py", line 1
^
IndentationError: unexpected indent
$ python reproducing.py
File "reproducing.py", line 1
File "reproducing.py", line 1
^
IndentationError: unexpected indent

View file

@ -1 +1,2 @@
(function(){x<-intToUtf8(34);s<-"(function(){x<-intToUtf8(34);s<-%s%s%s;cat(sprintf(s,x,s,x))})()";cat(sprintf(s,x,s,x))})()
(function(){x<-intToUtf8(34);s<-"(functio = 3 TO DATACOUNT - 1"
DATA " PRINT #1, s(nn(){x<-intToUtf8(34);s<-%s%s%s;cat(sprintf(s,x,s,x))})()";cat(sprintf(s,x,s,x))})()

View file

@ -0,0 +1,60 @@
// 0.9-pre compatible
fn main()
{
let q = 34u8;
let p = 44u8;
let l = [
"fn main()",
"{",
" let q = 34u8;",
" let p = 44u8;",
" let l = [",
" ",
" ];",
" let mut i = 0;",
" while i < 5",
" {",
" println(l[i]);",
" i+=1;",
" }",
" i = 0;",
" while i < l.len()",
" {",
" print(l[5]);",
" print((q as char).to_str());",
" print(l[i]);",
" print((q as char).to_str());",
" println((p as char).to_str());",
" i+=1;",
" }",
" i = 6;",
" while i < l.len()",
" {",
" println(l[i]);",
" i+=1;",
" }",
"}",
];
let mut i = 0;
while i < 5
{
println(l[i]);
i+=1;
}
i = 0;
while i < l.len()
{
print(l[5]);
print((q as char).to_str());
print(l[i]);
print((q as char).to_str());
println((p as char).to_str());
i+=1;
}
i = 6;
while i < l.len()
{
println(l[i]);
i+=1;
}
}