5 ms·
Care to elaborate?
by rufugee 9y ago
Care to elaborate?
- Sir_Cmpwn 9y agoGNU coreutils and the broader GNU operating system is an extreme exercise in bloated and overengineered software. It's the antithesis of everything I like Alpine for. Give me a POSIX coreutils and I'm happy. Actually using any of GNU's extensions is an antipattern.
- oblio 9y agoI don't really care about anti-patterns, I care about usability. They're usable, full of features I use and have nice, standardized long form flags, especially good for scripts.
- Sir_Cmpwn 9y agoNo, they're especially awful for scripts. The only place where extensions are maybe appropriate is ad-hoc at your shell. Your scripts are non-portable. Suck it up and learn the POSIX flags, they're not difficult. If you can't, then you aren't really in Alpine's target audience anyway.
- imiric 9y agoThat's a great philosophical standpoint, but unfortunately in the real world BusyBox/musl is just incompatible with some software. I recently had issues getting Node running with nvm (see [this issue][0] and [this one][1]). Sure, there are workarounds, but GNU coreutils is the standard user land toolset for Linux, and it's no surprise alternative tools are less supported overall. I hope this will improve over time, because Alpine is an awesome distro. [0]: https://github.com/creationix/nvm/issues/1102 https://github.com/creationix/nvm/issues/1102 [1]: https://github.com/creationix/nvm/issues/1250 https://github.com/creationix/nvm/issues/1250
- Sir_Cmpwn 9y agoThen nvm downloads binaries compiled for glibc, not Linux. This is a bug in nvm - not Alpine, not Busybox, not musl, but a bug in nvm. Using tools like nvm is the wrong approach anyway, you should be installing from distro packages - and Alpine supports installing specific versions of a package if you really need that. >GNU coreutils is the standard user land toolset for Linux Bullshit. This is the standard: http://pubs.opengroup.org/onlinepubs/9699919799/ http://pubs.opengroup.org/onlinepubs/9699919799/
- imiric 9y ago> This is a bug in nvm - not Alpine, not Busybox, not musl, but a bug in _nvm_. Why the defensive tone? I never claimed one or the other, but as a user, I would just like to see it fixed. > Using tools like nvm is the wrong approach anyway, you should be installing from distro packages Please don't tell me what I should be installing. I _like_ nvm and similar tools for other languages, and would like to keep using them without my operating system (or anyone else for that matter) dictating what software to use and why. > Bullshit. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html > This is the standard: http://pubs.opengroup.org/onlinepubs/9699919799/ http://pubs.opengroup.org/onlinepubs/9699919799/ Of what, exactly? Of some Unix interoperability ideal? Sure, it has its place. But I'd argue that improving the user experience is even more important, and when user land tools break because of a choice of OS/toolchain, something is wrong there.
- camgunz 9y agoSeconded. It's really important that we get out of this "works on my machine" philosophy so endemic to current software dev. Learn standards. Read about the history of the platforms you're developing for. Get to know their communities. Don't just drop a code bomb on them and say, "well it works for me".
- AnIdiotOnTheNet 9y agoLet's be fair, coreutils are awful for scripting regardless. It is 2017, why are we having to parse and reformat text to pass it between tools? Powershell, which pipes tables of typed objects, is a much better implementation of the same concept.
- Sir_Cmpwn 9y agoNo, it's not. Using text still works great and is much simpler.
- AnIdiotOnTheNet 9y agoBullshit. Text parsing is significantly more complicated and error prone than typed data. Coreutils still works, true, but it does not work great.
- Sir_Cmpwn 9y agoSo throw it in json and manipulate it with jq. You can still structure text without introducing types to your shell.
- AnIdiotOnTheNet 9y agoSo let me get this straight. You're saying to take the output of some coreutils tool, pipe it's output text through something that parses text into json, manipulate it with another program, pipe that out through a program converting json to formatted text, and finally pipe that to some other tool. And that's simpler than just having the tools input and output tables of typed object data directly (can be represented in json for all I care) how?
- Sir_Cmpwn 9y agoI'm not really talking about coreutils at all at this point, and neither are you. You're talking about shell features. And I can't speculate on how using jq is generally applicable, but I can give you an example of how to use it in a particular situation.