Not logged in
Log in now
Create an account
Subscribe to LWN
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
GNU virtual private Ethernet
Sure, some find implementations don't have it. Fix them.
Simplicity is better than complexity.
Posted Mar 26, 2009 2:29 UTC (Thu) by k8to (subscriber, #15413)
As evidence for my position, here are some real-world filenames that my software needed to create to correctly archive some digital music history of the personal computer as an instrument.
jrodman@calufrax:/opt/kmods/mods/artists/Karl> ls d_* ¦*
d_ .it d_ .it d_ .it d_ .it d_1151.it d_1152.it d_1153.it d_1154.it ¦¦¦¦¯¯Ì_.it
jrodman@calufrax:/opt/kmods/mods/artists/Karl> ls d_* ¦* |xxd
0000000: 645f 2020 2020 2e69 740a 645f 2020 202e d_ .it.d_ .
0000010: 6974 0a64 5f20 202e 6974 0a64 5f20 2e69 it.d_ .it.d_ .i
0000020: 740a 645f 3131 3531 2e69 740a 645f 3131 t.d_1151.it.d_11
0000030: 3532 2e69 740a 645f 3131 3533 2e69 740a 52.it.d_1153.it.
0000040: 645f 3131 3534 2e69 740a a6a6 a6a6 afaf d_1154.it.......
0000050: cc5f 2e69 740a ._.it.
These files are handled by a combination of python and shellscripts, and one piece of C code (wrapping a library which knew how to read certain binary formats.) All of these pieces can handle newlines, tabs, spaces, control characters, leading dahes, and so on. I'm not really that smart. It wasn't much work.
If shellscripts are 5 second hackjobs, then they will always fail in some cases: strange filenames, permissions problems, etc. If you take a few minutes to apply correct safeguards, then thigns work fine.
Posted Mar 26, 2009 2:31 UTC (Thu) by k8to (subscriber, #15413)
Posted Mar 26, 2009 2:39 UTC (Thu) by foom (subscriber, #14868)
I find it very hard to believe that your software *needed* to create unintelligible filenames. And if it
did, I'd claim it needs to be fixed.
Posted Mar 26, 2009 2:48 UTC (Thu) by k8to (subscriber, #15413)
Posted Mar 26, 2009 3:40 UTC (Thu) by foom (subscriber, #14868)
If, in some alternative universe, it was already impossible to create those filenames, I have little
doubt you could still have created working software which didn't require the impossible.
Sorry I come off as unreasonable to you. *hugs*
Do you know difference between two words: "need" and "want"?
Posted Mar 26, 2009 8:41 UTC (Thu) by khim (subscriber, #9252)
you have no clue about my software or the project but you claim
to know what is correct and incorrect.
I don't have a clue. And I don't need it to know anything about your
project to know you are lying. Any project can be implemented with
exactly two filenames: "0" and "1". You'll need infinite depth of
directory structure to do so, true, but thankfully there are no practical
limitations in Linux. Is it feasible? Probably no. Is it possible? Of
course. And if we'll start with the position that your software does
not need these filenames but you current design needs these
suddenly you have much weaker argument: you are reducing complexity of your
software by increasing complexity of everyone's else's software. Is it good
trade-off? May be yes, may be no. But it's weak argument at best - no
matter what your project is and what it needs to be done.
Posted Mar 26, 2009 10:01 UTC (Thu) by epa (subscriber, #39769)
I know this is a matter of taste, and merely trying to impose one person's tastes on everyone is not a reason to change the kernel. But on the other hand, the marginal extra disk space saving (ten bytes?) from being able to put arbitrary binary stuff in filenames without encoding does not outweigh the many good reasons that Wheeler gave for changing.
Posted Mar 26, 2009 13:54 UTC (Thu) by clugstj (subscriber, #4020)
Put quotes around it?
Posted Mar 26, 2009 10:27 UTC (Thu) by mjj29 (subscriber, #49653)
Posted Mar 26, 2009 21:22 UTC (Thu) by explodingferret (guest, #57530)
Are you able to make the source of your shell scripts available? I'm sure I can find something in them that is breakable. :-)
DANGER! DANGER! DANGER! HYPOCRISY LEVEL IS OVER 9000!!!
Posted Mar 26, 2009 8:30 UTC (Thu) by khim (subscriber, #9252)
Simplicity is better than
As for the find, gnu find
already has -print0 and xargs is compatable.
And you can not even claim that "we already solved thsi problem so it's
old code vs new code". A lot of programs just don't work with
currect approach (especially script). You need to write and fix literally
millions lines of code vs few thoiusands in kernel.
Sorry, but you are advocating more complex solution while preaching
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds