This interactive youtube-dl cli wrapper written in javascript has 380 dependencies

github.com/synox/youtube-dl-interactive

This interactive youtube-dl cli wrapper written in javascript has 380 dependencies.

How did js fuck up so bad?

Attached: C24F991A-78E0-4AE5-A278-F8FBD39A27EE.gif (724x328, 709K)

Other urls found in this thread:

npm.anvaka.com/#/view/2d/youtube-dl-node
github.com/sindresorhus/trim-newlines/commits/master
github.com/sindresorhus/trim-newlines/blob/master/index.js
youtube.com/watch?v=PsUsByrOveE
en.wikipedia.org/wiki/Newline#Unicode
github.com/jonschlinkert?tab=repositories
github.com/jonschlinkert/isobject/blob/master/index.js
twitter.com/SFWRedditImages

What the fuck. It's literally like 20 lines in bash.

I hate javascript so god damn much it actually (unironically) makes me seethe.
It's the cancer of the software world and should be exterminated. The would would be a much better place without javascript garbage.

Attached: 1533223853082.jpg (549x604, 63K)

JS itself is a fucking mess, but it in of itself is not the major problem. It's the goddamned bloat that everyone includes or even using it for shit they shouldn't be that makes it so disguting.

>It's literally like 20 lines in bash.
>that calls 4000 lines in the background

Agreed, but that's what happens when you dumb down a language to appeal to brainlets.
You want to guess what the JS interpreter is running in the background?

Attached: 1534305056295.jpg (699x1048, 222K)

"dependencies": {
"inquirer": "^6.3.1",
"lodash": "^4.17.11",
"log-symbols": "^2.2.0",
"meow": "^5.0.0",
"ora": "^3.4.0",
"parse-columns": "^2.0.0",
"shelljs": "^0.8.3"
}
Huh?

>resolutio:n

>if we hide the dependencies folder like they do with python/ruby/rust/whateverthefuckelse then it isn't really happening :)

Good one retard, keep it up.

These also depend on other packages

just use youtube-dlg lmao
cli fags when will they learn

The fucking absolute state of free(r)(tm) software gui

Attached: 9FEB9251-B6C6-4649-B009-F445A60B266D.gif (930x615, 159K)

Just take one of those dependencies and look at theirs.
>meow
"dependencies": {
"@types/minimist": "^1.2.0",
"camelcase-keys": "^5.0.0",
"decamelize-keys": "^1.1.0",
"hard-rejection": "^2.0.0",
"minimist-options": "^4.0.1",
"normalize-package-data": "^2.5.0",
"read-pkg-up": "^5.0.0",
"redent": "^2.0.0",
"trim-newlines": "^2.0.0",
"type-fest": "^0.3.0",
"yargs-parser": "^13.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"execa": "^1.0.0",
"indent-string": "^3.2.0",
"tsd": "^0.7.1",
"xo": "^0.24.0"
},

>A fucking dependency for trimming newlines
you can't make this shit up
javascript developers deserve the bullet.

>unironically uses a gui

Attached: penn_jillette.jpg (300x400, 31K)

from github:
> Why?
> Because remembering CLI flags is hard.
it just fucking isn't. people are just damn lazy.

>How did js fuck up so bad?
it was fucked since the day it was invented. from invading privacy, distributing malware, all the way to node.js, it has been nothing but a cancerous language that continually gets more bloated and useless as the years roll by. i have a 100mbit connection, an overclocked i7-6700k and some webpages still load like they're being accessed by dialup or adsl, all thanks to the magic of js.

npm.anvaka.com/#/view/2d/youtube-dl-node

># of nodes
>56
># of links
>69

>>A fucking dependency for trimming newlines
>you can't make this shit up
HAHAHA. what a fucking travesty.

>javascript developers deserve the bullet.
several bullets, just to be sure.

Some of us have autism prease respect

Attached: FA3E63CB-1E55-47B8-9681-E123D63D84FA.jpg (868x1200, 97K)

lets see it Jow Forums

And...... “thread archived”

I can do it in ~100, but no selection via arrows but number inputs for options.

this is literally what whiptail and dialog exist for. it genuinely is about 20 lines of bash because all you're doing is listing flag availability after parsing the url and choosing.

youtube-dl -F to see formats, youtube-dl -f to download. anyone who need an external program for this is a nigger and should be killed for the sake of humanity

I mean, if you're autistically manually selecting the quality every single time instead of getting the best quality, maybe you want easy options?
But why not dl the best quality in the first place?

ikr, whenever a different format is needed for whatever the fuck reason it's easy to remember -F/-f

