十大另类程序语言(下)

5. TMMLPTEALPAITAFNFAL语言 http://p-nand-q.com/humor/programming_languages/tmmlpteal.html
    你没看错,上面这一排毫无意义的字母是一个语言的名称。它是The Multi-Million Language Project To End All Language Projects And Isn't That A Fine Name For A Language的缩写。TMMLPTEALPAITAFNFAL语言没有固定的语法规则,每一天都是不同的语法。例如,2000年10月13日你可以使用DIV但不能使用MOD;到了10月14日时你可以使用MOD了但DIV又不能用了。因此,你今天写的程序运行起来完全正常,但是到了明天就无法编译了。下面是一个TMMLPTEALPAITAFNFAL的Hello World程序,当然现在已经无法编译了。
    DECLARE CELL 100 AS READPOS
    DECLARE 10 AS NEWLINE
    WRITE CHAR NEWLINE
    COPY "Hello, World" TO CELL 0
    COPY 0 TO READPOS
    WHILE READPOS INDIRECT DO GOSUB 300
    WRITE CHAR NEWLINE
    RETURN
LINE 300: WRITE CHAR READPOS INDIRECT
    ADD 1 TO READPOS
    RETURN

4. l33t语言 http://web.archive.org/web/20050329085620/http://electrod.ifreepages.com/l33t.htm
    Leetspeak是国外网络上曾经流行的一种字母书写方式,就像这个样子。很多电影和美剧的名字也是Leetspeak,比如se7en、numb3rs、s1m0ne等等。l33t程序的代码故意仿照这种风格。它的代码中只有0到9这九个数字是有意义的,其它的字符都没用。因此,你可以先写好一篇文章,然后依次把里面出现的字母替换成你的l33t代码,让一段Leetspeak文字中隐藏一个小程序。下面就是一个Hello World示例程序:
   // "Hello World" by Stephen McGreal.
   // Note that the views expressed in this source code do not necessarily coincide with those of the author :o)
  
   Gr34t l33tN3$$?
   M3h...
   iT 41n't s0 7rIckY.
  
   l33t sP33k is U8er keWl 4nD eA5y wehn u 7hink 1t tHr0uGh.
   1f u w4nn4be UB3R-l33t u d3f1n1t3lY w4nt in 0n a b4d4sS h4xX0r1ng s1tE!!!;p
   w4r3Z c0ll3cT10n2 r 7eh l3Et3r!
  
   Qu4k3 cL4nS r 7eh bE5t tH1ng 1n teh 3nTIr3 w0rlD!!!
   g4m3s wh3r3 u g3t to 5h00t ppl r 70tAl1_y w1cK1d!!
   I'M teh fr4GM4stEr aN I'lL t0t41_1Ly wIpE teh phr34k1ng fL00r ***j3d1 5tYlE*** wItH y0uR h1dE!!!!L0L0L0L!
   t3lEphR4gG1nG l4m3rs wit mY m8tes r34lLy k1kK$ A$$
  
   l33t hAxX0r$ CrE4t3 u8er- k3wL 5tUff lIkE n34t pR0gR4mm1nG lAnguidGe$...
   s0m3tIm3$ teh l4nGu4gES l00k jUst l1k3 rE41_ 0neS 7o mAkE ppl Th1nk th3y'r3 ju$t n0rMal lEE7 5pEEk but th3y're 5ecRetLy c0dE!!!!
   n080DY unDer5tAnD$ l33t SpEaK 4p4rT fr0m j3d1!!!!!
   50mE kId 0n A me$$4gEb04rD m1ghT 8E a r0xX0r1nG hAxX0r wH0 w4nT2 t0 bR34k 5tuFf, 0r mAyb3 ju5t sh0w 7eh wAy5 l33t ppl cAn 8E m0re lIkE y0d4!!! hE i5 teh u8ER!!!!
   1t m1ght 8E 5omE v1rus 0r a Pl4ySt4tI0n ch34t c0dE.
   1t 3v3n MiTe jUs7 s4y "H3LL0 W0RLD!!!" u ju5t cAn'T gu3s5.
   tH3r3's n3v3r anY p0iNt l00KiNg sC3pT1c4l c0s th4t, be1_1Ev3 iT 0r n0t, 1s whAt th1s 1s!!!!!
  
   5uxX0r5!!!L0L0L0L0L!!!!!!!

