Live data from Hacker News

Show HN: I rewrote my Mac Electron app in Rust

desktopdocs.com

371–380 of 465 posts

Re: Show HN: I rewrote my Mac Electron app in Rust

#371
post #332

Earlier quoted context omitted.

Counterpoint: if you rewrite a Rust app, ANY Rust app and turn it into a perfectly rewritten Electron app, it will 100 percent still be shittier, bigger, slower and eat more RAM and CPU.

This is akin to saying if you rewrite it in Assembly it would be better than Rust. True, but what are the tradeoffs? Why doesn't everyone write it in assembly? It _would_ be bigger and eat more RAM and CPU. But that does not imply "shittier". There are parameters like dev time, skills available in the market, familiarity, the JS ecosystem etc that sometimes outweigh the disadvantage of being bigger/slower. You're poi…

> This is akin to saying if you rewrite it in Assembly it would be better than Rust

Not really. Nobody is rewriting GUI apps in Assembly, the reasons are obvious.

Re: Show HN: I rewrote my Mac Electron app in Rust

#372
post #332

Earlier quoted context omitted.

Counterpoint: if you rewrite a Rust app, ANY Rust app and turn it into a perfectly rewritten Electron app, it will 100 percent still be shittier, bigger, slower and eat more RAM and CPU.

This is akin to saying if you rewrite it in Assembly it would be better than Rust. True, but what are the tradeoffs? Why doesn't everyone write it in assembly? It _would_ be bigger and eat more RAM and CPU. But that does not imply "shittier". There are parameters like dev time, skills available in the market, familiarity, the JS ecosystem etc that sometimes outweigh the disadvantage of being bigger/slower. You're poi…