here, if this thread won't die faster, I'll deliver when I get to my pc.

>trim-newlines
>v2.0

Attached: 1558925198021.gif (450x402, 839K)

WAKE ME UP

Attached: file.png (753x501, 27K)

>interactive

Or just use a config file.

holy shit

WAKE ME UP

Attached: 1531205553646.png (982x82, 13K)

Version 2.0 was only released to rewrite it in ES2015 and make it stop working on old versions of Node.
Version 3.0 again raised the required version to 8.0 and renamed the arrow function parameter so the new TypeScript test case looks nicer.
github.com/sindresorhus/trim-newlines/commits/master

>Because remembering CLI flags is hard.

So this thing only calls another tool and adjusts flags? WTF?

>three lines
>is a fucking package

Fuck

>Why?
>Because remembering CLI flags is hard.
that's what man command is for ffs

>as many lines as there are versions
disgusting.

How does it even matter when everything is bundled in a single js script where every imported function is a key in a object which is just a reference?

This is too hard to use. There needs to be an electron gui

>This is alpha version, use it at your own risks! scream Thanks in advance for reporting bugs. #sharethelove blush
This is the people writting the software you use

>"Hey user, I just made this little app for people that can't remember CLI flags"
>"Nice, in what language?"
>"JS"
>"Uhhh...How many dependencies?"
>"Just 16 user"
>"Ohh, ok. Did you know that you can do the same thing in bash without all this bloat?"
>"I know, but JS is so much prettier and is language of the FUTURE. Soon everything will be in JS"
>mfw.jpg

Attached: 15171581290932.jpg (776x1054, 124K)

Which is why you use gydl

Attached: 1558968637.png (530x297, 17K)

just you wait, it will get worse

>some startup gets the bright idea to build a neural net to optimize javascript across all implementations
>company gets millions in investment money, produces a javascript ASIC
>all hardware mindshare shifts to javascript, javascript ntp implementations, javascript bootloaders, JAVASCRIPT COMPILERS

github.com/sindresorhus/trim-newlines/blob/master/index.js
fukkin

pic related is the video he downloaded
every time
youtube.com/watch?v=PsUsByrOveE

Attached: 1533584756961.png (1281x857, 1.06M)

>sindresorhus
oh no no no

Attached: patreonwasamistake.png (2502x1750, 2.25M)

I totally hate the situation when other people tell you that you can not use these lines anymore without paying respect to that faggot. 3 lines of code I can easily copy or do the same in less code. Holy fucking shit, when is somebody going to make a library that just gets content, echos it and writes it into an log. Call this library "superdebug" or some retarded normieshit.
Fuck this gay earth.

this is why the web is so fucked

>trim-newlines
>It's one line regex

Attached: 1517029667062.jpg (1032x774, 41K)

>mfw the first AI that will be able to understand reality will run in a browser

It's not even correct. It only removes CR and LF, which is far from every whitespace character in Unicode which is considered a line terminator, and it even misses VT and FF from ASCII, despite the fact the package description links to this very Wikipedia article.
en.wikipedia.org/wiki/Newline#Unicode

>javasoy thing
>macos
everytime

PRs are welcome :^)

Most of this boils down to poor judgement and unnecessary features, could have easily been avoided but I suppose the author just doesn't care. Also what matters more than the amount of dependencies is their file size.

Let's be real though, absolutely nobody uses those characters. Especially the unicode-only newlines. Searching for them would be a waste of clock cycles, as long as you announce that your library isn't gonna do that (which they obviously failed at).

I'd say a bigger issue is that it doesn't seem optimized at all (using not one, but two regex replaces).

Kids these days.
Need a GUI or TUI for a simple CLI program.
This is how you generate retards ego can't help themselves.

Attached: 1558936015602.jpg (960x945, 107K)

>lets see it Jow Forums

Attached: waitingop.jpg (260x194, 9K)

MORE TIME

You guys are newbies in the wonderful world of nodejs.

Attached: isodd.png (1181x564, 38K)

If user manages to do it before the thread gets achieved, I will release the number of this gal.

Attached: 61403257_2246624508764141_1133422997328101376_n.jpg (493x493, 19K)

stop please

How would you do it with one regex replace?

#!/bin/bash

if [[ -n "$1" ]]; then
out=($(youtube-dl --list-formats $1 | fzf))
[[ "webm" == "${out[1]}" ]] && youtube-dl "$1" -f "${out[0]}+bestaudio[ext=webm]"
[[ "mp4" == "${out[1]}" ]] && youtube-dl "$1" -f "${out[0]}+bestaudio[ext=m4a]"
fi