3. Java2K语言 http://p-nand-q.com/humor/programming_languages/java2k.html
    Java2K是一种非确定性的语言,程序正常运行是有一定概率的。很多时候程序并不能按照你的意愿去运行,即使是系统函数也不会总是去做它该做的事。所有的函数都有两种不同的解释,程序运行时会随机选择一个作为实际调用的函数。
    几乎所有的系统函数返回正确结果都只有90%的可能性,因此程序运行的最终结果或多或少都和预期结果不同。写出正确率尽量高的Java2K程序是一个非常有趣的挑战。

2. Chef语言 http://www.dangermouse.net/esoteric/chef.html
    一个完整的Chef程序代码分为三个部分:程序名、变量声明和一系列栈操作。所有的操作都写成食谱的样子。例如,Put x into the mixing bowl就表示把变量x压入栈中,而Stir for 2 minutes则表示把栈顶元素向下移两格。下面的程序打印出前100个Fibonacci数。
Fibonacci Numbers with Caramel Sauce.

Ingredients.
100 g flour
250 g butter
1 egg

Method.
Sift the flour. Put flour into mixing bowl. Serve with caramel sauce. Stir for 2 minutes. Remove egg. Rub the flour until sifted. Stir for 2 minutes. Fold the butter into the mixing bowl. Pour contents of the mixing bowl into the baking dish.

Serves 1.

Caramel Sauce.

Ingredients.
1 cup white sugar
1 cup brown sugar
1 vanilla bean

Method.
Fold white sugar into mixing bowl. Put white sugar into mixing bowl. Fold brown sugar into mixing bowl. Clean mixing bowl. Put white sugar into mixing bowl. Remove vanilla bean. Fold white sugar into mixing bowl. Melt white sugar. Put vanilla bean into mixing bowl. Refrigerate. Heat white sugar until melted. Put white sugar into mixing bowl. Remove vanilla bean. Fold white sugar into mixing bowl. Caramelise white sugar. Put vanilla bean into mixing bowl. Refrigerate. Cook white sugar until caramelised. Put white sugar into mixing bowl. Serve with caramel sauce. Fold brown sugar into mixing bowl. Put white sugar into mixing bowl. Add vanilla bean. Serve with caramel sauce. Add brown sugar.

1. Shakespeare语言 http://shakespearelang.sourceforge.net/
    在所有的另类语言中,Shakespeare语言可能是最搞笑的了,并且难以置信的是它居然是SourceForge.net的一个项目。Shakespeare的代码完全模仿莎士比亚的戏剧。它也是一个基于栈的程序语言,程序中出场的每一个人物都代表一个栈。Shakespeare的代码自由度很高,因此同一个程序你可以写出完全不同的代码出来。Shakespeare的Hello World代码如下:
The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.

                    Act I: Hamlet's insults and flattery.

                    Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!

You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.

Speak your mind!

[Exit Romeo]

                    Scene II:
The praising of Juliet.

[Enter Juliet]

Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!

[Exit Juliet]

                    Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!

Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!

[Exeunt Ophelia and Hamlet]

                    Act II: Behind Hamlet's back.

                    Scene I: Romeo and Juliet's conversation.

[Enter Romeo and Juliet]

Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!

Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!

[Exit Romeo]

                    Scene II: Juliet and Ophelia's conversation.

[Enter Ophelia]

Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!

Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!

[Exeunt]

Matrix67收集整理
转贴请注明出处

十大另类程序语言(上)

10. LOLCODE语言 http://lolcode.com/
    国外流行一种lolcat图片,经常出现在论坛的头像和签名图里。lolcat图片里有一只很乖的小动物(通常是小猫),旁边写几句很可爱的话(比如故意的语法错误、拼写错误、近似发音或者网络缩略语)。很多web 2.0的宕机页面就是一张lolcat图片。LOLCODE就是用这种可爱的猫猫语言来写程序。LOLCODE的代码通俗易懂,写起来非常可爱,小MM一定会喜欢。比如看看下面这段代码:
