News for hackers. Stuff that matters.
Re:Inspecting Web Views in macOS by adamnemecek on Friday March 11, 2022 @10:07PM (#30648643)
GUI development is really fucking broken. I get it, it's hard to compete with a standardized platform with a probably billion man hours poured into it but I'm really hoping that Rust will make it possible to write native and web experiences from one codebase.
Re:Inspecting Web Views in macOS by hiptobecubic on Friday March 11, 2022 @10:13PM (#30648676)
What does rust have to do with this?
Re:Inspecting Web Views in macOS by zer0-c00l on Friday March 11, 2022 @10:14PM (#30648691)
it allows OP to farm karma effectively
Re:Inspecting Web Views in macOS by ashton314 on Friday March 11, 2022 @10:27PM (#30648750)
Appears to be backfiring somewhat. I say that as a Rust enthusiast.
Re:Inspecting Web Views in macOS by adamnemecek on Friday March 11, 2022 @11:29PM (#30649004)
Its the first language that lends itself to be used both on the desktop fornative GUIs as well as in the browser.
Re:Inspecting Web Views in macOS by hiptobecubic on Tuesday March 15, 2022 @12:21AM (#30681649)
What? My understanding is that there isn't a native GUI toolkit written in rust for any platform at all. At least, not one that isn't a toy project.
Re:Inspecting Web Views in macOS by iso8859-1 on Friday March 11, 2022 @10:15PM (#30648693)
This post is talking mostly about CSS and it shows a document object model tree. JavaScript is also used, given that he mentions React.

Among these options, it seems that Rust is most similar to JavaScript. But this whole article would be the same if React was written with Rust instead.

So what is the broken part of GUI development, and why is Rust positioned to fix it? As I see it, not much would change if we used Rust instead of JavaScript, except that it could be harder to diagnose when ReactInRust is being used.

Re:Inspecting Web Views in macOS by eyelidlessness on Saturday March 12, 2022 @12:04AM (#30649125)
Amusingly, SwiftUI seems much better suited to this use case than any other lower level language, while Elm and Clojure are much more obvious contenders. In any case, the space is crowded with DSLs and the expression-based DSLs are the ones that generally keep gaining traction.
Re:Inspecting Web Views in macOS by virchau13 on Friday March 11, 2022 @11:18PM (#30648959)
The broken part is that it is worth it to use an inefficient rendering method (lots of JS generated by React + an interpreter and GC + a render tree (React VDOM) + an overcomplicated element tree (DOM) + a rendering system) instead of an efficient rendering system (if React-in-Rust existed, it would be native executables manipulating an in memory tree for a renderer, removing at least two layers of complications). And this seems to be simply because the React+JS model works so well for DX compared to the rest that it allows for way faster feature implementation.
Re:Inspecting Web Views in macOS by jkelleyrtp on Saturday March 12, 2022 @01:06AM (#30649329)
I’ve been working on this :) https://dioxuslabs.com/
Re:Inspecting Web Views in macOS by SkyMarshal on Friday March 11, 2022 @10:21PM (#30648721)
> I get it, it's hard to compete with a standardized platform with a probably billion man hours poured into it

Are you talking about the MacOS System Preferences app, which has probably been around since Macs switched to Intel, or about React? Either could fit that description.

Re:Inspecting Web Views in macOS by adamnemecek on Friday March 11, 2022 @11:26PM (#30648989)
I'm talking about WebKit.
Re:Inspecting Web Views in macOS by maxloh on Friday March 11, 2022 @10:28PM (#30648751)
How about flutter? It uses native views.
Re:Inspecting Web Views in macOS by heavyset_go on Saturday March 12, 2022 @12:46AM (#30649259)
As far as I'm aware, Flutter is like Qt and React Native in that its platform controls are redrawn to look like native controls.
Re:Inspecting Web Views in macOS by skydhash on Saturday March 12, 2022 @01:38PM (#30653635)
Flutter replaces the entire views with its own rendering engine. That has caused some issues with consistency.
Re:Inspecting Web Views in macOS by throwaway81348 on Friday March 11, 2022 @10:11PM (#30648666)
why Rust in particular?
Re:Inspecting Web Views in macOS by r00tanon on Friday March 11, 2022 @10:14PM (#30648689)
I missed the /s ?