News for hackers. Stuff that matters.
Re:Tauri – Electron alternative written in Rust by dmitryminkovsky on Wednesday January 05, 2022 @07:36AM (#29808199)
I guess but compatibility issues on the web, while they existe, are pretty discrete these days. Browser monoculture is exceedingly worse, both practically and from a business perspective, in my opinion.
Re:Tauri – Electron alternative written in Rust by cpuguy83 on Wednesday January 05, 2022 @12:31PM (#29812011)
As someone who uses Safari on Mac, I can say that compatibility issues are a big deal. Granted many of the issues are simply from sites checking for Chrome and telling everything else to f--- off. I've even seen a site fail to run on (chromium) Edge because it really wanted Chrome. However, real compatibility issues are a thing as well.

That said, I hate electron. I hate that I have to run 4-5 instances of chrome on my machine all day long for various different apps instead of the developer checking that their stuff works across the 3 main rendering engines.

Re:Tauri – Electron alternative written in Rust by Hasu on Wednesday January 05, 2022 @05:07PM (#29815728)
You are correct that Safari has major compatibility issues, but incorrect that the problem is simply that developers target Chrome (it happens sometimes, sure). Most things that work in Chrome also work in Firefox, but WebKit is ~10 years behind both Firefox and Chrome because Apple hasn't invested in keeping up to date with web APIs where their competitors have. Hell, even Edge (before it adopted Chromium) was more compatible than Safari.

Personally, I view Safari in 2022 the same way I viewed IE in 2012 - as a backwards browser holding back web development because the company developing it just doesn't care about the web. The compatibility issues aren't as bad, but I have to care about Safari because iOS still won't let any browser use anything other than WebKit, where there was a point where saying "Anyone choosing to use IE11 deserves a bad experience" made a certain amount of sense. No one gets a choice on their iPhone, so Apple makes things harder for web developers, probably because they want them all to be iOS app developers instead.

Re:Tauri – Electron alternative written in Rust by fault1 on Thursday January 06, 2022 @12:36PM (#29826695)
Personally, I think the last few versions of Safari have caught up a lot.

Safari development does seem to go through spurts, depending on who is working at Apple. Let's not forget that in the past, it's been a major driver of web innovation, particularly in the late 2000s to early 2010s.

Re:Tauri – Electron alternative written in Rust by jchw on Wednesday January 05, 2022 @01:42PM (#29813117)
To be fair, I hate Safari with a passion. It took until iOS 15 for support for WebAssembly.initiateStreaming and there’s still no support for WebM or Opus on iPhones. Curiously, on platforms where Apple doesn’t mandate a browser engine, Safari is magically able to support codecs that aren’t patent-encumbered…
Re:Tauri – Electron alternative written in Rust by tombofry on Wednesday January 05, 2022 @07:21PM (#29817315)
Just to clarify - WebKit does support Opus, but using their CAF container [1], which is a pain to deal as it requires double the space to store essentially the same encoded audio twice.

[1]: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/A...

Re:Tauri – Electron alternative written in Rust by hlbjhblbljib on Wednesday January 05, 2022 @03:45PM (#29814664)
Nobody tests on a Mac. If Apple wanted the platform to be supported they could make it much cheaper to test on, but instead they've made developer hostile moves for the last ten years.
Re:Tauri – Electron alternative written in Rust by cpuguy83 on Wednesday January 05, 2022 @03:51PM (#29814766)
Github actions has Mac runners at the same rate as Linux runners, including the free tier (though the free minutes burn faster, as I understand it).
Re:Tauri – Electron alternative written in Rust by mhitza on Wednesday January 05, 2022 @04:34PM (#29815275)
It's a 10x multiplier to run mac on GitHub actions https://docs.github.com/en/billing/managing-billing-for-gith...
Re:Tauri – Electron alternative written in Rust by stcredzero on Wednesday January 05, 2022 @01:22PM (#29812855)
Granted many of the issues are simply from sites checking for Chrome and telling everything else to f--- off.

The world has circled back to the bad practices around IE 6! History doesn't repeat, but it sure does rhyme!

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @07:59AM (#29808344)
I don't know about that, one data point: an ES2018 feature, regex lookarounds, is still not implemented in Safari. And the JS engine is the thing that's the most compatible across browsers, nowhere near the level of incompatibility of the rendering engine for example.
Re:Tauri – Electron alternative written in Rust by nine_k on Wednesday January 05, 2022 @08:14AM (#29808459)
Ignore stuff that was added to HTML, CSS, and JS for last 4-5 years. You'll still have a pretty solid? GUI platform, likely more capable and accessible than Qt or GTK or AWT.

With the usual compiler / transpiler stack, you'll have a nice, fast-to-market, non-esoteric development environment. All without the need to ship 100MB binaries.

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @08:16AM (#29808484)
Sorry but requiring web devs to ignore the last 4~5 years of progress is just unacceptable.

Not that that would fix the situation, there are still rendering inconsistencies between browsers when using stuff like margins floats and tables.

Re:Tauri – Electron alternative written in Rust by fsloth on Wednesday January 05, 2022 @09:15AM (#29809161)
"requiring web devs to ignore the last 4~5 years of progress is just unacceptable."

But this it not for "web devs", but for general UI development on desktops. Given some conventions there are decades old 4-5 years does not sound very ancient in comparison. And for desktop you probably want to trade bleeding edge hotness for tested and tried methods anyway. 4-5 years on desktop is a very brief span of time.

Re:Tauri – Electron alternative written in Rust by skinkestek on Wednesday January 05, 2022 @08:37AM (#29808685)
Then do as I: develop in Firefox and if it works there (and isn't a PWA where maybe you get in trouble with Safari?) then it works everywhere.

Less testing, less bugs. Whats not to like?

Contrast to Chrome first developers who often get caught by cross browsers incompatibilities just like they did back in the days when they were IE first developers : )

Re:Tauri – Electron alternative written in Rust by nightpool on Wednesday January 05, 2022 @12:55PM (#29812435)
This is absolutely not true. I wrote a simple flexbox layout in Firefox last year and it was majorly broken when I tried to test it on Chrome, since Firefox and Chrome disagreed on how to compute "min-width" for inline images and other replaced content. In this case, my layout worked in Firefox, but Chrome was the browser that was following the CSS standard correctly, and my code was broken.
Re:Tauri – Electron alternative written in Rust by jitl on Wednesday January 05, 2022 @10:45AM (#29810373)
There’s plenty of weird cruft in Firefox’s ~30 year old codebase that causes bugs and unspecified behavior. For example, Firefox’s ContentEditable code deletes things “backwards” compared to all other browsers and operating systems (bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1735608) - this behavior isn’t standardized in any spec, and Firefox is different from other browsers.

There are plenty of gotchas in layout/rendering as well, where either the standard is under specified, or Firefox has some small bugs. Maybe Chrome has many-chrome only APIs, but the developer will always need to test in Chrome and iOS Safari 13 (or whatever your oldest supported iOS version is).

Chrome and iOS are where the users are, and a good website or app should be usable and beautiful for everyone.

Re:Tauri – Electron alternative written in Rust by dbrgn on Wednesday January 05, 2022 @07:01PM (#29817096)
Developing UI components based on ContentEditable is trial and error, with a lot of code held together by cross-browser integration tests where you always have to pray that a browser upgrade doesn't brake something new in a subtle and surprising way...

1/5, would not recommend. (But sometimes there's no way around it.)

Re:Tauri – Electron alternative written in Rust by TheGoddessInari on Wednesday January 05, 2022 @09:59PM (#29818701)
> There’s plenty of weird cruft in Firefox’s ~30 year old codebase that causes bugs and unspecified behavior.

Just wondering where you're getting "30 years" from?

That asked, a Chrome-shaped monoculture doesn't help anybody. We need more competing implementations, not less. Anyone feel like collaborating on such?

Re:Tauri – Electron alternative written in Rust by jitl on Thursday January 06, 2022 @09:12AM (#29823719)
Netscape was founded in 1994, Firefox is derived from Gecko (1997) layout code code open-sourced from Netscape in 1998. See https://en.m.wikipedia.org/wiki/Gecko_(software) for some background. I was thinking 1994 when I wrote the comment, but it’s closer to ~25 years if you reckon from Gecko’s birth year of 1997.
Re:Tauri – Electron alternative written in Rust by hiptobecubic on Wednesday January 05, 2022 @11:34PM (#29819433)
Are you casually asking if anyone wants to start writing a rendering engine?
Re:Tauri – Electron alternative written in Rust by spoiler on Wednesday January 05, 2022 @10:25AM (#29810085)
> Contrast to Chrome first developers who often get caught by cross browsers incompatibilities just like they did back in the days when they were IE first developers : )

I'm not entirely sure how I feel about this statement (and comparison to IE). If anything, Safari is "the new IE" rather than Chrome.

MOST (hopefully the nitpickers pick up the caps lock) stuff in Chrome are drafts or standards.

Sure, Google pioneered/championed some of them, but that's kinda irrelevant if developers voted for those features. There's very little Chrome-specific stuff.

Also, other browsers have vendor specific stuff in them too, yet people rarely fling shit in their direction?

FWIW I also mostly use Firefox for dev because I prefer how some devtool features are designed/implemented.

Most of my cross browser issues in FF were "brief" in the senses that they were bugs that got fixed eventual.

Re:Tauri – Electron alternative written in Rust by skinkestek on Wednesday January 05, 2022 @12:12PM (#29811725)
> I'm not entirely sure how I feel about this statement (and comparison to IE). If anything, Safari is "the new IE" rather than Chrome.

Some people who either don't know history or willfully ignores it keeps claiming that Safari is the new IE, at one point one even made a webside out of it.

Don't fall for it.

Chrome is the new IE:

- technologically advanced? Check!

- implement a number of things without asking or waiting for consensus? Check!

- will be abandoned as soon as they have crushed every competitor? Well, it is produced by the worlds most famous company when it comes to killing its own software.

Re:Tauri – Electron alternative written in Rust by bananabreakfast on Wednesday January 05, 2022 @02:11PM (#29813468)
I can't believe you seriously just suggested Google is going to abandon Chrome.

Next up, Microsoft is going to abandon Word. Also, Facebook is going to abandon Facebook. This is why no one takes these conversations seriously. All vitriol, no substance.

Re:Tauri – Electron alternative written in Rust by salmo on Thursday January 06, 2022 @10:26PM (#29834458)
I wouldn’t be shocked to see MS abandon Word or Facebook (erm Meta) abandon Facebook in the same sense Google would abandon Chrome.

Sure, some piece of software will have that name, but it won’t be aggressively developed like MS abandoned IE a few times.

I also won’t be shocked if Word or Facebook are like Edge where it’s a new different thing with an old name.

Re:Tauri – Electron alternative written in Rust by danielheath on Wednesday January 05, 2022 @05:07PM (#29815732)
IE still had released, but it stopped moving forward after 6 because there was no longer a good reason for ms to invest.

I doubt google would spend much on chrome if no other browser were popular.

Re:Tauri – Electron alternative written in Rust by xialvjun on Thursday January 06, 2022 @05:55AM (#29822000)
But chromium is opensource. Even if google stop devoting to chrome, we can develop it. In fact, I think Mozilla should turn to chromium too like Microsoft, just be aware of keeping the licence open.
Re:Tauri – Electron alternative written in Rust by tata71 on Thursday January 06, 2022 @05:07PM (#29831025)
Dear Mozilla:

Fork Chromium.

Love, Your Old Users

Re:Tauri – Electron alternative written in Rust by pineconewarrior on Wednesday January 05, 2022 @09:55AM (#29809691)
I do this too, but still run into issues with Safari. Luckily, later Safari 14 versions and Safari 15 are not too bad.
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @08:41AM (#29808735)
Unless I'm missing something that doesn't fixes the issue, the problem is symmetrical, browser A is different than browser B, so browser B is different than browser A, testing in either of them doesn't guarantee a correct output in both of them.
Re:Tauri – Electron alternative written in Rust by skinkestek on Wednesday January 05, 2022 @08:52AM (#29808871)
Chrome - like IE before it - has a number of "features" that only work/ed in Chrome/IE.

Writing for a standards compliant browser like Firefox makes your code more well defined today just as it did back then because you won't get away with the same sloppyness. (This also makes you catch and fix problems in early iterations over the problem instead of after QA calls to complain so it saves you time and context switching too and if you are good you might look like a cross browser superhero almost for free ;-)

Earlier on not every basic thing was supported everywhere, many people here will remember the ACID tests. Younger devs won't remember them as we stopped talking about them after every browser became compliant. Today every mainstream browser has comprehensive test suites to cover everything we need from CSS I think.

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @08:57AM (#29808930)
Testing on ~~Chrome~~ Firefox would save you from accidentally using Chrome-only features, but that's only part of the problem, caniuse.com kinda works better for that as you get data about other browsers too.
Re:Tauri – Electron alternative written in Rust by skinkestek on Wednesday January 05, 2022 @09:02AM (#29809001)
>Testing on Chrome would save you from accidentally using Chrome-only features, but that's only part of the problem,

How?

> caniuse.com kinda works better for that as you get data about other browsers too.

caniuse.com is nice but unlike using a standards compliant browser it requires you to be mentally alert and aware of it.

Using a standards compliant browser means you'll see the result of sloppy css immediately on the screen.

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @09:27AM (#29809328)
>>Testing on Chrome would save you from accidentally using Chrome-only features, but that's only part of the problem, >How?

Sorry I meant "Firefox" and "Chrome-only" there.

In general though it's not like Firefox is spec compliant and others aren't, pretty much every browser works a little different in some areas. Just for the sake of saying something verifiable: no browser is spec compliant because the spec mandates a precise maximum length for strings and each main browser has a different, arbitrary (= I have the RAM, they just won't let me use it), lower limit on that.

Re:Tauri – Electron alternative written in Rust by folkhack on Wednesday January 05, 2022 @11:04AM (#29810650)
> Sorry but requiring web devs to ignore the last 4~5 years of progress is just unacceptable.

No it's not. "Web dev" is one of the things in my toolbox and I still clicked on this well-knowing it was likely not truly cross-platform and keeping up with bleeding-edge features.

Truth is all development is about tradeoffs and Electron is one heck of a blob to ship to users... in a lot of applications a lighter weight artifact may be desirable where the trade off of the last 4-5 years of browser advancements may be perfectly OK.

Is it unacceptable? Sure - if your application needs features out of the last 4-5 years of browser advancements... but that's not most applications. If you need a bleeding-edge solution that's truly cross-platform then Electron clearly still is your choice as you're just shipping around a fancied up Chromium.

Re:Tauri – Electron alternative written in Rust by hlbjhblbljib on Wednesday January 05, 2022 @03:46PM (#29814682)
The last 4-5 years of "progress" have been pretty unacceptable.
Re:Tauri – Electron alternative written in Rust by nine_k on Wednesday January 05, 2022 @08:24AM (#29808583)
But you won't be developing a web app, you'd be developing a desktop app, much like with React Native.

Having web developers learn C++ and Qt instead would be much more unacceptable.

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @08:33AM (#29808656)
By this logic requiring web devs to write ES3 code should be acceptable too.

The platform changed significantly, improved significantly, in the past few years, some of these major advancements can't be ignored just because a browser doesn't implement them.

Re:Tauri – Electron alternative written in Rust by shukantpal on Wednesday January 05, 2022 @09:45AM (#29809548)
Nope, you can compile code back to whatever ECMAScript version you like with tools like Babel or TypeScript. So the devs don’t even notice that they’re compiling to 4-5 year old ES.
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @10:33AM (#29810200)
That's actually not true in general, tell me how to compile Proxy and regex lookarounds to ES5 or whatever version that doesn't support these features. In fact tell me how to polyfill these features in any way at all.
Re:Tauri – Electron alternative written in Rust by projct on Wednesday January 05, 2022 @12:29PM (#29811988)
There's a proxy polyfill. And if you really wanted there's at least one pcre2 wasm build you could wrap to make a polyfill, lol. Barely anyone uses lookahead/lookbehind even in pcre, though.
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @01:28PM (#29812939)
Proxy polyfill: assuming you are referring to this [0], since I haven't seen anything else like this, then I'll paste here what the readme says:

> The polyfill supports just a limited number of proxy 'traps'. It also works by calling seal on the object passed to Proxy. This means that the properties you want to proxy must be known at creation time.

i.e. that's not a polyfill for Proxy. It's a polyfill for a subset of the thing, maybe that's useful for somebody, but it's useless for the use cases I had for Proxy so far.

Shipping an entire regex engine with your app: right, that's the only way to do something like that. Not that that's actually the same thing though, I can't just load this and use lookarounds as normal, i.e. it's not a polyfill.

For all practical purposes these features are not polyfillable. If your idea of a polyfill includes not actually polyfilling the entire thing or shipping an entire engine with your app then sure, anything is polyfillable, you could even run Java in the browser.

[0]: https://github.com/GoogleChrome/proxy-polyfill

Re:Tauri – Electron alternative written in Rust by mrtesthah on Wednesday January 05, 2022 @01:53PM (#29813264)
>Shipping an entire regex engine with your app: right, that's the only way to do something like that.

You mean like shipping an entire 100+ MB browser and rendering engine with your app?

Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @02:02PM (#29813358)
Electron does not weigh 300+ MB for starter, and one means basically statically linking your app so that it ships with its own dependencies and works more consistently, while the other means shipping a language because the one you have to use is not implemented properly by the platform, pretty different things when you look at them. I'll give you though that in both cases you are shipping a big engine with your app, so it kinda sounds like the same thing.
Re:Tauri – Electron alternative written in Rust by edflsafoiewq on Wednesday January 05, 2022 @12:21PM (#29811865)
What advancements do you have in mind?
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @01:31PM (#29812984)
A lot got released in the past 4/5 years. I don't have a list of favorites off the top of my mind. Many useful things got shipped though.
Re:Tauri – Electron alternative written in Rust by dmitryminkovsky on Wednesday January 05, 2022 @11:26AM (#29811007)
For language issues I assume using Babel, which in my opinion is not a big deal if you’re already making an app.

Render-wise, browsers are pretty uniform these days. I experience very few problems in this regard, and my app Pony runs out of the same web codebase on all platforms (iOS, Android, web). The worst offender is Safari, but it’s not that bad. The potential gains from something like Tauri (and I plan to try Tauri for Pony desktop) far exceed the compatibility concerns for me (which I’ve already had to address due to web).

Re:Tauri – Electron alternative written in Rust by kjleitz on Wednesday January 05, 2022 @10:27AM (#29810125)
Safari not supporting lookbehinds is a bigger PitA than I ever imagined it would be.
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @11:04AM (#29810643)
Right? And that's not the kind of feature that you can just polyfill back in. I don't understand how it's possible that that's not implemented yet.
Re:Tauri – Electron alternative written in Rust by duped on Wednesday January 05, 2022 @03:47PM (#29814699)
Couldn't you just package your favorite regex library and expose it through a JS function binding in your app?
Re:Tauri – Electron alternative written in Rust by fabiospampinato on Wednesday January 05, 2022 @04:34PM (#29815281)
That's a big "just", but yes in theory that's doable, however:

- The performance you are going to get will be terrible compared to the native implementation.

- Oniguruma, which I think is Ruby's engine, weighs half a megabyte on its own, that's comparable to the core bundle of the app I'm working on. That's a lot to my eyes.

- If you need to use this engine in dependencies that just assume that lookarounds are available then you are going to need to fork every single dependency just to wire it with the regex engine you compiled, super messy.

Re:Tauri – Electron alternative written in Rust by wolframhempel on Wednesday January 05, 2022 @10:29AM (#29810153)
As a guy who started web development when IE6 was the dominant platform I cannot cherish "browser monoculture" enough.

.clearfix

Re:Tauri – Electron alternative written in Rust by runarberg on Wednesday January 05, 2022 @12:23PM (#29811894)
And now we have display of "flow-root" instead of clearfix.

However the only reason I ever used the clearfix hack was when using float to do layout. I haven’t done that for ages (i.e. since CSS grew to include flexbox and grid). And I only ever use float to—well—float images inside text where the inside display is always inline. So I haven’t ever seen a need for display flow-root in the wild... Although I’m sure it exists.

Re:Tauri – Electron alternative written in Rust by baxuz on Thursday January 06, 2022 @04:40AM (#29821370)
It's much bigger than you think.

If I'm building an electron app, it's because I need native code running in nodejs/V8 as native addons, often in the render process, or I'm using bleeding edge APIs not available on Safari.

This type of framework is simply not an option.

Re:Tauri – Electron alternative written in Rust by kyriakos on Wednesday January 05, 2022 @02:10PM (#29813456)
Safari is missing features and has its own quirks so I wouldn't say that.