ioccc-src / temp-test-ioccc

Temporary test IOCCC web site that will go away
Creative Commons Attribution Share Alike 4.0 International
48 stars 7 forks source link

False missing files; updating .entry.json needed #2734

Closed leobru closed 1 week ago

leobru commented 3 weeks ago

Is there an existing issue for this?

Describe the problem with or missing documentation

Relevant files

No response

What you expect

Please edit the "bugs" file and .entry.json as appropriate.

Relevant links or files

No response

Anything else?

No response

leobru commented 3 weeks ago

1994/shapiro.alt.c is https://www.funet.fi/pub/doc/IOCCC/1994/shapiro.alt.c

lcn2 commented 3 weeks ago

Thank you @leobru

We will be sure to address this as part of the Great Fork Merge.

BTW: @xexyl and @SirWumpus and other folks: @leobru is Leo, an IOCCC judge, in case you didn't know. We both have full edit capability on this repo, although Leo might not yet know some of the details about the make quick_www and make www stuff.

REQUEST to @xexyl

Please address Leo's issue as terms of whatever PRs are needed while Landon is away, if you please.

xexyl commented 3 weeks ago

Yes I recognise the name: beginning of his surname.

Nice catches Leo!

I will set a reminder to do this tomorrow morning.

xexyl commented 3 weeks ago

Reminder set.

Safe travels and a great and safe holiday to you Landon!

xexyl commented 3 weeks ago

Oh and you may assign this to me.

xexyl commented 3 weeks ago

I might have a question regarding these things. If I do I will let you know. Anyway back tomorrow.

lcn2 commented 3 weeks ago

BTW: @xexyl, we are fixing the manifest now due to the addition of 2001/westley/card.gif.

We will post a message to @leobru about the process .. stay tuned ...

xexyl commented 3 weeks ago

Thanks Leo.

I will let you know if I have any questions, tomorrow.

xexyl commented 3 weeks ago

BTW: @xexyl, we are fixing the manifest now due to the addition of 2001/westley/card.gif.

We will post a message to @leobru about the process .. stay tuned ...

Thanks!

lcn2 commented 3 weeks ago

BTW: @leobru

If your file timestamps are up to date, doing a make quick_www will update things through the rest of the repo (and this when committed, the web site).

However, because the manifest has been changed (something unusual), we have:

=-=-=-=-= IOCCC begin make verify_entry_files =-=-=-=-=
bin/all-run.sh -v 1 bin/chk-entry.sh
...
bin/chk-entry.sh: Warning: file list does NOT match manifest for: 2001/westley
bin/chk-entry.sh: Warning: manifest files that are missing starts below: 2001/westley
2001/westley/.entry.json
2001/westley/.gitignore
comm: file 2 is not in sorted order
comm: file 1 is not in sorted order
comm: input is not in sorted order
bin/chk-entry.sh: Warning: manifest files that are missing ends above: 2001/westley
bin/chk-entry.sh: Warning: found files not in manifest starts below: 2001/westley
2001/westley/card.gif
comm: file 2 is not in sorted order
2001/westley/.entry.json
2001/westley/.gitignore
comm: file 1 is not in sorted order
comm: input is not in sorted order
bin/chk-entry.sh: Warning: found files not in manifest ends above: 2001/westley
bin/all-run.sh: ERROR: tool: bin/chk-entry.sh  -- 2001/westley failed, error: 1
bin/all-run.sh: Warning: EXIT_CODE set to: 1

So we need to update the manifests. We can do this by:

# form CSV from JSON .entry.json files
make entry2csv

# update manifest.csv to include the new file 2001/westley/card.gif
# use your favorite CSV editor / spreadsheet tool to add:
Screenshot 2024-10-30 at 15 42 42

and thus:

--- save.manifest.csv   2024-10-14 12:43:33
+++ manifest.csv    2024-10-30 15:41:46
@@ -1811,6 +1811,7 @@
 2001,westley,Makefile,30,true,makefile,true,entry Makefile
 2001,westley,westley.alt.c,40,true,c,true,alternate source code
 2001,westley,westley.orig.c,50,true,c,true,original source code
