Toot

Written by Eric G. on 2025-01-11 at 20:17

Hey #Ruby and #DevOps folks:

I have a maintenance project on some Ruby code that will require that I map files in a directory tree to a new directory tree.

There's no consistent global pattern, so the remap will have be by applying a set of rules. Overly simplified:

[[ etc ]]

I would like the rules to be declarative, obvious and easily amendable without baking it into the code.

The obvious, brute-force (my specialty) approach is to write the rules, iterate through each one, locate the matches and perform the actions.

This makes it O(n log n) which might be fine for this project but makes me wonder:

Anyone know of an existing gem that does this more efficiently?

(I'm also trying, because laziness, to not write this remapping code myself so even if the existing gem does it in O(nlogn), I may consider it.

=> More informations about this toot | View the thread | More toots from ericg@beige.party

Mentions

Tags

=> View ruby tag | View devops tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113811563941522003
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
227.648073 milliseconds
Gemini-to-HTML Time
0.607876 milliseconds

This content has been proxied by September (3851b).