Revisit 1990 entries
Although I previously got them to all compile they did not all work. Now they do except that jaw does not work properly in macOS (I have noticed something odd in linux too but it appears to work mostly if not entirely). Yusuke Endoh pointed out for 1990/theorem that atof() nowadays needs include stdlib.h so this was added to the file. As well I added the inclusion of string.h for strcmp(). I also fixed some segfaults in this entry (even though the judges pointed out that for NULL pointer one needs the four '0 0 0 0' it still segfaulted under those conditions) so that everything should work now under both linux and macOS. There were iirc two parts to this: one the NULL pointer is no longer dereferenced but also the type being passed to strcmp() was a int * and not a char *. This prevented 1990/theorem/sorter from working at all (segfault) and as I recall it there was another segfault I encountered as well. For 1990/jaw Yusuke Endoh provided a ruby implementation of btoa as it's not always available in modern systems. Thank you Yusuke! In 1990/jaw shark.sh had to be modified as well. This had to do with '.' not being in the default PATH. As well I had previously made a mistake about btoa versus atob as both were referenced in 1990/jaw/README.md. I believe I have this correct now. Many if not all the README files were modified with various changes including formatting (like turning them into markdown) and section titles amongst other things. I seem to recall I'm missing something here but I can't recall what I recall :-) so this will have to suffice this time round (maybe it was the btoa/atob issue that I just remembered and added above but I'm not sure).
This commit is contained in:
1 parent
e5ef2978f6
commit
0ae55de0b8
17 files changed
+420
-347
No files matched your search
+25
-14
@@ -1,10 +1,17 @@
|
||||
# Best Utility
|
||||
|
||||
Byron Rakitzis Sean Dorward
|
||||
Princeton University Princeton University
|
||||
5707 Old Lodge Dr. 10274 Burleigh Cottage Lane
|
||||
Houston, TX 77066 Ellicott City, MD 21043
|
||||
USA USA
|
||||
Byron Rakitzis
|
||||
Princeton University
|
||||
5707 Old Lodge Dr.
|
||||
Houston, TX 77066
|
||||
USA
|
||||
|
||||
Sean Dorward
|
||||
Princeton University
|
||||
10274 Burleigh Cottage Lane
|
||||
Ellicott City, MD 21043
|
||||
USA
|
||||
|
||||
|
||||
## To build:
|
||||
|
||||
@@ -16,13 +23,16 @@
|
||||
|
||||
## Judges' comments
|
||||
|
||||
This program implements a subject a well known Un*x utility whose
|
||||
original source was considered to be extremely obfuscated by many
|
||||
people, excluding its author. In fact, this utility was a major
|
||||
inspiration for the formation of this contest.
|
||||
|
||||
The author supplied us with a slightly smaller unformatted version
|
||||
of the program which we include below:
|
||||
This program touches on a well known Unix utility, the 6th edition Bourne Shell
|
||||
(`/bin/sh`), whose original source was considered to be extremely obfuscated by
|
||||
many people (although Steve Bourne might disagree). Did you know that the Bourne
|
||||
Shell source was a major inspiration for the formation of the IOCCC back in
|
||||
1984?
|
||||
|
||||
|
||||
The author supplied us with a slightly smaller unformatted version
|
||||
of the program which we include below:
|
||||
|
||||
#define D ,close(
|
||||
char*c,q[512],m[256],*v[99],**u,*i[3];int f[2],p;main(){for(m[m[60]=m[62]=
|
||||
@@ -36,9 +46,10 @@
|
||||
e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||(exit(1),0):5;}
|
||||
|
||||
|
||||
Modern compilers had a problem with this entry because the exit(3) function
|
||||
returns void but we were able to get it to compile by using the comma
|
||||
operator which we also did in the smaller version.
|
||||
Modern compilers had a problem with this entry because the exit(3) function
|
||||
returns void but we were able to get it to compile by using the comma
|
||||
operator which we also did in the smaller version.
|
||||
|
||||
|
||||
## Author's comments
|
||||
|
||||
|
||||
Reference in new issue
Block a user