News for hackers. Stuff that matters.
Re:YouTube-dl has an interpreter for a subset of JavaScript ... by Test0129 on Saturday September 10, 2022 @04:05PM (#32794165)
Making a pedantic argument on what constitutes an interpreter is silly. The title is bad. It is an interpreter. I'll continue to eat downvotes on this because of the pedantry of HN.
Re:YouTube-dl has an interpreter for a subset of JavaScript ... by jraph on Saturday September 10, 2022 @04:21PM (#32794298)
I didn't downvote, but I don't think esprehn is being unfair. Their comment is very informative. They didn't argue that what was implemented is not an interpreter, they did explain why it's not a JavaScript interpreter and not even an interpreter for a subset of JavaScript. It's just a special purpose interpreter suitable for YouTube's code that cannot be re-used for any code that uses the subset that it seems to implement.

It's not pedantry (or I'm pedantic). It's a reaction to the title that can lead people to believe that a complete JavaScript interpreter has been written in less than a thousand lines of Python. This reaction is perfectly understandable.

Re:YouTube-dl has an interpreter for a subset of JavaScript ... by khazhoux on Saturday September 10, 2022 @04:08PM (#32794191)
Technically, it’s only the pedantry of a subset of HN.
Re:YouTube-dl has an interpreter for a subset of JavaScript ... by lupire on Saturday September 10, 2022 @04:19PM (#32794281)
It's an interpretation of a subset of the pedantry on HN.
Re:YouTube-dl has an interpreter for a subset of JavaScript ... by baobabKoodaa on Saturday September 10, 2022 @04:33PM (#32794363)
> Making a pedantic argument on what constitutes an interpreter is silly. The title is bad. It is an interpreter.

It's not a pedantic argument. Based on the title I thought that somebody wrote something akin to V8 in 800 lines of Python. After reading the comments I realized those 800 lines just interpret a particular JavaScript function written by Youtube. Those things are different. Pointing out the fact that they are different is not pedantry. The title is misleading and the comments pointing that out are helpful.

Re:YouTube-dl has an interpreter for a subset of JavaScript ... by chess_buster on Saturday September 10, 2022 @04:23PM (#32794304)
I evaluated it with my Pedantic Interpreter which only results in the `pedantic` token.
Re:YouTube-dl has an interpreter for a subset of JavaScript ... by blondin on Saturday September 10, 2022 @06:29PM (#32795074)
my vote is meaningless and i am sorry about that. but just wanted to let you know that what you said made sense. do not let people get to you.

most of us know that a thousand or so lines of code is not a full JavaScript interpreter and cannot be the real thing.

there is no argument or conversation to have about it.