From b8a77019a94fbac65dd33ea15421d6cad9e1083f Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sat, 25 Mar 2023 00:49:33 -0700 Subject: [PATCH] fix Makefile and README.md for 2018/hou --- 2018/hou/.gitignore | 3 +++ 2018/hou/Makefile | 17 +++++++++-------- 2018/hou/README.md | 39 +++++++++++++++++++++++---------------- 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/2018/hou/.gitignore b/2018/hou/.gitignore index ea1749132..864ca68c2 100644 --- a/2018/hou/.gitignore +++ b/2018/hou/.gitignore @@ -1 +1,4 @@ +ioccc.html +ioccc.json +output.html prog diff --git a/2018/hou/Makefile b/2018/hou/Makefile index 940b596a2..4d3fbad85 100644 --- a/2018/hou/Makefile +++ b/2018/hou/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/env make # -# IOCCC 20178 winning entry - hou +# IOCCC 2018 winning entry - hou ################################################################################ # @@ -101,8 +101,8 @@ CINCLUDE= #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h -#CINCLUDE= -I ${X11_INCDIR} -#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11 +#CINCLUDE= `${SDL2_CONFIG} --cflags` # Optimization # @@ -123,10 +123,10 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} # Libraries needed to build # -#LIBS= -LIBS= -lm +LIBS= +#LIBS= -lm #LIBS= -L ${X11_LIBDIR} -lX11 -#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL +#LIBS= `${SDL2_CONFIG} --libs` # C compiler to use # @@ -164,7 +164,8 @@ ENTRY= hou PROG= prog # OBJ= ${PROG}.o -DATA= input.json +CSRC= ${PROG}.o +DATA= TARGET= ${PROG} # ALT_OBJ= @@ -213,6 +214,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f ioccc.html ioccc.json output.html @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ @@ -324,4 +326,3 @@ pluto: charon @echo "dwarf is a type of planet" @echo "therefore, $@ is a planet" @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" - diff --git a/2018/hou/README.md b/2018/hou/README.md index 72907c985..c31c39877 100644 --- a/2018/hou/README.md +++ b/2018/hou/README.md @@ -1,29 +1,37 @@ # Most likely to top the charts -Qiming HOU + Qiming HOU -## To build: +# To build: - make all +```sh +make +``` -### To run +### To run: - ./prog < input.json > output.html +```sh +./prog < input.json > output.html +``` - View `output.html` in a browser. +View `output.html` in a browser. ### Try: - grep -e '[-?+*/^&|.<>=]' prog.c +```sh +grep -e '[-?+*/^&|.<>=]' prog.c - (cd ..; ls -lS */prog.c) | \ - awk 'BEGIN { print "["; } { print "{\"winner\":\"",$9,"\", \"size\":",$5,"},"} END { print "]"}' \ - > ioccc.json - ./prog < ioccc.json > ioccc.html +(cd ..; ls -lS */prog.c) | \ +awk 'BEGIN { print "["; } { print "{\"winner\":\"",$9,"\", \"size\":",$5,"},"} END { print "]"}' \ +> ioccc.json +./prog < ioccc.json > ioccc.html +``` -What's not right with the output? How to fix it? +View `output.html` in a browser. -### Selected Judges Remarks: +What's not right with the output? How can one fix it? + +## Judges' comments: This entry exhibits a way of obfuscation we haven't seen before, we think. The rulez of programming in an imperative language are violated, aren't they? @@ -38,11 +46,10 @@ This entry takes such decadence to an extreme. It just calls a bunch of librarie As one would expect from such an approach, this program is much more resource intensive than it should be. And one needs a C99-compatible libc (with the common UNIX stuff) to build this and an HTML5-compatible browser to open the result. And it terminates with an assertion failure, but who cares if the web page is already generated? --------------------------------------------------------------------------------- -