Live data from Hacker News

Show HN: Elsa – A QuickJS wrapper written in Go

github.com

41–50 of 69 posts

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#43
post #39
post #4

It's a simple command-line application that dispatches to the quickjs runtime. The headline is somewhat misleading.

I'm really curious how this reached #1 here on HN. Not accusing anyone of foul play, just really curious why this is so popular. As for quickJS, I've really enjoyed using it and was surprised how easy it was to get started with a brew install on a Mac.

> I'm really curious how this reached #1 here on HN.

Usually people submit then direct friends/contacts/Twitter followers/etc to the "new" page to upvote. "growth hacking"? :)

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#45
post #4

It's a simple command-line application that dispatches to the quickjs runtime. The headline is somewhat misleading.

Let it go. Let it go. Misleading titles never bothered HN anyway.

I didn’t get the connection before your joke, but I think it is called Elsa exactly because it is written in Go!

(This happens to me Olaf the time)

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#46
post #19

So Elsas own comparison[1] says that the binary size difference is 20MB Elsa (QJS) vs 44MB Deno (V8). Looking at QuickJS benchmark[2] V8 is 28M vs 1M QJS, so Elsa adds 19M on top of the engine vs 16M for Deno. Doesn't feel that lightweight anymore [1] https://github.com/elsaland/elsa/blob/master/COMPARISON.md [2] https://bellard.org/quickjs/bench.html

That was surprising to me, too. For me the big benefit of QuickJS is the tiny runtime size. If that isn't a factor you might as well go for V8, the performance is an order of magnitude better.

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#47
post #20

Earlier quoted context omitted.

Wow,, this is seriously bad. Calling this fast is very misleading. QuickJS is about 0.5x as fast as V8 without JIT (and like 20x slower than V8+JIT).

That a rocket is two orders of magnitude faster than a jetliner doesn't make a jetliner not fast.

True statement, but what does that metaphor-analogy have to do with server side JavaScript runtimes? They are also not the same thing, Dragonflys are fast, but they won't run my JS either.

Our systems have absolute speeds that the client requests don't care about. They don't care if they are fast for an _x_ when that _x_ has nothing to do with the client. Minimal is a nice quality, but I don't think Elsa is fast in absolute terms or as secure as Deno.

I did an analysis in a different comment, it looks like Elsa comes in at 3500 lines of code, of which Go is less than a thousand. What this does is supply an outlet for Go programmers to contribute to a JS runtime like Deno which is mostly developed in Rust and TS. From a sociological perspective, it will be interesting to see how Elsa evolves and whether Go or TS dominate future development.

What I think is neat is that QuickJS comes in as more computationally efficient (benchmark score / executable_bytes_size). But that also makes sense, jits have to work pretty hard to extract that extra performance. One would have to do some sort of coverage analysis to compare quickjs to v8 --jitless, interpreter to interpreter. It would be interesting to track the commits in a codebase over time wrt speed for interpreters and jits across a set of languages.

    # from https://bellard.org/quickjs/bench.html
    # total score w/o regex
    In [2]: 41576 / 28000
    Out[2]: 1.4848571428571429

    In [3]: 1138 / 620
    Out[3]: 1.835483870967742
Given Fabrice Bellards other projects, I wouldn't be surprised if a JIT landed in QuickJS.

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#49
post #39
post #4

It's a simple command-line application that dispatches to the quickjs runtime. The headline is somewhat misleading.

I'm really curious how this reached #1 here on HN. Not accusing anyone of foul play, just really curious why this is so popular. As for quickJS, I've really enjoyed using it and was surprised how easy it was to get started with a brew install on a Mac.

>I'm really curious how this reached #1 here on HN

I was initially excited about the idea of a Go alternative to some existing js runtimes.

Re: Show HN: Elsa – A QuickJS wrapper written in Go

#50
post #42
post #31

Earlier quoted context omitted.

Please don't do that for accessibility reasons.

Please explain.

Not all unicodes are equal for a screen reader. The text in case is read for me as every letter is separated from the others by a unpronouncible symbol and the whole line becomes a mess. Something like the chicken language, if you are acquainted with the concept.
Post reply on HN