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,405 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2018 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
|
||||
BUNZIP2= bunzip2
|
||||
GZIP_PROG= gzip
|
||||
BZIP2= bzip2
|
||||
CURL= curl
|
||||
DD= dd
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
MKDIR= mkdir
|
||||
MV= mv
|
||||
TR= tr
|
||||
GREP= grep
|
||||
SORT= sort
|
||||
UNIQ= uniq
|
||||
STRIP= strip
|
||||
|
||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||
#
|
||||
#X11_LIBDIR= /usr/X11R6/lib
|
||||
#X11_LIBDIR= /usr/X11/lib
|
||||
X11_LIBDIR= /opt/X11/lib
|
||||
|
||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||
#
|
||||
#X11_INCDIR= /usr/X11R6/include
|
||||
#X11_INCDIR= /usr/X11/include
|
||||
X11_INCDIR= /opt/X11/include
|
||||
|
||||
# Compiler warnings
|
||||
#
|
||||
#CWARN=
|
||||
#CWARN= -Wall
|
||||
#CWARN= -Wall -Wextra
|
||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||
#CWARN= -Wall -Wextra -Weverything
|
||||
#CWARN= -Wall -Wextra -Weverything -pedantic
|
||||
#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
|
||||
|
||||
# Silence warnings that ${CWARN} would normally complain about
|
||||
#
|
||||
CSILENCE=
|
||||
#CSILENCE= -Wno-implicit-int
|
||||
|
||||
# compiler standard
|
||||
#
|
||||
#CSTD=
|
||||
#CSTD= -ansi
|
||||
CSTD= -std=c11
|
||||
|
||||
# compiler bit architecture
|
||||
#
|
||||
# Some entries require 32-bitness:
|
||||
# ARCH= -m32
|
||||
#
|
||||
# Some entries require 64-bitness:
|
||||
# ARCH= -m64
|
||||
#
|
||||
# By default we assume nothing:
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# defines that are needed to compile
|
||||
#
|
||||
CDEFINE=
|
||||
#CDEFINE= -DIOCCC=25
|
||||
|
||||
# include files that are needed to compile
|
||||
#
|
||||
CINCLUDE=
|
||||
#CINCLUDE= -include stdlib.h
|
||||
#CINCLUDE= -include stdio.h
|
||||
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||
#CINCLUDE= -I ${X11_INCDIR}
|
||||
|
||||
# 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.
|
||||
# Reasonable compilers will allow for -O3.
|
||||
#
|
||||
#OPT=
|
||||
#OPT= -O
|
||||
#OPT= -O1
|
||||
#OPT= -O2
|
||||
OPT= -O3
|
||||
|
||||
# default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS=
|
||||
#LIBS= -L ${X11_LIBDIR}
|
||||
|
||||
# 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
|
||||
##############################
|
||||
#
|
||||
OBJ= prog.o
|
||||
DATA=
|
||||
TARGET= left right shift msg0 msg1 msg2
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
#
|
||||
all: ${TARGET} ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
left: prog.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
right: generated1.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
shift: generated2.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
msg0: generated3.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
msg1: generated4.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
msg2: generated5.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
generated1.c: prog.c left
|
||||
@${RM} -f $@
|
||||
./left < $< > $@
|
||||
|
||||
generated2.c: prog.c right
|
||||
@${RM} -f $@
|
||||
./right < $< > $@
|
||||
|
||||
generated3.c: prog.c left
|
||||
@${RM} -f $@
|
||||
./left < $< | ./left > $@
|
||||
|
||||
generated4.c: prog.c left shift
|
||||
@${RM} -f $@
|
||||
./shift < $< | ./left > $@
|
||||
|
||||
generated5.c: prog.c right shift
|
||||
@${RM} -f $@
|
||||
./shift < $< | ./right > $@
|
||||
|
||||
############
|
||||
# spoilers #
|
||||
############
|
||||
|
||||
spoiler: spoilers
|
||||
|
||||
spoilers:
|
||||
@echo "Really show spoilers? Please build this target to confirm:"
|
||||
@echo " i_give_up_show_me_the_spoilers"
|
||||
|
||||
i_give_up_show_me_the_spoilers: msg3 msg4 msg5 msg6 msg7 msg8 msg9
|
||||
|
||||
msg3: generated6.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg4: generated7.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg5: generated8.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg6: generated9.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg7: generated10.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg8: generated11.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg9: generated12.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
generated6.c: prog.c right left shift
|
||||
@${RM} -f $@
|
||||
./right < $< | ./shift | ./left > $@
|
||||
|
||||
generated7.c: prog.c right shift
|
||||
@${RM} -f $@
|
||||
./shift < $< | ./right | ./shift | ./right > $@
|
||||
|
||||
generated8.c: generated7.c right left shift
|
||||
@${RM} -f $@
|
||||
./shift < $< | ./right | ./shift | ./left > $@
|
||||
|
||||
generated9.c: generated8.c right shift
|
||||
@${RM} -f $@
|
||||
./right < $< | ./right | ./shift | ./right | ./shift | ./right > $@
|
||||
|
||||
generated10.c: generated9.c right left shift
|
||||
@${RM} -f $@
|
||||
./shift < $< | ./right | ./shift | ./left > $@
|
||||
|
||||
generated11.c: generated10.c right shift
|
||||
@${RM} -f $@
|
||||
./right < $< | ./right | ./shift | ./right | ./shift | ./right > $@
|
||||
|
||||
generated12.c: msg7
|
||||
./msg7 > $@
|
||||
|
||||
####################################
|
||||
# spoilers for the truly_impatient #
|
||||
####################################
|
||||
|
||||
spoiler_for_the_truly_impatient: i_just_want_to_see_the_final_message
|
||||
|
||||
i_just_want_to_see_the_final_message: msg11.txt
|
||||
@cat $<
|
||||
|
||||
msg11.txt: msg11 prog.c
|
||||
@${RM} -f $@
|
||||
./$< < prog.c > $@
|
||||
|
||||
msg10: generated13.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
msg11: generated14.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
generated13.c: prog.c left shift
|
||||
./left < $< | ./left | ./left | ./shift | ./left | ./shift | ./left | ./shift | ./left > $@
|
||||
|
||||
generated14.c: prog.c msg10
|
||||
./msg10 < $< > $@
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
everything: all alt
|
||||
|
||||
clean:
|
||||
${RM} -f ${OBJ} ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -f generated*.c msg*
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
echo 'ate sandwich'; \
|
||||
fi
|
||||
|
||||
nuke: clobber
|
||||
@${TRUE}
|
||||
|
||||
dist_clean: nuke
|
||||
@${TRUE}
|
||||
|
||||
install:
|
||||
@echo "Surely you are performing, Dr. May!"
|
||||
@${TRUE}
|
||||
|
||||
# backwards compatibility
|
||||
#
|
||||
build: all
|
||||
@${TRUE}
|
||||
|
||||
|
||||
##################
|
||||
# 133t hacker rulz
|
||||
##################
|
||||
#
|
||||
love:
|
||||
@echo 'not war?'
|
||||
@${TRUE}
|
||||
|
||||
haste:
|
||||
$(MAKE) waste
|
||||
@${TRUE}
|
||||
|
||||
waste:
|
||||
@echo 'haste'
|
||||
@${TRUE}
|
||||
|
||||
make:
|
||||
@echo 'Attend a maker faire'
|
||||
@${TRUE}
|
||||
|
||||
easter_egg:
|
||||
@echo you expected to often mis-understand this $${RANDOM} magic
|
||||
@echo chongo '<was here>' "/\\oo/\\"
|
||||
@echo Eggy
|
||||
|
||||
fabricate fashion form frame manufacture produce: make
|
||||
@${TRUE}
|
||||
|
||||
sandwich:
|
||||
@if [ `id -u` -eq 0 ]; then \
|
||||
echo 'Okay.'; \
|
||||
echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
|
||||
else \
|
||||
echo 'What? Make it yourself.'; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# 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_v6; \
|
||||
else \
|
||||
echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
|
||||
fi
|
||||
@echo A $@ helps ${MAKE} the elements that help form planets
|
||||
@${TRUE}
|
||||
|
||||
deep_magic:
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --deep_magic 3a3fabb90892eeb2f610ae0f74a35a970060665a063ab702bd686c17c4ae07f6 --FNV1a_hash_256_bit "prog"; \
|
||||
else \
|
||||
echo "Wrong! Do it again!"; \
|
||||
sleep 2; \
|
||||
echo "Wrong! Do it again!"; \
|
||||
sleep 2; \
|
||||
echo "Wrong! Do it again!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
magic: deep_magic
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --mode 216091 --level 216193 --FNV1a_hash_256_bit "prog"; \
|
||||
else \
|
||||
echo "If you don't eat yer meat, you can't have any pudding!"; \
|
||||
echo "How can you have any pudding if you don't eat yer meat?!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
# The IOCCC resident astronomer states
|
||||
#
|
||||
charon: supernova
|
||||
@echo $@ is a dwarf planet
|
||||
@echo dwarf is a type of planet
|
||||
@echo $@ is a planet
|
||||
|
||||
pluto: supernova
|
||||
${MAKE} charon
|
||||
@echo $@ is a dwarf planet
|
||||
@echo dwarf is a type of planet
|
||||
@echo $@ is a planet
|
||||
@echo get used to having lots of planets because a $< can ${MAKE} a lot of them
|
||||
@@ -0,0 +1,197 @@
|
||||
<!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 shifty</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Most shifty</h1>
|
||||
|
||||
<p>Don Yang<br>
|
||||
<a href="http://uguu.org/">http://uguu.org/</a></p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To use:</h3>
|
||||
|
||||
<pre><code>make
|
||||
more generated1.c
|
||||
more generated2.c
|
||||
more generated3.c
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>make
|
||||
./left < prog.c
|
||||
./right < prog.c
|
||||
./left < prog.c | ./left
|
||||
|
||||
./shift < prog.c
|
||||
|
||||
./msg0
|
||||
./msg1
|
||||
./msg2
|
||||
</code></pre>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>Code should be readable in any direction! This tool will help you rotate your
|
||||
code so you don’t have to stare at it sideways or even upside down. Rotating
|
||||
this program left and recompiling will reveal other tools including a right rotate
|
||||
and a shift program.</p>
|
||||
|
||||
<p>Strange things happen when the world is upside down! It is entirely possible
|
||||
that this is remark is completely misleading.</p>
|
||||
|
||||
<p>What exactly does the shift program do?</p>
|
||||
|
||||
<p>Like a great sliding puzzle (hint) this entry has 6 more programs that will
|
||||
reveal messages and one more tool that can be used to reveal the final
|
||||
message hidden in the original source. All of these can be created using
|
||||
combinations of ./left, ./right and ./shift and the additionally generated
|
||||
programs.</p>
|
||||
|
||||
<p>The final message can be revealed using</p>
|
||||
|
||||
<pre><code>./msg9 < prog.c
|
||||
</code></pre>
|
||||
|
||||
<p>But what combinations will generate ./msg3, ./msg4, ./msg5, ./msg6, ./msg7,
|
||||
./msg8 and finally ./msg9?</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h1>Tools usage</h1>
|
||||
|
||||
<p>Nuko is a text rotator: given some text in stdin, Nuko will write the
|
||||
same text to stdout, but rotated 90 degrees counterclockwise.</p>
|
||||
|
||||
<pre><code>gcc prog.c -o left
|
||||
./left < input.txt > rotated_counterclockwise.txt
|
||||
</code></pre>
|
||||
|
||||
<p>Due to static memory allocation, only the first 1K columns by 1K rows
|
||||
are rotated, the rest are silently ignored. But fear not, a separate
|
||||
tool with dynamic memory allocation is included:</p>
|
||||
|
||||
<pre><code>./left < prog.c > r1.c
|
||||
gcc r1.c -o right
|
||||
./right < input.txt > rotated_clockwise.txt
|
||||
</code></pre>
|
||||
|
||||
<p>For variety, this second tool rotates clockwise instead of
|
||||
counterclockwise. Also, it can handle files larger than 1024x1024,
|
||||
depending on how much memory you got.</p>
|
||||
|
||||
<p>Of course we wouldn’t stop with just two rotations, if we continue to
|
||||
rotate counterclockwise once more, we get another program. This
|
||||
program outputs a single message to stdout, which is the name of the
|
||||
series that Nuko came from.</p>
|
||||
|
||||
<pre><code>./left < prog.c | ./left > r2.c
|
||||
gcc r2.c -o msg0
|
||||
./msg0
|
||||
</code></pre>
|
||||
|
||||
<p>There is one final rotation, which produces a tool that removes
|
||||
leading whitespaces:</p>
|
||||
|
||||
<pre><code>./left < prog.c | ./left | ./left > r3.c
|
||||
gcc r3.c -o shift
|
||||
./shift < input.txt > no_leading_space.txt
|
||||
</code></pre>
|
||||
|
||||
<p>Where this might be useful, besides ruining the formatting of certain
|
||||
files, is that it completes the set of tools needed to solve the
|
||||
puzzle that is embedded in prog.c</p>
|
||||
|
||||
<h1>Puzzle box</h1>
|
||||
|
||||
<p>Notice how the edges of prog.c contain two notches. By rotating
|
||||
prog.c and removing leading space, the code would be shifted one space
|
||||
toward one of those notches (and creating a new notch on the other
|
||||
side). This shifted code behaves slightly different from the original
|
||||
program. For example, here are two more messages that can be
|
||||
produced:</p>
|
||||
|
||||
<pre><code>./shift < prog.c | ./right > msg1.c && gcc msg1.c -o msg1 && ./msg1
|
||||
./shift < prog.c | ./left > msg2.c && gcc msg2.c -o msg2 && ./msg2
|
||||
</code></pre>
|
||||
|
||||
<p>In total, there are 9 embedded strings that can be produced via a
|
||||
sequence of rotates and shifts, one of which can be used to extract
|
||||
the 10th final string from prog.c. The intent is to simulate those
|
||||
wooden puzzle boxes that can be opened by pushing and shifting various
|
||||
well-concealed seams. Thus, finding the correct sequence of rotates
|
||||
and shifts is left as an exercise to the reader (but if you are really
|
||||
lazy, just read the Makefile).</p>
|
||||
|
||||
<p>Source code for all the tools needed to solve this puzzle are embedded
|
||||
in prog.c, all you need is a C compiler.</p>
|
||||
|
||||
<h1>Features</h1>
|
||||
|
||||
<ul>
|
||||
<li><p> Code compiles when rotated 4 ways. This required a bit of
|
||||
patience to achieve. Code still compiles even with one column of
|
||||
text shifted. This required even more patience.</p></li>
|
||||
<li><p> All rotated and shifted variants compiles without warnings. This
|
||||
involves various tweaks to satisfy cases where compiler is overly
|
||||
protective, including but not limited to the “1125” at line 4 as
|
||||
opposed to “1025”, to satisfy -Waggresive-loop-optimizations.</p></li>
|
||||
<li><p> CRC32 of the code is embedded in the code itself.</p></li>
|
||||
<li><p> Process for writing prog.c is available in spoiler.html</p></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>Compatibility</h1>
|
||||
|
||||
<p>Nuko and the rotated tools accepts only ASCII files where each
|
||||
character maps to exactly one byte. Also, end-of-line sequence is
|
||||
assumed to be LF only, as opposed to CR-LF. All control characters
|
||||
are treated like normal printable characters, so files containing tabs
|
||||
will look weird after rotation, for example.</p>
|
||||
|
||||
<p>Nuko has been verified to work with these compiler / OS combinations:</p>
|
||||
|
||||
<ul>
|
||||
<li> gcc 4.8.4 on Linux</li>
|
||||
<li> gcc 4.9.2 on Linux</li>
|
||||
<li> gcc 6.1.0 on JS/Linux</li>
|
||||
<li> gcc 6.3.0 on Linux</li>
|
||||
<li> gcc 6.4.0 on Cygwin</li>
|
||||
<li> clang 3.5.0 on Linux</li>
|
||||
<li> clang 3.8.1 on Linux</li>
|
||||
<li> clang 5.0.1 on Cygwin</li>
|
||||
<li> tcc 0.9.25 on JS/Linux</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Nuko compiles without warnings with all compilers above, even with
|
||||
“-Wall -Wextra -pedantic” for gcc and clang.</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<!--
|
||||
(c) Copyright 1984-2018, [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-2018,
|
||||
<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,162 @@
|
||||
# Most shifty
|
||||
|
||||
Don Yang
|
||||
<http://uguu.org/>
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
### To use:
|
||||
|
||||
make
|
||||
more generated1.c
|
||||
more generated2.c
|
||||
more generated3.c
|
||||
|
||||
### Try:
|
||||
|
||||
make
|
||||
./left < prog.c
|
||||
./right < prog.c
|
||||
./left < prog.c | ./left
|
||||
|
||||
./shift < prog.c
|
||||
|
||||
./msg0
|
||||
./msg1
|
||||
./msg2
|
||||
|
||||
### Selected Judges Remarks:
|
||||
|
||||
Code should be readable in any direction! This tool will help you rotate your
|
||||
code so you don't have to stare at it sideways or even upside down. Rotating
|
||||
this program left and recompiling will reveal other tools including a right rotate
|
||||
and a shift program.
|
||||
|
||||
Strange things happen when the world is upside down! It is entirely possible
|
||||
that this is remark is completely misleading.
|
||||
|
||||
What exactly does the shift program do?
|
||||
|
||||
Like a great sliding puzzle (hint) this entry has 6 more programs that will
|
||||
reveal messages and one more tool that can be used to reveal the final
|
||||
message hidden in the original source. All of these can be created using
|
||||
combinations of ./left, ./right and ./shift and the additionally generated
|
||||
programs.
|
||||
|
||||
The final message can be revealed using
|
||||
|
||||
./msg9 < prog.c
|
||||
|
||||
But what combinations will generate ./msg3, ./msg4, ./msg5, ./msg6, ./msg7,
|
||||
./msg8 and finally ./msg9?
|
||||
|
||||
## Author's comments:
|
||||
# Tools usage
|
||||
|
||||
Nuko is a text rotator: given some text in stdin, Nuko will write the
|
||||
same text to stdout, but rotated 90 degrees counterclockwise.
|
||||
|
||||
gcc prog.c -o left
|
||||
./left < input.txt > rotated_counterclockwise.txt
|
||||
|
||||
Due to static memory allocation, only the first 1K columns by 1K rows
|
||||
are rotated, the rest are silently ignored. But fear not, a separate
|
||||
tool with dynamic memory allocation is included:
|
||||
|
||||
./left < prog.c > r1.c
|
||||
gcc r1.c -o right
|
||||
./right < input.txt > rotated_clockwise.txt
|
||||
|
||||
For variety, this second tool rotates clockwise instead of
|
||||
counterclockwise. Also, it can handle files larger than 1024x1024,
|
||||
depending on how much memory you got.
|
||||
|
||||
Of course we wouldn't stop with just two rotations, if we continue to
|
||||
rotate counterclockwise once more, we get another program. This
|
||||
program outputs a single message to stdout, which is the name of the
|
||||
series that Nuko came from.
|
||||
|
||||
./left < prog.c | ./left > r2.c
|
||||
gcc r2.c -o msg0
|
||||
./msg0
|
||||
|
||||
There is one final rotation, which produces a tool that removes
|
||||
leading whitespaces:
|
||||
|
||||
./left < prog.c | ./left | ./left > r3.c
|
||||
gcc r3.c -o shift
|
||||
./shift < input.txt > no_leading_space.txt
|
||||
|
||||
Where this might be useful, besides ruining the formatting of certain
|
||||
files, is that it completes the set of tools needed to solve the
|
||||
puzzle that is embedded in prog.c
|
||||
|
||||
# Puzzle box
|
||||
|
||||
Notice how the edges of prog.c contain two notches. By rotating
|
||||
prog.c and removing leading space, the code would be shifted one space
|
||||
toward one of those notches (and creating a new notch on the other
|
||||
side). This shifted code behaves slightly different from the original
|
||||
program. For example, here are two more messages that can be
|
||||
produced:
|
||||
|
||||
./shift < prog.c | ./right > msg1.c && gcc msg1.c -o msg1 && ./msg1
|
||||
./shift < prog.c | ./left > msg2.c && gcc msg2.c -o msg2 && ./msg2
|
||||
|
||||
In total, there are 9 embedded strings that can be produced via a
|
||||
sequence of rotates and shifts, one of which can be used to extract
|
||||
the 10th final string from prog.c. The intent is to simulate those
|
||||
wooden puzzle boxes that can be opened by pushing and shifting various
|
||||
well-concealed seams. Thus, finding the correct sequence of rotates
|
||||
and shifts is left as an exercise to the reader (but if you are really
|
||||
lazy, just read the Makefile).
|
||||
|
||||
Source code for all the tools needed to solve this puzzle are embedded
|
||||
in prog.c, all you need is a C compiler.
|
||||
|
||||
# Features
|
||||
|
||||
- Code compiles when rotated 4 ways. This required a bit of
|
||||
patience to achieve. Code still compiles even with one column of
|
||||
text shifted. This required even more patience.
|
||||
|
||||
- All rotated and shifted variants compiles without warnings. This
|
||||
involves various tweaks to satisfy cases where compiler is overly
|
||||
protective, including but not limited to the "1125" at line 4 as
|
||||
opposed to "1025", to satisfy -Waggresive-loop-optimizations.
|
||||
|
||||
- CRC32 of the code is embedded in the code itself.
|
||||
|
||||
- Process for writing prog.c is available in spoiler.html
|
||||
|
||||
# Compatibility
|
||||
|
||||
Nuko and the rotated tools accepts only ASCII files where each
|
||||
character maps to exactly one byte. Also, end-of-line sequence is
|
||||
assumed to be LF only, as opposed to CR-LF. All control characters
|
||||
are treated like normal printable characters, so files containing tabs
|
||||
will look weird after rotation, for example.
|
||||
|
||||
Nuko has been verified to work with these compiler / OS combinations:
|
||||
|
||||
- gcc 4.8.4 on Linux
|
||||
- gcc 4.9.2 on Linux
|
||||
- gcc 6.1.0 on JS/Linux
|
||||
- gcc 6.3.0 on Linux
|
||||
- gcc 6.4.0 on Cygwin
|
||||
- clang 3.5.0 on Linux
|
||||
- clang 3.8.1 on Linux
|
||||
- clang 5.0.1 on Cygwin
|
||||
- tcc 0.9.25 on JS/Linux
|
||||
|
||||
Nuko compiles without warnings with all compilers above, even with
|
||||
"-Wall -Wextra -pedantic" for gcc and clang.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
(c) Copyright 1984-2018, [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,41 @@
|
||||
#include/*nui*/<stdio.h>//;70/*#}r[3]op;f(p;ok})i[;k-r*?(rc&(o}nr**s*2)!}-mpi##
|
||||
extern int n0;typedef int x;x//i/eu2->uuo0uo=;nXfdx+1e8uOeh&k-x[e1(i)>{=eqa,nii
|
||||
n,u,k,o,_,i=1;static char//[X]/f/t]:n=t-rxt+0f[=(-=+;t)*,aa!>1=dt0pzrpi(l)idtnn
|
||||
d[1125][0x401];x main(){if(//]* nu]O[nc-(ac=;odxx1k]}u)2ulr(=00+u2=ee&fos{n,*cc
|
||||
i){for(n=0;1024>n;n++)//]Tkhng[0ur)[u[h>u)h1or];>]-=Or):=l*Ou);+r4poa&(=ep(qnll
|
||||
for(u=0x0;u<1025;)d[n][u++]=64//[n;o]ua0=)a,<(=}X;no[n{8uo)=&{i]n)?fl!!g{u)=,uu
|
||||
/2;for(u=n=0////////]_#p^#onui[/u+}+?+r;d{r/X////////////c/(&if=-)p(l(xewt{1udd
|
||||
/4;EOF!=(o=////////////]#ebdl#ah[0}n/1()////////////////////1f(k1)*ion)thsO;,ee
|
||||
getchar())// //////]u#oh[,;/////////// //////;;)2nc={ci(=ck<<
|
||||
&&u<1024;// ///////////////// ////}{:t((ihl"Nh,ss
|
||||
)u+=o-10// ///////// ///2)nifaeYUaott
|
||||
?n<1024// ////,n(r(uLr,dd
|
||||
?d[n++// @@@ ///td(EuL*Xli
|
||||
][u]=o// @ @ ///+)Or;O,io
|
||||
,k=k<// @ @ ///)Fii;xb.
|
||||
n?n:k// @ @ ///"fi,.h
|
||||
,0:0// @@@ //)(n/h>
|
||||
:!(n// //;0t/>/
|
||||
=0);// //!/|//
|
||||
for(// 5 //=/*/%
|
||||
;k--// 12 =q tni
|
||||
;)d[k// //))u/
|
||||
/01][u// //1Ni/
|
||||
/1]/*n/// //(Ui;
|
||||
>*/=!/*N// //=K~/
|
||||
h*/1,/*UN/// //nqO~*
|
||||
.*/puts/*n//// //[/?,]
|
||||
o*/(d[k])/*u////// /////// //1*q[u
|
||||
i*/;}else{//t///////////// /////////// //,stup;
|
||||
d[0][0]++;puts(/*f///////// //]====[//////// //(N tni
|
||||
ti&/N/////.///s/It]]_bz8[// ///SHOUJO\vv/////////// //;}"jvo"
|
||||
su /U/////N///t}Ue]~J#phi[// //\SHUUMATSU|]_[//////// ///,"/utf"
|
||||
<ntt/fe=)|UI0{u;Nnu]^u#j[v// //,^^\RYOKOU/:)]a#p[.// ///"c!tj!xb"
|
||||
e/ n/ilI(|/(1ep)/ *>->IOCCC// //]^#dbi#`h#anuok^u#[// ///"S","/ttfm"
|
||||
d/eit{i(rl/r-s-"/e/]o[^^^^^!/////]hfhu[Qj:FfT]uhp)~[[// ///"iuspx!fsb!tho"
|
||||
unn;n)h=a({aIl0onnt//"jiu!fmcjefoJ","/zsbdt!fsb!tobnvI!" "///","~<1!osvufs<*2"
|
||||
lriqi(w!hf)h=e1trin//".;2;1;1+*432&25\*3,o)_6)92x\sbiduvq@1=v@2:.o@4:.o),v,1/>"
|
||||
cef ;n{Fci2cl}-iufi//"v*1?**)sbidufh>o))fmjix|*)ojbn!uoj<v-o!uoj31\?i/pjeut=fe"
|
||||
ntetli)Ot{3t;}lhte}//"vmdoj$","svpU!utbM!(tmsjH"{=]041[]6[u,n*rahc;q tni nretxe
|
||||
ixdn,aqEe)-u)}=Ced;//};0+nruter;)K(U;)++n*--;n*;K=n(rof{)(niam )O,K,U(N enifed#
|
||||
#e#iIm((g)Ip ;I"r#0.[(c)2018][cffc189a]*/"Nuko");}return+0;}//>h.oidts<edulcni#
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>Replay text</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<style type="text/css">
|
||||
.tmp{color:#00f}.final{color:#000}</style>
|
||||
</head><body>
|
||||
<noscript><span style="color:red">JavaScript required</span></noscript>
|
||||
<script type="text/javascript">
|
||||
var realtime_step=80;var fps=1000/realtime_step;var current_event=0;var current_time;var step=0;var slots=new Array(227);var update_slots=new Array(slots.length);var max_time=9479000;var max_file_size=79;var timer=null;var follow=1;var fast_scroll=1;var opacity=100;var opacity_timer=null;var string_table=
|
||||
[" XXXXXX","*(XXXXXXXXX// //XXXX;i","t XXXXX// ///,n(collaer)*","i(inq;// ////////XXXXXX// /////////X*/(stup;++]0[]0[d","e iXXXXXXX/// ///))(rahcteg=o(=!","n,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXf/t]:n=t-rxt+0f[=(-=+;t)*,aa!>1=dt0pzrpi(l)idtnn","fX*XXXXXXXXXXX////// //XXXXXXXXXXXXXXXXXXXXX///XXXXXXXXXXtnno0lIa{(a=h)n;nnu",";&&XXXXXX// ///////////////// ////}{:t((ihl\"Nh,ss","=0))// //!/X//","s(t/.oX\"// //tni(=n(!&&p>2","a","rXXX/////// //{)))8*","cXXXXXX// //XXX","((XXXXXXXXX+s]/XX// ///04(=uxn[,ie","))))XXXXXX// //XXXXXo","u-XXXXXXXX// ///,1=+o;","h)aXX// //;k=]++d[n","o>=XXXXX// //XXXXXXXXXXXX","lXXXXXXXXXXXXXX/////XXXXXXXXXXXXXXXXXXXXX","d XXXXXXXXX///// /////FOE(elihw{esle}","0!(n// //;0t/>/","*******************************************************************************"," ****// ** /*****","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX///////XXXXXXXXXXXXXXXXXX","}//QQQQQQ// ///////o3dv)X","{","+)6<q //u=u,O(","p,XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXec","_","],Q/Q// ////Q*/stup/*.","XXXXXXX// //XXXXXXXXXXX","[X,*1// /////// //////X*/)]k[d(/*o","XXXXXX// //XXXXXXXXX","XXXXXXXX// //XXXXXXXXXXXX","\'/*XXXXXXXXXXX////// //XXXXXXXXXXXXXXXXXXXXX///XXXXXXXXXXtnno0lIa{(a=h)n;nnu",",,0:// /// //)(n/h>","1","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","x","width = file_size - offsets[line_count - 1];","y","-10;XXXXXXXu/X// //0<10=XX","<<XXXXXXXXXXXXXX////// //////////XXXXXXXXX////// //XXXXXXXXXX","mXXX,u// /////////// /////////////t//{esle};/*i","z","2>XXXXXXXXXXX// //XXXXXXts","XXXXXXXXX// //XXXXX","\"!XXXXXXXXXXXXXXXXXX////XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"//ifui-}lc2icF{n; fec","> rXX// //(fi;0=x}","XXXXXX// //XXXXXXXXXX","gXXXXXXXXX// //////XXXXXXX;/////////// //////;;)2nc={ci(=ck<<"," ;k--// 12 =q tni",":!(n// //;0t/>/","XXXXXXX// //XXX","for(// 5 //=/*/%","!=(XXXXXXXXXXXX/// ///XXXXXXXXie","#include<stdio.h>//; f=:,n,]??)&g//fidne#","&&u<1024;// ///////////////// ////}{:t((ihl\"Nh,ss",",0:0// /// //)(n/h>","=0);// //!/X//","?n<1024// ////,n(r(uLr,dd","XXXXXXXXX// //XXXXXX","extern int X0;typedef int x;x//i/eu2->uuo0uo=;nXfdx+1e8uOeh&k-x[e1(i)>{=eqa,nii"," /* Record current of","#define t &0/////]1dkr)(:n=u[<+ut;;r{1utn","(q){while//]lks**//// ////412r!(0(]o d",",k=k<// / / ///)Fii;xb.","/4;EOF!=(o=////////////XXXXXXXXXX0}n/1()////////////////////1f(k1)*ion)thsO;,ee",":!!(// //;0t/>/",";}}}else{//s/// 2 //02];;*","?1024>X// ////,n(r(uLr,dd","?d[n++// /// ///td(EuL*Xli","I-32){//XXXp/*// //==u;4i X","XXXXX// //XXXXXXXX","][u]=o// / / ///+)Or;O,io","extern//XXX[*****10);o0!0?k[dnu&e42o)[,xi","getchar())// //////XXXXXXX;/////////// //////;;)2nc={ci(=ck<<","n?n:k// / / ///\"fi,.h","putchar(I//u/X// //0<10=XX"," );l=I-10//tt// 15 //10110X","(EOF!=(I=//+s]/XX// ///04(=uxn[,ie",")){if(l||//;{/X// //)on;0x,t*","/2;for(u=n=0////////XXXXXXXXXXX/X+}+?+r;d{r/X////////////c/(&if=-)p(l(xewt{1udd","I,l;int//XX[}du,!*[k-////k<=+0o1hOouo2krl","I=l-10-puts(// /// //24;st/","XXXXXXX// //XXXXXXXXXX","for(u=0x0;u<1025;)d[nLine truncated
|
||||
var events=
|
||||
[0,500,0,0,0,0,0,1000,1,0,0,0,500,500,0,0,0,0,500,200,0,0,0,0,0,364000,1,0,92,1,200,200,0,0,0,1,0,363800,2,0,3,1,200,200,0,0,0,2,0,363600,2,0,5,1,200,200,0,0,0,3,0,363400,2,0,12,1,200,200,0,0,0,4,0,363200,2,0,18,1,200,100,0,0,0,5,0,363000,2,0,15,1,100,100,0,0,0,6,0,362900,2,0,19,1,100,100,0,0,0,7,0,362800,2,0,4,1,100,100,0,0,0,8,0,362700,2,0,42,4,100,100,0,0,0,9,0,362600,2,0,9,1,100,100,0,0,0,10,0,362500,2,0,2,1,100,100,0,0,0,11,0,362400,2,0,19,1,100,100,0,0,0,12,0,362300,2,0,3,1,100,100,0,0,0,13,0,362200,2,0,17,1,100,100,0,0,0,14,0,362100,2,0,101,1,100,142,0,0,0,15,0,362000,2,0,16,1,142,143,0,0,0,16,0,361858,2,0,48,4,143,143,0,0,0,17,0,362048,1,1,0,0,143,143,0,0,1,0,0,143,1,108,0,0,143,143,0,0,2,0,0,361429,1,108,3,1,143,143,0,0,2,1,0,361286,2,108,5,1,143,143,0,0,2,2,0,361143,2,108,2,1,143,142,0,0,2,3,0,361000,2,108,0,1,142,143,0,0,2,4,0,360858,2,108,43,1,143,143,0,0,2,5,0,360715,2,108,10,1,143,143,0,0,2,6,0,360572,2,108,3,1,143,143,0,0,2,7,0,360429,2,108,5,1,143,143,0,0,2,8,0,360286,2,108,13,1,143,143,0,0,2,9,0,360143,2,108,14,1,143,200,0,0,2,10,0,200,1,188,0,0,200,200,0,0,3,0,0,359800,1,188,25,1,200,200,0,0,3,1,0,200,1,226,0,0,200,200,0,0,4,0,0,359400,1,226,24,1,200,200,0,0,4,0,200,200,0,0,4,0,200,200,0,0,3,0,200,200,0,0,2,0,200,200,0,0,2,0,0,200,1,2,0,0,200,200,0,0,2,0,0,40200,1,2,12,1,200,333,0,0,2,1,0,40000,2,2,16,1,333,333,0,0,2,2,0,39667,2,2,10,1,333,334,0,0,2,3,0,39334,2,2,11,1,334,142,0,0,2,4,0,39000,2,2,0,1,142,143,0,0,2,5,0,38858,2,2,19,1,143,143,0,0,2,6,0,38715,2,2,10,1,143,143,0,0,2,7,0,38572,2,2,2,1,143,143,0,0,2,8,0,38429,2,2,10,1,143,143,0,0,2,9,0,38286,2,2,31,1,143,143,0,0,2,10,0,38143,2,2,36,1,143,333,0,0,2,11,0,38000,2,2,20,1,333,333,0,0,2,12,0,37667,2,2,45,1,333,334,0,0,2,13,0,37334,2,2,252,1,334,200,0,0,2,14,0,37000,2,2,29,1,200,200,0,0,2,15,0,36800,2,2,31,1,200,200,0,0,2,16,0,36600,2,2,36,1,200,200,0,0,2,17,0,36400,2,2,20,1,200,200,0,0,2,18,0,36200,2,2,45,1,200,333,0,0,2,19,0,36000,2,2,252,1,333,333,0,0,2,20,0,35667,2,2,29,1,333,334,0,0,2,21,0,35334,2,2,7,1,334,166,0,0,2,22,0,166,1,3,0,0,166,167,0,0,3,0,0,59834,1,3,3,1,167,167,0,0,3,1,0,59667,2,3,5,1,167,166,0,0,3,2,0,59500,2,3,2,1,166,167,0,0,3,3,0,59334,2,3,0,1,167,167,0,0,3,4,0,59167,2,3,12,1,167,1000,0,0,3,5,1000,333,0,0,3,5,0,58000,2,3,35,1,333,333,0,0,3,6,0,57667,2,3,0,1,333,334,0,0,3,7,0,57334,2,3,38,1,334,250,0,0,3,8,0,57000,2,3,35,1,250,250,0,0,3,9,0,56750,2,3,0,1,250,250,0,0,3,10,0,56500,2,3,40,1,250,250,0,0,3,11,250,500,0,0,3,11,0,56000,2,3,7,1,500,500,0,0,3,12,0,348500,1,107,0,0,500,333,0,0,4,0,333,333,0,0,5,0,333,334,0,0,6,0,334,166,0,0,7,0,0,166,1,193,0,0,166,167,0,0,7,0,0,4834,1,193,0,3,167,167,0,0,7,3,0,4667,2,193,39,1,167,166,0,0,7,4,0,4500,2,193,16,1,166,167,0,0,7,5,0,4334,2,193,3,1,167,167,0,0,7,6,0,4167,2,193,18,1,167,200,0,0,7,7,0,4000,2,193,4,1,200,200,0,0,7,8,0,3800,2,193,13,1,200,200,0,0,7,9,0,3600,2,193,0,1,200,200,0,0,7,10,0,3400,2,193,13,1,200,200,0,0,7,11,0,3200,2,193,12,1,200,333,0,0,7,12,0,3000,2,193,0,1,333,333,0,0,7,13,0,2667,2,193,8,1,333,334,0,0,7,14,0,2334,2,193,0,1,334,100,0,0,7,15,0,2000,2,193,50,1,100,100,0,0,7,16,0,1900,2,193,4,1,100,100,0,0,7,17,0,1800,2,193,2,1,100,100,0,0,7,18,0,1700,2,193,12,1,100,100,0,0,7,19,0,1600,2,193,16,1,100,100,0,0,7,20,0,1500,2,193,10,1,100,100,0,0,7,21,0,1400,2,193,11,1,100,100,0,0,7,22,0,1300,2,193,13,1,100,100,0,0,7,23,0,1200,2,193,14,1,100,100,0,0,7,24,0,1100,2,193,14,1,100,200,0,0,7,25,0,1000,2,193,0,1,200,200,0,0,7,26,0,800,2,193,55,1,200,200,0,0,7,27,0,600,2,193,8,1,200,200,0,0,7,28,0,400,2,193,0,1,200,200,0,0,7,29,0,200,2,193,4,1,200,500,0,0,7,30,0,97000,1,193,354,29,500,500,0,0,7,29,0,96500,2,193,256,1,500,200,0,0,7,30,0,96000,2,193,158,1,200,200,0,0,7,31,0,95800,2,193,257,1,200,200,0,0,7,32,0,95600,2,193,0,1,200,200,0,0,7,33,0,95400,2,193,14,1,200,200,0,0,7,34,0,115123,1,194,0,3,200,125,0,0,8,3,0,114923,2,194,25,1,125,125,0,0,8,4,0,111875,1,219,0,3,125,125,0,0,9,3,0,111750,2,219,24,1,125,125,0,0,9,4,0,339625,1,225,0,3,125,125,0,0,10,3,0,339500,2,225,11,1,125,125,0,0,10,4,0,339375,2,225,4,1,125,125,0,0,10,5,0,339250,2,225,2,1,125,125,0,0,10,6,0,339125,2,225,15,1,125,142,0,0,10,7,0,339000,2,225,11,1,142,143,0,0,10,8,0,338858,2,225,5,1,143,143,0,0,10,9,0,338715,2,225,0,1,143,143,0,0,10,10,0,338572,2,225,20,1,143,143,0,0,10,11,0,338429,2,225,7,1,143,143,0,0,10,11,143,143,0,0,10,11,143,1000,0,0,9,3,1000,250,0,0,9,3,0,1000,1,195,0,3,250,250,0,0,9,3,0,750,2,195,0,3,250,250,0,0,9,6,0,500,2,195,3,1,250,250,0,0,9,6,250,500,0,0,9,6,0,20250,3,195,0,0,500,500,0,0,9,3,500,166,0,0,8,3,166,167,0,0,7,3,167,167,0,0,7,3,0,1067,1,189,0,3,167,166,0,0,7,3,0,900,2,189,6,1,166,167,0,0,7,4,0,734,2,189,17,1,167,167,0,0,7,5,0,567,2,189,11,1,167,200,0,0,7,6,0,400,2,189,13,1,200,200,0,0,7,7,0,200,2,189,38,1,200,200,0,0,7,8,0,285600,1,189,210,7,200,200,0,0,7,7,0,285400,2,189,40,1,200,200,0,0,7,8,0,285200,2,189,0,1,200,200,0,0,7,9,0,285000,2,189,8,1,200,200,0,0,7,10,0,284800,2,189,0,1,200,200,0,0,7,11,0,284600,2,189,20,1,200,200,0,0,7,12,0,284400,2,189,7,1,200,200,0,0,7,13,0,284200,2,189Line truncated
|
||||
events.push(1);events.push(0);function e(id){return document.getElementById(id);}function Init(){var t0=0;for(var i=0;i<events.length;i+=6){events[i]+=t0;t0=events[i];if(events[i+1]==0) events[i+1]=max_time+1;else events[i+1]+=events[i];}var background='<pre style="margin:0px">\n';for(var i=0;i<max_file_size;i++)
|
||||
background+="\n";background+="<\57pre>";var layer_style="position:absolute;top:0px;left:0px;margin:0px;";document.write(
|
||||
'<div style="position:fixed;top:0px;right:0px;padding:2px;background-color:#fff;border:1px solid #00f;z-index:3" onmouseover="ForegroundControl()" onmouseout="BackgroundControl()" id=control><input type=button value="play 1x" onclick="Play(1)"> <input type=button value="play 3x" onclick="Play(3)"> <input type=button value="play 10x" onclick="Play(10)"> <input type=button value="play 30x" onclick="Play(30)"> <input type=button value="play 60x" onclick="Play(60)"> <input type=button value="pause" onclick="Pause()"> <input type=button value="rewind" onclick="Rewind()"><br><input type=checkbox id=follow name=follow onclick="Follow(this.checked)" checked> <label for=follow>Follow cursor (<span id=cursor_text><\57span>)<\57label> <input type=checkbox id=fast name=fast onclick="FastScroll(this.checked)" checked> <label for=fast>Fast scroll<\57label> <input type=checkbox id=tmp name=tmp onclick="Highlight(this.checked)" checked> <label for=tmp>Highlight transient lines<\57label><br><input type=range name=position id=position min=0 max='+max_time+' step=1 value=0 style="width:400px" onchange="InputSeek(this.value)"> <span id=time><\57span><\57div><div style="position:relative;border:1px solid">'+background+
|
||||
'<pre style="'+layer_style+'background-color:#fff;color:#fff;z-index:1" id=cursor><\57pre><pre style="'+layer_style+'color:#000;z-index:2" id=text><\57pre><\57div>');var output=e("text");for(var i=0;i<slots.length;i++){var span=document.createElement("span");span.id="slot"+i;output.appendChild(span);}Rewind();}function Animate(){Seek(current_time+step);UpdateProgress();}function Play(speed){step=realtime_step*speed;if(timer)
|
||||
clearTimeout(timer);timer=setTimeout("Animate()",realtime_step);}function Pause(){if(step!=0){step=0;Seek(current_time);UpdateProgress();}else{Play(1);}}function Reset(){for(var i=0;i<slots.length;i++){slots[i]=null;update_slots[i]="";var x=e("slot"+i);x.innerHTML="";x.className="tmp";x.style.display="none";}current_event=0;}function Scroll(){var c=e("cursor_block");if(c){var y=c.offsetTop;y-=64;if(y<0) y=0;var delta=y-window.scrollY;if(!fast_scroll||(delta>-80 && delta<window.innerHeight-64))
|
||||
delta/=fps;if(Math.abs(delta)>0){window.scrollTo(window.scrollX,window.scrollY+delta);return true;}}return false;}function ResetScroll(){if(Scroll())
|
||||
timer=setTimeout("ResetScroll()",realtime_step);}function Rewind(){Reset();step=0;Seek(0);UpdateProgress();if(follow)
|
||||
ResetScroll();}function NextFrame(){if(step>0){if(timer)
|
||||
clearTimeout(timer);timer=setTimeout("Animate()",realtime_step);}if(follow)
|
||||
Scroll();}function Seek(position){current_time=position;if(current_time<0)
|
||||
current_time=0;if(current_time>=max_time){current_time=max_time;step=0;}var t=Math.floor(current_time/1000);var s=t%60;var m=Math.floor(t/60);t=m+(s>9?":":":0")+s;e("time").innerHTML=t;if(events[current_event]>current_time){if(current_event>0 && events[current_event-6]<current_time){NextFrame();return;}Reset();}var min_slot=slots.length;var max_slot=0;var cursor_event=-1;for(;events[current_event]<=current_time;current_event+=6){var end_time=events[current_event+1];if(end_time<=current_time)
|
||||
continue;var type=events[current_event+2];if(type==0||type>3){cursor_event=current_event;}else{var i=events[current_event+3];if(type==3){slots[i]=null;}else{var text=string_table[events[current_event+4]].substr(
|
||||
0,events[current_event+5]);if(type==1||slots[i]==null) slots[i]=text;else slots[i]+=text;}if(min_slot>i) min_slot=i;if(max_slot<i) max_slot=i;update_slots[i]=(end_time>=max_time?2:1);}}for(var i=min_slot;i<=max_slot;i++){if(update_slots[i]){var span=e("slot"+i);if(slots[i]!=null){span.innerHTML=slots[i]+"\n";span.style.display="inline";span.className=(update_slots[i]==1?"tmp":"final");}else{span.innerHTML="";span.style.display="none";}update_slots[i]=0;}}if(cursor_event>=0){var text="";var y;var x=events[cursor_event+5];if(events[cursor_event+2]==0){y=events[cursor_event+4];for(var i=0;i<y;i++)
|
||||
text+="\n";for(var i=0;i<x;i++)
|
||||
text+=" ";text+='<span style="background-color:#0f0" id=cursor_block> <\57span>';}else{var s=events[cursor_event+3];for(var i=y=0;i<s;i++){if(slots[i]!=null){y++;text+="\n";}}var line=slots[s]||"";var offset=events[cursor_event+4];while(line.length<=offset)
|
||||
line+=" ";text+=line.substr(0,offset)+
|
||||
'<span style="background-color:#0f0;color:#0f0" id=cursor_block>'+
|
||||
line.substr(offset,events[cursor_event+2]-3)+
|
||||
'<\57span>';}e("cursor").innerHTML=text;e("cursor_text").innerHTML=(y+1)+','+(x+1);}NextFrame();}function InputSeek(position){var t=parseInt(position);if(t>=0)
|
||||
Seek(t);}function UpdateProgress(){e("position").value=current_time;}function Follow(state){follow=state;}function FastScroll(state){fast_scroll=state;}function Highlight(state){var x=document.styleSheets;for(var i=0;i<x.length;i++){var y=x[i].cssRules;for(var j=0;j<y.length;y++){if(y[j].selectorText==".tmp"){y[j].style.color=state?"#00f":"#000";return;}}}}function ForegroundControl(){e("control").style.opacity="1.0";opacity=100;if(opacity_timer){clearTimeout(opacity_timer);opacity_timer=null;}}function BackgroundControl(){e("control").style.opacity=opacity/100;if(opacity>35){opacity-=5;opacity_timer=setTimeout("BackgroundControl()",100);}}Init();</script>
|
||||
</body></html>
|
||||
Reference in new issue
Block a user