Skip to content

fix: improve prelex logic - #97

Closed
logic-finder wants to merge 2 commits into
mainfrom
fix/prelex-logic
Closed

fix: improve prelex logic#97
logic-finder wants to merge 2 commits into
mainfrom
fix/prelex-logic

Conversation

@logic-finder

@logic-finder logic-finder commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

To be honest, I don't think this modification give us much merit, at the expense of simplicity, but I just did it though.

@logic-finder
logic-finder requested a review from lshqqytiger July 25, 2026 10:00
@logic-finder logic-finder self-assigned this Jul 25, 2026
@logic-finder logic-finder added the enhancement New feature or request label Jul 25, 2026
@lshqqytiger
lshqqytiger requested a review from Copilot July 26, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the prelex() selection logic used by hhss to pick random, non-duplicated sentence lines from the loaded sentence database.

Changes:

  • Switches lastpos to represent the last valid element index (len - 1) instead of the length.
  • Splits the selection into “swap-based picks” plus a final “last pick” without swapping.

Comment thread hhss/c/prelex.c Outdated
@logic-finder

Copy link
Copy Markdown
Contributor Author

done

@logic-finder

Copy link
Copy Markdown
Contributor Author

I changed my mind--I think this change would harm the simplicity of the original code.
Let me close this PR.

@github-project-automation github-project-automation Bot moved this to Done in Utils Jul 26, 2026
@logic-finder
logic-finder deleted the fix/prelex-logic branch July 26, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants