Skip to content

feat(ud): introduce a new program: ud! - #111

Merged
logic-finder merged 7 commits into
mainfrom
feat/ud
Nov 1, 2026
Merged

logic-finder merged 7 commits into
mainfrom
feat/ud

Conversation

@logic-finder

Copy link
Copy Markdown
Contributor
$ ud --message="마인크래프트해킹버전1.13.2" --iterate=5
download: 마인크래프트해킹버전1.13.2.dll
unzip: 마인크래프트해킹버전1.13.2.jpeg
build: 마인크래프트해킹버전1.13.2.obj
extract: 마인크래프트해킹버전1.13.2.exe
remove: 마인크래프트해킹버전1.13.2.txt

So basically all the outputs take this form: <action>: <msg>.<extension>.

<action> ::= "download" | "unzip" | "build" | "extract" | "remove" | etc...
<extension> ::= "dll" | "exe" | "zip" | "obj" | "txt" | "jpeg" | etc...

@logic-finder logic-finder self-assigned this Oct 29, 2026
@logic-finder logic-finder added the enhancement New feature or request label Oct 29, 2026
@logic-finder

logic-finder commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

It'd be nice to allow mutiple -m options like:

$ ud -m 마크립버전1.13.1 -m 로블록스립버전1.13.2 -m 어몽어스립버전1.13.3 -i5
download: 마크립버전1.13.1.dll
unzip: 로블록스립버전1.13.2.jpeg
build: 어몽어스립버전1.13.3.obj
extract: 로블록스립버전1.13.2.exe
remove: 어몽어스립버전1.13.3.txt

To implement this, let the config struct have array_t *msgs field and stores each string into msgs.

@logic-finder
logic-finder marked this pull request as ready for review October 31, 2026 15:04
@lshqqytiger
lshqqytiger requested a balanced review from Copilot October 31, 2026 15:10

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.

🟡 Changes recommended

Negative iteration counts can trigger SIZE_MAX output lines instead of being rejected, while documented options are unrecognized and the help fallback references a missing manual.

4 open issues
What changed in this PR

Introduces ud, a fake updater for the Utils suite that prints messages in <action>: <message>.<extension> format.

Changes:

  • Adds a C implementation with configurable messages, iteration counts, and English/Korean actions.
  • Integrates ud into the suite’s build targets.
  • Adds introductory documentation and a manual-page skeleton.
File Description
vars.mk Registers the ud target.
ud/​ud.1 Adds the manual-page skeleton.
ud/​README.md Introduces the utility.
ud/​c/​ud.internals.h Defines action translations and file extensions.
ud/​c/​ud.c Implements startup, usage, and output generation.
ud/​c/​Makefile Adds build and cleanup rules.
ud/​c/​global.h Defines executable and manual paths.
ud/​c/​config.internals.h Declares configuration helpers and shared state.
ud/​c/​config.h Defines configuration types and interfaces.
ud/​c/​config.c Implements defaults, validation, and manual display.
ud/​c/​argp_drivers.internals.h Registers command-line options.
ud/​c/​argp_drivers.h Exposes option metadata.
ud/​c/​argp_drivers.c Handles option values and diagnostics.
ud/​c/​.gitignore Excludes generated build artifacts.
README.md Adds ud to the utility list.

Review effort: Balanced

Comment thread ud/c/argp_drivers.c Resolved
Comment thread ud/c/argp_drivers.internals.h Resolved
Comment thread ud/c/argp_drivers.internals.h Resolved
Comment thread ud/c/config.c Resolved
@logic-finder

Copy link
Copy Markdown
Contributor Author

@lshqqytiger Done.

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.

🔵 Needs a closer look

The documented --message option is rejected, the help fallback depends on a missing file, and the unseeded random generator repeats the same update sequence across invocations.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Seed the random generator before generating actions

ud/​c/​ud.c:37

rand_range() calls rand(), but this program never seeds the generator. Consequently, separate invocations with the same arguments always choose the same actions, extensions, and messages, rather than varying the fake update sequence. Call the existing seed() helper once before work(), as the other randomized utilities do.

4 resolved since last review

Review effort: Balanced

@logic-finder
logic-finder merged commit b06c9d0 into main Nov 1, 2026
1 check failed
@logic-finder
logic-finder deleted the feat/ud branch November 1, 2026 06:22
@github-project-automation github-project-automation Bot moved this to Done in Utils Nov 1, 2026
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.

3 participants