replace an outgrown sort idiom; name the format-spec bytes#273
Merged
Conversation
two small readability payments from the elegance sprint's safe list. logscan's sorted_keys carried a twelve-line insertion sort that predates working ordered string comparison — the sort existed because list.sort() couldn't be trusted before the pointer-compare fix. it is now m.keys().sort(), and the golden check proves the output unchanged. the format-spec lowering used bare byte values for alignment and fill characters; they now carry names (ALIGN_LEFT_BYTE and friends), so the code says what the 60 meant.
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.
summary
two items from the sprint's safe list (no state moves, no dispatch changes):
sorted_keystwelve-line insertion sort →m.keys().sort(). the hand-rolled sort predates working ordered string comparison (add logscan, a log analyzer in pith; fix ordered string comparison #258) — the language caught up to its own code. golden check byte-identical.ALIGN_LEFT_BYTE,ALIGN_CENTER_BYTE,ALIGN_RIGHT_BYTE,FILL_ZERO_BYTE,FILL_SPACE_BYTE.what was tested
full suite green (all four golden checks), fixed point byte-identical, seed refreshed, fmt gate clean.