Dev time like cater for ever moving Node stack? (Not sure if it applies here because I'm not familiar with Tauri).

Re: Show HN: I rewrote my Mac Electron app in Rust

#373
post #332

Earlier quoted context omitted.

This is akin to saying if you rewrite it in Assembly it would be better than Rust. True, but what are the tradeoffs? Why doesn't everyone write it in assembly? It _would_ be bigger and eat more RAM and CPU. But that does not imply "shittier". There are parameters like dev time, skills available in the market, familiarity, the JS ecosystem etc that sometimes outweigh the disadvantage of being bigger/slower. You're poi…

This is something I think a lot of people miss about Rust - outside of slow compile times and personal preference, there is no reason not to choose Rust over JavaScript/TypeScript (unless of course you're working in the browser). It does everything JavaScript can do, but it does it faster and with more stability. At the end of the day, these features pay out huge dividends. And this isn't Rust zealotry! I think this…

A world of difference between the borrow checker and a garbage collector.

Re: Show HN: I rewrote my Mac Electron app in Rust

#374
post #340

Earlier quoted context omitted.

Right now they are fancy autocompletes. That is enormously useful for a language where 90% of the typing is boilerplate in desperate need of autocompletion. Most of the “interesting” logic I write is nowhere close to autocompleted successfully and most of it needs to be thrown out. If you’re spending most of your days writing glue that translates one set of JSON documents or HTTP requests into another I’m sure they’r…

I don't know which models you are using, but in my experience they have been way more than fancy autocomplete today. I have had thousand line programs written and refined with just a few prompts. On the analysis and code review side, they have been even more impressive, finding issues and potential impacts of changes and describing the intent behind the code. I implore you to revisit good models like Gemini 2.5 Pro.…

I generally have to maintain the code I write, often by myself; thousands of lines of uninspired slop code is the last thing I need in my life.

Friction is the birth place of evolution.

Re: Show HN: I rewrote my Mac Electron app in Rust

#375

Earlier quoted context omitted.

That’s a big issue if you can’t set a minimum required version for some reason, same for web apps in general - I rarely find much problems with platform behavior but that’s probably because we just reject out of date browsers.

That's one of the main selling points of Electron: it ships a single browser instead of using the system webview. The main drawback, of course, is that it ships a browser with every app.

Yeah for a small tertiary apps then Electron is a huge performance burden to put on your users. They might just choose it's not worth it and not use your app.

On the contrary if it's a large app that the user spends lots of time in, then the performance overhead might well be worth it for the user.

Imagine in the first case that it requires a base load of 10 units of energy to run and gives 2 units of output, while in the second it still costs 10 units of base load energy, but now it gives 100 units of output. The base load becomes relatively irrelevant.

Re: Show HN: I rewrote my Mac Electron app in Rust

#376
post #350
post #349

Earlier quoted context omitted.

I have never seen any AI system could explain correctly on the following Golang code: package main func alwaysFalse() bool { return false } func main() { switch alwaysFalse() // don't format the code { case true: println("true") case false: println("false") } } > Go community was trained for the longest time not to make backward-incompatible API updates so that helps quite a bit in consistency of dependencies across…

You're bringing up exceptions rather than a rule. Sure you can find things they mess up. The whole premise of a lot of the "AI" stuff is approximately solving hard problems rather than precisely solving easy ones.

The opposite is true, they sometimes guess correctly, even a broken watch is right two times a day.

Re: Show HN: I rewrote my Mac Electron app in Rust

#377
post #341
post #332

Earlier quoted context omitted.

This is akin to saying if you rewrite it in Assembly it would be better than Rust. True, but what are the tradeoffs? Why doesn't everyone write it in assembly? It _would_ be bigger and eat more RAM and CPU. But that does not imply "shittier". There are parameters like dev time, skills available in the market, familiarity, the JS ecosystem etc that sometimes outweigh the disadvantage of being bigger/slower. You're poi…

All those parameters mentioned are exclusively for developers. End users don't care and will get a worse product when you choose Electron instead of doing it properly.

> All those parameters mentioned are exclusively for developers. End users don't care and will get a worse product when you choose Electron instead of doing it properly.

A sensible take wouldn't pick one or the other as unilaterally better regarding the abstract context of what a good product is. The web as a platform is categorically amazing for building UIs, and if you chose continued to choose it as the frontend for a much more measurably performant search backend, that could be a fantastic product choice, as long as you do both parts right.

Re: Show HN: I rewrote my Mac Electron app in Rust

#378
post #357
post #350

Earlier quoted context omitted.

You're bringing up exceptions rather than a rule. Sure you can find things they mess up. The whole premise of a lot of the "AI" stuff is approximately solving hard problems rather than precisely solving easy ones.

I believe future AI systems can make correct answers. The rule is clearly specified in Go specification. BTW, I haven't found an AI system can get the correct output for the following Go code: package main import "fmt" func main() { for counter, n := 0, 2; n >= 0; n-- { defer func(v int) { fmt.Print("#", counter, ": ", v, "\n") counter++ }(n) } }

What do you base that prediction on? Without a fundamental shift in the underlying technology, they will still just be guessing.

Re: Show HN: I rewrote my Mac Electron app in Rust

#379
post #301

Earlier quoted context omitted.

My surprise is typescipt is so slow. I have never used it yet, but I think will never too.

At the risk of feeling silly for not knowing this ... why is TypeScript considered a programming language, and how can you make it "faster"? I have used its it came out so I do know what it is, but I have people ask if they should write their new program in TypeScript, thinking this is something they can write it in and then run it. My usage of it is limited to JavaScript, so I see it as adding a static typing layer…

The "10x speedup" is for the compilation step from TS to JS, eg how much faster the new Typescript compiler is, not the runtime performance of the JS output.

Theoretically(!) using TS over JS may indirectly result in slightly better perf though because it nudges you towards not mutating the shape of runtime objects (which may cause the JS engine to re-JIT your code). The extra compilation step might also allow to do some source-level optimizations, like constant folding. But I think TS doesn't do this (other JS minifiers/optimizers do though).

Re: Show HN: I rewrote my Mac Electron app in Rust

#380
post #267

Earlier quoted context omitted.

> I recently went the other way (started a project in Tauri, moved to Electron) because of frustration with rendering differences between the web views employed on different platforms. This is our #1 frustration with Tauri. The OS-provided system webviews are not stable, repeatable, consistent platforms to build upon. Tauri decided that a key selling point of their platform was that Tauri builds won't bundle a browse…

Don’t try to speak for me please. I’m perfectly happy with my app looking mildly different and not weighing 1GB. I’m inclined to believe most people using Tauri do not have your issue. I don’t quite understand why you have that issue in the first place. The fact they use the system webview is front, left and center on their website. It’s like you decided to use a fork because of the decorations on the back, and now c…

Because Tauri people advertise it as a complete solution to everything Electron does. But then they act surprised when people have platform difference issues that they don't have with Electron. Tauri is being actively misrepresented and people have good reason to feel duped.
Post reply on HN