Re: sox vs libmagic

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

 



Jan Stary <hans@xxxxxxxx> writes:

> On Sep 20 11:32:15, mans@xxxxxxxxx wrote:
>> Jan Stary <hans@xxxxxxxx> writes:
>> 
>> >> > Would anyone miss the libmagic functionality
>> >> > if it was removed from SoX?
>> >
>> > On Sep 18 10:27:00, peterparker@xxxxxxxxxxxx wrote:
>> >> A few other posters have commented to either enable or disable at
>> >> compilation time. I am using sox a lot, but have never compiled it
>> >> myself and would be happy if I hadn't to in the future to either enable
>> >> or disable libmagic, whatever my preference would be.
>> >
>> > On Sep 19 15:51:53, mans@xxxxxxxxx wrote:
>> >> Until someone can point to a specific problem the feature is causing,
>> >> I see absolutely no reason for removing it.
>> >
>> > I think it goes the other way: there needs to be a specific reason to
>> > have it in there.
>> 
>> It's already there, presumably because it was useful to someone.
>
> That's exactly what I am asking: is anyone using it?
> How exactly are you using it? When have you last used it?

It doesn't matter what I or you have or haven't done.  The feature is
there, so I must assume that someone is using or least has used it.
Removing it without good reason would be rude.  It's what Gnome
developers do.

>> I'm against removing features merely because one person lacks the
>> imagination to see their utility.  If the situation were reversed,
>> someone sending a patch to add this feature, I'd be asking for examples
>> of when it is needed.  Change without reason is always misguided.
>
> Let's stop with the generalizations and "persons without imagination", OK?
> I know what libmagic does. I just don't think that it is much useful in SoX.
> How many misnamed or unrecognizable audio files have you encountered recently?

Recently, not a lot.  In the past, more than I care to count.

> Zero, that's how many. And how did libmagic in SoX help you with that?
> You can't tell, because you haven't used it. Tell me it's not true.
>
> 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?

> 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.

> 4. It would be one less dependency, and less code.

The dependency is optional.  The amount of code is negligible.

> 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?

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.

-- 
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