News for hackers. Stuff that matters.
Re:Ladybird: A new cross-platform browser project by andsoitis on Monday September 12, 2022 @10:10AM (#32810529)
> Q: Do you have a JavaScript JIT compiler?

> No, we have a traditional AST interpreter that is being replaced by a bytecode VM. You can track the LibJS test262 score for both backends here. I’m not convinced that the complexity and security burdens of a JavaScript JIT are reasonable, and given recent developments like Microsoft Edge’s Super Duper Secure Mode, I’m interested in pushing for best-effort JIT-less performance while keeping the codebase simple.

Always excited to see new JS engines. I'd be curious to see where LibJS's performance / code simplicity / memory balance tends towards over time.

Re:Ladybird: A new cross-platform browser project by zxspectrum1982 on Monday September 12, 2022 @11:02AM (#32811398)
I wonder if a new implementation of JavaScript was needed. My first hunch would have been to try Fabrice Bellard's QuickJS: https://bellard.org/quickjs/
Re:Ladybird: A new cross-platform browser project by paoda on Monday September 12, 2022 @11:09AM (#32811501)
It definitely wasn't needed, but it goes against what I think makes SerenityOS so special.

That being that everything in SerenityOS and its several related projects is made from scratch.

Re:Ladybird: A new cross-platform browser project by greenthrow on Monday September 12, 2022 @12:20PM (#32812593)
> If you wish to make an apple pie from scratch, you must first invent the universe.

They are using Qt and C++. They have chosen where to draw a line, which is fine, and that line happens to be on the other side of "Javascript Engine".

Re:Ladybird: A new cross-platform browser project by bowsamic on Monday September 12, 2022 @12:51PM (#32813035)
They are not using Qt in Serenity, only on Linux in order to hook up painting and events.

Also, they are making a new programming language (Jakt) to replace a lot of the C++

Re:Ladybird: A new cross-platform browser project by sph on Monday September 12, 2022 @12:35PM (#32812797)
To be fair Qt is just to create the window on Linux, but all the browser internals are their own.
Re:Ladybird: A new cross-platform browser project by greenthrow on Monday September 12, 2022 @08:26PM (#32819229)
It's also being used for networking.
Re:Ladybird: A new cross-platform browser project by LeFantome on Thursday September 15, 2022 @10:56PM (#32861538)
For now…

Everything is from scratch on SerenityOS. Ladybird takes as much of that as it can but the is not afraid to use existing tech for the bits of Serenity that cannot currently be used on Linux ( the GUi framework and networking ).

Re:Ladybird: A new cross-platform browser project by coldtea on Monday September 12, 2022 @01:58PM (#32814235)
I think they'll replace Qt with their own GUI lib eventually - and they're already building their own language to replace C++ (for their uses I mean)...
Re:Ladybird: A new cross-platform browser project by lioeters on Monday September 12, 2022 @09:45PM (#32819818)
> they're already building their own language to replace C++

Of course, every respectable software project sooner or later invents its own language!

Re:Ladybird: A new cross-platform browser project by asddubs on Monday September 12, 2022 @01:45PM (#32814018)
I guess a precise defition of the line would be something like "no third party code dependencies"
Re:Ladybird: A new cross-platform browser project by iopq on Monday September 12, 2022 @02:32PM (#32814731)
Qt is not third party?
Re:Ladybird: A new cross-platform browser project by asddubs on Monday September 12, 2022 @04:59PM (#32816886)
for their operating system (serenityOS) they're not using any dependencies, they have their own windowing framework. for the cross platform version of the browser, they use Qt instead. but on serenity itself the browser does not use it.
Re:Ladybird: A new cross-platform browser project by iopq on Wednesday September 14, 2022 @06:15AM (#32835189)
fair enough
Re:Ladybird: A new cross-platform browser project by sp332 on Monday September 12, 2022 @04:15PM (#32816270)
Well... not if you're using KDE as your window manager?
Re:Ladybird: A new cross-platform browser project by adamdusty on Monday September 12, 2022 @10:55PM (#32820206)
Evidently the line is a curve and did not include a third party JS engine, since the project doesn't include a third party JS engine.
Re:Ladybird: A new cross-platform browser project by greenthrow on Monday September 12, 2022 @11:05PM (#32820254)
I know. I think you did not understand my comment.
Re:Ladybird: A new cross-platform browser project by dom96 on Monday September 12, 2022 @04:39PM (#32816596)
This actually makes a lot of sense, especially when you consider that WASM is now a thing.
Re:Ladybird: A new cross-platform browser project by cestith on Wednesday September 14, 2022 @09:39AM (#32837019)
It's worth noting, as I'm sure you already noticed, that they are supporting WASM in addition to JS. So maybe the right answer for "your simple, secure bytecode JS interpreter is too slow" really is "Just precompile that slow part to WASM".