release winning entries of IOCCC28 under the year 2024
Congratulations to: * 2024/anders - Prize in sound coding - layered music generator * 2024/burton - Prize in pentagrammatology - wordle hard mode solver * 2024/cable1 - Prize in bot talk - LLM inference engine * 2024/cable2 - Prize in murky waters - salmon recipe * 2024/carlini - Prize in perfect timing - Intel 4004 emulation * 2024/codemeow - Prize in tray planting - bonsai generator * 2024/endoh1 - Prize in patient pointillism - slow ray tracer in CPP * 2024/endoh2 - Prize in solid body physics - rotating rigid body simulation * 2024/ferguson1 - Prize in diabolical logistics - Oregon trail pact with the devil * 2024/ferguson2 - Prize in yil-tas - Navajo code talker translator * 2024/howe - Nice accent eh-ward - mini vi * 2024/kramer - Prize in linguistic arithmetic - natural language numerical calculator * 2024/kurdyukov1 - Prize in phased periodicity - phase of the Moon * 2024/kurdyukov2 - Prize in art restoration - JPEG artifact removal * 2024/kurdyukov3 - Prize in virtual quietus - gaming VM and doom * 2024/kurdyukov4 - Prize in embiggening - encode without literals * 2024/maffiodo - Prize in creative interpretation - Jav\*script interpreter * 2024/mills - Prize in ℤ₃ - Infocom v3 story interpreter * 2024/stedolan - Best one liner - icon from MD5 * 2024/straadt - Prize in imitative rebooting - OpenRISC CPU and Linux * 2024/tmarrec - Prize in cyclonic coding - 3D tornado simulation * 2024/tompng - Prize in quasi bijection - vortex encryptor decryptor * 2024/weaver - Sur prize - rickroll Ran `make update` to perform the above. new file: 2024/burton/.entry.json
This commit is contained in:
1 parent
10512e6c79
commit
09750f8899
443 files changed
+182938
-231
No files matched your search
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"no_comment" : "mandatory comment: because comments were removed from the original JSON spec",
|
||||
"entry_JSON_format_version" : "1.2 2024-09-25",
|
||||
"award" : "Prize in perfect timing",
|
||||
"year" : 2024,
|
||||
"dir" : "carlini",
|
||||
"entry_id" : "2024_carlini",
|
||||
"title" : "i4004",
|
||||
"abstract" : "Intel 4004 emulation",
|
||||
"author_set" : [
|
||||
{
|
||||
"author_handle" : "Nicholas_Carlini"
|
||||
}
|
||||
],
|
||||
"manifest" : [
|
||||
{
|
||||
"file_path" : "prog.c",
|
||||
"inventory_order" : 20,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "c",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "entry source code"
|
||||
},
|
||||
{
|
||||
"file_path" : "Makefile",
|
||||
"inventory_order" : 30,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "makefile",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "entry Makefile"
|
||||
},
|
||||
{
|
||||
"file_path" : "prog.orig.c",
|
||||
"inventory_order" : 50,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "c",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "original source code"
|
||||
},
|
||||
{
|
||||
"file_path" : "try.sh",
|
||||
"inventory_order" : 100,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "shellscript",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "script to try entry"
|
||||
},
|
||||
{
|
||||
"file_path" : "2024_carlini.tar.bz2",
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
"entry_text" : "download entry tarball"
|
||||
},
|
||||
{
|
||||
"file_path" : ".entry.json",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "json",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "entry summary and manifest in JSON"
|
||||
},
|
||||
{
|
||||
"file_path" : ".gitignore",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "gitignore",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "list of files that should not be committed under git"
|
||||
},
|
||||
{
|
||||
"file_path" : ".path",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "path",
|
||||
"display_via_github" : false,
|
||||
"entry_text" : "directory path from top level directory"
|
||||
},
|
||||
{
|
||||
"file_path" : "README.md",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "markdown",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "markdown source for this web page"
|
||||
},
|
||||
{
|
||||
"file_path" : "adder.bin",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "binary",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "4004 binary to slowly add pressed digits"
|
||||
},
|
||||
{
|
||||
"file_path" : "fib.bin",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "binary",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "4004 binary to slowly promt the Fibonacci numbers"
|
||||
},
|
||||
{
|
||||
"file_path" : "redacted.bin",
|
||||
"inventory_order" : 4000000000,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "binary",
|
||||
"display_via_github" : true,
|
||||
"entry_text" : "4004 binary for slow Busicom calculator"
|
||||
},
|
||||
{
|
||||
"file_path" : "index.html",
|
||||
"inventory_order" : 4294967295,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "html",
|
||||
"display_via_github" : false,
|
||||
"entry_text" : "this web page"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# sort with: ../../bin/sgi.sh
|
||||
*~
|
||||
*.dSYM
|
||||
*.o
|
||||
.DS_Store
|
||||
.*.swp
|
||||
@@ -0,0 +1 @@
|
||||
2024/carlini
|
||||
Binary file not shown.
@@ -0,0 +1,212 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2024/carlini
|
||||
|
||||
#############################
|
||||
# shell used by this Makefile
|
||||
#############################
|
||||
|
||||
SHELL= bash
|
||||
|
||||
|
||||
#######################
|
||||
# common tool locations
|
||||
#######################
|
||||
|
||||
include ../../var.mk
|
||||
|
||||
|
||||
#####################
|
||||
# C compiler settings
|
||||
#####################
|
||||
|
||||
# Common C compiler warnings to silence
|
||||
#
|
||||
# Example: CSILENCE= -Wno-poison-system-directories
|
||||
#
|
||||
CSILENCE=
|
||||
|
||||
# Attempt to silence unknown warning options
|
||||
#
|
||||
CUNKNOWN= -Wno-unknown-warning-option
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
# NOTE: The addition of -pedantic to CWARN is a challenge that
|
||||
# You may wish to avoid if it proves too problematic.
|
||||
# There is NO penalty for removing -pedantic from CWARN.
|
||||
#
|
||||
CWARN= -Wall -Wextra -pedantic ${CSILENCE} ${CUNKNOWN}
|
||||
|
||||
# Compiler standard
|
||||
#
|
||||
CSTD= -std=gnu17
|
||||
|
||||
# Compiler bit architecture
|
||||
#
|
||||
# Example for 32-bitness: ARCH= -m32
|
||||
# Example for 64-bitness: ARCH= -m64
|
||||
#
|
||||
# NOTE: Normally one should NOT specify a specific architecture.
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# Defines that are needed to compile
|
||||
#
|
||||
# Example: -Dfoo -Dbar=baz
|
||||
#
|
||||
CDEFINE=
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
# Example: CINCLUDE= -include stdio.h
|
||||
#
|
||||
CINCLUDE=
|
||||
|
||||
# Other flags to pass to the C compiler
|
||||
#
|
||||
# Example: COTHER= -fno-math-errno
|
||||
#
|
||||
COTHER=
|
||||
|
||||
# Optimization
|
||||
#
|
||||
# NOTE: Feel free to change the level of compiler optimization.
|
||||
# The "-O3" is just a friendly default you might wish to try.
|
||||
#
|
||||
# Example: OPT= -O0 -g
|
||||
#
|
||||
OPT= -O3
|
||||
|
||||
# Default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${COTHER} ${OPT}
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
# Example: LDFLAGS= -lncurses -lm
|
||||
#
|
||||
LDFLAGS=
|
||||
|
||||
# C compiler to use
|
||||
#
|
||||
# NOTE: The IOCCC Judges recommend you leave CC as just "cc"
|
||||
# and NOT set it to clang, or gcc, or something else
|
||||
# unless you have a STRONG reason to do so.
|
||||
#
|
||||
# Setting CC to something other than "cc" makes your
|
||||
# code less portable to those who do not have your
|
||||
# particular C compiler. **hint**
|
||||
#
|
||||
# If you want to test your code with a particular C compiler,
|
||||
# use the make command line. For example:
|
||||
#
|
||||
# make all CC=clang
|
||||
# make all CC=gcc
|
||||
#
|
||||
CC= cc
|
||||
|
||||
# Compiler add-ons or replacements for clang only
|
||||
#
|
||||
ifeq "$(findstring $(CLANG),${CC})" "$(CLANG)"
|
||||
#
|
||||
# NOTE: This code is only invoked when CC is "clang"
|
||||
# such as when you use the make command line:
|
||||
#
|
||||
# make all CC=clang
|
||||
#
|
||||
CSILENCE+= -Wno-cast-align -Wno-declaration-after-statement -Wno-float-conversion \
|
||||
-Wno-implicit-int-conversion -Wno-missing-prototypes \
|
||||
-Wno-missing-variable-declarations -Wno-poison-system-directories \
|
||||
-Wno-shadow -Wno-shorten-64-to-32 -Wno-sign-conversion
|
||||
#
|
||||
CWARN+= -Weverything
|
||||
#
|
||||
endif
|
||||
|
||||
# Specific add-ons or replacements for gcc only
|
||||
#
|
||||
ifeq "$(findstring $(GCC),${CC})" "$(GCC)"
|
||||
#
|
||||
# NOTE: This code is only invoked when CC is "gcc"
|
||||
# such as when you use the make command line:
|
||||
#
|
||||
# make all CC=gcc
|
||||
#
|
||||
CSILENCE+=
|
||||
#
|
||||
CWARN+=
|
||||
#
|
||||
endif
|
||||
|
||||
|
||||
###########################################
|
||||
# Special Makefile variables for this entry
|
||||
###########################################
|
||||
|
||||
ENTRY= prog
|
||||
PROG= ${ENTRY}
|
||||
#
|
||||
OBJ= ${PROG}.o
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
# list any data files supplied with your submission
|
||||
#
|
||||
# Example: DATA= curds whey
|
||||
#
|
||||
DATA= redacted.bin
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
|
||||
all: data ${TARGET}
|
||||
@${TRUE}
|
||||
|
||||
.PHONY: all alt data everything clean clobber
|
||||
|
||||
# how to compile
|
||||
#
|
||||
${PROG}: ${PROG}.c
|
||||
${CC} ${CFLAGS} ${PROG}.c -o $@ ${LDFLAGS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} ${PROG}.alt.c -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
# both all and alt
|
||||
#
|
||||
everything: all alt
|
||||
@${TRUE}
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
clean:
|
||||
${RM} -f ${OBJ} ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -rf *.dSYM
|
||||
|
||||
|
||||
######################################
|
||||
# optional include of 1337 hacker rulz
|
||||
######################################
|
||||
|
||||
-include 1337.mk ../1337.mk ../../1337.mk
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,14 @@
|
||||
#include<stdlib.h>
|
||||
#include<stdio.h>
|
||||
#include<fcntl.h>
|
||||
|
||||
#define P 1<<24
|
||||
#define Z while(
|
||||
#define W for(i=0;i<K;i++)
|
||||
#define A *Q++
|
||||
|
||||
typedef int _;
|
||||
|
||||
char*Q = "8 {} o; ({ #} U{t * ;1} &x;_; k}rI}6{Y}O{{ p{} O}}A Z} x o{ >} W{ } V{ q{ .}t; n{{ P{U{m;; >; }{&;{ { e{ g} }{ w o { R};_{1;6}N}7{ (V{6} G;E}3} k{Y}T}4}Y; C{ {[5;S; L J{ s;,} {@{ [{ c;5; J{ m; D}g{*{ ^; ec; w;T;D; {W}1;I; a} {@*{y}l .}D{: a}{ & v} ] }w b{ }; x{ z} g}H}#;%;v2{ n} [{&; n;U}a} ; ; H}Yc F{; m =}W; V};i{}f}c;H} {l{ p; b}_;v} H{ `{{ r;w}3{X;C;O} O} B}z} { b{ d;V{8 }, }9} d{*{ a{ Jb{t{${ ;6{}@}- e{q{W}}B{ e; ; }0{ -;x}}Q; } x{ L~} J} Sn}{/ G;X; y{9}UY} 7}#d{e;l; ?{} ^{M}{ S} K; +{ .{r{ z}Vu;} O{[;8{}g} C{ U;a{={$ m}{}_} { 8} o} Z{ u;=;c; ;Q;G; H^}X; M{ 6{[ '{ /;1} g; E} ;[{ v{?;c; }; -P 3{ V } @} >;}52}c{ YF} ^[;z; R{a} `{V~} =} r 3}p}{[g;)} R -;4} g{{ z}^;}V; b 1}n} F; R;{s;l}{c; E${u}o} e; @} ,} ';S; = :[{ D}4};}} 1;2{ ^{A{w !} n}2} 5{8}z{ &;o; I} u}{ ]; A}s; S;9 { 3;T;p;9;=}d G , M}iw{ }X} 8;;}{ }Ew} { =l ?{ u ,} ;k{ 1}N; ]} 3{1{{>}c; Q}M i{ I{.{ o}L{ ?@}@{2; Y;O -> K} .{V; X}D; < E} ; 5{ /{ ;;a{ & ;P{}{p{Z{} X }+; q; 9|{z;y 7} g{G;I{ O{ ; ^}(} _:} }h G A{;{-{ ~}} a{ u{ )} 7{Y{ L}; /; m[;b{W |; ]} & h;; } &}_} ;Y} 3 8{*; S;} O{0w;0{ :; `{ D{3{ y{ ae{ N; *{t} }X}aB});{ x{ #;{ }; J ; 8} }{2; .; } E;W};{&{{ b{Y; ^; ; h : +} C{}j}=; d{ Q}N;;N{ )4 ={ q{f}D;p} 2}% K} }LY{ b{ W RK{ F; w1f{ J{ |;n} E}; ; t; O;L;{.9} <; B{F ; 0{ w; b{&}l; { 9{Q{ } K}; E;; {9 W;C}_{ 9 o; o{p} % Z;} QZ; 6 Q} I{ {p}s} } } _} b{ {v{ q{X;[{%} J )E; ;V} P} t{ {{p P ; B}R{E.0{ !}h;7 x} 8}`;C}s{x ;D;x; %{ w}; s$ ; y *;j{}{{{{8X; G{4w; t e{) ?}{{x;5; {*}}/}F 5}| s}E;&} j w{s C{ } n{ t}Z; {2;+}s ^} { _; {} *{k} S; , v2{ q; 5 }a}m{ }0; { }!}; N} ;8K { W}W; qO{C{ o{e}+ p} =; ;<;W{; V pP} %; n} ;{}$J} } V{s; v{ B; ,8; j; 1{]{; <; I} Q} ; q} 3{ /{7{H}{ r{ A}{;); O{ 3{ 2 L{d 6{J{ Z;5; { V{;{q; B{u}+D; @ 5 s % { >;} z{ q} #} W}d}}} 9{ `}+{C},;I za{m; -}E}}]N{d} #} U} .{} { N;7{w G b; }} k } E{ ({L{} D{ |{)}>G;}{ {t}=} f} ;X}) b;>}h} ;;;} ?(;=; G;m u0; }U; A;u} Y} ; d}{2;p; V.} E}; ;^},} { {;F}4} ; Y; z;>} <{O;y{ K{ ;){ n{ 2}q ^l.; 5F ;6;; K} (;t;a{ C Z}T; p{ yt{K{g;5} ; _{ ; ={}N{; f{} S;^;!{C;{ x{ {k{V{/{ *{ D{$} U #{ } `{fa(;R%{ #} 9 e} S<; A};=;K -{ a;@{5 KW 0;T}{(} C; :q{n;{{${ ,} }A{ '{ _i; } 4; ; ~} q})}> ~;/;0;O;} F}A D{;/{G{ @; U} _{ Z [; N{E;~ z;`{ {Z}{ Y{r $} 0G} m ";
|
||||
|
||||
_ i,q[P],B[P],R[P],l[9],*z,K,I,m[P],p,D=1968,S,n,g,*t[P],k[P],c,e,E,*u,y,F; char T[P],*v; long C=1; _*w(_*Q){ _ N,*f=Q,*o,p; Z(N=A)<9){ _ a=(z-B)/4,b=0; o=Q-1; if(N<6){ *z=N; K=1+(N>1)+(N>4); W{ I=A; N=z[i+1]=I<2e5?a-I:m[I=I-2e5]; if(N)t[N][k[N]++]=a; } z+=4; } else if(N^7){ I=A; K=A; W m[i]=a+=A; K=P; W R[i]=q[i]; w(R+l[I]); } else{ a=0; I=--A; p=K=A; if(I){ W{ b+=Q[p]; f[a+=A]+=b; } Q=f; } else Q+=p*2; } f=o; } return Q; } _ s(_ O){ if(C<D){ C*=D; p*=D; K=A; p+=(K-1-(K>10)-(K>13)-(K>34)-(K>92))<<4; K=A; p+=K<33?(K^8)*2%5:(K^6)%3*4+(A^8)*2%5+4; } _*x=B+O*2; K=C*-~*x/(*x+x[1]+2); I=p>=K; p-=K*I; C=I?C-K:K; x[I]++; return I; } _ h(_ K,_ O){ _ g=1<<K,f=1; O*=99; Z!s(++K+O)){}; K--; W f=f*2|s(O); return f-g; } void d(_ H,_ O){ for(p=0; p<H; p++){ K=1<<O; W B[g++*4+1]=R[i]>>p&1; } } _ main(_ x,char**O){ if(x<2)exit(42); fcntl(0,4,O_NONBLOCK); _*Q=q,K,i,j=h(9,0); Z j--){ if(s(1)){ z=Q-h(4,2)-1; K=h(1,3)+1; W A=*z++; } else A=(1-2*s(8))*h(3,9); } Q=q; K=S=A; v=T+A; n=A; W t[i]=malloc(7e4); K=A; W l[i]=A; I=A; z=B; Q=w(q+I); g=A; FILE*J=fopen(O[1],"r"); K=4096; W R[i]=fgetc(J); d(8,12); g=A; K=16; W{ j=256; Z j--)R[j]=Q[j*16+i]; d(6,8); } u=Q+4096; unsigned long*f=calloc(S,16),G; Z 1){ _ r,M=0,g,*Q; Z M<S){ K=3; Z K--){ I=1<<6*K; g=M/I; G=f[y+S/64*K+g/64]>>g%64; Z G&1){ M=M-M%I+I; G/=2; K=0; } } Q=B+M*4; r=A; i=T[A]; K=T[A]; I=T[A]; p=T[M]; T[M]=r<2?i^r:r<4?r^3?i|K:i&K:r^5?i^K:i?K:I; if(p^T[M]){ I=k[M]; Z I--){ g=t[M][I]; K=3; W f[(y^S*(g<=M))+S/64*i+(g>>6*-~i)]&=~(1L<<(g>>6*i)%64); } } M++; } K=S/16; W f[y+i]=-1L; y^=S; { char*Q=v; if(A){ F|=A; K=A; I=!A; E+=I&!K; if(K&I&A){ K=18; putchar(32+F*13); W putchar(u[i*18+*(_*)(T+n+((i+3)%18-(i>15))*21)%18]); F=0; puts(""); } } if(E-c>128){ c=E;e=!e;I=e?0:u[325+getchar()];K=8;W A=I>>i&1;}}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include<stdlib.h>
|
||||
#include<stdio.h>
|
||||
#include<fcntl.h>
|
||||
|
||||
#define P 1<<24
|
||||
#define Z while(
|
||||
#define W for(i=0;i<K;i++)
|
||||
#define A *Q++
|
||||
|
||||
typedef int _;
|
||||
|
||||
char*Q = "8 {} o; ({ #} U{t * ;1} &x;_; k}rI}6{Y}O{{ p{} O}}A Z} x o{ >} W{ } V{ q{ .}t; n{{ P{U{m;; >; }{&;{ { e{ g} }{ w o { R};_{1;6}N}7{ (V{6} G;E}3} k{Y}T}4}Y; C{ {[5;S; L J{ s;,} {@{ [{ c;5; J{ m; D}g{*{ ^; ec; w;T;D; {W}1;I; a} {@*{y}l .}D{: a}{ & v} ] }w b{ }; x{ z} g}H}#;%;v2{ n} [{&; n;U}a} ; ; H}Yc F{; m =}W; V};i{}f}c;H} {l{ p; b}_;v} H{ `{{ r;w}3{X;C;O} O} B}z} { b{ d;V{8 }, }9} d{*{ a{ Jb{t{${ ;6{}@}- e{q{W}}B{ e; ; }0{ -;x}}Q; } x{ L~} J} Sn}{/ G;X; y{9}UY} 7}#d{e;l; ?{} ^{M}{ S} K; +{ .{r{ z}Vu;} O{[;8{}g} C{ U;a{={$ m}{}_} { 8} o} Z{ u;=;c; ;Q;G; H^}X; M{ 6{[ '{ /;1} g; E} ;[{ v{?;c; }; -P 3{ V } @} >;}52}c{ YF} ^[;z; R{a} `{V~} =} r 3}p}{[g;)} R -;4} g{{ z}^;}V; b 1}n} F; R;{s;l}{c; E${u}o} e; @} ,} ';S; = :[{ D}4};}} 1;2{ ^{A{w !} n}2} 5{8}z{ &;o; I} u}{ ]; A}s; S;9 { 3;T;p;9;=}d G , M}iw{ }X} 8;;}{ }Ew} { =l ?{ u ,} ;k{ 1}N; ]} 3{1{{>}c; Q}M i{ I{.{ o}L{ ?@}@{2; Y;O -> K} .{V; X}D; < E} ; 5{ /{ ;;a{ & ;P{}{p{Z{} X }+; q; 9|{z;y 7} g{G;I{ O{ ; ^}(} _:} }h G A{;{-{ ~}} a{ u{ )} 7{Y{ L}; /; m[;b{W |; ]} & h;; } &}_} ;Y} 3 8{*; S;} O{0w;0{ :; `{ D{3{ y{ ae{ N; *{t} }X}aB});{ x{ #;{ }; J ; 8} }{2; .; } E;W};{&{{ b{Y; ^; ; h : +} C{}j}=; d{ Q}N;;N{ )4 ={ q{f}D;p} 2}% K} }LY{ b{ W RK{ F; w1f{ J{ |;n} E}; ; t; O;L;{.9} <; B{F ; 0{ w; b{&}l; { 9{Q{ } K}; E;; {9 W;C}_{ 9 o; o{p} % Z;} QZ; 6 Q} I{ {p}s} } } _} b{ {v{ q{X;[{%} J )E; ;V} P} t{ {{p P ; B}R{E.0{ !}h;7 x} 8}`;C}s{x ;D;x; %{ w}; s$ ; y *;j{}{{{{8X; G{4w; t e{) ?}{{x;5; {*}}/}F 5}| s}E;&} j w{s C{ } n{ t}Z; {2;+}s ^} { _; {} *{k} S; , v2{ q; 5 }a}m{ }0; { }!}; N} ;8K { W}W; qO{C{ o{e}+ p} =; ;<;W{; V pP} %; n} ;{}$J} } V{s; v{ B; ,8; j; 1{]{; <; I} Q} ; q} 3{ /{7{H}{ r{ A}{;); O{ 3{ 2 L{d 6{J{ Z;5; { V{;{q; B{u}+D; @ 5 s % { >;} z{ q} #} W}d}}} 9{ `}+{C},;I za{m; -}E}}]N{d} #} U} .{} { N;7{w G b; }} k } E{ ({L{} D{ |{)}>G;}{ {t}=} f} ;X}) b;>}h} ;;;} ?(;=; G;m u0; }U; A;u} Y} ; d}{2;p; V.} E}; ;^},} { {;F}4} ; Y; z;>} <{O;y{ K{ ;){ n{ 2}q ^l.; 5F ;6;; K} (;t;a{ C Z}T; p{ yt{K{g;5} ; _{ ; ={}N{; f{} S;^;!{C;{ x{ {k{V{/{ *{ D{$} U #{ } `{fa(;R%{ #} 9 e} S<; A};=;K -{ a;@{5 KW 0;T}{(} C; :q{n;{{${ ,} }A{ '{ _i; } 4; ; ~} q})}> ~;/;0;O;} F}A D{;/{G{ @; U} _{ Z [; N{E;~ z;`{ {Z}{ Y{r $} 0G} m ";
|
||||
|
||||
_ i,q[P],B[P],R[P],l[9],*z,K,I,m[P],p,D=1968,S,n,g,*t[P],k[P],c,e,E,*u,y,F; char T[P],*v; long C=1; _*w(_*Q){ _ N,*f=Q,*o,p; Z(N=A)<9){ _ a=(z-B)/4,b=0; o=Q-1; if(N<6){ *z=N; K=1+(N>1)+(N>4); W{ I=A; N=z[i+1]=I<2e5?a-I:m[I=I-2e5]; if(N)t[N][k[N]++]=a; } z+=4; } else if(N^7){ I=A; K=A; W m[i]=a+=A; K=P; W R[i]=q[i]; w(R+l[I]); } else{ a=0; I=--A; p=K=A; if(I){ W{ b+=Q[p]; f[a+=A]+=b; } Q=f; } else Q+=p*2; } f=o; } return Q; } _ s(_ O){ if(C<D){ C*=D; p*=D; K=A; p+=(K-1-(K>10)-(K>13)-(K>34)-(K>92))<<4; K=A; p+=K<33?(K^8)*2%5:(K^6)%3*4+(A^8)*2%5+4; } _*x=B+O*2; K=C*-~*x/(*x+x[1]+2); I=p>=K; p-=K*I; C=I?C-K:K; x[I]++; return I; } _ h(_ K,_ O){ _ g=1<<K,f=1; O*=99; Z!s(++K+O)){}; K--; W f=f*2|s(O); return f-g; } void d(_ H,_ O){ for(p=0; p<H; p++){ K=1<<O; W B[g++*4+1]=R[i]>>p&1; } } _ main(_ x,char**O){ if(x<2)exit(42); fcntl(0,4,O_NONBLOCK); _*Q=q,K,i,j=h(9,0); Z j--){ if(s(1)){ z=Q-h(4,2)-1; K=h(1,3)+1; W A=*z++; } else A=(1-2*s(8))*h(3,9); } Q=q; K=S=A; v=T+A; n=A; W t[i]=malloc(7e4); K=A; W l[i]=A; I=A; z=B; Q=w(q+I); g=A; FILE*J=fopen(O[1],"r"); K=4096; W R[i]=fgetc(J); d(8,12); g=A; K=16; W{ j=256; Z j--)R[j]=Q[j*16+i]; d(6,8); } u=Q+4096; unsigned long*f=calloc(S,16),G; Z 1){ _ r,M=0,g,*Q; Z M<S){ K=3; Z K--){ I=1<<6*K; g=M/I; G=f[y+S/64*K+g/64]>>g%64; Z G&1){ M=M-M%I+I; G/=2; K=0; } } Q=B+M*4; r=A; i=T[A]; K=T[A]; I=T[A]; p=T[M]; T[M]=r<2?i^r:r<4?r^3?i|K:i&K:r^5?i^K:i?K:I; if(p^T[M]){ I=k[M]; Z I--){ g=t[M][I]; K=3; W f[(y^S*(g<=M))+S/64*i+(g>>6*-~i)]&=~(1L<<(g>>6*i)%64); } } M++; } K=S/16; W f[y+i]=-1L; y^=S; { char*Q=v; if(A){ F|=A; K=A; I=!A; E+=I&!K; if(K&I&A){ K=18; putchar(32+F*13); W putchar(u[i*18+*(_*)(T+n+((i+3)%18-(i>15))*21)%18]); F=0; puts(""); } } if(E-c>128){ c=E;e=!e;I=e?0:u[325+getchar()];K=8;W A=I>>i&1;}}}}
|
||||
Binary file not shown.
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate 2024/carlini
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy way.
|
||||
#
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
# make sure the program has been built
|
||||
#
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear the screen
|
||||
#
|
||||
clear
|
||||
|
||||
# try the program
|
||||
#
|
||||
trap 'echo 1>&2; echo "Now go forth and calculate!" 1>&2; echo 1>&2; exit' 1 2 3 15
|
||||
echo 'NOTE: This program may take about 75 seconds per operation.' 1>&2
|
||||
echo 1>&2
|
||||
echo 'NOTE: After the square root of 2 is printed, abort the program (control C) to exit.' 1>&2
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to run: echo '5+3-oS' | ./prog redacted.bin: (please be very patient) "
|
||||
echo 1>&2
|
||||
echo 1>&2
|
||||
echo "5+3-oS" | ./prog redacted.bin
|
||||
Reference in new issue
Block a user