+2001,westley,card.gif,100,true,image,false,image of punch cards
 2001,westley,try.sh,100,true,shellscript,true,script to try entry
 2001,westley,2001_westley.tar.bz2,1415926535,false,tbz2,false,download entry tarball
 2001,westley,.entry.json,4000000000,true,json,true,entry summary and manifest in JSON

Continuing:

# convert CSV into JSON files
make csv2entry

The above modified 2001/westley/.entry.json so we build all the links:

make quick_www

NOTE: If we didn't trust file timestamps for some reason, make www would rebuild everting (this takes about 15 minutes) while ignoring file mod times.

FYI: @leobru , @xexyl knows these processes as well, so if I am away, you can ask him for guidance.

Adding a new file to an existing entry, or removing a file form an existing entry is an unusual action, so the steps are a bit more involved. If this was a new IOCCC winner, then bin/cvt-submission.sh would have been used to generate this stuff.

FYI: The above did:

On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    modified:   2001/westley/.entry.json

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   2001/westley/index.html
    modified:   thanks-for-help.html

So doing git add -u and a commit we have commit bd546c8f4ba4616a3ddd1559b163f2694d7c6033

Again @leobru .. thanks for finding the missing file. The above is just a bit of the manifest accounting needed when files are added or remove from existing entries .. which is an unusual event now. If needed @xexyl can also assist.

xexyl commented 3 weeks ago

The card.gif one is sorted in the pull request I just opened with commit b86f81c3449d0f25f23387f36a0ffb8fd3272135.

I had a really hard night and yesterday was quite hard too (they're related) but I will hopefully get to the others in a bit too (soon I'll be taking a shower and other 'morning stuff' but also have other things on my mind at this hour). I think I have some questions about one of the things you discovered, @leobru, but I'll let you know if so.

xexyl commented 3 weeks ago

Describe the problem with or missing documentation

  • 2001/herrmann1 The original remarks file mentions gcd.turing and times2.turing. Both are present under different names.

Okay first of all I'm very tired so if I miss something here I'm sorry; but I am trying to make sure I do understand this.

The file that is noted as missing in this entry is herrmann1.turing. Is this file under the name plus1.turing? If so I am confused because that is also noted by the author, I thought?

As for gcd.turing that was not noted as missing.

Please advise, @leobru, so I can take care of this problem.

I'll address the other ones next (or shortly I hope).

xexyl commented 3 weeks ago

BTW Leo: a useful tool I wrote that both Landon and I have used a fair amount (I think Landon actually used it in his calc repo even) that is feature-rich and lets one run sed(1) on files (select files or all files) under git control is sgit. This has been used a lot here and the jparse repo (co-developed by Landon and me) and the mkiocccentry repo too.

Just as an FYI.

xexyl commented 3 weeks ago

Is there an existing issue for this?

  • [x] I have searched for existing issues and did not find anything like it

Describe the problem with or missing documentation

  • 2001/rosten The author's remarks in plain text format are the purportedly missing cat man page.

You know looking at the remarks now ... I see what you mean! So how do you wish to be done? I can take the README.md file and make a text version. Or alternatively I can make it a man page and then update the remarks to refer to that (and the manifest too of course which also means the .entry.json file).

Please advise and I'll be happy to take care of this as well.

xexyl commented 3 weeks ago

About halfway through the shapiro.alt.c issue. Once that is resolved I will open another pull request and then once you let me know about herrmann1 I can take care of that and then I believe this issue can be closed, though I of course will let you decide on that.

xexyl commented 3 weeks ago

... bin/entry2csv.sh does take some time, however, so I have to wait on that ... once done I can update the spreadsheet, export to the new CSV and then run make csv2entry. Then I can do a make quick_readme2html and then once that is done I can do a pull request.

Stay tuned!

xexyl commented 3 weeks ago

Okay with commit 45fb924ecfb5212f04f548e73a100607eae17ef9 the shapiro.alt.c has been added! I cannot test the links until after the commit has been merged but it should be okay, unless I forgot something in my tired head.

