yfaming's avatar
yfaming
yfaming@getalby.com
npub1jz8m...rg8y
- coder: Rust, Python, Racket(learning...) - Nostr 中文圈 https://following.space/d/musdrpjpdmbr 值得关注的 nostr 中文用户都在这儿!
yfaming's avatar
yfaming 4 months ago
玩币安 Alpha 刚好经历一个完整周期,净利润 $77.74,感觉还行了。😀 抢门槛为 200 积分的空投,好几次没抢到,差点放弃。还是门槛高一些的好~😭 之前看到一个说法,任何一个门槛,都会阻挡很多人。没门槛的机会,很快就会被踩成坑。有门槛的机会,可持续性好很多。😎
yfaming's avatar
yfaming 4 months ago
最近用 nostr 发现两个不太好的地方。 - 通知比较混乱,不够准确,也不够实时。 - 评论结构的处理。现在支持「对评论的评论」,但展示不够友好。打开主帖,只能看到少量「对主帖的评论」,要继续点开评论才能看到层层嵌套的回复。这样导致信息很分散,即使讨论很热烈,也难以感受到氛围。相比之下,我更喜欢扁平或一次性展示完整评论树的方式,就像 Hacker News 那样。 #nostr Recently, I’ve noticed two areas where nostr could be improved: - Notifications are messy — not accurate enough and often not real-time. - Comment structure handling. Currently, it supports “comments on comments,” but the display isn’t very user-friendly. When opening a main post, you only see a few direct replies, and need to keep clicking through to view nested responses. This makes the discussion feel sparse and fragmented, even when it’s actually lively. I’d prefer a flatter view, or better, showing the entire comment tree at once — similar to Hacker News.
yfaming's avatar
yfaming 4 months ago
我刚在 注册了他们的新钱包服务,支持 Lightning Address(比如 @rizful.com)和我一直很喜欢的 NWC(Nostr Wallet Connect)协议。 现在我已把我的 nostr Lightning Address 设置为 yfaming@rizful.com,并在 Primal app 中通过 NWC 连接了这个钱包,整体体验很顺畅! 而且只要在 Nostr 上发帖并 AT @Rizful.com ,就可能收到他们发的 test zap 打赏~ 想试试?推荐参考这篇文档: I just signed up for the new wallet service at . It supports Lightning Address (like @rizful.com) and the NWC (Nostr Wallet Connect) protocol, which I’ve always liked. I’ve already set my nostr Lightning Address to yfaming@rizful.com , and connected this wallet in the Primal app via NWC. The experience has been really smooth! And here’s the fun part: if you post on Nostr and @Rizful.com, you might receive a test zap from them. Want to try it out? Check this guide:
yfaming's avatar
yfaming 4 months ago
About nostr database I’ve been reading the `NostrDatabase` trait and its LMDB backend in rust-nostr. Storing events is simple—just put `(event_id → event)` in a KV store. The challenge is querying, since LMDB itself only supports very basic lookups. The approach in nostr-lmdb is to build extra indexes (e.g. author+kind+created_at+id, tag+created_at+id, etc.). Queries pick the most suitable index to fetch candidate event IDs, then filter them one by one. A few thoughts: Indexing on a KV store is straightforward, nothing mystical. The query logic is verbose, basically a hand-rolled rule-based optimizer. A cost-based optimizer might be a more advanced path? NostrDatabase only supports a single filter, while the protocol allows multiple filters (OR across filters). So a relay must merge results manually. #rust-nostr #nostr 关于 nostr database 最近读了 rust-nostr 里的 NostrDatabase trait 及其 lmdb 实现。存储部分很直观,以 event_id 为 key 存储 event。难点在查询:因为 lmdb 只是 KV 数据库,它本身不支持复杂查询。 nostr-lmdb 的做法,是在存储 event 的同时,额外维护多组索引(比如 author+kind+created_at+id,tag+created_at+id 等)。查询时,先挑合适的索引定位可能的 event id,再逐一过滤。 这种实现让我有几点感受: 原来在 KV 底层上建索引可以这么做,其实没什么玄妙。 查询逻辑比较冗长,感觉像是手工实现了一个 rule-based 优化器。如果更复杂,或许需要 cost-based 优化? 目前 NostrDatabase 只支持单一 filter,而协议里 filter 之间是 OR 关系。如果要做 relay,还得额外处理多个 filter 的合并。 image
yfaming's avatar
yfaming 4 months ago
哭了,连续三次没抢到币安 Alpha 空投,竞争这么激烈的吗?!😂
yfaming's avatar
yfaming 4 months ago
直接在 nginx 配置里设置 NIP-05 验证,不得不说 nginx 真挺强大,我了解的太少了(方案是 ChatGPT 给的)。 image
yfaming's avatar
yfaming 4 months ago
手速太慢,错失一次币安 Alpha 空投 😭
yfaming's avatar
yfaming 4 months ago
dioxus 看起来不错,能用 Rust 同时写 UI 和业务逻辑,对我来说挺有吸引力的。这是它相较于 tauri 的最大优势。 值得关注的是 dioxus 的 UI 组件功能是否足够强大。毕竟,目前用前端技术写 UI(HTML/CSS/JavaScript)几乎是最优解,有 React、Vue、Tailwind CSS 等成熟且强大的库可用。如果 dioxus 的 UI 能达到类似的水平,那它就更有吸引力了。
yfaming's avatar
yfaming 4 months ago
今天币安 Alpha 没有空投,伤心中
yfaming's avatar
yfaming 4 months ago
币安 Alpha 刷到了 240 分,看今天能不能领到空投吧!
yfaming's avatar
yfaming 4 months ago
刚估算了一下 nostr 数据的存储成本(单纯存,不做复杂查询/搜索),大概在 $20 左右,还算能接受。 那问题来了:nostr 数据有没有商业价值?至少能当 AI 的训练语料吧。要是真能卖出几份,光靠这就能覆盖运营成本了。 数据量(event & post)参考自 nostr.band。 Just estimated the storage cost for nostr data (pure storage, no complex queries/search). Turns out it’s around $20 — pretty affordable. But here’s the question: does nostr data have commercial value? At the very least, it could serve as AI training corpus. If I can sell it a few times, that alone might cover the operating cost. Event & post counts are based on nostr.band. #nostr image