Show HN: Interactively select the quality and format for youtube-dl
21–30 of 95 posts
Re: Show HN: Interactively select the quality and format for youtube-dl
#22Remembering flags is hard? Are shell scripts no longer a thing?
Re: Show HN: Interactively select the quality and format for youtube-dl
#23People gotta realize that Node.js is actually excellent for this sort of task. It hits quite a few sweet spots as an all-round Unix scripting language: * Familiar syntax and semantics (Bash/Zsh/Fish/Csh/Ksh/Ash/Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere) * Standard library ( https://nodejs.org/dist/latest-v12.x/docs/api/fs.html ) gives you access to POS…
I'm not sure what you hope your posted comparisons show, but the Go "monstrosity" seems to have many more features than the Node one.
Re: Show HN: Interactively select the quality and format for youtube-dl
#24I just have an alias with the format codes I want in order of preference (youtube-dl allows that) That's a very nice interactive ui though
Re: Show HN: Interactively select the quality and format for youtube-dl
#25I just have an alias with the format codes I want in order of preference (youtube-dl allows that) That's a very nice interactive ui though
Can you post the alias?
It has examples as well: https://github.com/ytdl-org/youtube-dl#format-selection-exam...
Re: Show HN: Interactively select the quality and format for youtube-dl
#26People gotta realize that Node.js is actually excellent for this sort of task. It hits quite a few sweet spots as an all-round Unix scripting language: * Familiar syntax and semantics (Bash/Zsh/Fish/Csh/Ksh/Ash/Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere) * Standard library ( https://nodejs.org/dist/latest-v12.x/docs/api/fs.html ) gives you access to POS…
Line numbers are always a terrible metric for proving anything but in this case your especially abusing that data.
Re: Show HN: Interactively select the quality and format for youtube-dl
#27Earlier quoted context omitted.
Can you post the alias?
It's well-documented in youtube-dl's readme: https://github.com/ytdl-org/youtube-dl#format-selection It has examples as well: https://github.com/ytdl-org/youtube-dl#format-selection-exam...
Re: Show HN: Interactively select the quality and format for youtube-dl
#28People gotta realize that Node.js is actually excellent for this sort of task. It hits quite a few sweet spots as an all-round Unix scripting language: * Familiar syntax and semantics (Bash/Zsh/Fish/Csh/Ksh/Ash/Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere) * Standard library ( https://nodejs.org/dist/latest-v12.x/docs/api/fs.html ) gives you access to POS…
But your points are... Weird.
1. Familiar to people who know JavaScript, sure. But shell is the language you interact with the CLI with, so more people who use the CLI are familiar with a shell.
2. Most languages have a standard library.
3. I know many people who would disagree with you. Anyway, pip works fine in a Unix environment, which is what we're discussing here.
4. We're talking about glue code, right? Glue doesn't tend to be very parallel.
5. So, perfect Unix glue? Sure, you like it, and that's great for you! Keep on doing you. It's obviously capable of making nice tools, but so are most languages...
6. You luks-suspend example is weird because the Node.js code obviously does so much less than the other versions. I have no idea what the Go version is doing, but the shell version does things like remount the filesystem, handle udev, etc... A bash version of the JavaScript code would be shorter!
7. 0.1+0.2!=0.3 is a result of floating point arithmetic being floating point arithmetic. It's not specific to JavaScript.
Re: Show HN: Interactively select the quality and format for youtube-dl
#29Re: Show HN: Interactively select the quality and format for youtube-dl
#30People gotta realize that Node.js is actually excellent for this sort of task. It hits quite a few sweet spots as an all-round Unix scripting language: * Familiar syntax and semantics (Bash/Zsh/Fish/Csh/Ksh/Ash/Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere) * Standard library ( https://nodejs.org/dist/latest-v12.x/docs/api/fs.html ) gives you access to POS…
Sure, the the node code uses fewer lines than the Go code. But what you’ve failed to notice is the Go code calls APIs directly rather than fork()ing and does so within its own code base (how many lines of code is in the countless imports of your node example?). Plus the Go code also has unit tests which the others don’t. Line numbers are always a terrible metric for proving anything but in this case your especially a…
The Node example has zero external dependencies outside of the Node.js standard library.