Merged
Conversation
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
AndreasArvidsson
commented
Aug 4, 2024
4 tasks
phillco
reviewed
Aug 4, 2024
phillco
reviewed
Aug 4, 2024
Member
phillco
left a comment
There was a problem hiding this comment.
Looks great! A few suggestions
Co-authored-by: Phil Cohen <phillip@phillip.io>
Co-authored-by: Phil Cohen <phillip@phillip.io>
…orless into flattenScopeTypeList
phillco
approved these changes
Aug 4, 2024
cursorless-bot
pushed a commit
that referenced
this pull request
Aug 4, 2024
Brings our dfa compilation time from around 700ms down to about 320ms Fixes #2614 I had forgot, but we actually do parse `<user.any_alphanumeric_key>` se we can show the users spoken form in the tutorial. I've now utilize this further and actually add the spoken forms for the glyph scope type in the flattened list. Note that this implementation is somewhat hacky on purpose. Basically I didn't want to touch our csv parser without first talking to pokey since a lot of these list and spoken forms are used in places like the cheat sheet and the tutorial. What I'm instead doing is keeping all the existing lists and then creating a new list that is a flattened version of them. That way the sheet sheet and other places can still use the individual list and we are only using this flattened larger list for the actual scope type capture. This is probably something we want to revisit later, but for now we're getting a huge boast in dfa compilation time with no changes to the speakable grammar and that I think is a clear win. ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [x] I have not broken the cheatsheet - [x] Run Talon grammar tests --------- Co-authored-by: Phil Cohen <phillip@phillip.io>
1 task
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
…orms (#2658) I have a on purpose conflict where I have `string: doubleQuotes` pair and `string: string` scope. This allows me to do `string wrap` that will do double quotes, but `take string` should be all strings not just double quotes. This worked fine before the dfa optimization where we flattened the scope types in #2628 Just rearranging the lists so the one with scope types has higher priority than the list of wrappers fixes this. ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
cursorless-bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
…orms (#2658) I have a on purpose conflict where I have `string: doubleQuotes` pair and `string: string` scope. This allows me to do `string wrap` that will do double quotes, but `take string` should be all strings not just double quotes. This worked fine before the dfa optimization where we flattened the scope types in #2628 Just rearranging the lists so the one with scope types has higher priority than the list of wrappers fixes this. ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Brings our dfa compilation time from around 700ms down to about 320ms
Fixes #2614
I had forgot, but we actually do parse
<user.any_alphanumeric_key>se we can show the users spoken form in the tutorial. I've now utilize this further and actually add the spoken forms for the glyph scope type in the flattened list.Note that this implementation is somewhat hacky on purpose. Basically I didn't want to touch our csv parser without first talking to pokey since a lot of these list and spoken forms are used in places like the cheat sheet and the tutorial. What I'm instead doing is keeping all the existing lists and then creating a new list that is a flattened version of them. That way the sheet sheet and other places can still use the individual list and we are only using this flattened larger list for the actual scope type capture. This is probably something we want to revisit later, but for now we're getting a huge boast in dfa compilation time with no changes to the speakable grammar and that I think is a clear win.
Checklist