dustmite(1)

πŸ’… dustmite β€” bestie's guide to shrinking ur code

okay so first things first, the manual name is dustmite and it lives in section 1 of the manual, and honestly? she's that girl. let's get into it 🫢


✨ NAME ✨

dustmite β€” a tool for minimizing D source code. periodt.


🌸 SYNOPSIS 🌸

dustmite [OPTION]... PATH TESTER

that's the whole vibe. PATH and TESTER are mandatory, the options are the little sprinkles on top πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so DustMite is a tool for minimizing D source code, fr fr. and like, plot twist, reducing C++ code also works quite well via --split *.{c,cpp,h,hpp}:d β€” she's versatile, she contains multitudes πŸ’…

DustMite will parse the source code into a simple hierarchy, and then attempt to shrink it by deleting fragments iteratively, as long as the result satisfies a user-specified condition. it's giving "keep deleting until the vibes are still immaculate" ✨

PATH should be a directory containing a clean copy of the file-set to reduce.

  • A file path can also be specified too, no stress. NAME.EXT will be treated like NAME/NAME.EXT. and TESTER should be a shell command which returns 0 for a correct reduction, and anything else otherwise. yes bestie, the exit code IS the vibe check πŸ”₯

πŸ‘‘ OPTIONS πŸ‘‘

  • --force β€” Force reduction of unusual files. she said "unusual files are valid too" πŸ’œ
  • --reduce-only MASK β€” Only reduce paths glob-matching MASK (may be used multiple times, so stack 'em up like friendship bracelets πŸŽ€)
  • --no-remove REGEXP β€” Do not reduce blocks containing REGEXP (may be used multiple times β€” some things are protected, and that's on boundaries 🌸)
  • --strip-comments β€” Attempt to remove comments from source code. bye bye commentary πŸ’€
  • --coverage DIR β€” Load .lst files corresponding to source files from DIR
  • --obfuscate β€” Instead of reducing, obfuscate the input by replacing words with random substitutions. not a reduction era, an incognito era πŸ™ˆ
  • --keep-length β€” Preserve word length when obfuscating. keeps the silhouette the same, love that for her ✨
  • --split MASK:MODE β€” Parse and reduce files specified by MASK using the given splitter. Can be repeated. MODE must be one of: files, lines, words, d
  • --no-redirect β€” Don't redirect stdout/stderr streams of test command. she's letting it all out, unfiltered 🫢
  • -j[N] β€” Use N look-ahead processes (8 by default). multitasking queen πŸ‘‘
  • --help β€” Show this message

πŸ¦‹ Less interesting options:

(her words not mine, but okay we still love them)

  • --strategy STRAT β€” Set strategy (careful/lookback/pingpong/indepth/inbreadth)
  • --dump β€” Dump parsed tree to DIR.dump file
  • --dump-html β€” Dump parsed tree to DIR.html file
  • --times β€” Display verbose spent time breakdown. clock it ⏰
  • --cache DIR β€” Use DIR as persistent disk cache (in addition to memory cache)
  • --trace β€” Save all attempted reductions to DIR.trace
  • --no-save β€” Disable saving in-progress results. living in the moment, no screenshots πŸ’…
  • --no-optimize β€” Disable tree optimization step (may be useful with --dump)

🌈 SEE ALSO 🌈

The full documentation for dustmite can be found on the GitHub wiki:

https://github.com/CyberShadow/DustMite/wiki

go read it, it's lowkey iconic, iykyk πŸ“–βœ¨


bestie this page came from the Dustmite manual, dated December 2016, and it's dustmite(1) in the User Commands section. slay, go minimize something πŸ’–πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from