Add preview of 1984-2019
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
@@ -0,0 +1,219 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2013 makefile
|
||||
#
|
||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
||||
# is licensed under:
|
||||
#
|
||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
#
|
||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
|
||||
################
|
||||
# tool locations
|
||||
################
|
||||
#
|
||||
SHELL= /bin/bash
|
||||
CP= cp
|
||||
CPP= cpp
|
||||
GUNZIP= gunzip
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
|
||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||
#
|
||||
X11_LIBDIR= /usr/X11R6/lib
|
||||
|
||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||
#
|
||||
X11_INCDIR= /usr/X11R6/include
|
||||
|
||||
# Compiler warnings
|
||||
#
|
||||
#CWARN=
|
||||
CWARN= -Wall -W -Wno-empty-body
|
||||
#CWARN= -Wall -W -pedantic
|
||||
|
||||
# compiler standard
|
||||
#
|
||||
#CSTD=
|
||||
#CSTD= -ansi
|
||||
CSTD= -std=c99
|
||||
|
||||
# compiler bit architecture
|
||||
#
|
||||
# Some entries require 32-bitness:
|
||||
# ARCH= -m32
|
||||
#
|
||||
# Some entries require 64-bitess:
|
||||
# ARCH= -m64
|
||||
#
|
||||
# By default we assume nothing:
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# optimization
|
||||
#
|
||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||
# A few compilers have broken optimizers or this entry make break
|
||||
# under those buggy optimizers and thus you may not want anything.
|
||||
#
|
||||
#OPT=
|
||||
#OPT= -O
|
||||
#OPT= -O1
|
||||
OPT= -O2
|
||||
#OPT= -O3
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS=
|
||||
|
||||
# default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CWARN} ${CSTD} ${ARCH} ${OPT} ${LIBS}
|
||||
|
||||
# ANSI compiler
|
||||
#
|
||||
# Set CC to the name of your ANSI compiler.
|
||||
#
|
||||
# Some entries seem to need gcc. If you have gcc, set
|
||||
# both CC and MAY_NEED_GCC to gcc.
|
||||
#
|
||||
# If you do not have gcc, set CC to the name of your ANSI compiler, and
|
||||
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
|
||||
# to disable such programs.
|
||||
#
|
||||
CC= cc
|
||||
#CC=clang
|
||||
MAY_NEED_GCC= gcc
|
||||
|
||||
|
||||
##############################
|
||||
# Special flags for this entry
|
||||
##############################
|
||||
#
|
||||
ENTRY= endoh2
|
||||
DATA=jpeg.jpg jpeg.c
|
||||
ALT_OBJ=
|
||||
ALT_ENTRY=jpeg
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
#
|
||||
all: ${ENTRY} ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
${ENTRY}: ${ENTRY}.c
|
||||
${CC} ${CFLAGS} $< -o $@
|
||||
|
||||
${ALT_ENTRY}: ${ALT_ENTRY}.c
|
||||
${CC} ${CFLAGS} $< -o $@
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: ${ALT_ENTRY}
|
||||
@${TRUE}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
jpeg.c: ${ENTRY}
|
||||
${RM} -f $@
|
||||
./${ENTRY} < ${ENTRY}.c > $@
|
||||
|
||||
jpeg.jpg: ${ALT_ENTRY}
|
||||
${RM} -f $@
|
||||
@echo This next step will take some time
|
||||
./${ALT_ENTRY} > $@
|
||||
|
||||
check: ${DATA}
|
||||
${RM} -f jpeg2.c
|
||||
ruby ocr.rb jpeg.jpg > jpeg2.c
|
||||
diff jpeg.c jpeg2.c && echo Check succeeded
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
everything: all alt check
|
||||
|
||||
clean:
|
||||
${RM} -f ${ENTRY}.o ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${ENTRY} ${ALT_ENTRY}
|
||||
|
||||
nuke: clobber
|
||||
@${TRUE}
|
||||
|
||||
dist_clean: nuke
|
||||
@${TRUE}
|
||||
|
||||
install:
|
||||
@echo "Surely we are joking Dr. Lehmer!"
|
||||
@${TRUE}
|
||||
|
||||
# backwards compatibility
|
||||
#
|
||||
build: all
|
||||
@${TRUE}
|
||||
|
||||
|
||||
##################
|
||||
# 133t hacker rulz
|
||||
##################
|
||||
#
|
||||
love:
|
||||
@echo 'not war?'
|
||||
@${TRUE}
|
||||
|
||||
haste:
|
||||
$(MAKE) waste
|
||||
@${TRUE}
|
||||
|
||||
waste:
|
||||
@echo 'haste'
|
||||
@${TRUE}
|
||||
|
||||
easter_egg:
|
||||
@echo you expected to mis-understand this $${RANDOM} magic
|
||||
@echo chongo '<was here>' "/\\oo/\\"
|
||||
@echo Readers shall not be disallowed from being unable to not partly misunderstand this partocular final echo.
|
||||
|
||||
# Understand the history of the Homebrew Computer Club
|
||||
# as well as the West Coast Computer Faire and
|
||||
# you might be confused different. :-)
|
||||
#
|
||||
supernova: nuke
|
||||
@-if [ -r .code_anal ]; then \
|
||||
${RM} -f .code_anal_v4; \
|
||||
else \
|
||||
echo "We are not expected to understand that"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
deep_magic:
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --deep_magic 2ed3582ec5c094a093fea2a6bcb9f19439892873c9cc45ed1ceaafe08b7d52e1b2c7cd524be3b0b2 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "Park different"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
magic: deep_magic
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --mode 391581 --level 216193 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "These aren't the primes you're looking for Paul Erdos!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*@@@sssss8]][[[[a#@@sss0['w}8|v}a<{av}a@{av}j>~{v}j8|c[sa?|{8[|#~}
|
||||
[j#@ra>~}sa!{>}|#r0l}sao8}[a'f8|r'8[j?x[?@<[j?@[j?@[s?>|;[[[j!>b'8'a@<cb@>?
|
||||
c$kg_@<b#0pf<#keab{_b0|c0#d#0#|'o{i<!8dr,f_{#rg{baiderh{er0}|'{0{ic.df?'o|j{lim
|
||||
0'{i?#c0b|c#kg!}r!8lp1g!|i_ar<[#0g|h_}ieg>|_ah|sr<|i[[[}s#f@}[{@u~~~r@[|#|{ssss{a
|
||||
}|0~{?}|<{?}|qj?}s@[_}j0]][[[[a_@@@sssss<[[?>=sln5+a[so#,g-0aw;#*a>*abwa.*+da9=n?<6
|
||||
-'7%71>e_?>a[j;e=;scdet?>shd??a;5&6:=[ch@aw[sf;[#<[[j>k7__?>>d>==n'6+7*abcdnh3a_jhw
|
||||
b6;73;b#<ww<7bcw7d+;&i=cn?c>=#d5;8w3;nawn#<;;77__ra?8hi1abcww#>==<[;k7[wn7[=,>ab[a@s[
|
||||
='b,.[8.?>>fdjn(_2$a8c8[[j_8.=B6+b8]]]]]]]]]j1;7_sj<[[af;7sjd][j_<7!=a>d7_j8d.ab[hybm
|
||||
?>=;ei7aws1d!ebn _,?>0aka[#;5+7
|
||||
!?ac;7_wa7{;a3_ bjcna>a<;bs8;7
|
||||
j-=cabh?97_sj[' -5*j[!;5+a7[1wb[!wBb7w?0wb
|
||||
_?an+&e_|j'4a<7 0v;7d.kd8wa?.=:a-wwm=:;[e5
|
||||
*-=fwn7rab[c.j# eaw#c>>>bml;mtdekssae
|
||||
zqtd[39<u_char* p=$,w[13997],*h=w,
|
||||
*q,*r_****_;#in clude_*ioccc*2
|
||||
013*_<stdio.h>_ *--2013-ioc
|
||||
cc-2013-ioccc-2 013-- *_#define
|
||||
@n(d);c ((d)>
|
||||
>8);c (
|
||||
d
|
||||
);*B= 32;B[ y=1]=22 .627400; B[2]=16;_*-i occc-2013 -ioccc
|
||||
-2013-io ccc-201 *_int@a,b,d,e,s,t ,g,z,y;double@f, B[3],i,j,k,l;void
|
||||
@m(int@z){f or(j=k= l=y=1;y<99;y+=2+0) l*=z*z* .038553 ,k*=-y*(y+1),j+=l_
|
||||
k;i*=j;}int@c( int@d){ return@ putchar (d)_255; }intmain (){for( ;*p;p++
|
||||
)*p<33?0:(*h++=*p -32);q= h;for(p =w;p<w +823;p++)for(d=*p-56 ,e=-1+ 0;++e<(
|
||||
d<00?5:d<6?d>4?160:30 :d>35?2 7<<(d-3 6):d_9* 6);q++)*q=d<0?*p>>e& 1:d<6|| q[d>35?
|
||||
-108:d%9*-12-12];for(q=h ;g++<61 56;q++)* q?*q=*p- 4?e=*p+ +,e-32?e:0:r&&*r?g
|
||||
%108<2?2:*r++:(r=r?p++:w, 2):0;n( g=8*8187)n(g+8)n(1 6)n(19014)n(18758) ;for(;s<10;s++)c(
|
||||
s<3?s:0)n(g+3)n (67)for (;t<65;)c(t++>0) n(g-24)n(11)c(8 )n(612)n(656)n(
|
||||
257)n(4352)n(g+ 0-20)n( 5*42);; for(;y ++<207;)c( y<3 1?y<19?
|
||||
y>6:30-y:y<47?y <32||y>36? 16:0:y< 48?2:y%1 6*16+13-
|
||||
y_16)n(64*960)n (g+5)n(4)n( 1)n(g+2 )n(8)n(257)n(0)n(
|
||||
2*8064)for(;b<4 04096;b++ ){e=32< a?63-a:a;for(f
|
||||
=d=t=s=0;e>t;)e
|
||||
-=++t;e=t%2?e:t -e;;;for(d=a>3
|
||||
1?e=7-e,14-t-e: t-e;s<64;t=f-=
|
||||
i*B[!d+!e])z=b_ 64%82*8+s_8-4,
|
||||
y=b_5248*8+s%8+7 ,i=z<0||z>647||
|
||||
y%11>9?1:q[h[z_6+y_11*108]*60+y%11*6+z%6]*2-1,m(s_8*2*d+d),m(s++%8*2*e+e);s=2+t*t;;fo
|
||||
r(d=2;s>3;s_=4)d*=2;;s=8<<(a?12:9);s-=d*2<<!!a*4;s|=t>0?t:t-1+d;c(s_256)?c(0):0;c(s)?
|
||||
c(0):0;if(a++>62){n(g-8+b_64%8)a=0;}}n(g+1)return@0+0;}*/ /*IOCCC*/#include<stdio.h>
|
||||
char*p,w[13997],*h=w,*q,*r;int d,e,g;int main(){for(;e<3583;e++>15&&e<3582&&d>32?*h
|
||||
++=d-95?d:47:0)d=getchar();q=h;for(p=w;p<w+823;p++)for(d=*p-88,e=-1;++e<(d<0?5:d<
|
||||
6?d>4?160:30:d>35?27<<(d-36):d/9*6);q++)*q=d<0?*p>>e&1:d<6||q[d>35?-108:d%9*-12
|
||||
-12];for(q=h+108;g++<5995;)putchar(g%109<1?10:*q++?*p-36?(e=*p++)-64?e:32:r
|
||||
/*IOCCC2013*/&&*r?g%109%108<2?34:*r++:(r=r?p++:w,34):32);return 0;}
|
||||
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css">
|
||||
<title>Most recyclable</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Most recyclable</h1>
|
||||
|
||||
<p>Yusuke Endoh<br>
|
||||
<a href="mailto:mame@ruby-lang.org">mame@ruby-lang.org</a><br>
|
||||
<a href="https://github.com/mame/">https://github.com/mame/</a></p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To build:</h3>
|
||||
|
||||
<pre><code>make endoh2
|
||||
</code></pre>
|
||||
|
||||
<h3>To run:</h3>
|
||||
|
||||
<pre><code> make all
|
||||
</code></pre>
|
||||
|
||||
<p>You’ll need to have Ruby installed to run all the automated check</p>
|
||||
|
||||
<pre><code>make check
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>cat jpeg.c
|
||||
</code></pre>
|
||||
|
||||
<p>Look at jpeg.jpg in an image viewer program.</p>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>This is a program which, when fed its own source, generates a program that almost is its whitespace inverse,
|
||||
which, in its order, generates a JPEG file (speaking of file size abuse, that is about 16.4 times
|
||||
larger than a PBM file with the same image, but the source was also abusing the size counting program…)</p>
|
||||
|
||||
<p>Don’t pay attention to the OCR <del>behind the ruby curtain</del> — it’s a straightforward bitmap comparison.</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h3>Highlights</h3>
|
||||
|
||||
<ul>
|
||||
<li>LZ77-like compression for font and template data</li>
|
||||
<li>tiny JPEG encoder
|
||||
|
||||
<ul>
|
||||
<li>Zig-zag space-filling curve</li>
|
||||
<li>Discrete cosine transform</li>
|
||||
<li>JPEG Huffman encoding (cheeting)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Notes</h3>
|
||||
|
||||
<p>I picked JPEG instead of PNG, GIF, or BMP
|
||||
because it is the most difficult to generate.
|
||||
I believe that the JPEG encoder is the world’s smallest ever.
|
||||
Nevertheless, the program was too big to meet the IOCCC’s size rule.
|
||||
So I created a smaller bootstrap program that generates the main program.
|
||||
<code>prog.c</code> contains fragments of the main program <em>as a comment</em>
|
||||
which <code>iocccsize -i</code> does <em>not</em> count.
|
||||
I gratefully think the judges for spoiling the size rule this year.</p>
|
||||
|
||||
<p>I think the program will work on any major platforms and compilers.</p>
|
||||
|
||||
<h3>Legal</h3>
|
||||
|
||||
<p>This program uses (a part of) Proggy Tiny Fonts
|
||||
which is distributed in MIT License:</p>
|
||||
|
||||
<pre><code>Copyright (c) 2004, 2005 Tristan Grimmer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</code></pre>
|
||||
|
||||
<hr />
|
||||
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2015,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,90 @@
|
||||
# Most recyclable
|
||||
|
||||
Yusuke Endoh
|
||||
<mame@ruby-lang.org>
|
||||
<https://github.com/mame/>
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
### To build:
|
||||
|
||||
make endoh2
|
||||
|
||||
### To run:
|
||||
|
||||
make all
|
||||
|
||||
You'll need to have Ruby installed to run all the automated check
|
||||
|
||||
make check
|
||||
|
||||
### Try:
|
||||
|
||||
cat jpeg.c
|
||||
|
||||
Look at jpeg.jpg in an image viewer program.
|
||||
|
||||
|
||||
### Selected Judges Remarks:
|
||||
|
||||
This is a program which, when fed its own source, generates a program that almost is its whitespace inverse,
|
||||
which, in its order, generates a JPEG file (speaking of file size abuse, that is about 16.4 times
|
||||
larger than a PBM file with the same image, but the source was also abusing the size counting program...)
|
||||
|
||||
Don't pay attention to the OCR ~~behind the ruby curtain~~ --- it's a straightforward bitmap comparison.
|
||||
|
||||
## Author's comments:
|
||||
### Highlights
|
||||
|
||||
* LZ77-like compression for font and template data
|
||||
* tiny JPEG encoder
|
||||
* Zig-zag space-filling curve
|
||||
* Discrete cosine transform
|
||||
* JPEG Huffman encoding (cheeting)
|
||||
|
||||
### Notes
|
||||
|
||||
I picked JPEG instead of PNG, GIF, or BMP
|
||||
because it is the most difficult to generate.
|
||||
I believe that the JPEG encoder is the world's smallest ever.
|
||||
Nevertheless, the program was too big to meet the IOCCC's size rule.
|
||||
So I created a smaller bootstrap program that generates the main program.
|
||||
`prog.c` contains fragments of the main program *as a comment*
|
||||
which `iocccsize -i` does *not* count.
|
||||
I gratefully think the judges for spoiling the size rule this year.
|
||||
|
||||
I think the program will work on any major platforms and compilers.
|
||||
|
||||
### Legal
|
||||
|
||||
This program uses (a part of) Proggy Tiny Fonts
|
||||
which is distributed in MIT License:
|
||||
|
||||
Copyright (c) 2004, 2005 Tristan Grimmer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
@@ -0,0 +1,43 @@
|
||||
Font = {
|
||||
0x000000000000000 => 32, 0x008208208008000 => 33, 0x514500000000000 => 34,
|
||||
0x00053e514f94000 => 35, 0x0087a870af08000 => 36, 0x00046a50a562000 => 37,
|
||||
0x01892462589d000 => 38, 0x208200000000000 => 39, 0x108410410408100 => 40,
|
||||
0x408104104108400 => 41, 0x00022a72a200000 => 42, 0x000208f88200000 => 43,
|
||||
0x000000000008400 => 44, 0x000000f80000000 => 45, 0x000000000008000 => 46,
|
||||
0x082104208410800 => 47, 0x01c8a2aa289c000 => 48, 0x00860820821c000 => 49,
|
||||
0x01c88231083e000 => 50, 0x01c88230289c000 => 51, 0x00431493e104000 => 52,
|
||||
0x03e820f0289c000 => 53, 0x00c420f2289c000 => 54, 0x03e084108210000 => 55,
|
||||
0x01c8a272289c000 => 56, 0x01c8a2782118000 => 57, 0x000008000200000 => 58,
|
||||
0x000008000210000 => 59, 0x00008cc0c080000 => 60, 0x00003e03e000000 => 61,
|
||||
0x000818198800000 => 62, 0x01c882108008000 => 63, 0x01e86db6f81f000 => 64,
|
||||
0x00821451c8a2000 => 65, 0x03c8a2f228bc000 => 66, 0x01c8a082089c000 => 67,
|
||||
0x0389228a2938000 => 68, 0x03e820f2083e000 => 69, 0x03e820f20820000 => 70,
|
||||
0x01c8a09a289e000 => 71, 0x0228a2fa28a2000 => 72, 0x01c20820821c000 => 73,
|
||||
0x00e0820820bc000 => 74, 0x022928c28922000 => 75, 0x02082082083e000 => 76,
|
||||
0x0228b6daaaa2000 => 77, 0x032caaaaa9a6000 => 78, 0x01c8a28a289c000 => 79,
|
||||
0x03c8a2f20820000 => 80, 0x01c8a28a299e000 => 81, 0x03c8a2f228a2000 => 82,
|
||||
0x01c8a070289c000 => 83, 0x03e208208208000 => 84, 0x0228a28a289c000 => 85,
|
||||
0x0228a2514208000 => 86, 0x022aaaa94514000 => 87, 0x0228942148a2000 => 88,
|
||||
0x0228a2708208000 => 89, 0x03e08421083e000 => 90, 0x710410410410700 => 91,
|
||||
0x820410208104080 => 92, 0x704104104104700 => 93, 0x008522000000000 => 94,
|
||||
0x000000000000fc0 => 95, 0x008100000000000 => 96, 0x00001c09e89e000 => 97,
|
||||
0x82083c8a28bc000 => 98, 0x00001e82081e000 => 99, 0x08209e8a289e000 => 100,
|
||||
0x00001c8be81e000 => 101, 0x39043c410410000 => 102, 0x00001c8a289e09c => 103,
|
||||
0x82083c8a28a2000 => 104, 0x008018208208000 => 105, 0x00400c104104138 => 106,
|
||||
0x410412518512000 => 107, 0x608208208208000 => 108, 0x000034aaaaaa000 => 109,
|
||||
0x00003c8a28a2000 => 110, 0x00001c8a289c000 => 111, 0x00003c8a28bc820 => 112,
|
||||
0x00001e8a289e082 => 113, 0x00002cca0820000 => 114, 0x00001e81c0bc000 => 115,
|
||||
0x01041c41040e000 => 116, 0x0000228a289e000 => 117, 0x000022894508000 => 118,
|
||||
0x000022aaa514000 => 119, 0x000022508522000 => 120, 0x0000228a289e09c => 121,
|
||||
0x00003e10843e000 => 122, 0x108208408208100 => 123, 0x208208208208200 => 124,
|
||||
0x408208108208400 => 125, 0x000000666000000 => 126
|
||||
}
|
||||
|
||||
field = IO.popen("convert #{ ARGV[0] } gray:-") {|f| f.read }
|
||||
field = field.unpack("C*").map {|n| n >= 0x80 ? 1 : 0 }.each_slice(656).to_a
|
||||
55.times do |y|
|
||||
108.times do |x|
|
||||
print Font[(0..9).map {|j| field[y*11+j+4][x*6+4,6] }.join.to_i(2)].chr
|
||||
end
|
||||
puts
|
||||
end
|
||||
Reference in new issue
Block a user