exercism / cobol

Exercism exercises in COBOL.
https://exercism.org/tracks/cobol
MIT License
11 stars 22 forks source link

Four new exercises #123

Closed kapitaali closed 6 months ago

kapitaali commented 6 months ago

Hi,

please find four new COBOL track exercises: binary-search, protein-translation, secret-handshake, space-age

Let's hope I have all the needed information added in config files.

github-actions[bot] commented 6 months ago

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

axtens commented 6 months ago

I've re-opened the PR. I'd forgotten about the "auto-close". Let's have a look at your work

axtens commented 6 months ago

Are you writing these on a Windows, Linux or Mac? The reason I ask is that ordinarily one would not expect to see the files in the bin folder appearing as part of the PR and that suggests that CRLF line ends are being encountered

axtens commented 6 months ago

For binary-search was the any particular reason why you chose to work out a binary search rather than use the SEARCH ALL command? There's nothing in the instructions for the task that command you to work it long-hand.

axtens commented 6 months ago

In protein-translation and likely in others, it would be better use SPACE or SPACES rather than " ". It's more explicit and doesn't leave the student wondering how many spaces are between the two double quotes.

axtens commented 6 months ago
bugmagnet@bugmagnet-wasta:~/Dropbox/Projects/exercism-tracks/cobol$ bash bin/test protein-translation
Cobolcheck not found, try to fetch it.
CobolCheck: INFO 2024-04-14T10:15:34.689719Z INF001: Attempting to load config from config.properties.
CobolCheck: INFO 2024-04-14T10:15:34.689899Z INF002: Loaded config successfully from config.properties.
CobolCheck: INFO 2024-04-14T10:15:34.689920Z INF003: Cobol-Check starting
CobolCheck: INFO 2024-04-14T10:15:34.689932Z INF005: Log level is INFO.
CobolCheck: INFO 2024-04-14T10:15:34.689944Z INF006: Configuration settings: production.
CobolCheck: INFO 2024-04-14T10:15:34.690397Z INF014: Error log for the test suite parser is set to: /home/bugmagnet/Dropbox/Projects/exercism-tracks/cobol/exercises/practice/protein-translation/ParserErrorLog.txt.
CobolCheck: INFO 2024-04-14T10:15:34.691161Z INF013: Output for generated COBOL test program is set to: /home/bugmagnet/Dropbox/Projects/exercism-tracks/cobol/exercises/practice/protein-translation/test.cob.
CobolCheck: INFO 2024-04-14T10:15:34.730348Z INF012: Successfully generated COBOL test program for src/protein-translation.
CobolCheck: INFO 2024-04-14T10:15:34.731032Z INF004: Cobol-Check terminating: 0
COMPILE AND RUN TEST
test.cob: in paragraph 'UT-AFTER-EACH':
test.cob:791: error: syntax error, unexpected PERFORM
  789 |             EVALUATE UT-TEST-SUITE-NAME..
  790 |                 WHEN..
  791 >            PERFORM UT-AFTER-EACH-BRANCH-0..
  792 |             END-EVALUATE..
  793 |            ...
protein-translation: proof solution did not pass the tests
axtens commented 6 months ago

Please do not use GOBACK. It confuses COBOLCHECK, the unit test tool.

axtens commented 6 months ago

Also configlet is complaining. You should check your submissions with configlet before creating a PR. In this case configlet says,

The `source_url` value is the empty string, but it must be a valid URL:
/home/runner/work/cobol/cobol/exercises/practice/protein-translation/.meta/config.json
axtens commented 6 months ago

So @kapitaali , how about you delete this PR, fix things up and submit each exercise as a separate PR.

kapitaali commented 6 months ago

Closed, doing it 1by1

kapitaali commented 6 months ago

For binary-search was the any particular reason why you chose to work out a binary search rather than use the SEARCH ALL command? There's nothing in the instructions for the task that command you to work it long-hand.

It says in the blurb, "Implement a binary search algorithm". If it's not explicit enough that one should implement it oneself, I can add it to the instructions.

kapitaali commented 6 months ago

Are you writing these on a Windows, Linux or Mac? The reason I ask is that ordinarily one would not expect to see the files in the bin folder appearing as part of the PR and that suggests that CRLF line ends are being encountered

Linux, Pop_OS is Ubuntu