3 ms·
Nowadays "javascript" refers to the scriptable, grotesquely and absurdely complex and massive web engines, aka google financed blink and geeko, then apple finan
by sylware 4y ago
Nowadays "javascript" refers to the scriptable, grotesquely and absurdely complex and massive web engines, aka google financed blink and geeko, then apple financed webkit, that with their SDK.
The currently obfuscated javascript media players will try to break yt-dlp by leveraging the complexity and size of those scripted web engines. They will make them out of reach to small teamns or individuals and it is even "better", it will force ppl to use apple or google web engine, killing any attempt to provide a real alternative.
A standalone javascript interpreter is actually some work, but seems to stay in the "reasonable" realm: look at quickjs from M. Bellard and friends (the guy who created qemu, ffmpeg, tinycc, etc): plain and simple C (no need of a c++ compiler), doing the job more that well enough.
That's why noscript/basic (x)html is so much important.
- dtx1 4y ago> but seems to stay in the "reasonable" realm > M. Bellard and friends Chose one, that dude is a wizard wielding c like a brain surgeon wields a scalpel.
- olliej 4y agoYeah I agree with almost all of this - the massive size and complexity of commercial engines makes it seem like JS the language must also be complex. I also agree with the idea that these sites will probably be able to/want to create JS that breaks these small/lightweight engines requiring constant work :-/ This final point I disagree with entirely. You can't point to Bellard doing something as evidence that it's reasonable. This is a guy that wrote a program that generated a TV signal via a VGA card. :D
- randyrand 4y agoChrome and Safari both have open source JS engines…
- userbinator 4y agoThat's beside the point. Open-source is not useful to the smaller players if it is too complex to comprehend and constantly churned.
- kelnos 4y agoThat's not the case, though. There are even python modules that let you evaluate JS code in v8 (Chrome's JS interpreter). It'd be pretty trivial for youtube-dl to make use of that if the author thought it was worth doing.
- sylware 4y agoIt is the case, not too mention v8 pulls in an extremely expensive c++ compiler in the SDK while quickjs can compile with tinycc. Open source is not enough anymore, "lean" open source is the way now, SDK included.
- languageserver 4y ago> That's why noscript/basic (x)html is so much important. xhtml has been dead for a decade
- oblak 4y agoah, but quickjs is an actual js engine. I have tried a couple of versions with real progress between them. This thing here is not
- axiolite 4y ago> quickjs from M. Bellard and friends Is the M key next to the F key on your particular keyboard by chance? Because I've always called him "Fabrice." https://en.wikipedia.org/wiki/Fabrice_Bellard https://en.wikipedia.org/wiki/Fabrice_Bellard