Files
ioccc/2014/deak
Cody Boone Ferguson af5482825c Reorganise menus
The sections have been modified a fair amount. The Entries menu has been
extended to have: Fixing entries, Updating author info, Thanks for the
help. The first two were moved from FAQ and the last one from About.
The rationale for these, in order: entries and authors have to do with
entries and most of the help involves entries. It also has to do with
website but in 'about' it does not seem the right place, unless maybe it
is renamed to 'Credits' or something (I am not suggesting this one way
or the other). This one is debatable but that was the rationale.

The Status menu has been extended to have: Markdown guidelines and
Security policy. The rationale is that the markdown guidelines are part
of contest guidelines and the security policy is about the status of the
entries and how if there are any security problems they will not be
addressed (instead of about the IOCCC).

The FAQ was extended to have: Compiling entries, Running entries, How to
help. The reason to not have compiling and running entries under Entries
is because this is 'how to' and also the menu was too long. How to help
seems like a good idea under FAQ too (was in About).

About was extended to have the new 'about.html' page (from about.md).
This is a rare case where a new file is useful as it fits under 'About'.
The menu now is: Home page, About the IOCCC, The Judges, Contact us. I
was pondering the 'About [the IOCCC]' at the top and also naming it
'About us' but it seemed like a link to index.html was necessary and as
for 'about us' it seemed less clear as to whether it was about the
judges or the contest itself. The FAQ has been updated slightly for
this.

After further inspection the bin/index.html and the inc/index.html links
were removed from the about section.

With these changes, renaming an item or slight reordering
notwithstanding, I believe that #2006 is probably in good shape.
2024-10-25 11:23:21 -07:00
..
2024-10-25 11:23:21 -07:00
2020-12-30 16:57:03 -08:00
2023-07-06 21:49:38 -07:00

To build:

    make

There is an alternate version that the author provided but fixed in 2023 to compile with modern systems and to allow one to reconfigure the constants X1, X2, Y1 and Y2 (which were magic numbers). See Alternate code below.

To use:

    ./prog

Try:

    ./prog

Try changing bounding box coordinates in the source to explore various regions of the fractal.

Alternate code:

The alternate code is included as prog.alt.c so you can more easily see the difference in what it might look like if the C was more recognisable and also to let you reconfigure the coordinates.

Alternate build:

    make alt

If you wish to redefine the coordinates you can do so by defining X1, X2, Y1 and/or Y2, which default to: -2, 1, -1.3 and 1.3 respectively. For instance:

    make clobber X1=-3 X2=2 Y1=-2.3 Y2=2.3 alt

You may pick and choose which ones to redefine.

Alternate use:

Use prog.alt as you would prog.

Alternate try:

    ./try.alt.sh

Judges' remarks:

We consider this entry a tribute to all "Abuse of the C preprocessor" and Mandelbrot fractal drawing entries we've seen over the years.

We liked the use of unary notation facilitated by variadic macros.

Author's remarks:

Portability

The application was written on a standard Ubuntu 14.04 and tested with gcc 4.9.1 and clang 3.5 on a 64 bit system (though this should not matter). The application makes no assumption regarding any system specific settings, and it only needs a console to run. The provided Makefile is just to have an easy compilation. I don't see any problems porting it to different compiler/system as long as it supports the C99 standard.

The application

The purpose of the application is mainly to illustrate the weird possibilities of the C preprocessor, rather than to be a full featured console mode Mandelbrot drawer. There are tools much better suited for drawing fractals.

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:

    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);}

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 /* <-- Configure here: X1, X2, Y1, Y2 */ is intentionally not obfuscated so that the adventurous programmer can manually modify the coordinates of the fractal to be drawn on the screen.

Compiler warnings

Yes, unfortunately there are compiler warnings of the kind "initialization makes integer from pointer without a cast" but the provided Makefile automatically disables them.