News for hackers. Stuff that matters.
Re:Spacedrive – an open source cross-platform file explorer by Void_ on Wednesday October 11, 2023 @03:00AM (#37841740)
Seems like most React apps never think of supporting large amounts of data.

Not blaming them - the framework should support it out of the box. You shouldn’t have to understand virtualized lists.

I made a TableView in SwiftUI and I can scroll through thousands of without having the slightest idea how it works under the hood.

Re:Spacedrive – an open source cross-platform file explorer by throwaway50702 on Wednesday October 11, 2023 @03:25AM (#37841858)
You can use one of the React-Virtualized components without the slightest idea how it works. TableView from SwiftUI is the same thing - a component that implements virtualization on top of the base GUI library for you.

React is not a UI framework, it's a low level reactive library with very limited scope - even the DOM bindings are shipped separately! Bring your own batteries.

Re:Spacedrive – an open source cross-platform file explorer by jwells89 on Wednesday October 11, 2023 @06:43AM (#37842873)
The issue with the “bring your own widgets” approach in my experience is that it’s unusual for third party widget packages to have anywhere near the sort of depth and breadth of capabilities compared to the same widgets that come OOTB with native UI toolkits. This means “shopping” for the widget with the best tradeoffs for one’s particular use case and making up for whatever inadequacies it comes with yourself (or just living with the inadequacies, resulting in a crappier app), which is annoying at best.

It’s so much nicer to just be able to trust that an extensive library of stock widgets will be able to do whatever it is that you need, as tends to be the case with AppKit/UIKit.

Re:Spacedrive – an open source cross-platform file explorer by threeseed on Wednesday October 11, 2023 @07:12AM (#37843059)
When you're building a cross-platform app OSX isn't the weakest link. It's older versions of Windows and Linux.

And UI libraries like Tailwind, Shoelace etc are surprisingly extensive and constantly being improved. And if something isn't to your liking it's often to trivial to change it.

Re:Spacedrive – an open source cross-platform file explorer by throwaway50702 on Wednesday October 11, 2023 @07:10AM (#37843049)
That'd be something provided by the Web platform (and the DOM bindings), not React. React provides a way to work with the DOM elements/native components/etc in a reactive way.

The real problem is that the Web platform doesn't offer a good set of customizable UI elements other than the most barebone basics.

Re:Spacedrive – an open source cross-platform file explorer by trollied on Wednesday October 11, 2023 @03:34AM (#37841893)
Something has gone wrong somewhere when your file manager UI is written in React.
Re:Spacedrive – an open source cross-platform file explorer by mrtesthah on Wednesday October 11, 2023 @03:44AM (#37841947)
Oh yikes, this runs in a browser? What a waste of time to build something like this.
Re:Spacedrive – an open source cross-platform file explorer by threeseed on Wednesday October 11, 2023 @04:17AM (#37842116)
It uses Tauri which is the Rust equivalent of Electron.

I'm building an app using it now and it's significantly better than past attempts at browser-based, cross platform app development. It is extremely fast and efficient so apart from UI controls not looking the same it will be on par with a native app.

And one of the big advantages for me is that I get to leverage Rust's excellent low-level capabilities e.g. cross platform SIMD support, io_uring with minimal investment.

Re:Spacedrive – an open source cross-platform file explorer by troupo on Wednesday October 11, 2023 @04:20AM (#37842133)
> t is extremely fast and efficient so apart from UI controls not looking the same it will be on par with a native app.

It uses system-provided WebView (WebKit on MacOS and Linux, and Edge on Windows) to display the UI shell, so the UI portion will be just as slow as any Electron app.

Re:Spacedrive – an open source cross-platform file explorer by threeseed on Wednesday October 11, 2023 @04:33AM (#37842197)
Sure but most of the issues with Electron apps aren't to do with the web layer.

It's the fact that the app is so slow to launch, consumes ridiculous amount of resources, does not take advantage of the hardware, is unstable etc. And then when you're using the app all of the interactions are slow because NodeJS's concurrency is so poor.

Rust and Tauri fixes all of those. It's not perfect but for a cross-platform app development library I've not seen anything better. Happy to be enlightened with alternatives.

Re:Spacedrive – an open source cross-platform file explorer by troupo on Wednesday October 11, 2023 @07:19AM (#37843096)
> It's the fact that the app is so slow to launch, consumes ridiculous amount of resources, does not take advantage of the hardware, is unstable etc.

You've just described almost any web-based UI ;)

> And then when you're using the app all of the interactions are slow because NodeJS's concurrency is so poor.

Most of the slow interactions come from the web-based UI. I mean, Slack needs 17% CPU to draw an animated emoji. And it's already running in a hyper optimised Chrome: https://twitter.com/dmitriid/status/1486364312910368769

> Happy to be enlightened with alternatives.

Qt :)

Re:Spacedrive – an open source cross-platform file explorer by shubhamkrm on Wednesday October 11, 2023 @09:39AM (#37844240)
> Qt

Unfortunately, it’s licensing is not suitable for everyone.

Re:Spacedrive – an open source cross-platform file explorer by KronisLV on Wednesday October 11, 2023 @12:19PM (#37846454)
> It's not perfect but for a cross-platform app development library I've not seen anything better. Happy to be enlightened with alternatives.

Unironically, FreePascal/Lazarus had a decent shot at this with LCL: https://en.m.wikipedia.org/wiki/Lazarus_Component_Library

It could target Win32, GTK and Qt all at compile time (even Android and OS X but that never got developed all that far AFAIK), depending what runs on your target platform, while you get common components and RAD at design time.

I haven't seen anything like it since and sadly the language and ecosystem are mostly dead, which is a shame, because the idea was brilliant and it actually worked (and is still used in some software, like CudaText and PeaZip I think).

Aside from that, something like MAUI could be worth a look: https://dotnet.microsoft.com/en-us/apps/maui

Re:Spacedrive – an open source cross-platform file explorer by hobofan on Wednesday October 11, 2023 @04:44AM (#37842242)
> so the UI portion will be just as slow as any Electron app

Or as fast as any website built with a pinch of care to performance.

Re:Spacedrive – an open source cross-platform file explorer by artursapek on Wednesday October 11, 2023 @08:53AM (#37843770)
On the bright side, they could still switch to using a proper pure Rust UI library like iced.
Re:Spacedrive – an open source cross-platform file explorer by threeseed on Wednesday October 11, 2023 @11:34AM (#37845819)
Their documentation [1] is completely empty.

I do applaud anyone that tackles the challenge of building a proper native cross-platform UI.

It is one of the ultimate goals in software so wish them all the best.

[1] https://book.iced.rs

Re:Spacedrive – an open source cross-platform file explorer by artursapek on Wednesday October 11, 2023 @01:03PM (#37847108)
The iced repo has plenty of examples, and the docs.rs is very clean. The book is a newer effort.
Re:Spacedrive – an open source cross-platform file explorer by throwaway50702 on Wednesday October 11, 2023 @04:13AM (#37842093)
Seems like a very nice app that works on multiple platforms, and it's even gifted to the community as open source. I don't know where you found the audacity to call something waste of time, but please keep it to yourself.
Re:Spacedrive – an open source cross-platform file explorer by oblio on Wednesday October 11, 2023 @09:41AM (#37844261)
I tried to build something much simpler than this.

For integration with cloud services you're going to run into OAuth, and guess what, that dance happens in a browser: get access to cloud drive -> get sent to provider login <<web>> page (or authorization page) -> get sent somewhere else.

I mean, you can build it without the browser, but a key and very early step involves a browser, you need it anyway. Might as well ship your own if you can do it.

Re:Spacedrive – an open source cross-platform file explorer by mrtesthah on Thursday October 12, 2023 @09:55AM (#37857177)
https://developer.apple.com/documentation/authenticationserv...

You don't need to embed a browser engine for this, let alone build the entire app inside a browser.

Re:Spacedrive – an open source cross-platform file explorer by oblio on Friday October 13, 2023 @06:34AM (#37869046)
AWESOME!

Now do the same for: Windows · Linux · iOS · watchOS · Android [1].

I'd rather embed the browser and get a free cross platform UI toolkit that's guaranteed to work everywhere :-)

[1] https://github.com/spacedriveapp/spacedrive

Re:Spacedrive – an open source cross-platform file explorer by clnq on Wednesday October 11, 2023 @01:23PM (#37847425)
If that bothers you, picture this — webasm on Electron.
Re:Spacedrive – an open source cross-platform file explorer by SoKamil on Wednesday October 11, 2023 @06:18AM (#37842741)
I presume that by TableView you mean List { } component. Sadly, there is no component for large horizontal lists in SwiftUI and no, ScrollView with LazyHStack is not an answer due to memory issues.
Re:Spacedrive – an open source cross-platform file explorer by Void_ on Wednesday October 11, 2023 @06:25AM (#37842784)
There’s a table view now. I made iTunes-like UI for my Spotify songs. Buttery smooth.
Re:Spacedrive – an open source cross-platform file explorer by SoKamil on Wednesday October 11, 2023 @08:09AM (#37843454)
Re:Spacedrive – an open source cross-platform file explorer by Void_ on Wednesday October 11, 2023 @12:37PM (#37846699)
Yep that’s the one