10 Commits
Author SHA1 Message Date
Landon Curt Noll 46723ae0e4 fix shellcheck error in 1990/jaw/shark.sh 2024-03-11 00:44:15 -07:00
Cody Boone Ferguson 45f8089acc Minor further improvement to 1990/jaw/shark.sh 2023-11-04 05:45:36 -07:00
Cody Boone Ferguson d8ce37e361 Don't hard code paths in 1990/jaw/shark.sh
It is not actually necessary to mess with the path and in fact the $PATH
variable is no longer modified or even referred to. The purpose of the
program was that even without btoa and uncompress the script should be
able to extract the tarball.

Now only the tarball path is hard coded as reading a tarball from stdin
is problematic though I'm pretty sure it used to work.
2023-11-04 04:55:14 -07:00
Cody Boone Ferguson 9a92fcfca3 Further improve 1990/jaw/shark.sh
The script now deletes the tarball in the entry's directory.

The README.md file now suggests one use the try.sh script.
2023-11-01 05:11:34 -07:00
Cody Boone Ferguson 8741610110 Fix script in 1990/jaw
Now the files added to the archive will be extracted. It is unfortunate
but a temporary tarball has to be formed rather than writing to stdout.
There is a possible fix to this but it hasn't been looked into yet. The
tarball is temporary, however, and is deleted after it is extracted. The
script MUST be run from a subdirectory of the entry but as the script
had hardcoded the paths before this shouldn't be that big of a deal.

Another problem was more to do with paths and also the script relying on
the exit code allowing for &&. Now it's ';' between most commands.

There still remains, Landon and I believe, a bug in the entry and this
has been added to the bugs.md file; the script not working has been
removed from the bugs.md.
2023-11-01 04:48:25 -07:00
Cody Boone Ferguson 1d6ef234d0 Fixes in 1990/jaw
The program (and the generated program made by shark.sh) no longer use
perror(3) and instead use fprintf(3) (writing to stderr). This is mostly
because in macOS errno == 0 looks like an error.

Some updates to the shark.sh script were also made.

The bug status has been updated as there is apparently another bug
though I was sure it was solved when I last looked at it. It happens
with and without the above updates. I'm unsure about other things too
but these are not in the bugs.md yet as I'm not even sure what to say
just yet.

Added try.sh script which does some of the commands. However as there is
that bug it doesn't do any comparisons - for now.
2023-10-30 09:56:23 -07:00
Cody Boone Ferguson 67a3677763 Fixes in 1990/jaw
The example commands in the judges' comments had some problems that gave
an error message when running them.

I have also figured out the apparent problem with macOS in the command
under the try section being:

    echo "Quartz glyph jocks vend, fix, BMW." | compress | ./btoa | ./jaw

But it's not actually a problem. It uses perror() and under macOS with
errno == 0 it shows:

    Undefined error: 0

whereas linux shows 'Success'. So it's not actually a problem with the
entry at all. In fact the condition that triggers that call is the same
in both linux and macOS.

I've updated bugs.md to note this and I also updated the README.md to
note it (and to refer to the bugs.md file for more details).

The thank you to me is because I missed it earlier on when I fixed the
scripts, simple though the fixes were.
2023-03-21 09:43:02 -07:00
Cody Boone Ferguson 0ae55de0b8 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).
2023-03-11 10:07:14 -08:00
Landon Curt Noll 30e46c0ace checkpoint 1990 Makefiles
Added Makefiles for 1990 entries.

In a some cases the source code was modified.

Modified 1990 README.md files.

In some cases the program still cannot be compiled.
2023-02-13 01:20:57 -08:00
Landon Curt Noll d2a42f42e8 Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.
2022-09-18 23:37:49 -07:00