-
-
Notifications
You must be signed in to change notification settings - Fork 72
[Booleans] new concept #781
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
Conversation
concepts/booleans/about.md
Outdated
true | ||
``` | ||
|
||
Because `5 > 12` is `false`, clearly the combined expression must be `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we can say the combined expression is clearly false
since we haven't introduced why the expression would be false
. We also risk reinforcing whatever interpretation the student got from line 85 because they might think Julia stops when it hits a false value regardless of which operator is used so that's what "unambiguous" means.
concepts/booleans/about.md
Outdated
``` | ||
|
||
Because `5 > 12` is `false`, clearly the combined expression must be `false`. | ||
The `1 != 0` expression is not relevant and is never evaluated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 != 0
isn't evaluated when the left side evaluates to false. It is evaluated if the left side evaluates to true so we can't say it's never evaluated without qualifying that never.
concepts/booleans/introduction.md
Outdated
true | ||
``` | ||
|
||
Parentheses are optional and can make the code easier to read. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be included under the logical OR section. However, we've already mentioned this in the Boolean logic section so it can be dropped.
concepts/booleans/introduction.md
Outdated
|
||
In Julia (and many other programming languages), `&&` has a [higher precedence][operator-precedence] than `||` (in the same way that `*` is applied before `+`). | ||
This means that `true || false && true` evaluates to `true` because it is parsed as `(true || false) && true`. | ||
It is common to include explicit brackets anyway so that the reader doesn't need to think about this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is common to include explicit brackets anyway so that the reader doesn't need to think about this. | |
It is common to include explicit parentheses anyway so that the reader doesn't need to think about this. |
Co-authored-by: András B Nagy <[email protected]>
Co-authored-by: András B Nagy <[email protected]>
I need to think about this and try again. |
Co-authored-by: András B Nagy <[email protected]>
Your key point is that comparison operators aren't taught till the next concept. I'm a bit less worried about this in One take-home message: don't blindly reuse text from the older exercise drafts, as I did here.. There are reasons why this syllabus hasn't launched. I'll think about this, and try again tomorrow. |
I did a major rewrite (essentially from scratch) of both Markdown files, in response to the all-too-valid criticisms from @BNAndras. Further comments welcome, from anyone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at a computer but these jumped out at me.
concepts/booleans/about.md
Outdated
true | ||
``` | ||
|
||
These operators will be familiar to users of many other languages, though *not* Python. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is confusing. and
and or
exist in other languages. Perhaps we say the operators and these concepts should be familiar coming from other languages but they might have different names there.
* Add `queen-attack` * Re-include tests * Add extra return at end of runtests.jl --------- Co-authored-by: depial <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@692973e...eef6144) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 2.3.0 to 2.6.0. - [Release notes](https://github.com/julia-actions/setup-julia/releases) - [Changelog](https://github.com/julia-actions/setup-julia/blob/master/devdocs/making_a_new_release.md) - [Commits](julia-actions/setup-julia@780022b...9b79636) --- updated-dependencies: - dependency-name: julia-actions/setup-julia dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/julia-actions/cache/releases) - [Changelog](https://github.com/julia-actions/cache/blob/main/devdocs/making_a_new_release.md) - [Commits](julia-actions/cache@8608484...8242439) --- updated-dependencies: - dependency-name: julia-actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@5076954...b4b15b8) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@eef6144...11bd719) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/julia-actions/setup-julia/releases) - [Changelog](https://github.com/julia-actions/setup-julia/blob/master/devdocs/making_a_new_release.md) - [Commits](julia-actions/setup-julia@9b79636...5c9647d) --- updated-dependencies: - dependency-name: julia-actions/setup-julia dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@b4b15b8...6f51ac0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… order of the return values (exercism#827)
Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 2.0.5 to 2.0.7. - [Release notes](https://github.com/julia-actions/cache/releases) - [Changelog](https://github.com/julia-actions/cache/blob/main/devdocs/making_a_new_release.md) - [Commits](julia-actions/cache@8242439...2b1bf4d) --- updated-dependencies: - dependency-name: julia-actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@6f51ac0...65c4c4a) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* WIP draft of numbers concept * enlarged/corrected section on rounding * added section on isapprox() for floats --------- Co-authored-by: Colin Leach <[email protected]>
Co-authored-by: András B Nagy <[email protected]>
Co-authored-by: András B Nagy <[email protected]>
Co-authored-by: András B Nagy <[email protected]>
Co-authored-by: András B Nagy <[email protected]>
Aargh! I have done something very, very wrong with this, and the files changed now include GH workflows and all sorts of nonsense. Unless I can dig myself out of this soon, I may close this PR and open a new one. It was just about ready to review, before I broke it! |
Closing now, I wrecked this PR. Continues with #831. |
For discussion on the forum.
This concept draft borrows heavily from
exercises/concept.wip/.docs/introduction.md
, with some edits and new additions. It pairs withannalyns-infiltration
.