Show HN: Interactively select the quality and format for youtube-dl
People 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:<p>* Familiar syntax and semantics (Bash&#x2F;Zsh&#x2F;Fish&#x2F;Csh&#x2F;Ksh&#x2F;Ash&#x2F;Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere)<p>* Standard library (<a href="https:&#x2F;&#x2F;nodejs.org&#x2F;dist&#x2F;latest-v12.x&#x2F;docs&#x2F;api&#x2F;fs.html" rel="nofollow">https:&#x2F;&#x2F;nodejs.org&#x2F;dist&#x2F;latest-v12.x&#x2F;docs&#x2F;api&#x2F;fs.html</a>) gives you access to POSIX APIs (&quot;batteries included&quot; - but not bloated)<p>* Sane packaging, package management, and ecosystem (overreliance on third-party module is a thing <i>exactly</i> because NPM works with much less friction than e.g. the Python situation)<p>* Asynchronous event model lets you safely do multiple things in parallel without worrying about low-level memory management, or which concurrency boilerplate library to use, etc.<p>All in all, it&#x27;s the perfect Unix glue. All it misses is a mature S-expression-based syntax.<p>For example, take the problem of locking your encrypted partitions before suspending your Linux machine. Since distro developers are too &quot;busy&quot; to provide what one might say is basic functionality, power users took matters in their own hands and wrote this 100-ish line Bash script (<a href="https:&#x2F;&#x2F;github.com&#x2F;vianney&#x2F;arch-luks-suspend" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vianney&#x2F;arch-luks-suspend</a>), which evolved into this 1500-ish line Go monstrosity (<a href="https:&#x2F;&#x2F;github.com&#x2F;guns&#x2F;go-luks-suspend" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;guns&#x2F;go-luks-suspend</a>)... as well as these ~75 lines of Node.js (<a href="https:&#x2F;&#x2F;github.com&#x2F;egasimus&#x2F;node-luks-suspend" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;egasimus&#x2F;node-luks-suspend</a>).<p>But yeah, sure, hurr durr JaavaaScriipt baad, 0.1+0.2!==0.3, &#x27;true&#x27;==true, etc... The horror!