Once you, @leobru, tell me what you mean with herrmann1, I can take care of that, and unless you have anything else in mind, I guess this issue is resolved? Oh right, also the cat man page.

Anyway I'll be afk a while I think.

leobru commented 3 weeks ago

Describe the problem with or missing documentation

  • 2001/herrmann1

The original remarks file (as submitted by the author) which I've found in my archives, mentions gcd.turing and times2.turing. The new names are herrmann1.gcd and herrmann1.times2

The file that is noted as missing in this entry is herrmann1.turing. Is this file under the name plus1.turing? If so I am confused because that is also noted by the author, I thought?

The file name herrmann1.turing in the edited remarks is a mistake. It should be herrmann1.times2.

xexyl commented 3 weeks ago

Describe the problem with or missing documentation

  • 2001/herrmann1

The original remarks file (as submitted by the author) which I've found in my archives, mentions gcd.turing and times2.turing. The new names are herrmann1.gcd and herrmann1.times2

The file that is noted as missing in this entry is herrmann1.turing. Is this file under the name plus1.turing? If so I am confused because that is also noted by the author, I thought?

The file name herrmann1.turing in the edited remarks is a mistake. It should be herrmann1.times2.

Thanks Leo. I set a reminder to take care of this tomorrow as I'm just too tired to do it today, unfortunately. This is what I need to know though.

What about the cat man page one?

leobru commented 3 weeks ago

What about the cat man page one?

Attached is remark.txt the plaintext original from my archives.

xexyl commented 3 weeks ago

What about the cat man page one?

Attached is remark.txt the plaintext original from my archives.

Thanks. Did a git add on it so I'll be sure to see it tomorrow.

xexyl commented 3 weeks ago

A request for you, @leobru, if you would, with much thanks from both Landon and me.

Please clone the mkiocccentry repo on your systems and then run from the directory:

make release

If this fails because of not enough recent version of flex or bison, you can try instead:

make prep

If all is good then please let us know. Otherwise, on the systems that fail, please run:

make bug_report

and attach the log file.

Thank you!

xexyl commented 3 weeks ago

Working on 2001/rosten now. Renamed it to greasymouse.man as that's the name of the program. Now making the CSV files. When that's done I can edit the spreadsheet, export back to CSV and then update the .entry.json and index.html file.

After that I know I need to check the 2001/herrmann1 and then I think this issue is done unless something else comes up. It is not clear to me if I can finish this today but I do hope to.

xexyl commented 3 weeks ago

The herrmann1 is done but before I do a pull request I'm going to show you, @leobru, how I did it, which includes a simple use of sgit(1) that I told you about.

This is the process I went through:

$ cd 2001/herrmann1 # you'll see why I did this in a moment
$ sgit -e 's/gcd.turing/herrmann1.gcd/g' -e 's/times2.turing/herrmann1.times2/g' -e \
's/herrmann1.turing/herrmann1.times2/g' .

This modifies the filenames in the way you said.

I then removed from the section (in README.md) Bugs and (mis)features the line:

> **STATUS: missing files - please provide them**<br>

The html file will be updated when I move back to the root directory.

Let's try git status and then git diff in the entry's directory:

$ git status .
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   README.md
    modified:   index.html

no changes added to commit (use "git add" and/or "git commit -a")

And the diff filtered through grep to only show changed lines, for brevity here:

$ git diff .|grep '^[+-]'
--- i/2001/herrmann1/README.md
+++ w/2001/herrmann1/README.md
-> **STATUS: missing files - please provide them**<br>
-The info files `herrmann1.turing` and [herrmann1.gcd](%%REPO_URL%%/2001/herrmann1/herrmann1.gcd) are sample
+The info files `herrmann1.times2` and [herrmann1.gcd](%%REPO_URL%%/2001/herrmann1/herrmann1.gcd) are sample
-tape of the program `times2.turing`. To provide your own tape, type
+tape of the program `herrmann1.times2`. To provide your own tape, type
-    ./herrmann1 prg=times2.turing tape="O O O I I I O O O"
+    ./herrmann1 prg=herrmann1.times2 tape="O O O I I I O O O"
--- i/2001/herrmann1/index.html
+++ w/2001/herrmann1/index.html
-<p>The info files <code>herrmann1.turing</code> and <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/herrmann1.gcd">herrmann1.gcd</a> are sample
+<p>The info files <code>herrmann1.times2</code> and <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/herrmann1.gcd">herrmann1.gcd</a> are sample
-tape of the program <code>times2.turing</code>. To provide your own tape, type
+tape of the program <code>herrmann1.times2</code>. To provide your own tape, type
-<pre><code>    ./herrmann1 prg=times2.turing tape=&quot;O O O I I I O O O&quot;</code></pre>
+<pre><code>    ./herrmann1 prg=herrmann1.times2 tape=&quot;O O O I I I O O O&quot;</code></pre>

