Avatar
ElectronicMonkey
45c41f21e1cf715fa6d9ca20b8e002a574db7bb49e96ee89834c66dac5446b7a
Author of nostr blogging client: https://flycat.club/

> 第二个是只读节点,必须和第一个搭配使用。你只需要付费其中一个,就都能用了。

那可能我理解错了 william 的文案。。

我想问的是目前你的技术方案是怎么做到只读的白名单的?拉取信息的时候没有签名,感觉好像没办法限制到啊?

只读节点现在是怎么限制没有付费的人使用的?

只读节点是怎么限制需要付费的?

当你完全控制 relays 的时候,虽然会麻烦很多,但是也透明很多。现在有很多 nostrgram 这样的客户端,用户体验可以做得很好,但是它的“优化”可能也是有代价的,它对你可能不是很透明、可以完全掌握的。现在社区的趋势是一直在强调更智能的软件,降低用户门槛,但我们可能也要注意做所谓“优化“的时候不要牺牲到控制权和透明度

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 have tried dioxus https://dioxuslabs.com/, it use webveiw(I think?) and offers a react-like style to write interface. I have this little relay GUI that can be run on desktop for non-coder people https://github.com/digi-monkey/fly-castle , but dioxus still not feels like a very good one since it lacks some tools compare to react.js

好奇怪,你提醒了我才去看了,之前已经设置过还收到了打赏。不知道为什么刚刚我的metadata数据变回去了。。难道也遇到了你类似的覆盖问题。。现在重新设了下

客户端都是拿到数据做时间排序的,少于最新的视为过期扔掉。你存有历史数据并不会影响到他们。其次,如果按nip来走,所有客户端都可以围绕你的历史数据来建立恢复业务,收费依然是relay收,nip相当于有一个标准的api,这样你的relay更容易去接入更多的客户端

飞猫本身不存任何数据,是默认使用的3个relay有你的历史数据。你可以尝试加下自己的relay看看有没有更多的历史数据

你登陆下飞猫,点下左边menu里面的contact就可以看到了

我理解这个是通用的,relay 任何有用的服务都可以加上。我喜欢的一个场景是本地化的局域网服务,比如我们三个人想有一个自己的小社交网络,就用这个,限制别人无法加入和获取到我们的数据

我用飞猫试了下你的公钥,23小时有一个55的关注,不知道是不是你想恢复的版本

> 一上去就先把relay覆盖成它默认的了

好奇这个指的是什么?不能配置你常用的 relay 吗

没太明白为什么,我理解这个 NIP 就是对 relay 做某些服务(不管是拉取数据还是写入数据)需要要求客户端提前做好验证,证明真的是某个用户在操作,才能为他们提供服务。跟这个场景有什么冲突吗?

提个更通用的方法,使用 auth 的 nip 来做这个历史数据的拉取。这样客户端可以通用。https://github.com/nostr-protocol/nips/blob/master/42.md