Live data from Hacker News

JSSE: A JavaScript Engine Built by an Agent

p.ocmatos.com

11–19 of 19 posts

Re: JSSE: A JavaScript Engine Built by an Agent

#11
post #4

Now do it without those pre-written tests. Spec only. Else, the writers of those tests deserve a LOT of credit.

> Now do it without those pre-written tests

That's probably the most important thing, actually. I've tried my hardest to get Claude to build an APL VM using only the spec and it's virtually impossible to get full compliance as it takes too many shortcuts and makes too many assumptions. That's part of the challenge though, to see how far the daffy robots have come.

Re: JSSE: A JavaScript Engine Built by an Agent

#12
post #9

It is pretty incredible to me that in the pre-LLM/agent coding world, creating a new high-quality JS engine or browser seemed like it would likely never happen again. But now, any large company could build one if they wanted to. In a single digit number of months no less.

There's many JS implementations out there. Quality kind depends on what you need, and there's some engines more or less complete in which quirks are supported. And for example, v8 doesn't make much sense in embedded contexts

There are definitely plenty of other JS engines, but they aren't always up to date on newer JS features. I'm pretty sure this is the 3rd JS engine to fully support the Temporal API (even JSC hasn't shipped it yet).

Re: JSSE: A JavaScript Engine Built by an Agent

#13
post #9

Earlier quoted context omitted.

There's many JS implementations out there. Quality kind depends on what you need, and there's some engines more or less complete in which quirks are supported. And for example, v8 doesn't make much sense in embedded contexts

There are definitely plenty of other JS engines, but they aren't always up to date on newer JS features. I'm pretty sure this is the 3rd JS engine to fully support the Temporal API (even JSC hasn't shipped it yet).

More like 8th. These pass nearly all Temporal tests as well: v8, spidermonkey, libjs, boa, escargot, kiesel, jint. Almost there: graaljs, yavashark.

Re: JSSE: A JavaScript Engine Built by an Agent

#14
post #4

Now do it without those pre-written tests. Spec only. Else, the writers of those tests deserve a LOT of credit.

You can prompt an LLM to generate tests from the spec and I'd bet it would easily get most of the way there, especially if you give it a reference implementation to test against. I did just that, though on a small scale - just for feature tests. The last few percent would be the real challenge, you probably don't want it to just imitate another implementation's bugs.

Re: JSSE: A JavaScript Engine Built by an Agent

#15
post #4

Now do it without those pre-written tests. Spec only. Else, the writers of those tests deserve a LOT of credit.

> Now do it without those pre-written tests That's probably the most important thing, actually. I've tried my hardest to get Claude to build an APL VM using only the spec and it's virtually impossible to get full compliance as it takes too many shortcuts and makes too many assumptions. That's part of the challenge though, to see how far the daffy robots have come.

Hehe I tried gving it a minesweeper CSP I've been working on and asked it to develop the feature I was working on at the moment just to compare. I was working on adding non chronological backtracking to the search engine.

I gave it the proper compile flags, I gave it test cases and their expected output, and everything it would have needed. The test cases were specifically hand picked to be hard on the search algorithm. And the base program was correct and gave the correct results (I was only adding an optimization), and were what I was using as a baseline for testing my implementation. You know, with a debugger and breakpoints, printfs and all that.

In the end it couldn't get the thing to work (I asked it to compile and verify) then it proudly declared that in all of the test cases I gave it, everything was solved through constraint propagation and the search didn't even trigger. So it didn't introduce any bugs. It tried to gaslight me. Even though it got a segfault in the new code it added (which would obviously not have been triggered if the search didn't actually execute)

Re: JSSE: A JavaScript Engine Built by an Agent

#16

It is pretty incredible to me that in the pre-LLM/agent coding world, creating a new high-quality JS engine or browser seemed like it would likely never happen again. But now, any large company could build one if they wanted to. In a single digit number of months no less.

[dead]

Re: JSSE: A JavaScript Engine Built by an Agent

#17
post #14
post #4

Now do it without those pre-written tests. Spec only. Else, the writers of those tests deserve a LOT of credit.

You can prompt an LLM to generate tests from the spec and I'd bet it would easily get most of the way there, especially if you give it a reference implementation to test against. I did just that, though on a small scale - just for feature tests. The last few percent would be the real challenge, you probably don't want it to just imitate another implementation's bugs.

Reference implementation that someone else — a human, wrote? Hm… so one way or another, some humans’ labour is laundered…

Re: JSSE: A JavaScript Engine Built by an Agent

#18
post #14

Earlier quoted context omitted.

You can prompt an LLM to generate tests from the spec and I'd bet it would easily get most of the way there, especially if you give it a reference implementation to test against. I did just that, though on a small scale - just for feature tests. The last few percent would be the real challenge, you probably don't want it to just imitate another implementation's bugs.

Reference implementation that someone else — a human, wrote? Hm… so one way or another, some humans’ labour is laundered…

Don't we all stand on the shoulders of giants?

Re: JSSE: A JavaScript Engine Built by an Agent

#19
post #18

Earlier quoted context omitted.

Reference implementation that someone else — a human, wrote? Hm… so one way or another, some humans’ labour is laundered…

Don't we all stand on the shoulders of giants?

I have never attempted to take credit for someone's work, nor ever put serious effort into hiding someone's contribution. LLMs are purpose-designed for that.
Post reply on HN