WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

690

User input; date -a -d s -w s -m s -y s -n s -m m -d m

Initial interpretation; ['date', ['a'], ['d', 's'], ['w', 's'], ['m', 's'], ['y', 's'], ['n', 's'], ['m', 'm'], ['d', 'm']]

Would it be better, do you think, to collapse it into this; [['a', 'n', 's', 'y', 's', 'm', 's', 'w', 's', 'd', 's']]

Or this; ['date', ['a'], ['d','s','m'], ['w','s'], ['m','s','m'], ['y','s'], ['n','s']]

They were different, they did have flag indicators '-', but that's useless, the flag is always 0 and all that - did was create more processing time. The good thing about the second one - ['date', ['a'], ['d','s','m'], ['w','s'], ['m','s','m'], ['y','s'], ['n','s']] - is I can sub string [1:] to get rid of date, then iterate over the remaining lists. Pin list[0], which here is ['a'] as the parent flag to very thing else, then again iterate after that index.

The first on - [['a', 'n', 's', 'y', 's', 'm', 's', 'w', 's', 'd', 's']] - is similar but I think takes more dict look ups and parsing, which is fast, but fast is not 0.

User input; date -a -d s -w s -m s -y s -n s -m m -d m Initial interpretation; ['date', ['a'], ['d', 's'], ['w', 's'], ['m', 's'], ['y', 's'], ['n', 's'], ['m', 'm'], ['d', 'm']] Would it be better, do you think, to collapse it into this; [['a', 'n', 's', 'y', 's', 'm', 's', 'w', 's', 'd', 's']] Or this; ['date', ['a'], ['d','s','m'], ['w','s'], ['m','s','m'], ['y','s'], ['n','s']] They were different, they did have flag indicators '-', but that's useless, the flag is always 0 and all that - did was create more processing time. The good thing about the second one - ['date', ['a'], ['d','s','m'], ['w','s'], ['m','s','m'], ['y','s'], ['n','s']] - is I can sub string [1:] to get rid of date, then iterate over the remaining lists. Pin list[0], which here is ['a'] as the parent flag to very thing else, then again iterate after that index. The first on - [['a', 'n', 's', 'y', 's', 'm', 's', 'w', 's', 'd', 's']] - is similar but I think takes more dict look ups and parsing, which is fast, but fast is not 0.

Be the first to comment!