As you can see both README.md and index.html has been changed. This is kind of cheating, though, so I will restore the index.html and show you a nice way to quickly update index.html if the README.md file has been updated:

$ cd - # we need to be back in the root directory

I updated the bugs.md file to remove the part of that entry that refers to missing files. Here's a diff:

$ git diff bugs.md
diff --git i/bugs.md w/bugs.md
index cc8b6d2a63c648d82420ace1fb144dc67b771e24..f366584a5e5548e61663faeac70367f3311d51a4 100644
--- i/bugs.md
+++ w/bugs.md
@@ -2502,19 +2502,10 @@ Jump to: [top](#)
 ## 2001/herrmann1
 </div>

 Jump to: [top](#)

-### STATUS: missing files - please provide them
-### Source code: [2001/herrmann1/herrmann1.c](%%REPO_URL%%/2001/herrmann1/herrmann1.c)
-### Information: [2001/herrmann1/index.html](2001/herrmann1/index.html)
-
-The author referred to the file `herrmann1.turing` but it does not exist not even
-in the archive. Do you have a copy? Please provide it!
-
-Jump to: [top](#)
-

Now let's update bugs.md. Yes, the fun Easter egg was all my doing, just as some other rules' Easter eggs! This one is probably my favourite but it doesn't really matter; just pointing it out as it's fun. Here's how to update bugs.html (note that not all html files have specific rules; for those it depends on what files need to be updated in what rule you have to do, though make www - which is very slow - will do everything and make quick_www, which can be faster, should too, as long as the timestamps are okay):

$ make bugs 
=-=-=-=-= IOCCC begin make bugs =-=-=-=-=
Shhh. Be vewy vewy quiet.
I'm hunting wabbits 🐇 .. and bugs 🪳🪲🦟🐜🐛.

Eh, what's up, doc?

I'm hunting wabbits 🐇 .. and bugs 🪳🪲🦟🐜🐛
=-=-=-=-= IOCCC complete make bugs =-=-=-=-=

Now that bugs.html is updated we have to make sure 2001/herrmann1/index.html is updated. To do this quickly:

$ make quick_readme2index

and let it do its work. Since it's in 2001 once it has processed the specific file you can interrupt it. The bin/quick-readme2index.sh script will check timestamps so what I do sometimes, if I need to have a html file generated (even if I don't have to update the README.md file), is touch the README.md file.

Now once I've done this step everything should be in order and I can commit and do a pull request. A helpful rule:

make help

Feel free to ask me more things and I'll be happy to help out! Hope this helps you see what I did.

xexyl commented 3 weeks ago

BTW: you might try also make test to run some tests. The GitHub workflow does this too to flag any problems found. It runs a number of checks, using some scripts that Landon wrote and some scripts that I wrote too (or at least one I wrote .. not sure how many).

xexyl commented 3 weeks ago

I believe that with commit https://github.com/ioccc-src/temp-test-ioccc/pull/2741/commits/ad48e7a80cd9d512df9e9b513ed62322c8a470e4 this issue is resolved but I leave that up to your judgement, Leo. If anything was missed please let me know and I'll address it.

UPDATE 0

Commit f1903e4374ba3d4d495829b35aa4d444d02d1c15 made a minor fix also.

lcn2 commented 1 week ago

It appears that this issue had been resolved.

Thanks @leobru for raising this issue, and thanks @xexyl for helping resolve it.