Re: sox vs libmagic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Stary <hans@xxxxxxxx> writes:

>> > I am proposing to remove libmagic from SoX, because
>> >
>> > 1. It is of questionable utility. Next time you encounter
>> >    a missnamed or unrecognizable audio file, just run file(1) on it.
>> >    That's what file(1) is for. 
>> 
>> Wrong.  How would you do that in an automated fashion?
>
> I don't understand the question -
> cannot file(1) be scripted just like sox?

What do you propose one should do with the file(1) output?

>> > 2. I haven't inspected the code closely, but it also seems that
>> >    for the libmagic functionality to even happen, you need to call SoX
>> >    with an explicit --magic. If that's the case, tell me:
>> 
>> Yes, that is the case.
>> 
>> >    have you ever done that? No. So you are not using it anyway.
>> 
>> Again, it doesn't matter.  Since it's there, I have to assume someone is
>> using it.
>
> This seems to be exactly the point where we differ:
> I believe it's dead code:

Based on what?  That *you* haven't ever needed it?

>> > So far the only argument for it to stay is that it's already there.
>> > IMHO that's not a reason for it to be there. Or, to paraphrase:
>> > code without reason is always misguided.
>> >
>> > Of course I can build my SoX --without-magic (and I do).  I just
>> > believe that it would be beneficial to SoX as a piece of software to
>> > drop it entirely. It would be smaller without really losing anything.
>> 
>> It would be losing a feature.  How is that ever beneficial?
>
> Again, this seems to be the very difference in attitude:
> "features must never be removed". No wonder software gets
> evr more bloated.

By extension, features should never be added either.  Hell, we should
just stop writing software at all.

Why do you hate this particular feature so badly?

>> That said, having looked at the code, the use of libmagic is actually
>> quite limited and could probably be replaced with little effort without
>> losing any functionality.  If I cared as deeply as you appear to do,
>> that's where I'd be looking.
>
> "Replaced" with what?

Similar functionality re-implemented without libmagic.

-- 
Måns Rullgård

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux