Live data from Hacker News

QuickJS JavaScript Engine

bellard.org

81–90 of 279 posts

Re: QuickJS JavaScript Engine

#81

Earlier quoted context omitted.

Wait, he has an Emacs clone, too? EDIT: https://bellard.org/qemacs/

Looks impressive, I may have to try it out. Too bad it's LGPL. I expected MIT because QuickJS was, and hoped for it because GPL is unethical[1]. [1] https://sdegutis.com/2019-06-26-why-the-gpl-is-unethical

The GPL doesn't hold a gun to ones head forcing one to use software licensed under it.

If you don't want the person you are distributing the software to be able to make modifications and adapt it just don't use GPL licensed software.

How difficult can this be?

As to the ethical dimension, I am sure you are as impressed by the ethics of John Deere as much as their customers are.

Re: QuickJS JavaScript Engine

#82

Earlier quoted context omitted.

Wait, he has an Emacs clone, too? EDIT: https://bellard.org/qemacs/

Looks impressive, I may have to try it out. Too bad it's LGPL. I expected MIT because QuickJS was, and hoped for it because GPL is unethical[1]. [1] https://sdegutis.com/2019-06-26-why-the-gpl-is-unethical

> GPL is unethical

No. You think that GPL is unethical. It does not make it unethical.

After thorough reading, your blog post did not convince me and here is why:

> Proponents argue that the GPL has a long-term goal of making more software free for all, by limiting short-term freedoms of some, for the sake of encouraging the propagation of the GPL via software, like a virus. That’s why it’s called a viral license.

This is a faulty comparison [1]. You do choose to use a code under GPL and make your code under GPL as a result. You don't choose to catch a virus. See also [2].

> they are using a system they fundamentally disagree with, in order to promote and propagate a new system, and they are doing this from within the new system, which they would replace the old system with from without if they could.

What is your suggestion? They live in our world by its rules. How do you want them to achieve their goal? Also, what is wrong with doing this?

> So the authors of software have rights, a fact which proponents of the GPL agree with. But they argue that the users of software have rights which should, in an ideal system, trump those of software authors.

> This is a clear contradiction. In an ideal legal system, either the software authors should have the absolute right of licensing their software as they see fit, or the software users should have the absolute right of accessing and modifying the software regardless of the software author’s wishes and intent.

Sorry, I don't understand the contradiction here.

> Experience shows that most people see nothing wrong with the current system: let authors distribute their work with whatever licenses they want, and let the market decide whether an author’s requirements are reasonable enough to cooperate with.

Great. If "experience shows", you must have a reference, right? Anyway, this is an argumentum ad populum [3]. "[it] is a fallacious argument that concludes that a proposition must be true because many or most people believe it" [which does not make it right].

Also, I don't want to "let the market decide". I want good behavior to be enforced, not some hazardous process that might end up producing a good behavior. The "market" is not necessarily right. There is no guarantee here. But I agree this is personal opinion. Anyway: choosing to use GPL is indeed a way to participate in this free market, if such a thing exists, and "let it decide".

> Practical philosophical systems agree with this. When someone creates a work, they have the absolute right to do what they want with it, as long as they themselves do not break the law, and as long as the existence of the thing itself doesn’t violate the law either.

Oh, there we seem to agree. So authors of GPL software do not want to see their code used in proprietary software.

> Thus, the heart of the GPL goes against common sense, experience, and the just liberty of creators over their creations.

It goes against your common sense, not mine. Talk about common sense now.

> But that actually brings up an interesting point: the GPL actually limits people’s freedom.

This is the point of the GPL. To prevent people from reusing the code without forwarding freedom to users. If you make a code that is proprietary, you are the one who is "actually" limiting freedom of other people.

One person's freedom ends where another person's freedom begins. Freedom is nothing like an absolute graal.

If you are pissed off because you can't reuse some interesting GPL code in your proprietary software or your permissively licensed software, well, you are free to not use it. Nobody forces you to do it. You are also free to (re)consider setting your program under GPL. It is your choice, and one of the goals of the GPL too.

Thing is: there is no absolute truth. Some people think that the right way to write free software is to use permissive licenses. Some, to use copyleft. Some people think they should be free to produce proprietary software. Some people think that proprietary software is unethical and have given many solid arguments for that. Common sense on this question is apparently non existent (yet?).

[1] https://www.logicallyfallacious.com/tools/lp/Bo/LogicalFalla...

> Tip: Comparisons of any kind almost always are flawed. Think carefully before you accept any kind of comparison as evidence.

[2] https://en.wikipedia.org/wiki/Argumentum_ad_populum

[3] https://en.wikipedia.org/wiki/Viral_license#Criticism_of_the...

Re: QuickJS JavaScript Engine

#83

Would this be a suitable replacement for SpiderMonkey as an embedded JS engine for a Desktop Application?

Many projects use duktape ( https://duktape.org/ )

There's also XS6 engine. But I dislike the macro trickery in that one.

Looks like QuickJS doesn't use setjmp/longjmp, as opposed to duktape. I really like this, as it will simplify memory management inside C functions, and allow to use gcc cleanup functions.

Re: QuickJS JavaScript Engine

#86
post #37
post #25

Is there anything that Fabrice can't do? I mean, FFMpeg is almost a PhD thesis in and of itself, and he still manages to find time to make TinyC, QEMU, and now this. To say I'm jealous of his skills would be an understatement.

Also the x86 emulator in JS that can run windows 2000 on a browser canvas.

Wow... I didn't pay attention to the URL and when I open this site I thought 'Who does an insane project like writing a new JS/ES interpreter all by himself (in C). Almost as insane as the guy who wrote that x86 emulator for the browser...'.

Just to learn that it is indeed the same guy (plus Charlie Gordon) :D

Re: QuickJS JavaScript Engine

#87
post #25

Is there anything that Fabrice can't do? I mean, FFMpeg is almost a PhD thesis in and of itself, and he still manages to find time to make TinyC, QEMU, and now this. To say I'm jealous of his skills would be an understatement.

>FFMpeg is almost a PhD thesis I’d argue it is a whole lot more than most PhD thesis. Fabrice is a wizard.

That's probably true; FFMpeg almost single-handedly created an entire cottage industry in video production. The amount of elaborate image-processing it allows you to do probably does overtake most PhD papers you're likely to read.

Re: QuickJS JavaScript Engine

#89

I like that Bellard released the source code in old school tar format rather than on github. The world's code collaboration platform is of little use to the world's best programmer. Hopefully QuickJS won't discourage the author of Duktape from making future releases of his incredible small low-memory JS engine.

What's to like about it? First thing I wanted to do is look at the sources, which is now a multiple-step process - especially since I'm on windows and usually work on a Mac. Not to mention mobile.

Re: QuickJS JavaScript Engine

#90

This man is a wizard. You can also thank him for ffmpeg and qemu. A company I worked for once tried to hire him as a consultant because he had implemented an LTE BTS in software. Is there anything he hasn't done? EDIT: tombert beat me to it[0] by a couple minutes. [0] https://news.ycombinator.com/item?id=20413498

Ha! Fabrice is prolific enough to where two people felt that they had to exclaim it to the world.
Post reply on HN