-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve boolean and some iteration commands, unify tests #144
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, add destructuring to |
okamsn
changed the title
Improve boolean commands and some iteration commands.
Improve boolean commands, some iteration commands, unify tests
Dec 14, 2022
okamsn
changed the title
Improve boolean commands, some iteration commands, unify tests
Improve boolean and some iteration commands, unify tests
Dec 14, 2022
|
okamsn
force-pushed
the
better-init
branch
2 times, most recently
from
January 5, 2023 01:26
4a13bdc
to
19e29a5
Compare
This was referenced Jan 12, 2023
okamsn
force-pushed
the
better-init
branch
2 times, most recently
from
January 29, 2023 18:19
a81b521
to
09079a9
Compare
7 tasks
okamsn
force-pushed
the
better-init
branch
2 times, most recently
from
March 16, 2023 01:49
0f7d525
to
62eab43
Compare
okamsn
force-pushed
the
better-init
branch
4 times, most recently
from
May 1, 2023 02:29
afa8c5e
to
5bceedb
Compare
- Make it an error to use the same iteration var for multiple iteration commands. - Add `loopy--other-vars` for the `set` commands. These variables don't work exactly like iteration or accumulation variables, so it needs it's own group. - Improve boolean commands by making their behavior more like accumulation commands. - Switch to `loopy-result` instead of a variable based on the loop name. - Use accumulation variables instead of iteration variables. - Make boolean commands exit via `leave`. - Check the compatibility of the used boolean commands during expansion, like we already do with accumulation commands. - Add `:into` to the boolean commands. - Improve `cons`, `cycle`, `iter`, `numbers`, and `seq-index`, by defaulting to avoiding updating the iteration variables during the loop. This lets us avoid indirect variables and produce faster code. This can be overridden using the `with` (or `without`) special macro arguments. - For `cycle` in particular, we now allow it to do the opposite. - Add predicates `loopy--with-boundp` and `loopy--command-boundp`. - Update Org doc and changelog with these changes.
okamsn
force-pushed
the
better-init
branch
2 times, most recently
from
May 6, 2023 22:38
da2fa46
to
9b63fee
Compare
okamsn
force-pushed
the
better-init
branch
3 times, most recently
from
August 11, 2023 02:59
f60229e
to
dc93277
Compare
- Separate, clean up, and add tests. - Unify most command tests for `loopy` and `loopy-iter`. - Add more errors which can be signaled in `loopy-misc.el`. Use these signals to better test expected failures. - Simplify explanation of boolean commands. - Remove unused functions. - `loopy--quoted-symbol-p`: We still use `loopy--quoted-form-p`. - `loopy--quote-if-car-not-symbol-or-lambda` - Remove unused functions `loopy--get-optimized-accum`, `loopy--accum-code-expansion`. We replaced these functions with `loopy--expand-optimized-accum` and using Emacs's own macro expansion facilities a while ago. - Remove functions. - Replace references to removed function with references to the new function. - Replace use of removed `loopy--quoted-symbol-p` with `loopy--quoted-form-p` in `find`. - Make `loopy--with-bound-p` return value and place. - Make `loopy--command-bound-p` return value and place. - Remove unused `loopy-test-structure` from default tests. Still used elsewhere. - Clarify examples for `find`. - Mark that a test is expected to fail on Emacs 27 due to byte compilation errors. - Remove duplicate tests from `iter-tests.el`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make it an error to use the same iteration var for multiple iteration commands.
loopy--other-vars
for theset
commands.These variables don't work exactly like iteration or accumulation variables,
so it needs it's own group.
Improve boolean commands by making their behavior more like accumulation
commands.
loopy-result
instead of a variable based on the loop name.leave
.like we already do with accumulation commands.
:into
to the boolean commands.Improve
cons
,cycle
,iter
,numbers
, andseq-index
, by defaultingto avoiding updating the iteration variables during the loop. This lets us
avoid indirect variables and produce faster code. This can be overridden
using the
with
(orwithout
) special macro arguments.cycle
in particular, we now allow it to do the opposite.loopy--with-boundp
andloopy--command-boundp
.Update Org doc and changelog with these changes.