News for hackers. Stuff that matters.
Re:A lighter V8 by pier25 on Thursday September 12, 2019 @01:16PM (#20953921)
Somewhat off topic but this Lite version made me think of something.

Is there any engine/browser mode/something that lets go of legacy JS/CSS/HTML and increases performance/weight/memory consumption?

A browser/JS engine with removed legacy support would in principle be much faster, no?

Re:A lighter V8 by Hixie on Thursday September 12, 2019 @03:47PM (#20955607)
That's literally how Flutter started. "What if we don't have to be backwards compatible? Let's delete the HTML parsing quirks... and expensive CSS selectors... and... all of the DOM... and JavaScript... and why do we have markup even..."
Re:A lighter V8 by bla3 on Thursday September 12, 2019 @06:37PM (#20957204)
How would you say has that worked out?
Re:A lighter V8 by sebe on Friday September 13, 2019 @09:34PM (#20968339)
They've made a lot of progress, check out https://flutter.dev/

They're expanding from mobile, ios and android, working on flutter for desktop and web.

They move to the dart language early on in their experiment.

Dart has an online playground https://dartpad.dev which has experimental flutter mode.

Found this flutter hello world! example, don't know how long the link will work. https://dartpad.dev/experimental/embed-new-flutter.html?id=2...

Re:A lighter V8 by untog on Thursday September 12, 2019 @02:53PM (#20954999)
Sciter is maybe close:

https://sciter.com/

It allows you to make desktop apps with HTML/CSS, but it has its own custom engine that doesn't support all the quirks the web does.

Re:A lighter V8 by t0astbread on Friday September 13, 2019 @01:51AM (#20959537)
This looks interesting but the code samples look like they include non-standard features (if I'm not mistaken).

Is this compatible out of the box with (most) modern web apps? Because that's the real value of Electron.

Re:A lighter V8 by pier25 on Friday September 13, 2019 @11:52AM (#20963201)
> Is this compatible out of the box with (most) modern web apps? Because that's the real value of Electron.

No it's not. It uses its own JS-like scripting language, and custom CSS 3 support.

A couple of months ago the author suggested on Reddit he might start working on an Electron alternative that used Node + Sciter.

https://www.reddit.com/r/programming/comments/a8vkzm/scitern...

Re:A lighter V8 by ktpsns on Thursday September 12, 2019 @03:44PM (#20955578)
Interesting. What's the name of the engine, and is it open source?
Re:A lighter V8 by pier25 on Thursday September 12, 2019 @05:52PM (#20956868)
5MB!

Anyone knows how is the performance?

Re:A lighter V8 by Koshkin on Thursday September 12, 2019 @06:20PM (#20957085)

  > Script
  >        (tbd)
Re:A lighter V8 by JasonFruit on Friday September 13, 2019 @08:41AM (#20961538)
It has scripting available in a JavaScript-like language. I'm not able to tell yet how mature it is as I've only done a brief test.
Re:A lighter V8 by jitl on Thursday September 12, 2019 @01:21PM (#20953967)
What is “legacy” JS? with()/eval()?

What is “legacy” CSS? Box model?

What is “legacy” HTML? <br>?

Re:A lighter V8 by dictum on Thursday September 12, 2019 @01:29PM (#20954048)
HTML has something of a legacy mode, https://en.m.wikipedia.org/wiki/Quirks_mode

Roughly anything before HTML5/4.01 and XHTML renders in quirks mode.

AFAIK there are no legacy CSS properties. Only nonstandard (i.e. prefixed or experimental and never published in finished specs) properties have been deprecated.

Browsers already have some leeway with DOM APIs. https://developers.google.com/web/updates/2017/01/scrolling-...

Re:A lighter V8 by jcranmer on Thursday September 12, 2019 @01:38PM (#20954148)
Quirks mode can largely be described with a quirks-mode stylesheet that applies several custom styles to all elements unless otherwise overridden.
Re:A lighter V8 by the8472 on Thursday September 12, 2019 @01:41PM (#20954177)
Remove javascript, instant "lite" version. You can even disable it with a CSP header.
Re:A lighter V8 by jannes on Thursday September 12, 2019 @01:24PM (#20954000)
What do you consider legacy JS/CSS/HTML? Do you mean HTML features like contentEditable? Do you mean JS eval()?
Re:A lighter V8 by pier25 on Thursday September 12, 2019 @05:48PM (#20956830)
From the top of my head: CSS floats, contentEditable, execCommand.
Re:A lighter V8 by The_rationalist on Thursday September 12, 2019 @01:26PM (#20954022)
Document.write()
Re:A lighter V8 by Steltek on Thursday September 12, 2019 @02:02PM (#20954408)
Don't you get the same effective perf benefit by marking your script async defer?
Re:A lighter V8 by angrygoat on Thursday September 12, 2019 @01:26PM (#20954017)
How are you going to define legacy? I'm not sure how you could whittle down the web platform in an agreed way.