Merge pull request #765 from xexyl/2014-birken
Add end to code block end in 2014/birken/README.md
This commit is contained in:
13 files changed
+92
-42
No files matched your search
@@ -1 +1,2 @@
|
|||||||
plummer
|
plummer
|
||||||
|
plummer.alt
|
||||||
@@ -57,7 +57,7 @@ ARCH=
|
|||||||
|
|
||||||
# Defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE=
|
CDEFINE= -DZ=200
|
||||||
|
|
||||||
# Include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
@@ -112,8 +112,8 @@ OBJ= ${PROG}.o
|
|||||||
DATA=
|
DATA=
|
||||||
TARGET= ${PROG}
|
TARGET= ${PROG}
|
||||||
#
|
#
|
||||||
ALT_OBJ=
|
ALT_OBJ= ${PROG}.alt.o
|
||||||
ALT_TARGET=
|
ALT_TARGET= ${PROG}.alt
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
@@ -136,6 +136,9 @@ ${PROG}: ${PROG}.c
|
|||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
+52
-16
@@ -11,6 +11,7 @@ US
|
|||||||
make all
|
make all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -22,6 +23,42 @@ where:
|
|||||||
- number is a number (try 21701)
|
- number is a number (try 21701)
|
||||||
- arg is any argument
|
- arg is any argument
|
||||||
|
|
||||||
|
NOTE: an alternate version exists. See Alternate code section below.
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./plummer 01234567890876543210 xxx
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Alternate code:
|
||||||
|
|
||||||
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added an alternate
|
||||||
|
version which uses `usleep()` so you can see what is happening with faster
|
||||||
|
systems. To use:
|
||||||
|
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make alt
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `plummer.alt` as you would `plummer`.
|
||||||
|
|
||||||
|
If you wish to change the time to sleep (default `200`) you can do so like:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make clobber CDEFINE="-DZ=50" alt
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Try:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./plummer.alt xyzzyzzyx 5555
|
||||||
|
```
|
||||||
|
|
||||||
|
Thank you Cody!
|
||||||
|
|
||||||
### INABIAF - it's not a bug it's a feature :-)
|
### INABIAF - it's not a bug it's a feature :-)
|
||||||
|
|
||||||
This entry will very likely crash or do something else if you run it without
|
This entry will very likely crash or do something else if you run it without
|
||||||
@@ -41,32 +78,31 @@ specifies the number to start counting from and uses leading `0`s to
|
|||||||
indicate the number of digits, the second argument can be anything
|
indicate the number of digits, the second argument can be anything
|
||||||
but must be present.
|
but must be present.
|
||||||
|
|
||||||
Variable names are single characters chosen for their similarity to
|
Variable names are single characters chosen for their similarity to other
|
||||||
other characters (O for 0, l for 1, S for 5 in some fonts, and _
|
characters (`O` for `0` (zero), `l` for `1` (one), `S` for `5` (five) in some
|
||||||
for ... well nothing really, but it is easy to miss). To prevent
|
fonts, and `_` for ... well nothing really, but it is easy to miss). To
|
||||||
the need for `strlen()`, the fact that argv is laid out sequentially
|
prevent the need for `strlen()`, the fact that argv is laid out sequentially is
|
||||||
is exploited (ie. `argv[i + 1] == argv[i] + strlen(argv[i]) + 1`).
|
exploited (i.e. `argv[i + 1] == argv[i] + strlen(argv[i]) + 1`). This is not
|
||||||
This is not portable (by the books), but it seems to work
|
portable (by the books), but it seems to work everywhere I try (actually, for
|
||||||
everywhere I try (actually, for VMS, that only holds for `i > 1`).
|
VMS, that only holds for `i > 1`). Also, I depend on the fact that a carriage
|
||||||
Also, I depend on the fact that a carriage return causes the line
|
return causes the line just written to be overwritten. `lint` (and most
|
||||||
just written to be overwritten. `lint` (and most compilers) complain
|
compilers) complain that there is no control path leading to a return from
|
||||||
that there is no control path leading to a return from `main()`. At
|
`main()`. At 125 characters, it still fits on a single line (for those of us
|
||||||
125 characters, it still fits on a single line (for those of us who
|
who don't mind ruining our eyes with 132 column screens).
|
||||||
don't mind ruining our eyes with 132 column screens).
|
|
||||||
|
|
||||||
The first statement points the base of `l` (the argument vector) to
|
The first statement points the base of `l` (the argument vector) to
|
||||||
be the first argument by incrementing it. It then assigns `O` to
|
be the first argument by incrementing it. It then assigns `O` to
|
||||||
point to the character before the first character of the second
|
point to the character before the first character of the second
|
||||||
argument which also happens to be the NULL termination of the first
|
argument which also happens to be the NUL termination of the first
|
||||||
argument. `*O` gets a `\r` assigned to it. Finally `0` is assigned to
|
argument. `*O` gets a `\r` assigned to it. Finally `0` is assigned to
|
||||||
the first character of the second argument which has the effect of
|
the first character of the second argument which has the effect of
|
||||||
NULL terminating the first argument after the carriage return had
|
NUL terminating the first argument after the carriage return had
|
||||||
removed its NULL termination. I really tried to make the last part
|
removed its NUL termination. I really tried to make the last part
|
||||||
of that statement part of the original expression, but the best I
|
of that statement part of the original expression, but the best I
|
||||||
could do was attach it with a comma (against the advice of K&R).
|
could do was attach it with a comma (against the advice of K&R).
|
||||||
The for loop runs the next for loop continuously (actually until
|
The for loop runs the next for loop continuously (actually until
|
||||||
the machine crashes or the user gets tired of seeing the
|
the machine crashes or the user gets tired of seeing the
|
||||||
counting). The next for loop is the meat of the program. In the
|
counting). The next for loop is the meat of the program. In the
|
||||||
initialization statement, the string pointed to by `l` (the first
|
initialization statement, the string pointed to by `l` (the first
|
||||||
argument containing the digits used for counting followed by a `\r`)
|
argument containing the digits used for counting followed by a `\r`)
|
||||||
is printed, and `_` is started at the least significant digit in the
|
is printed, and `_` is started at the least significant digit in the
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
char*_,*O;main(S,l)char**l;{*(O=*(l+++S-1)-1)=13,*l[1]=0;for(;;)for(printf(*l),_=O-1,usleep(Z);_>=*l&&++*_>(S+*O+S)*S;*_--=(S+*O)*S);}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
# Best Game
|
# Best Game
|
||||||
|
|
||||||
Don Dodson
|
Don Dodson
|
||||||
AG Communication Systems
|
|
||||||
4101 W Union Hills Dr #1104
|
|
||||||
Glendale, AZ 85308
|
|
||||||
US
|
US
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
@@ -29,11 +26,10 @@ attempt.
|
|||||||
|
|
||||||
### Interactive 3D Maze
|
### Interactive 3D Maze
|
||||||
|
|
||||||
Step into a randomly generated 3D maze and try to get out alive!
|
Step into a randomly generated 3D maze and try to get out alive! Use the vi
|
||||||
Use the vi movement keys (hjkl) to move on a level, and u or d
|
movement keys (`hjkl`) to move on a level, and `u` or `d` to move (u)p or (d)own
|
||||||
to move (u)p or (d)own from a position with a U or D on the
|
from a position with a `U` or `D` on the map. To simulate the feeling of being
|
||||||
map. To simulate the feeling of being in an unknown labyrinth,
|
in an unknown labyrinth, areas which you have not visited cannot be seen.
|
||||||
areas which you have not visited cannot be seen.
|
|
||||||
|
|
||||||
Reach the north-west left corner of level 1 to exit.
|
Reach the north-west left corner of level 1 to exit.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
thadgavin
|
thadgavin
|
||||||
|
thadgavin_sdl
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
fs.tar
|
|
||||||
gavin
|
gavin
|
||||||
kernel
|
|
||||||
sh
|
sh
|
||||||
vi
|
vi
|
||||||
gavin.o
|
gavin.o
|
||||||
|
fs/
|
||||||
+12
-3
@@ -25,7 +25,7 @@ su
|
|||||||
```
|
```
|
||||||
|
|
||||||
Make a floppy with an ext2 filesystem (`mke2fs /dev/fd0` replacing `fd0` with
|
Make a floppy with an ext2 filesystem (`mke2fs /dev/fd0` replacing `fd0` with
|
||||||
whatever the floppy device is!), mount it under `/mnt/floppy`. Then:
|
whatever the floppy device is!), mount it under `/mnt/floppy` and then:
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -47,13 +47,13 @@ Move the window away from the corner.
|
|||||||
vi gavin.c
|
vi gavin.c
|
||||||
```
|
```
|
||||||
|
|
||||||
Scroll the file with up-arrow and down-arrow
|
Scroll up and down the file with up-arrow and down-arrow.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sh
|
sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Can have several shell windows:
|
You can have several shell windows:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
vi README.md
|
vi README.md
|
||||||
@@ -62,6 +62,15 @@ vi README.md
|
|||||||
|
|
||||||
Press and hold any key.
|
Press and hold any key.
|
||||||
|
|
||||||
|
### Alternate method
|
||||||
|
|
||||||
|
[Yusuke Endoh](/winners.html#Yusuke_Endoh) provided the `kernel` and `fs.tar`
|
||||||
|
files which can be used if you cannot normally use this entry. Instead of
|
||||||
|
generating the files just use the files provided.
|
||||||
|
|
||||||
|
Thank you Yusuke!
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
Over the years, we've seen a program that dumps core if executed on a "wrong"
|
Over the years, we've seen a program that dumps core if executed on a "wrong"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -27,6 +27,7 @@ make
|
|||||||
./prog
|
./prog
|
||||||
|
|
||||||
./prog http://127.0.0.1:1701
|
./prog http://127.0.0.1:1701
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
|
|||||||
@@ -24,17 +24,19 @@ cat image.rgb | ./prog ' .,:;!$#@'
|
|||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
On the face of it :-) given what this program one might wonder what makes this winner special.
|
On the face of it :-) given what this program does one might wonder what makes
|
||||||
But when you realize the source is small enough to tweet on twitter you understand.
|
this winner special. But when you realize the source is small enough to tweet
|
||||||
|
on twitter you understand.
|
||||||
|
|
||||||
Who will be the first to tweet this source? How many re-tweets will such tweet get?
|
Who will be the first to tweet this source? How many re-tweets will such tweet
|
||||||
And how many people will really understand the tweet?
|
get? And how many people will really understand the tweet?
|
||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
### Remarks
|
### Remarks
|
||||||
|
|
||||||
This program convert an image to an ASCII ART. The program reads a raw RGB image from **stdin** and print the ASCII ART to **stdout**.
|
This program convert an image to an ASCII ART. The program reads a raw RGB image
|
||||||
|
from **stdin** and print the ASCII ART to **stdout**.
|
||||||
|
|
||||||
The build process will raise some warnings about:
|
The build process will raise some warnings about:
|
||||||
|
|
||||||
@@ -45,7 +47,8 @@ The program crash if run without parameters.
|
|||||||
|
|
||||||
### Screen size
|
### Screen size
|
||||||
|
|
||||||
If you have a terminal geometry than if different from the common 80x25 you can modify the *output width* by changing the value of the first variable:
|
If you have a terminal geometry than is different from the common 80x25 you can
|
||||||
|
modify the *output width* by changing the value of the first variable:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
d=80,
|
d=80,
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
# Most Pointed Reaction
|
# Most Pointed Reaction
|
||||||
|
|
||||||
Don Yang
|
Don Yang
|
||||||
<http://uguu.org/>
|
<http://uguu.org/>
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ echo IOCCC | ./fuuko_cpp98 > output_cpp98.c
|
|||||||
```
|
```
|
||||||
|
|
||||||
Don't like dango either? Use a C++11 compiler to get just circles (or
|
Don't like dango either? Use a C++11 compiler to get just circles (or
|
||||||
swiss cheese, if you prefer that).
|
Swiss cheese, if you prefer that).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
g++ -O3 -std=c++11 fuuko.c -lm -o fuuko_cpp11
|
g++ -O3 -std=c++11 fuuko.c -lm -o fuuko_cpp11
|
||||||
@@ -106,7 +106,7 @@ Fuuko has been tested under these environments:
|
|||||||
|
|
||||||
The most obscure parts are in detecting the subtle differences in
|
The most obscure parts are in detecting the subtle differences in
|
||||||
different dialects. The standard committees put a lot of effort into
|
different dialects. The standard committees put a lot of effort into
|
||||||
avoiding "quiet changes", but Fuuko is still able exploit a few of
|
avoiding "quiet changes", but Fuuko is still able to exploit a few of
|
||||||
those. It should be an interesting exercise for the reader to figure
|
those. It should be an interesting exercise for the reader to figure
|
||||||
how she did it.
|
how she did it.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user