Re: sox vs libmagic

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

 



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

> > 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: the fact that it's there
does not mean someone is using it. With this attitude,
software would just bloat indefinitely.

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

Yes.

> The amount of code is negligible.

It's not a matter of amount; just like having e.g. a needless malloc()
is a candidate for removal even if it's one line.

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

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

	Respectfully,

		Jan


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