Add good ideas from dead branches#1966
Merged
Merged
Conversation
…generic defaults Record two abandoned-experiment findings in .agents/memory/ so future agents don't re-tread them: - sortedcontainers-for-streams: both attempts to make streams always-sorted via SortedList, and why it lost (too slow for tiny streams). - stream-subclass-generic-defaults: the inherit-generics target shape, blocked on PEP 696 default type params; investigate typing_extensions. AI-assisted (Claude)
Once core lives on Stream.core, two swappable StreamCore backends behind one abstract interface (list-based for small streams, tree/sortedcontainer for large) would suit each workload instead of forcing one container to win both. AI-assisted (Claude)
Keep-the-list binary-search idea avoids the small-stream insertion cost that sank sortedcontainers, but applied bisect with no length gate and only helps the classList=None path; a list binary search won't beat the linear scan until >~1000 elements, which real streams rarely reach. Conclusion: don't pursue bisect-on-list; get fast big-stream lookup from the swappable-.core plan. AI-assisted (Claude)
…ator memory MockObjectProcessor.process counted notes with len(subStream.flatten().notesAndRests), which materializes a throwaway flat Stream just to count; recurse() yields the same notes lazily. Tiny unrelated win salvaged from the deleted flatIterator branch. Also record the BFS-flatten-iterator idea: a lazy breadth-first flatten is worth writing (likely for tree first) but must not reuse the flat/flatten name, which is bound to offsetInHierarchy. AI-assisted (Claude)
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.
Some branches have had long-term experiments. Save good ideas from them as memories, but delete the branches instead.