Posted Mar 26, 2009 2:29 UTC (Thu) by k8to (subscriber, #15413)
[Link]
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.
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.
Simplicity is better than complexity.
Posted Mar 26, 2009 2:31 UTC (Thu) by k8to (subscriber, #15413)
[Link]
Hah, the html markup I wasn't familiar with (needed to prevent the forum from mangling the listing) led me to mangle my post. Case in point, bad input, bad output. Shrug, learn, move on.
Simplicity is better than complexity.
Posted Mar 26, 2009 2:39 UTC (Thu) by foom (subscriber, #14868)
[Link]
> needed to create
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.
Simplicity is better than complexity.
Posted Mar 26, 2009 2:48 UTC (Thu) by k8to (subscriber, #15413)
[Link]
If someone else cares about the design constraints that led to this necessity, let me know. Foom: i've watched you refuse to converse in a reasonable way across many threads. you have no clue about my software or the project but you claim to know what is correct and incorrect. Shut up.
Simplicity is better than complexity.
Posted Mar 26, 2009 3:40 UTC (Thu) by foom (subscriber, #14868)
[Link]
I claim that I'd find software that creates filenames like that on my disk to be irritating. So I'd
certainly prefer if no software actually did so, and probably wouldn't mind if it was impossible to do
so.
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)
[Link]
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.
Simplicity is better than complexity.
Posted Mar 26, 2009 10:01 UTC (Thu) by epa (subscriber, #39769)
[Link]
Surely base64-encoding the filenames would not be too much hardship? Personally, I would be inclined to do that anyway, because trying to use shell commands to manipulate a file called ¦¦¦¦¯¯Ì_.it will be painful.
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.
Simplicity is better than complexity.
Posted Mar 26, 2009 13:54 UTC (Thu) by clugstj (subscriber, #4020)
[Link]
"manipulate a file called ¦¦¦¦¯¯Ì_"
Put quotes around it?
Simplicity is better than complexity.
Posted Mar 26, 2009 10:27 UTC (Thu) by mjj29 (subscriber, #49653)
[Link]
Would there be any problem with uuencoding those filenames?
Simplicity is better than complexity.
Posted Mar 26, 2009 21:22 UTC (Thu) by explodingferret (guest, #57530)
[Link]
If we can do ANYTHING to prevent you writing programs which try to store information in filenames this way, I'm all for it.
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)
[Link]
This argument:
Simplicity is better than
complexity.
plus this one
As for the find, gnu find
already has -print0 and xargs is compatable.
equals
hypocrite.
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
simplicity.