Format fix and add alt code of 2014/deak

The README.md file has been format fixed.

The alt code is what the author provided but fixed to compile (a value
was left off the 'return' in the code). This was added as alt code for
fun and to help one appreciate the obfuscation all the more.

The Makefile does allow one to build it by running 'make alt' but it is
not explained how to configure it like the original was (explained by
the author). This is left as an exercise to the readers.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-15 12:33:15 -07:00
1 parent ffdf581218
commit 7389312120
5 files changed
+81 -25

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
prog prog
prog.alt
prog.orig prog.orig
+2 -2
View File
@@ -113,8 +113,8 @@ OBJ= ${PROG}.o
DATA= DATA=
TARGET= ${PROG} TARGET= ${PROG}
# #
ALT_OBJ= ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ALT_TARGET= ${PROG}.alt
################# #################
+44 -23
View File
@@ -1,7 +1,7 @@
# Most underscored argument # Most underscored argument
Ferenc Deak Ferenc Deak<br>
<fritzone@gmail.com> <fritzone@gmail.com>
## To build: ## To build:
@@ -9,6 +9,9 @@
make make
``` ```
There is an alternate version that the author provided but fixed in 2023 to
compile. See [alternate code](#alternate-code) below.
## To run: ## To run:
```sh ```sh
@@ -21,9 +24,25 @@ make
./prog ./prog
``` ```
Changing bounding box coordinates in the source to explore Try changing bounding box coordinates in the source to explore
various regions of the fractal. various regions of the fractal.
### Alternate code:
The alternate code is included as [prog.alt.c](prog.alt.c) so you can more
easily see the difference in what it might look like if the C was more
recognisable. To use, try:
```sh
make alt
```
Use `prog.alt` as you would `prog`.
Bonus: the author explains how to configure the program but can you figure out
how to do it in the alternate code?
## Judges' remarks: ## Judges' remarks:
We consider this entry a tribute to all "Abuse of the C preprocessor" We consider this entry a tribute to all "Abuse of the C preprocessor"
@@ -52,25 +71,27 @@ The usage of recognizable elements from the C programming language in the
application source code is intentionally kept to a bare minimum. If this phrase application source code is intentionally kept to a bare minimum. If this phrase
would not be true, the application would be the following: would not be true, the application would be the following:
double _[]={-2 ```c
,1,-1.3 ,1.3, 0, 0,0,0 double _[]={-2
,0 ,0,50, 80, 0,0,0 ,255 ,1,-1.3 ,1.3, 0, 0,0,0
, 8,0}; int main ( ,0 ,0,50, 80, 0,0,0 ,255
int j) {if (j== 1 ){ if( , 8,0}; int main (
_[12] >_[10] )_[17]=1 ;} if int j) {if (j== 1 ){ if(
(_[13] >_[11 ] ||_[17]==1) return _[12] >_[10] )_[17]=1 ;} if
;_[6] = _ [13] / _[11]*(_[1]-_[ 0]) (_[13] >_[11 ] ||_[17]==1) return 1
+_[ 0]; _ [7]=_[12]/_[10]*(_[3]-_[2] )+_ ;_[6] = _ [13] / _[11]*(_[1]-_[ 0])
[2];_[8]=_[9]=_[14]=0;l2:_[4]=_[8] * _ [8] +_[ 0]; _ [7]=_[12]/_[10]*(_[3]-_[2] )+_
;_[ 5]= _ [9]*_[9];_[9]=2*_[8]*_[9]+ _[7 [2];_[8]=_[9]=_[14]=0;l2:_[4]=_[8] * _ [8]
];_[8 ] = _ [ 4 ]-_[5]+_[6];_[14 ]++ ;_[ 5]= _ [9]*_[9];_[9]=2*_[8]*_[9]+ _[7
;if((_ [14]< _ [15])&&(_[4]+ _[ 5] ];_[8 ] = _ [ 4 ]-_[5]+_[6];_[14 ]++
<_[16 ])) goto l2; putchar( ;if((_ [14]< _ [15])&&(_[4]+ _[ 5]
" #@*+ "[( int) _[14]% <_[16 ])) goto l2; putchar(
5 ]);_ [13 ] ++ ; main ( " #@*+ "[( int) _[14]%
0) ;_[12]++; _[13] =0 5 ]);_ [13 ] ++ ; main (
;if(_ [17] !=1) putchar 0) ;_[12]++; _[13] =0
(0xa); main(1);} ;if(_ [17] !=1) putchar
(0xa); main(1);}
```
The application expects no parameters, the only way you can change the behaviour The application expects no parameters, the only way you can change the behaviour
is to modify the source code at the indicated location: the line is to modify the source code at the indicated location: the line
@@ -81,7 +102,7 @@ fractal to be drawn on the screen.
### Compiler warnings ### Compiler warnings
Yes, unfortunately there are compiler warnings of the kind "initialization makes Yes, unfortunately there are compiler warnings of the kind "initialization makes
integer from pointer without a cast" the provided Makefile automatically integer from pointer without a cast" but the provided Makefile automatically
disables them. disables them.
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License:
+21
View File
@@ -0,0 +1,21 @@
#include <stdio.h>
double _[]={-2
,1,-1.3 ,1.3, 0, 0,0,0
,0 ,0,50, 80, 0,0,0 ,255
, 8,0}; int main (
int j) {if (j== 1 ){ if(
_[12] >_[10] )_[17]=1 ;} if
(_[13] >_[11 ] ||_[17]==1) return 1
;_[6] = _ [13] / _[11]*(_[1]-_[ 0])
+_[ 0]; _ [7]=_[12]/_[10]*(_[3]-_[2] )+_
[2];_[8]=_[9]=_[14]=0;l2:_[4]=_[8] * _ [8]
;_[ 5]= _ [9]*_[9];_[9]=2*_[8]*_[9]+ _[7
];_[8 ] = _ [ 4 ]-_[5]+_[6];_[14 ]++
;if((_ [14]< _ [15])&&(_[4]+ _[ 5]
<_[16 ])) goto l2; putchar(
" #@*+ "[( int) _[14]%
5 ]);_ [13 ] ++ ; main (
0) ;_[12]++; _[13] =0
;if(_ [17] !=1) putchar
(0xa); main(1);}
+13
View File
@@ -1791,6 +1791,19 @@ second between commands.
Cody added explicit linking of libm (`-lm`) as not all systems do this Cody added explicit linking of libm (`-lm`) as not all systems do this
implicitly (linux doesn't seem to but macOS does). implicitly (linux doesn't seem to but macOS does).
## [2014/deak](2014/deak/prog.c) ([README.md](2014/deak/README.md))
Cody fixed the code that the author provided which would be what the program
would look like if, as the author put it:
> The usage of recognizable elements from the C programming language in the
application source code is intentionally kept to a bare minimum. If this phrase
would not be true, the application would be the following:
It did not compile because a value was left off the `return` statement.
Cody added this as alternate code just for fun and so one can more easily see
the difference to really appreciate the obfuscation.
## [2014/maffiodo1](2014/maffiodo1/maffiodo1.c) ([README.md](2014/maffiodo1/README.md])) ## [2014/maffiodo1](2014/maffiodo1/maffiodo1.c) ([README.md](2014/maffiodo1/README.md]))