@kat@yarn.girlonthemoon.xyz Welcome back 🥳
@eldersnake@we.loveprivacy.club Ahh awesome! No worries mate! 🙌
@prologic@twtxt.net seems to be working just fine mate! Thanks for your efforts and especially making the upgrade painless.
@itsericwoodward@itsericwoodward.com Well I clearly suck 🤣 putt.day #62 ⛳ 22/12 +10
🟡🟢🟡🟡🔴🔴🟡🟢🟢🟢🟡🔴🔴🟢🟢🟢🟡🟢🟢🟢 +2
https://putt.day/s/b4UKsjw0olkS
Free daily 3D mini golf in the browser? I smell a new obsession…
putt.day #62 ⛳ 10/12 Eagle
🟡🟡🟡🟡🟡🟡🟡🟡🟡🟢
https://putt.day/s/1VAFIDIxqpbT
Took me two days to clean this off properly 😳
I believe the tree that we stayed under was some kind of fig tree and on top of dropping little fig fruit and another little debris. I think we also got a bunch of butt poop and shit on top of the van’s roof. 🤣
had to clean a lot of gunk off the top of the van I have to wake up back from our holiday! 😱
@david@daiwei.me @GabesArcade@gabesarcade.com Thanks.
The cats don’t actually care much (since they’re cats), but Princess Peaches is prone to bouts of extreme jealously, and has been giving me the side-eye for sharing pictures of the cats rather than her.
I say the world needs both more princesses and more Peaches! 😄
@david@collantes.us heads up 👋 that verification code never reached you — outbound email was broken on my end (my mail relay was rejecting twtxt.net senders 🤦♂️). Fixed + deployed now 🥳 give the hosted feed another go, it’ll land this time 🤞
@itsericwoodward@itsericwoodward.com Wrote it up 👌 Single-user twtd API is now documented (plain JSON, one bearer token) — posting, uploads, profile, followers + WebFinger: https://git.mills.io/yarnsocial/twtd/src/branch/main/API.md 🎉 Shout if anything’s unclear for TwtKpr 🙏
twtpub.com is just the default instance tho — it’s a multi-tenant twtd, AGPLv3. Run your own and I’ll list it in the app’s picker so folks choose where to land 🤗 keeps it decentralised + spreads the load. Docs → https://git.mills.io/yarnsocial/twtd
New in the Twtxt App 🥳 a Hosted feed backend — claim a nick, one tap, no account, no server, nothing to run. Your feed lives at https://twtpub.com/u/yournick and you’re posting from the app straight away 🎉
Just depends, if I get overwhelmed and can’t keep up with demand, I’ll insist on a Gitea Issue(s) so I can organise the work.
@GabesArcade@gabesarcade.com Anywhere I can find ‘em 🤣 Gitea Issues, here, there anywhere you want really 😅
@bender@twtxt.net Pffft bender is never mean haha 😆
@kat@yarn.girlonthemoon.xyz let me know if mean old Bender can help on anything (especially if it is bending things [please let it be bending, let it be bending!]).
@prologic@twtxt.net I know, I am feeling sentimental. After all the bending done today, a bender needs to find solace in the little things, right?
Agreed. One thing I’m not sure if I can do is reuse the native font-size / accessibility stuff. I’ll have to look into whether that’s exposed to PWA(s) at all. 🤔
@prologic@twtxt.net one of my happiest day! Imagine loving pizza, and hearing someone saying “let’s do pizza!”. That’s bending for me! 🤩
Some further ideas/enhancements for Twtxt App …
- On the “Followers” tab, new followers should appear at the top I thnik.
- On the Following/Followers, each feed should be clickable/tappable.
- Maybe also tidy it up a bit, displaying the full raw Feed URI is messy.
@balloon-fu-sen@tw.fus.f5.si Thank you for reaching out 👌 I had alraedy done so via Email too a few days back and she upgraded her Pod to yarnd/0.16.x 🎉
Linux 0.11 rewritten in idiomatic Rust, boots in QEMU | Hacker News Fark’n hell, this is some ~50k SLOC of Rust code compared to the original ~8k SLOC of C of the original this was based off of. No doubt this was “vibe coded” for sure, there is no way a human can write 50k SLOC, not in a reasonable timeframe anyway 😅
Just thought it an interesting Hacker News article that caught my eye 👁️
@kat@yarn.girlonthemoon.xyz You did! 🎉
Hell yeah 👍 🙌
@lyse@lyse.isobeef.org None. I rejected ithe invite request 🤣
@david@daiwei.me Well… I can’t! becuase the email supplied was nobody@invalid or some shit™ 💩
@prologic@twtxt.net You also have to tell us the username!
@david@daiwei.me I agree, the App (https://twtxt.app) really does work quite nicely 👌
@david@daiwei.me that was literally one of the messages I got this morning with an invite request to join this pod 😱
gg instead of g to go to the top in tt. Much better! :-) Other multi-key combinations are also easily possible now.
Nice!
Hell yeah, @kat@yarn.girlonthemoon.xyz is back! \o/
@yarn_police@twtxt.net LOL 😂
Hurray, I can now press gg instead of g to go to the top in tt. Much better! :-) Other multi-key combinations are also easily possible now.
I should probably write a real article about this at some point, but here we go. The only downside with my new key binding system is that it breaks tview’s established pattern. You’ve got an InputHandler(), that is implemented using WrapInputHandler(…). It typically then directly implements the switching logic depending on the key press. Something like this:
func (w *Widget) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
// WrapInputHandler allows for intercepting key events with SetInputCapture(…)
// from the outside for customization. This handles the default key bindings.
return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
switch event.Key() {
case tcell.KeyRune:
if event.Modifiers() == tcell.ModNone {
switch event.Rune() {
case 'k':
w.scrollUp()
return // we already handled the event, stop processing
case 'j':
w.scrollDown()
return
}
}
}
// We didn't handle the key event. Maybe the parent
// widget knows what to do with it.
if handler := w.parent.InputHandler(); handler != nil {
handler(event, setFocus)
}
})
}
From the outside, you can intercept and either stop or continue the widget’s original key handling with a potentially rewritten key event using SetInputCapture(…):
w := NewWidget()
// customized or additional key bindings
w.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
switch event.Key() {
case tcell.KeyUp:
// Rewrite the event, so the "cursor up" key is an alias
// for the vim key binding "k", that is handled by the
// wrapped input handler above. (I know, I know, this is a
// completely unrealistic example, why would anyone use
// cursor keys when there are vim key bindings available?!)
return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
case tcell.KeyRune:
if event.Modifiers() == tcell.ModNone {
switch event.Rune() {
case 'q':
app.Stop()
// we already handled the event, do not pass it
// to the wrapped input handler above
return nil
case 'r':
toggleMessageReadStatus()
return nil
}
}
}
// we didn't handle the event, pass it to the wrapped
// input handler above
return event
}
Since they all expect a single key, I’ve noticed that using multiple dedicated KeyBindings of mine on these different levels kinda breaks multi-key handling with common prefixes. The outer-most KeyBinding captures the prefix, but it can’t transfer it to the inner one if not handled by the outer one. At least not without some more (potentially ugly) changes. So, I now have to work with just a single KeyBindings object for the entire widget chain (if it consists of multiple other widgets or the regular input handler and input capture are in the game). The outside needs to register all its key bind customizations or extensions at the same level that the original widget handles its default ones. Doable by exposing the widget’s KeyBindings instance, but not pretty. You always have to keep this in mind.
With the KeyBindings, it will look like that:
type Widget struct {
parent tview.Primitive
// make it available to children or the outside either by
// direct field access or by providing a getter method
KeyBindings *bind.KeyBindings
}
func NewWidget() *Widget {
w := &Widget{KeyBindings: &bind.KeyBindings{}}
w.KeyBindings. // default key bindings
Bind0(bind.KeySequence('k', w.scrollUp).
Bind0(bind.KeySequence('j', w.scrollDown)
return w
}
func (w *Widget) InputHandler() InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
// also note the missing support for focus transfer at the moment
event = w.KeyBindings.Capture(event)
if event == nil {
return
}
if handler := w.parent.InputHandler(); handler != nil {
handler(event, setFocus)
}
}
}
And then from the outside, or in a child widget:
w := NewWidget()
w.KeyBindings. // additional or customized key bindings
Bind1(bind.KeySequence(tcell.KeyUp), func(*tcell.EventKey) *tcell.EventKey {
return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
}).
Bind0(bind.KeySequence('q'), app.Stop).
Bind0(bind.KeySequence('r'), toggleMessageReadStatus)
When directly working with tview primitives that are not part of custom widget implementations, the following works well so far:
textView := tview.NewTextView().
SetWordWrap(true).
SetText("…")
SetScrollable(true)
textView.SetInputCapture((&bind.KeyBindings{}).
Bind0(bind.KeySequence('q'), app.Stop).
Bind1(bind.KeySequence('g', 'g'), func(*tcell.EventKey) *tcell.EventKey {
return tcell.NewEventKey(tcell.KeyHome, 0, tcell.ModNone)
}).
Capture)
I need to sleep on this some more.
Also, writing very long messages like this one is really not all that fun in tt’s editor. I should absolutely provide a way to shell out to vim.
(Took me about one and a half hours to compose, holy crap. But not only because of not using vim. Although, that might have saved me a quarter hour or so for sure. Proof-reading this message also uncovered quite a few bugs in my real documentation. So, that’s a big win!) Good night!
@lyse@lyse.isobeef.org Quite effective then eh? 🤣
@kat@yarn.girlonthemoon.xyz Welcome back!!!! 🎉 Did you upgrade your yarnd? 🤔
@david@daiwei.me Yeah the search engine/crawler has only found 28 active users in the ecosystem so far 😅
Just for security as required by law.
LOL 🤣 Was this someone’s idea of a joke? 🤔
@prologic@twtxt.net this is so epic!!!
anyway thank you to @prologic@twtxt.net for the email heads up to upgrade this pod! we SHOULD be on the latest version, if i did it right…
@kat@yarn.girlonthemoon.xyz omg i haven’t been here in FOREVER i’m sorry yarn friends!!! i’ve had a lot going on including being extremely depressed :(
@kat@yarn.girlonthemoon.xyz REAL SHIT?
test
@david@daiwei.me Not so keen on the mowing part. :-)