exercism / prolog

Exercism exercises in Prolog.
https://exercism.org/tracks/prolog
MIT License
29 stars 37 forks source link

Triangle - A bug or an extension? #289

Closed cpmachado closed 6 months ago

cpmachado commented 7 months ago

Hello there,

During a code review with bomber34, as I'm quite new to Prolog, he pointed out the following(from my solution):

?- triangle(1.0, 1, 1).
false

This happens, because my solution which was similar to the example enforces type equality, and it shouldn't or should it? I took the liberty to submit this patch, in case it's to be considered a bug.

Best regards, cpmachado

github-actions[bot] commented 7 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.

cpmachado commented 7 months ago

@ErikSchierboom My concern which wasn't maybe properly addressed, is that as my branch is, it enforces solutions without type equality. The implications are that many solutions that are currently working would be failing. Should this change in tests be made as optional? as an extra task? bonus cookie, you know?

Going to address the requested change in the instructions append.

Looking forward for your reply :-)

cpmachado commented 7 months ago

I'll look into it later in the day, when I have time,

cpmachado commented 7 months ago

@ErikSchierboom Just fixed the tests and added the bonus flag as pending was before in https://github.com/exercism/prolog/pull/289/commits/30debbe29cd2f22b1fe4df05b99ceff6201346e7

To run bonus tests

swipl -f "${implementation_file}" -s "${tests_file}" -g run_tests,halt -t 'halt(1)' -- --bonus
cpmachado commented 6 months ago

just linking this issue, apparently it is the last task https://github.com/exercism/prolog/issues/81

cpmachado commented 6 months ago

@ErikSchierboom Any more requests?