this amazing bash script only requires one dependency (fzf, would also work with dmenu)

Attached: test.gif (1146x1432, 317K)

Something like str.replace(/^ +| $/g, '')

I'd wager it's significantly more efficient than creating an intermediary string and 2 regex DFAs, should be easy to verify

breddy gud

"\n wtf are you on about \n\n".replace(/^ +| $/g, '')
'\n wtf are you on about \n\n'

I was thinking of the whitespace version there. Here, I'll hold your hand since you seem to be unable to grasp the regex or operator:

'\nhello\n\n'.replace(/^[\r\n]+|[\r\n]+$/g, '');

>"is-even"
>2 million downloads
>relies on a package called "is-odd" by the same author
>Literally returns !is-odd
github.com/jonschlinkert?tab=repositories

Wtf is wrong with nodejs users?

Attached: Screenshot_20190528-024447_reddit is fun.jpg (1080x2280, 398K)

nothing wrong with nodejs :^)

Attached: file.png (293x301, 7K)

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

>Saved

Attached: 1534805875886.jpg (680x543, 39K)

The best thing is that is-number no longer carries any dependencies since version 4.0 (17 Oct 2017), but because nobody ever updates their packages, is-odd still pulls in the extra dependencies.

IT HAS TO BE SATIRE

THERE'S NO WAY THIS IS SERIOUS

Attached: 103.jpg (600x815, 37K)

I refuse to believe people are THIS stupid

Why are you all having autistic breakdowns over this? This shows programmers investing more time in the important stuff rather than rewriting a bunch of boilerplate code.

so this is what they meant when they said bruh moment

>boilerplate code
>a single line of code
user, please, you're embarrassing yourself.

>But why not dl the best quality in the first place?
alias yt='youtube-dl -f bestvideo+bestaudio'

If thousands of people program the same thing in the same way, it's boilerplate.

That's not even necessary. Just have ffmpeg and ytdl will always download the best audio and video and automatically mux them if they're a seperate stream.

Is this how Jow Forums would implement is-even and is-odd in C++?
#include
#define MIN_SAFE_INTEGER -9007199254740992.0
#define MAX_SAFE_INTEGER 9007199254740991.0
static bool isInt(double num) {
double inte;
return !isnan(num) && std::modf(num, &inte) == 0.0 && num >= MIN_SAFE_INTEGER && num

>fzf

what is that? that's really cool

return arg & 1;

500 hours in notepad
not really equivalent, but how many different formats do you use? just edit/add ones you use

#!/bin/env bash
function main {
urls=$(whiptail --inputbox 'URL(s), space-delimited' 0 70 3>&1 1>&2 2>&3)

case $(
whiptail --notags --menu 'Format selection' 0 0 0\
0 'Best Video + Audio'\
1 'Best Audio'\
2 'Best combined format'\
3 'Give me a fucking mp3'\
3>&1 1>&2 2>&3
) in
0)
format='bestvideo+bestaudio';;
1)
format='bestaudio'
addargs='-x';;
2)
format='best';;
3)
format='bestaudio'
addargs='-x --audio-format mp3 --audio-quality 2';;
esac

youtube-dl -f "$format" $addargs $urls
}

main

Attached: 2019-05-28-035407_793x525_screencap.webm (793x525, 247K)

.0.1

How do you fuck up this much?

Wow user,you're right. If statements, for loops, functions, all boilerplate. We should make a package replacing those

here is it where's the nudes

>trim-newlines
Isn't this basic programming stuff that you learn in less than an hour? I mean, it's right in the first chapter of any C book.
>implying those people ever learned C

wtf Jow Forums delivered!!!

Attached: h76FD8E60_1d.jpg (385x247, 23K)

Unironically agreed

>You want to guess what the JS interpreter is running in the background?
are you retarded ?

github.com/jonschlinkert/isobject/blob/master/index.js

>literally one line
>a fucking package
>open source(r)

Attached: 1D8EE8DA-2405-43CE-ADF7-1F1C37D6F209.jpg (1536x1853, 502K)

Fuck off! Jon Schlinkert has achieved more in his life than you ever will.

Attached: is-odd.png (1009x3612, 467K)

That’s not even funny. That’s just sad.

Holy shit. Looking at this makes me feel so much better about myself. I wonder if the rest of this dude's repos are as embarrassing

Attached: 1380844317389.jpg (891x695, 279K)

this is a joke though, right?

Who cares? youtube-dl is written in python so it probably has 10 times that amount of dependencies.

have sex

Someone explain to me why this is considered terrible?

bend over

how much?