Skip to content
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

Update iteration commands #73

Merged
merged 1 commit into from
Jun 9, 2021
Merged

Update iteration commands #73

merged 1 commit into from
Jun 9, 2021

Conversation

okamsn
Copy link
Owner

@okamsn okamsn commented May 29, 2021

This PR addresses #65.

WORK IN PROGRESS

  • Add macro to simplify definitions, similar in use to loopy-defaccumulation.
    • Add support for optional arguments and keyword arguments.
  • Add distributing elements of multiple sequences.
    • TODO: What is the best data type for iterating through sequences? We can
      choose what to make the sequence resulting from distribution.
  • Try to add equivalent keywords for Iterate's sequence drivers.
  • Make command arguments more regular. For example, I haven't checked
    distributing elements for commands like list-ref, but it's still a good idea
    to change its optional FUNC argument to :by, to be more like the command
    list, for which an optional FUNC argument is no longer possible.

@okamsn okamsn marked this pull request as draft May 29, 2021 17:49
@okamsn okamsn mentioned this pull request Jun 1, 2021
11 tasks
@okamsn okamsn force-pushed the multi-seq branch 2 times, most recently from 498ade6 to 0c8c8ea Compare June 4, 2021 00:57
@okamsn
Copy link
Owner Author

okamsn commented Jun 4, 2021

Current commit message:

  • Add heuristic to determine whether we should quote a list.
  • Create macro loopy--defiteration, similar in use to
    loopy--defaccumulation.
  • Add multi-sequence support to list, array, and seq commands.
  • Add macros loopy--distribute-sequence-elements,
    loopy--distribute-array-elements, and loopy--distribute-list-elements.
  • Add test to check for ELC files in the current working directory. These files
    can accidentally be used instead of the EL files, meaning that we won't see our
    changes during testing.
  • Add the keywords from, upfrom, downfrom, to, upto, downto,
    above, below, and by to commands seq and array, the -ref variants,
    the -index variant, and the nums command and variants. Add :by to
    cons and list and variants.
    • For nums, keep the positional arguments, but make them optional.
  • Add to library comments a note on how to find loop commands with Imenu.
    This is helpful now that we are using a macro to define them.
  • In code, add more headings for outline commands.
  • Add macro loopy--plist-bind. This macro is similar to
    cl-destructuring-bind, but for property lists.
  • Add function loopy--find-start-by-end-dir-vals to extract the needed values
    from plists. This function is used for all of commands which share so many
    keyword arguments.
  • Split "Iteration" section of Org doc into several sub-sections.
    • Break down into sections.
    • Add descriptions and custom ID's for sections.
    • Re-arrange commands.
  • Add a changelog.

@okamsn okamsn marked this pull request as ready for review June 4, 2021 01:00
@okamsn
Copy link
Owner Author

okamsn commented Jun 4, 2021

I think these changes are ready. They can also be viewed in the multi-seq branch.

User @Luis-Henriquez-Perez, is there anything that you think should be changed?

- Add heuristic to determine whether we should quote a list.
- Create macro `loopy--defiteration`, similar in use to
  `loopy--defaccumulation`.
- Add multi-sequence support to `list`, `array`, and `seq` commands.
- Add macros `loopy--distribute-sequence-elements`,
  `loopy--distribute-array-elements`, and `loopy--distribute-list-elements`.
- Add test to check for ELC files in the current working directory.  These files
  can accidentally be used instead of the EL files, meaning that we won't see our
  changes during testing.
- Add the keywords `from`, `upfrom`, `downfrom`, `to`, `upto`, `downto`,
  `above`, `below`, and `by` to commands `seq` and `array`, the `-ref` variants,
  the `-index` variant, and the `nums` command and variants.  Add `:by` to
  `cons` and `list` and `variants`.
  - For `nums`, keep the positional arguments, but make them optional.
- Add to library comments a note on how to find loop commands with Imenu.
  This is helpful now that we are using a macro to define them.
- In code, add more headings for outline commands.
- Add macro `loopy--plist-bind`.  This macro is similar to
  `cl-destructuring-bind`, but for property lists.
- Add function `loopy--find-start-by-end-dir-vals` to extract the needed values
  from plists.  This function is used for all of commands which share so many
  keyword arguments.
- Split "Iteration" section of Org doc into several sub-sections.
  - Break down into sections.
  - Add descriptions and custom ID's for sections.
  - Re-arrange commands.
- Add a changelog.
- Remove old TODO from `cons` command. This TODO no longer applies.
- Improve Org documentation.
- Improve function documentation strings.
- Fix using variables that hold functions for `list`, `list-ref`, and `cons`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant