Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment fixes in ioccc_status.sh #999

Merged
merged 8 commits into from
Oct 4, 2023

Conversation

xexyl
Copy link

@xexyl xexyl commented Oct 4, 2023

No description provided.

The prototype answer is from discussion on GitHub, suggested by Landon,
but I added to it and fixed typos as well. I probably introduced some
other problems at this hour and at least one thing comes to mind as
perhaps not ideal to have but these things can be worked out now that
they're in the file.
As it seems like the version should be a specific format both for
consistency and to keep track of it I added a regexp check in the
ioccc_status.sh script I wrote the other day that does this.

The version must follow the regexp that was devised from the current
IOCCC_status_version of '0.2 2023-05-22' as:

    [0-9]+\.[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2}

The usage string has had this added and a new check was added to verify
that the '-i version' matches this format.

This update also will prevent sed from reporting an error if the
separator character (which I originally chose as '/' and then changed it
to '|' but which now could be either or ',' or something else) is in the
version as the version won't have that character.

The format of the version can certainly be changed but this seems like a
worthy idea, to check that there is a required format.

With this the script should be finished though of course something might
be found later on.
The -i version variable was actually the same name as the script version
which means that if one were to use -V to determine the version they
would see not the version of the script but an empty string (unless of
course they first set the version with -i version).

Although this is mostly a cosmetic fix it is still important as the
variables served two very different purposes and should not be used for
both.

Instead the name of the version (variable) of the script was changed to
IOCCC_STATUS_SCRIPT_VERSION. This seemed like a better way to go about
it as the -i version modifies the variable in the status.json file
IOCCC_status_version whereas ioccc_status.sh is the script that does it.
Clever I know :-)
A warning that might not have been previously triggered, odd and
unlikely as it might seem, was triggered at least in macOS Sonoma and it
has now been disabled: -Wno-implicit-int.

The entry used to require in modern days -traditional-cpp but like the
others I fixed this and that did introduce new warnings as code had to
be commented out in some cases like this entry (it did not matter in
this entry if it was commented out but it had to be due to compiler
errors otherwise). Even so this warning should have been triggered
already due to main() and subr() not specifying a return type.
My original fix that made it not require -traditional-cpp translated
some macros that rather made the entry not look as good by which I mean
it did not look like it used to but now much less is commented out
because the macro is left as is (though in use it is commented out ..
does that mean it's not used or used? :-) ). But now the main() function
type and args looks like it originally did except for one difference. It originally looked like:

    main(C,V)
    char **V;
    /*      C program. (If you don't
     *      understand it look it
     */     up.) (In the C Manual)

and it was changed to:

    main(/*/,('\b'*'\b'>=_|_>'\t'*'\n')
    char **('\b'*'\b'>=_|_>'\t'*'\n')
    * C program. (If you don't
    * understand it look it
    * up.) (In the /*/ /*C*/ manual)

but now it looks like:

    main(/*C,V)
    char **V;*/
    /*	C program. (If you don't
     *	understand it look it
     *	up.) (In the C */manual)

which is much better and much more like the original entry.
The reason it is in alt code is because one of the forms of input (see
below) will, although print out correct output, segfault after
outputting the text. That is when one does something like:

    echo foo | ./hague.alt

Whether it might be worth making it the entry itself with a note in the
Makefile and README.md and bugs.md (because it does print out correct
output) can be determined later - or not.

This change required several files to be updated besides the new file
hague.alt.c.
It served no good without the '^' and '$' as that would mean that as
long as the format is in the string anything else could be in front or
after (or in between if format specified more than once).
@xexyl
Copy link
Author

xexyl commented Oct 4, 2023

Doing other things now .. almost certainly won't do anything else until tomorrow.

Have a great day!

@lcn2
Copy link

lcn2 commented Oct 4, 2023

While this tool might be used in the future, it should not be considered a priority.

When the status is eventually updated, it will be important to show that a milestone has been reached.

Completing issue #2 and issue #3 would be worth milestones for a status update on the main site to be reported.

We will be focusing on the manifest and markdown translation tools in an effort to make forward progress.

@xexyl
Copy link
Author

xexyl commented Oct 4, 2023

While this tool might be used in the future, it should not be considered a priority.

When the status is eventually updated, it will be important to show that a milestone has been reached.

Completing issue #2 and issue #3 would be worth milestones for a status update on the main site to be reported.

We will be focusing on the manifest and markdown translation tools in an effort to make forward progress.

Agree it's definitely not a priority.

The news update I mentioned we discussed briefly last week or so and it was thought that news of progress being made but some unfortunate delays going on.

I have to leave now though .. hopefully back tomorrow morning. Good day!

@lcn2 lcn2 merged commit 790115d into ioccc-src:master Oct 4, 2023
@xexyl xexyl deleted the ioccc-status-comment-fixes branch October 4, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants