Re: sox vs libmagic

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

 



> > But I still believe that if I have a misnamed or unrecognizable file
> > (say, an OGG file named *.wav), the first thing to do is to fix _that_,
> > (i.e. rename it to *.ogg) and only then run SoX on it.
> >
> > Using libmagic in SoX let's me ignore that: sox --magic let's me
> > treat the *.wav file as an OGG which it is. That is _not_ a good thing:
> > the very same problem is still there.
> 
> Oh gosh, the world isn't perfect.  Let's immediately stick our heads in
> the sand and pretend it ain't so.

I wonder how many more strawman attacks
you have up your sleeve.

> >> > 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?
> >
> > No. That's why I am asking here first.
> > (So far, zero people said "I am using it".)
> 
> Only a tiny fraction of all sox users follow this mailing list.

So where do you suggest one should ask this question instead?

> >> >> > 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.
> >
> > Again with the false generalizations. No, that's not what I am saying.
> > But your argument for "why should libmagic stay" is "because it's there".
> > That's not a reason to keep it. 
> 
> Just why do you think someone added the feature in the first place?  My
> money is on someone needing it.

Yes, most probably someone either needed or wanted that feature
years ago (see the Changelog) when it was added. Does anybody
still nedd it now?

Similarly, SoX used to support ffmpeg, thus supporting
e.g. m4a audio. Then it was removed, luckily. But sure,
somebody must have wanted whan it was added. So what?

I am not comparing ffmpeg to libmagic, I am just saying
the the fact that somebody once added it still does not
escape the question why it is there now? Is it still needed?
I think not, that;s all I'm saying.

> Unless it is broken or a burden to maintain, it should stay.  You're not
> even the maintainer, so why do you care?

You have a very strange attitude towards software.
I am not even the maintainer, so why do I care. Jesus.

> >> Why do you hate this particular feature so badly?
> >
> > I don't hate it (or have any other sentiment towards it).
> > I just think it's unused cruft of questionable value,
> > and thus a candidate for removal. That's why I asked
> > if people are using it. (So far, no-one said yes.)
> 
> You could say the same about almost every feature in sox.  The vast
> majority of effects are very rarely used.

The effects are audio signal processors. That's what SoX does.
Guessing the format of unknown files is not. That's what file(1) does.
So no, this stretched generalization of yours doesn't work either.

> > NB: Using libmagic in SoX means explicitly using the --magic option.
> > If anyone is doing that, please speak up.
> 
> Again, most users do not follow this mailing list.
> 
> >> >> 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.
> >
> > How would that be any different? I don't have anything against
> > libmagic itself; but I believe SoX does not need to try to guess
> > unrecognized file formats, be it via libmagic or something
> > quite-the-same-but-different internally.
> 
> What kind of fantasy land do you live in?
> 
> > If I have an OGG file named *.wav, _that_ is the problem. If an internet
> > radio streams a FLAC stream named *.mp3, _that_ is the problem.
> > And using libmagic (or any format guessing for that matter) _in_SoX_
> > is not a solution to it. Instead, find out what the format really is,
> > maybe using a tool designed for file format guessing such as file(1),
> > and fix _that_ first. "Fixing" it within SoX is imho a pollution of SoX.
> > That's my point.
> 
> So you want to fix the internet.  Good luck with that.

And in closing, another meaningless strawman.
No, I don't want to "fix the internet", whatever you mean by that.

I think I give up trying to discuss a point with you.


Anyway, do the maintainers have an opinion on this?



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