HAI
CAN HAS STDIO?
I HAS A VAR
GIMMEH VAR
IZ VAR BIGGER THAN 10?
    YARLY
        BTW this is true
        VISIBLE "BIG NUMBER!"
    NOWAI
        BTW this is false
        VISIBLE "LITTLE NUMBER!"
    KTHX
KTHXBYE

9. BrainFuck语言 http://www.muppetlabs.com/~breadbox/bf
    BrainFuck语言是最简单的程序语言之一,只有8个有效字符,每个字符都有一个特定的含义。这8个字符控制一个指针在线性表里进行移动、读写、循环等操作。所有其它的字符都当作注释处理。我的Blog里曾对BrainFuck有过专门的介绍
    我很喜欢这个语言,甚至下载了它的编译器,写出不少BrainFuck程序。例如,下面这段代码可以输出我的网站域名“matrix67.com”:
++++++++++[>+++++++++++<-]>-.
<+++[>----<-]>.<+++++[>++++<-]>-.--.
<+++[>---<-]>.<+++++[>+++<-]>.
>+++++[>+++++++++++<-]>-.+.<+++[>---<-]>.<<
<+++++[>----<-]>-.<+++[>++++<-]>.--.

    BrainFuck语言有很多扩展。用不同的单词来代替这8个符号可以得到更多好玩的程序语言,有一些语言竟是把BrainFuck程序编码成图片或音乐作为程序代码。

8. Malbolge语言 http://www.lscheffer.com/malbolge.shtml
    Malbolge是最早的一个以代码丑陋为目标而设计出的程序语言,你几乎不可能读懂Malbolge的代码。它共有8条指令,所有运算都基于3进制,控制程序流的唯一指令是无条件跳转。它的Hello World程序如下:
