I chose it because it was fast and easy and I didn't want the UI programming to bog me down.

Reply to this note

Please Login to reply.

Discussion

What front end tech would you like to see for Gossip? Are there any that you would prefer.... or any that you would not entertain (I take it any and all web tech is out based on what I have read).

I ask because what you are doing blows everything else away, but will need a robust (not a colorful) front end.

I don't know, all I can tell you is what I have tried and how that went. #[0] is working out design ideas but I don't think he's interested in the coding part. Are you?

I tried Tauri and found the undebuggable magic that hooks Rust and JavaScript together to be a massive minus. I have performance problems and I could not figure out why. Using javascript rendering with VueJS or similar was nice (it is what I do for my day job), but it just didn't work. I hear "good things" from other places about Tauri, but it didn't work for me.

I tried gtk4 (since it's newer than gtk3 and new projects maybe should use the newer one), but the rust bindings are not documented and are not quite like the C++ bindings, so it was very painful trying to figure out how to do in rust what is well documented in C++. The people who wrote the rust bindings were no help at all. I found that slowed me down so much that I abandoned gtk4.

I did not try QT.

I did not try other rust-native UIs such as druid, iced, slint, or azul.

egui has two problems, but they aren't as bad as originally imagined.

First, it is not easy to do beautiful interfaces. You don't get beautiful fonts with color emojis or subpixel anti-aliasing or even hinting for that matter. The default widgets are ugly 1990s looking things, so you may have to build many of your own widgets. BUT given that it is OpenGL you can draw anything that OpenGL draws so strictly speaking there are no limits to what you can do. It's just that some things are very complicated and most people don't want to build the top-end of a GUI from scratch.

Second, it is immediate mode, which means it re-renders every frame. This turns out to be no big deal at all. I run it at 10 FPS and it looks fine. Many frames don't require a redraw as nothing has happened, so it might only draw 1 frame per second. And the rust code that specifies what to draw is much faster and simpler than the pixel shaders (for example) that determine what color each pixel needs to be, and we aren't doing anything like that in rust per frame. So I find my CPU appears pretty much idle, even though it is respecifying what to draw for up to 10 times per second. I find it "fun" to make sure the UI code doesn't block and doesn't do anything compute intensive, and optimizing it really is my cup of tea.

So in summary I'm not against sticking with egui, but to make it look beautiful and to fix the UX, it will probably require some uphill UI development which might have been easier in a different GUI.

/wall-of-text

I love the current UI.

It’s super cyberpunk

Agreed, lets keep it that way 🙏

It looks great. But only windows & Linux - no MacOS?

People have run it on MacOS. I can't package it for Mac because I have no such box.

I run it on macOS

Did this require some cross-OS wizardry?

🤙🫡

I run on macOS, compiling from source. It's pretty simple. You might actually be able to build macOS packages on Linux if you want to with https://github.com/burtonageo/cargo-bundle -- i didn't try it on a linux box yet but on my mac all i had to do to build a binary was create a very simple Cargo.toml file and then issue a command and it built an executable mac bundle. Since gossip is totally self-contained maybe you could cross-compile / bundle for macOS - at least intel mac hardware.

Is anyone running gossip on macOS? Workee?

Yeah it works great, haven't gotten around to looking into packaging it yet though

No, but I'm running Gossip on QubesOS with no problem.

Me, smooth!

Interesting notes on Tauri. I haven't tried it yet myself, but it looked interesting. I'm curious about looking into Rust w/ mobile apps.

I'm actually as interested in the coding as I am in the design part. I just need some time to get comfortable with Rust :)

And, as side note to you real lovers of the actual UI like #[7] (and me!), the design is more about UX than cosmetic bells and whistles.

The gui framework is just a tool, let's choose the one that work best for you and is useful for speeding up the goals.

A third issue with the egui rendering is that text can't be copied by a user. You can code around that issue, but it will probably not be real smooth (intuitive) for the UI.

I am interested in working on a nostr project but user interface in Rust is not my skillset.

I hope others take a good look at Gossip, becuase your concept is on track to keep clients from being cornered by the relays with the most money. New world order fat cats can setup 20 or 30 relays and dominate the whole thing if the client programs allow it. In fact I am sure they will also setup 10+ clients to ensure their relays are fed. (pun intended) Users need to realize the only way this works is if they control the relay scheme. FedCoin is going to try to kill this in a big way.

As I write this I realize that you should not be distracted with the gui. It's functional. You could extend an API and become the engine for clients very quickly.