Add 2015/hou/try.sh + format/typo checks
The file large is from dd(1) of /dev/zero to be large enough to cause the program to run out of memory (but not too large for the repo, see 'wc -c' on it) as suggested by the judges' remarks.
This commit is contained in:
1 parent
549633020f
commit
c0b8d32b59
4 files changed
+70
-6
No files matched your search
+22
-6
@@ -5,10 +5,24 @@ make
|
||||
```
|
||||
|
||||
|
||||
### Bugs and (Mis)features:
|
||||
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2015 hou in bugs.md](/bugs.md#2015-hou).
|
||||
|
||||
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
echo IOCCC | ./prog
|
||||
echo something | ./prog
|
||||
./prog < file
|
||||
```
|
||||
|
||||
|
||||
@@ -37,7 +51,7 @@ Some things that make you go, "huh?"
|
||||
|
||||
How are those values magically returned?
|
||||
|
||||
What happens with a large file? Something over 256K
|
||||
What happens with a large file? Something over 256K.
|
||||
|
||||
```sh
|
||||
./prog < large_file
|
||||
@@ -50,7 +64,7 @@ Where does that message come from?
|
||||
|
||||
This looks like a normal C program.
|
||||
|
||||
Almost everything is a double.
|
||||
Almost everything is a `double`.
|
||||
|
||||
There are tell-tale signs like `pow(2,(?/12))` and `exp(-?*?)` (names redacted).
|
||||
You can also find a bunch of cosines and polynomial evaluations.
|
||||
@@ -59,6 +73,7 @@ It looks like a ????? ???????????, right?
|
||||
|
||||
Run and find out.
|
||||
|
||||
|
||||
### Why obfuscated
|
||||
|
||||
Some poor scripting folks only have access to doubles (Jav?script, L?a, BA?IC,
|
||||
@@ -72,10 +87,11 @@ isn't a single integer. Even `getchar()` and `EOF` are immediately converted.
|
||||
|
||||
Since `bool` counts as an integer type too, there is no boolean either. No
|
||||
comparison, no `if`, no `?:`, no `||` `&&`. Everything is done in a single loop
|
||||
that terminates on printf. Straight up arithmetic.
|
||||
that terminates on `printf(3)`. Straight up arithmetic.
|
||||
|
||||
`floor(3)` and `ceil(3)` are technically double-to-double functions, but they feel
|
||||
like cheating. Yes `cos(3)`, no `floor(3)`.
|
||||
|
||||
`floor` and `ceil` are technically double-to-double functions, but they feel
|
||||
like cheating. Yes `cos`, no `floor`.
|
||||
|
||||
### Limitations
|
||||
|
||||
|
||||
Reference in new issue
Block a user