(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@986543W10/.R,+O<

7. Whitespace语言 http://compsoc.dur.ac.uk/whitespace/
    很多语言在编译时都会自动忽略空格、换行和Tab,而Whitespace语言正好相反,这个语言的有效字符只有三个(就是前面提到的三个空白符号),其它字符一律当作注释处理。这个语言对于机密工作者尤其有用,你可以把一个完整的Whitespace程序插入到一篇普通的文章中,谁也不会知道这里面竟然隐藏了一个机密代码。Whitespace也可以防止别人打印出源代码盗走。Whitespace源码的扩展名为.ws,这里是一个Whitespace的Hello World程序。我的Blog里也曾经介绍过Whitespace

6. Befunge语言 http://quadium.net/funge/spec98.html
    Befunge的代码是二维的。它用 < > v ^ 这四个符号来控制一个指针在代码中移动,指针经过一个字符或数字则把它压入一个栈,四则运算符号的功能就是弹出栈顶两个元素进行计算后把结果压回去。用 _ 和 | 来表示有条件的方向选择:当栈顶元素为0时向右(上)走,否则向左(下)走。& 和 ~ 分别用于读入数字或字符并压入栈,句号和逗号分别表示将栈顶元素作为整数或字符输出。最后以一个@符号表示程序结束。Befunge代码的注释不需要任何符号标明,你可以把注释写在程序的任何地方,只要运行时指针不会经过它就行了。你甚至可以把注释写在程序正中间,然后写代码时绕开注释写成一圈。Befunge的Hello World程序如下:
                 v
>v"Hello world!"0<
,:
^_25*,@

    看一个复杂的例子。我找了一个算圆周率的Befunge程序,看起来非常壮观。
aa*          v                  +------------------------+
vp*9920p*9930<                  | Pi generator in Bef-97 |
>:09a*pa*3/1+19a*p09a*g:09b*v   |                        |
v_@# g*b90 p*b910        < p<   | 7/2/1997, Kevin Vigor  |
>19a*g:+1-29b*p19a*g::09v       +------------------------+
v*a90g*b90*g*b91: _v#p*9<
>g-#v_ 2a*+$  v  :$
    >1-aa*ga*+v  p
v1:/g*b92p*991:<  *
>9b*p29b*g*199*gv9
v*b92p*aa-1g*990-<9
>g2-29b*p099*g1-:0^
v -9p*b92:%ag*991  <
>#v_ 299*g1+299*p>       ^
  >09b*g:#v_$v
v93p*b90-1<
>9*g199*ga/+.v
     v:g*992 <p*9 92-<
    v_29b*g399*p ^
    >09b*g:#v_v      1
vp*b90-1    < $      g
>199*g9`#v_'9,v      *
         >'0, >' ,299^

    通常认为Befunge是第一个基于“二维控制流”的语言,后来衍生出的一大批类似的语言都是受的Befunge影响。例如PingPong语言就是把Befunge的四种箭头符号换成正反斜杠,控制指针移动方向90度旋转,起一个反弹的作用。

Matrix67收集整理
转贴请注明出处

A Variety of Captcha 各式各样的验证码

    最近OIBH被众多群发机器加入到了被害者列表中,验证码那一关显然已经被搞破了(有漏洞还是识别的?如果是识别的话就有点佩服了)。后来我在网上胡乱搜索了一下关于验证码和验证码识别的对抗,有意思的东西还很多。下面这些有创意的验证码大家见过吗?

Tencent的中文验证码:
      

gif动画干扰的验证码:
      

“雪花牌电视机”(FireFox下浏览最佳):
    

3D验证码:
        

迷宫式验证码:
  

极限验证码:
  

flash验证码:
    http://www.glowchart.com/index.cfm?submit
音频验证码(记得MSN注册时就可以选择声音验证):
    http://www.notonebit.com/projects/killbot/kbaudio.php
图片分类式的验证码:
    http://gs264.sp.cs.cmu.edu/cgi-bin/esp-pix
WordPress的Did You Pass Math插件:
    http://blogs.herod.net/steven/archives/93(注意下面Leave a Reply的时候需要填写什么)
这里也有一个Do the Math脚本:
    http://www.hamidof.com/Downloads/PHP_Scripts/Simple_Captcha_Script/
问答式验证码(Discuz!插件):
    http://www.bbsplug.com/register.php

Matrix67搜集整理
转贴请注明出处

IOCCC近几年的获奖作品

    想起在网上找找这个是因为lakeblur给我发过这样一个C代码:

#include <stdio.h>
main(t,_,a)
char *a;
{
return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86,0,a+1)+a)):
1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %dn"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;#
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw'
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#
}'+}##(!!/")
  :t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
    :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);
}

    程序编译运行后不可思议地打印出一长段超过源代码长度的文字,而这些字串竟然根本没有在源代码中出现过。我知道C代码可以写得很怪,而且看这个程序估计还用了不少递归;但从没有想过还有如此荒唐的源代码,看上去基本上就是乱码。刚才我搜索到,这段代码是IOCCC的一个获奖作品。

    IOCCC即International Obfuscated C Code Contest,比谁的C代码写得最乱最读不懂。
    这个比赛已经举办了17年了,下面是近几年的一些获奖作品。
    你可以在http://www.au.ioccc.org/years.html看到更多,但很多需要在Linux环境下编译运行。比较有趣的又能够在windows环境下运行都已经在下面了。
    我们假设你编译后的文件名都是abc.exe。

编译后在dos下输入
abc "ash nazg durhbatuluhk, ash nazg gimbatul, ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul." >abc.pgm
然后用图片编辑器查看abc.pgm

                                  #include
                                  <stdio.h>
                     #include                <stdlib.h>
                     #include                <string.h>
                    #define w "Hk~HdA=Jk|Jk~LSyL[{M[wMcxNksNss:"
                   #define r"Ht@H|@=HdJHtJHdYHtY:HtFHtF=JDBIl"
                  "DJTEJDFIlMIlM:HdMHdM=I|KIlMJTOJDOIlWITY:8Y"
                 #define S"IT@I\@=HdHHtGH|KILJJDIJDH:H|KID"
                "K=HdQHtPH|TIDRJDRJDQ:JC?JK?=JDRJLRI|UItU:8T"
               #define _(i,j)L[i=2*T[j,O[i=O[j-R[j,T[i=2*
              R[j-5*T[j+4*O[j-L[j,R[i=3*T[j-R[j-3*O[j+L[j,
             #define t"IS?I\@=HdGHtGIDJILIJDIItHJTFJDF:8J"
    #define y                  yy(4),yy(5),                yy(6),yy(7)
  #define yy(              i)R[i]=T[i],T[i ]            =O[i],O[i]=L [i]
#define Y _(0          ], 4] )_ (1 ], 5] )_ (2      ], 6] )_ (3 ], 7] )_=1
#define v(i)(      (( R[ i ] * _ + T [ i ]) * _ + O [ i ]) * _ + L [ i ]) *2
double b = 32  ,l ,k ,o ,B ,_ ; int Q , s , V , R [8 ], T[ 8] ,O [8 ], L[ 8] ;
#define q( Q,R ) R= *X ++ % 64 *8 ,R |= *X /8 &7 ,Q=*X++%8,Q=Q*64+*X++%64-256,
# define  p      "G\QG\P=GLPGTPGdMGdNGtOGlOG"   "dSGdRGDPGLPG\LG\LHtGHtH:"
#  define W         "Hs?H{?=HdGH|FI\II\GJlHJ"    "lFL\DLTCMlAM\@Ns}Nk|:8G"
# define   U           "EDGEDH=EtCElDH{~H|AJk}"       "Jk?LSzL[|M[wMcxNksNst:"
#  define u                  "Hs?H|@=HdFHtEI"             "\HI\FJLHJTD:8H"
char  *   x                   ,*X , ( * i )[               640],z[3]="4_",
*Z = "4,8O4.8O4G" r U "4M"u S"4R"u t"4S8CHdDH|E=HtAIDAIt@IlAJTCJDCIlKI\K:8K"U
"4TDdWDdW=D\UD\VF\FFdHGtCGtEIDBIDDIlBIdDJT@JLC:8D"t"4UGDNG\L=GDJGLKHL
FHLGHtEHtE:"p"4ZFDTFLT=G|EGlHITBH|DIlDIdE:HtMH|M=JDBJLDKLAKDALDFKtFKdMK
\LJTOJ\NJTMJTM:8M4aGtFGlG=G|HG|H:G\IG\J=G|IG|I:GdKGlL=G|JG|J:4b"W
S"4d"W t t"4g"r w"4iGlIGlK=G|JG|J:4kHl@Ht@=HdDHtCHdPH|P:HdDHdD=It
BIlDJTEJDFIdNI\N:8N"w"4lID@IL@=HlIH|FHlPH|NHt^H|^:H|MH|N=J\D
J\GK\OKTOKDXJtXItZI|YIlWI|V:8^4mHLGH\G=HLVH\V:4n" u t t
"4p"W"IT@I\@=HdHHtGIDKILIJLGJLG:JK?JK?=JDGJLGI|MJDL:8M4
rHt@H|@=HtDH|BJdLJTH:ITEI\E=ILPILNNtCNlB:8N4t"W t"4u"
p"4zI[?Il@=HlHH|HIDLILIJDII|HKDAJ|A:JtCJtC=JdLJtJL
THLdFNk|Nc|
:8K"; main (
int C,char**        A) {for(x=A[1],i=calloc(strlen(x)+2,163840);
C-1;C<3?Q=_=       0,(z[1]=*x++)?((*x++==104?z[1]^=32:--x), X =
strstr(Z,z))      &&(X+=C++):(printf("P2 %d 320 4 ",V=b/2+32),
V*=2,s=Q=0,C     =4):C<4?Q-->0?i[(int)((l+=o)+b)][(int)(k+=B)
]=1:_?_-=.5/    256,o=(v(2)-(l=v(0)))/(Q=16),B=(v(3)-(k=v(1)
))/Q:*X>60?y   ,q(L[4],L[5])q(L[6],L[7])*X-61||(++X,y,y,y),
Y:*X>57?++X,  y,Y:*X >54?++X,b+=*X++%64*4:--C:pri
ntf("%d "
,i[Q][s]+i[Q ][s+1]+i[Q+1][s]+i[Q+1][s+1])&&(Q+=2)<V||(Q=
0,s+=2)<640
||(C=1));}

编译后在dos下输入abs > ioccc_ray.ppm,生成一个图片(等得可能有点久)

X=1024; Y=768; A=3;
J=0;K=-10;L=-7;M=1296;N=36;O=255;P=9;_=1<<15;E;S;C;D;F(b){E="1""111886:6:??AAF"
"FHHMMOO55557799@@>>>BBBGGIIKK"[b]-64;C="C@=::C@@==@=:C@=:C@=:C5""31/513/5131/"
"31/531/53"[b ]-64;S=b<22?9:0;D=2;}I(x,Y,X){Y?(X^=Y,X*X>x?(X^=Y):0,  I (x,Y/2,X
)):(E=X);      }H(x){I(x,    _,0);}p;q(        c,x,y,z,k,l,m,a,          b){F(c
);x-=E*M     ;y-=S*M           ;z-=C*M         ;b=x*       x/M+         y*y/M+z
*z/M-D*D    *M;a=-x              *k/M     -y*l/M-z        *m/M;    p=((b=a*a/M-
b)>=0?(I    (b*M,_      ,0),b    =E,      a+(a>b      ?-b:b)):     -1.0);}Z;W;o
(c,x,y,     z,k,l,    m,a){Z=!    c?      -1:Z;c     <44?(q(c,x         ,y,z,k,
l,m,0,0     ),(p>      0&&c!=     a&&        (p<W         ||Z<0)          )?(W=
p,Z=c):     0,o(c+         1,    x,y,z,        k,l,          m,a)):0     ;}Q;T;
U;u;v;w    ;n(e,f,g,            h,i,j,d,a,    b,V){o(0      ,e,f,g,h,i,j,a);d>0
&&Z>=0? (e+=h*W/M,f+=i*W/M,g+=j*W/M,F(Z),u=e-E*M,v=f-S*M,w=g-C*M,b=(-2*u-2*v+w)
/3,H(u*u+v*v+w*w),b/=D,b*=b,b*=200,b/=(M*M),V=Z,E!=0?(u=-u*M/E,v=-v*M/E,w=-w*M/
E):0,E=(h*u+i*v+j*w)/M,h-=u*E/(M/2),i-=v*E/(M/2),j-=w*E/(M/2),n(e,f,g,h,i,j,d-1
,Z,0,0),Q/=2,T/=2,       U/=2,V=V<22?7:  (V<30?1:(V<38?2:(V<44?4:(V==44?6:3))))
,Q+=V&1?b:0,T                +=V&2?b        :0,U+=V    &4?b:0)     :(d==P?(g+=2
,j=g>0?g/8:g/     20):0,j    >0?(U=     j    *j/M,Q      =255-    250*U/M,T=255
-150*U/M,U=255    -100    *U/M):(U    =j*j     /M,U<M           /5?(Q=255-210*U
/M,T=255-435*U           /M,U=255    -720*      U/M):(U       -=M/5,Q=213-110*U
/M,T=168-113*U    /       M,U=111               -85*U/M)      ),d!=P?(Q/=2,T/=2
,U/=2):0);Q=Q<    0?0:      Q>O?     O:          Q;T=T<0?    0:T>O?O:T;U=U<0?0:
U>O?O:U;}R;G;B    ;t(x,y     ,a,    b){n(M*J+M    *40*(A*x   +a)/X/A-M*20,M*K,M
*L-M*30*(A*y+b)/Y/A+M*15,0,M,0,P,  -1,0,0);R+=Q    ;G+=T;B   +=U;++a<A?t(x,y,a,
b):(++b<A?t(x,y,0,b):0);}r(x,y){R=G=B=0;t(x,y,0,0);x<X?(printf("%c%c%c",R/A/A,G
/A/A,B/A/A),r(x+1,y)):0;}s(y){r(0,--y?s(y),y:y);}main(){printf("P6n%i %in255"
"n",X,Y);s(Y);}

编译后输入abc 0 0 1可以画出x^2的函数图像,输入abc -1 0 0 1可以画出x^3-1的图像。你也可以试试其它的。

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define _   ;double
#define void   x,x
#define case(break,default) break[O]:default[O]:
#define switch(bool)   ;for(;x<bool;
#define do(if,else)  inIine(else)>int##if?
#define true   (--void++)
#define false   (++void--)
char*O=" <60>!?\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int
main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1]
=booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
)));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
[O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}

高精度开方。这个有点意思,已经发到OIBH上了。
输入abc 01524157875019052100试试。
你输入的数字需要有偶数位,否则自行添加前导0补足。

#include <stdio.h>
int l;int main(int o,char **O,
int I){char c,*D=O[1];if(o>0){
for(l=0;D[l              ];D[l
++]-=10){D   [l++]-=120;D[l]-=
110;while   (!main(0,O,l))D[l]
+=   20;   putchar((D[l]+1032)
/20   )   ;}putchar(10);}else{
c=o+     (D[I]+82)%10-(I>l/2)*
(D[I-l+I]+72)/10-9;D[I]+=I<0?0
:!(o=main(c/10,O,I-1))*((c+999
)%10-(D[I]+92)%10);}return o;}

画一个月亮

#include <stdio.h>
#include <math.h>
double l;main(_,o,O){return putchar((_--+22&&_+44&&main(_,-43,_),_&&o)?(main(-43,++o,O),((l=(o+21)/sqrt(3-O*22-O*O),l*l<4&&(fabs(((time(0)-607728)%2551443)/405859.-4.7+acos(l/2))<1.57))[" #"])):10);}

类似于hangman的猜单词游戏

#ifndef int
#ifdef while
char s[234],d[56],*p=s,m='m';
#define int typedef (*define)();
define O [6]={getc,putchar,(y)memmove,(y)printf,(y)n,(y)l};
#include __FILE__
signed short n(short bz){
short pb=0,Md=1,ih=2,sfp=3,sjs=4,fo,u=5,scp=6,t,gq=7,oh,r=8,pcf=9,rs=10;
char o=1,i=1,l,pc=i,b=r+o/2,_f=6,m=7,s=8,g,q,od=o*rs+4^s,js=_f/*3-m*'c',bs='g';
return 1; }
#y FILE c[a]+s,p[c],r[m]+u[i+4*o|f]-r[wob][wad]+s*f-!w|o,L+x     |  cut
;}int main(i,love_unix){*/;}int main(i,love_unix){/*;}int main(i,love_unix){*;}|  here */
while(FILE)for(;9-(i=0[O](f)););
for(;32-(i=0[O](f));0&& 3[O]("-->%s<--", "gxdgbtgxsxpcctvpixktedhiedcte"));
for(;'n
'-(i=O[0](f));)(i>='a'&&i<'z')?*
#include __FILE__
                                  "Demonic Smiley" );}  /* <g> */
#else
#define while(int) short c=0;int*f=fopen(__##int##__,"r");for(i=0;i<25;i _)i[d]='A'+(13+i)%26;main:
#define y define
#define _ ++
#include <stdio.h>
#include <string.h>
#include <time.h>
#include __FILE__
#endif
#elif defined(signed)
(p _)=(i-'a')[d]:!(i-'z')?*(p _)=32:(i>='A'&&i<='Z')&&((3&8|2)[O](d+1,d,24L),*(p _)=0[d]=i);/*
#y FILE t,ra|js+t*gj,at[qdd]-=K,is _,qv _,veb _,ti _,ao[mqht] _*/
if(c _<6) goto main; 5[O](
#else
#define signed short l(){char q='_';p=s+4*(time(NULL)%24)*2,m=(char)p+1;
*(p+8)=0; for(d[3]=10,d[33]=3[d]-10;d[3]<18;3[d] _) d[3][p]=q;3[d][p]=0;
hell:  printf("t[%s]n",p+10);if(!m) goto stoned;
froze: d[8]=(scanf("%c",&(2[d+__STDC__])),2[d+!NULL])&223;if(!(3[d+5]-'n')) goto froze;
for(m=1[d]=0;d[1]<8;2[d-1] _) (p[d[1]]-d[8]||(p[3[d-2]+10]=4[d+4]))+(p[d[1]+10]-q||m _);
goto hell;stoned:;}
FILE *X(FILE s){ char i,iev,jmqhu,xqht,mqh,ujek,sxydw,kdj,yjb,utou,qhre,eamy,jxxe,bt;}
#endif