Several README.md files updated
Typos / spelling errors and other such things. Many many more need to be checked still.
This commit is contained in:
1 parent
e8016a5ac8
commit
db31034f3b
10 files changed
+35
-32
No files matched your search
@@ -23,7 +23,7 @@ make
|
||||
./akari - - even < example.ppm > even_output.ppm
|
||||
./akari example.ppm odd_output.ppm
|
||||
|
||||
make akari2.c
|
||||
make akari2
|
||||
cat akari2.c
|
||||
|
||||
make akari2
|
||||
@@ -31,14 +31,14 @@ make akari2
|
||||
./akari2 < akari2.c
|
||||
./akari2 rot13 < akari2.c
|
||||
|
||||
make akari3.c
|
||||
make akari3
|
||||
cat akari3.c
|
||||
|
||||
make akari3
|
||||
|
||||
./akari3
|
||||
|
||||
make akari4.c
|
||||
make akari4
|
||||
cat akari4.c
|
||||
|
||||
./akari4
|
||||
|
||||
@@ -23,6 +23,9 @@ ulimit -s unlimited
|
||||
./fredriksson -k2 -t -n bofuskate < /usr/share/dict/words
|
||||
```
|
||||
|
||||
NOTE: you need to be allowed to change your stack size or else the last command
|
||||
will likely cause the program to dump core.
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
The author of this entry was making sure that it does not win the
|
||||
@@ -172,7 +175,7 @@ expressions by putting `]` as the first character, and putting `-` last.
|
||||
* The initialized char array includes the source code of the real program,
|
||||
as well as its name and commands to build and run it, all Burrows-Wheeler
|
||||
-transformed, then run-length-encoded with unary coding. The main program
|
||||
extracts and builds that, and then calls it. More precicely, the command
|
||||
extracts and builds that, and then calls it. More precisely, the command
|
||||
to build is
|
||||
|
||||
gcc -O3 ag.c -o ag
|
||||
@@ -231,7 +234,7 @@ expressions by putting `]` as the first character, and putting `-` last.
|
||||
|
||||
./fredriksson -ck0 [0-9] < fredriksson.c
|
||||
|
||||
This should print 1, as there is a numer '3' in the char array (only).
|
||||
This should print 1, as there is a number '3' in the char array (only).
|
||||
You can also try
|
||||
|
||||
./fredriksson -ck0 [0-9] < ag.c
|
||||
|
||||
@@ -48,7 +48,7 @@ using conditions.
|
||||
In this work, Magritte points out that a picture of a pipe is not
|
||||
a pipe. But what IS a pipe? This program tries to provide an answer.
|
||||
|
||||
Magritte's [test for pipes](http://en.wikipedia.org/wiki/The_Treachery_of_Images} is:
|
||||
Magritte's [test for pipes](http://en.wikipedia.org/wiki/The_Treachery_of_Images) is:
|
||||
|
||||
The famous pipe. How people reproached me for it! And yet, could
|
||||
you stuff my pipe? No, it's just a representation, is it not?
|
||||
@@ -69,7 +69,7 @@ impressive, but I think it can be taken further, in two ways.
|
||||
First, conditional operators, such as ?:, && and ||, can be thrown
|
||||
away. Second, using setjmp and longjmp, which are unfortunately
|
||||
not in common use, might make it difficult for a novice programmer
|
||||
to understnad the code without referring to the man page.
|
||||
to understand the code without referring to the man page.
|
||||
|
||||
By removing these, the code is 100% condition free, and every
|
||||
function runs its instructions in perfect order. Naturally, this
|
||||
@@ -83,7 +83,7 @@ The program should compile with any C compiler, but was tested
|
||||
mostly with gcc on Linux.
|
||||
|
||||
It doesn't support 64 bits (due to integer-pointer casts, and a >>31).
|
||||
It does work on 64-bit Linux, becasue all functions are below 4GB.
|
||||
It does work on 64-bit Linux, because all functions are below 4GB.
|
||||
|
||||
## Copyright:
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ make
|
||||
|
||||
This tiny program outputs what looks like a tiny keyboard.
|
||||
OK, so the letters are missing. But that is no problem because
|
||||
this program identifes the lower case letters that were pressed!
|
||||
this program identifies the lower case letters that were pressed!
|
||||
|
||||
It is one of those minimal keyboards without all of those
|
||||
confusing symbols keys. No shift for SHOULDING CAPS
|
||||
confusing symbols keys. No shift for SHOUTING CAPS
|
||||
but at least it does not have that useless caps lock key!
|
||||
|
||||
We recommend that you completely deconstruct / figure out
|
||||
|
||||
@@ -30,12 +30,12 @@ cc -xc hint.pdf -o hint
|
||||
./hint
|
||||
```
|
||||
|
||||
Of course, You can also obfuscate c code:
|
||||
Of course, You can also obfuscate C code:
|
||||
|
||||
```sh
|
||||
echo 'void main(){puts("Hello World!");}' | ./hamano > hello.pdf
|
||||
cc -xc hello.pdf -o hello2
|
||||
./hello2 | gcc -xc - -o ./hello3
|
||||
echo 'int main(){puts("Hello World!");}' | ./hamano > hello.pdf
|
||||
cc -Wno-implicit-function-declaration -xc hello.pdf -o hello2
|
||||
./hello2 | gcc -Wno-implicit-function-declaration -xc - -o ./hello3
|
||||
./hello3
|
||||
```
|
||||
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ less hou.c
|
||||
|
||||
./hou chk.txt hou.c | wc
|
||||
|
||||
./hou markdown.txt remarks.markdown > remarks.htm
|
||||
./hou markdown.txt README.md > remarks.htm
|
||||
```
|
||||
|
||||
View the `remarks.htm` file in your web browser.
|
||||
@@ -93,9 +93,9 @@ As an extra tweak, the text message actually does something useful. Remove the "
|
||||
|
||||
### References
|
||||
|
||||
[1] [Russ Cox, Regular Expression Matching: the Virtual Machine Approach](http://swtch.com/~rsc/regexp/regexp2.html)
|
||||
[1][Russ Cox, Regular Expression Matching: the Virtual Machine Approach](http://swtch.com/~rsc/regexp/regexp2.html)
|
||||
|
||||
[2] [Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)](http://swtch.com/~rsc/regexp/regexp1.html)
|
||||
[2][Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)](http://swtch.com/~rsc/regexp/regexp1.html)
|
||||
|
||||
## Copyright:
|
||||
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ macros or helper methods that can be confusing, I placed all functionality
|
||||
in the main function. Main is called recursively and quite extensively, but
|
||||
it gives the benefit that all invocations of the function has the same
|
||||
parameters, argv and argc. This really helps readability, as a programmer
|
||||
doesn’t need to remember several variable or function names. I also tried
|
||||
doesn't need to remember several variable or function names. I also tried
|
||||
to reduce the number of keywords, and the program only has four for-loops
|
||||
followed by a single return statement. There is a little bit of use of the
|
||||
question mark operator, but this is really there to keep the program as
|
||||
|
||||
@@ -19,7 +19,7 @@ make
|
||||
### Try:
|
||||
|
||||
```sh
|
||||
./birken < examples/ioccc.txt
|
||||
./birken < ioccc.txt
|
||||
|
||||
perl -e 'map{map{print int(rand()*8);}(0..16);print chr(10);}(0..30);' | tr '[0-4]' ' '| ./birken
|
||||
```
|
||||
|
||||
+11
-11
@@ -32,12 +32,12 @@ echo "Do or do not. There is no try."
|
||||
## Judges' comments:
|
||||
|
||||
The judges enjoyed playing the game almost to completion; if we remember correctly,
|
||||
we managed to place 59 or 60 dominos. We wonder, what would be faster: to play the game to completion
|
||||
we managed to place 59 or 60 dominoes. We wonder, what would be faster: to play the game to completion
|
||||
or to write an unobfuscated version of it?
|
||||
|
||||
## Author's comments:
|
||||
|
||||
This program is a domino game. The goal is to place dominos on the 8x8 grid.
|
||||
This program is a domino game. The goal is to place dominoes on the 8x8 grid.
|
||||
Each domino is made of 6 squares of the color red or green. To place a domino,
|
||||
at least one of it side shall match the other side of another domino.
|
||||
|
||||
@@ -47,7 +47,7 @@ at least one of it side shall match the other side of another domino.
|
||||
|
||||
At the start of the game, the first domino is placed randomly on the grid. You
|
||||
get another domino to place by selecting one empty position in the stack on the
|
||||
right. You can have to 8 dominos pending at any time.
|
||||
right. You can have to 8 dominoes pending at any time.
|
||||
|
||||
### Moving in the stack
|
||||
|
||||
@@ -71,17 +71,17 @@ sides and the domino has at least one neighbour.
|
||||
|
||||
### Scoring
|
||||
|
||||
First, depending on the number of dominos pending in the stack, a bonus is
|
||||
First, depending on the number of dominoes pending in the stack, a bonus is
|
||||
accorded :
|
||||
* 1 domino in the stack : 8 points.
|
||||
* 2 dominos in the stack : 4 points.
|
||||
* 3 or 4 dominos in the stack : 2 points.
|
||||
* 5 or more dominos in the stack : 0 point.
|
||||
* 2 dominoes in the stack : 4 points.
|
||||
* 3 or 4 dominoes in the stack : 2 points.
|
||||
* 5 or more dominoes in the stack : 0 point.
|
||||
|
||||
Then the bonus is multiplied by the number of matching neighbor the placed domino
|
||||
has (1, 2, 3 or 4). This is added to the score.
|
||||
|
||||
Finally, the total score is divided by the number of dominos placed (1 - 64).
|
||||
Finally, the total score is divided by the number of dominoes placed (1 - 64).
|
||||
|
||||
The 3 numbers on display represent : the total score, the fill count and the
|
||||
final score (total score divided by fill count).
|
||||
@@ -90,8 +90,8 @@ final score (total score divided by fill count).
|
||||
|
||||
The game is finished when no more domino can be placed and you either :
|
||||
* filled the complete grid.
|
||||
* have 8 pending dominos in the stack.
|
||||
* no more domino can be revealed in the stack (more than 56 dominos placed on
|
||||
* have 8 pending dominoes in the stack.
|
||||
* no more domino can be revealed in the stack (more than 56 dominoes placed on
|
||||
the grid).
|
||||
|
||||
**Note** There is no real end of game detection implemented in the program,
|
||||
@@ -99,7 +99,7 @@ simply press `q` when you have finished...
|
||||
|
||||
### Strategy
|
||||
|
||||
* Try to minimize the number of dominos revealed in the stack. The lower the number,
|
||||
* Try to minimize the number of dominoes revealed in the stack. The lower the number,
|
||||
the higher the bonus.
|
||||
* Each domino is unique and all combination of colors exists, so keep track
|
||||
of what is already place and what is left.
|
||||
|
||||
@@ -31,7 +31,7 @@ And modulus if remainders the needing,
|
||||
on standard input percent be feeding.
|
||||
|
||||
More than one line can thru give input,
|
||||
when interactive one values more than thruput.
|
||||
when interactive one values more than throughput.
|
||||
|
||||
With cut and paste and some time,
|
||||
one can compute M(23209).
|
||||
@@ -40,7 +40,7 @@ one can compute M(23209).
|
||||
|
||||
### Oh, The Strings You Can C!
|
||||
|
||||
I love the C language; its tersness is tops.
|
||||
I love the C language; its terseness is tops.
|
||||
But the thing I abhor is numerical ops!
|
||||
|
||||
No shifting, division, remainder, or times.
|
||||
|
||||
Reference in new issue
Block a user