Searching yarn

Twts matching #Go
Sort by: Newest, Oldest, Most Relevant
In-reply-to » I’m seeing some slowdowns in Vim lately. Must have something to do with syntax highlighting or indentation rules or something: When I hit Enter to go to the next line, it sometimes freezes for like 100 ms. It’s pretty annoying.

@movq@www.uninformativ.de Similar to my Go IDE at work. GoLand hangs so often in this giant code base. :-D (But it could also be one or the other snake oil that’s forcefully installed and fucks with me every day.)

⤋ Read More
In-reply-to » @prologic Hmmm, I have no idea how to solve that problem. 😅 Some jenny stuff aside, I received zero bug reports or code contributions since leaving GitHub in 2018.

@prologic@twtxt.net Oh, yes, just for clarity: This wasn’t a “pro GitHub” argument. 😅 I won’t go back there (or to another “forge”).

I think we’re totally on the same page: Decentralized Git hosting is good, but we haven’t solved the “collaboration” part yet. Or rather: We have to modernize it. The tools are already there, but (many) people don’t want to use them and think they’re clunky.

⤋ Read More

I’m seeing some slowdowns in Vim lately. Must have something to do with syntax highlighting or indentation rules or something: When I hit Enter to go to the next line, it sometimes freezes for like 100 ms. It’s pretty annoying.

Doesn’t happen in Vim Classic, so I switched all my machines to that now.

⤋ Read More

I don’t get people strolling in nature with headphones on and constantly staring at their phones all the time. Why even go outside if you cover ears and eyes? Okay, you’re on the move and smell the country air, but still. Yesterday, one girl was wearing earphones and reading a real book while walking on a field path. Better than a phone, sure, but what the hell!?

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

Posting the review and plan here for posterity as it is related to this thread: https://canvas.mills.io/a/6QVGjzRW

The PR(s) as-is will likely not go ahead I’m afraid. More work to be done, but this is basically all about the “Recovery” story and how to anchor and notion of an “account” without well umm an account 🤣

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@david@daiwei.me Right now, tt’s theme is baked into the binary. I have to edit the ui/styles.go and recompile. Luckily, this almost takes no time. But my todo list already includes a bullet point to make this customizable via the configuration file. :-)

⤋ Read More

Unread messages are yellow, while read messages are white in tt. Focusing them just alternates the fore- and background colors. With the old color scheme, I disliked that inline code and code blocks were basically just the opposite of normal text. Hence, unread code was white and read code yellow. I found this often confusing, especially with larger code blocks. Sure, there are the timestamp and author columns that still show the usual white (read) and yellow (unread) background for selected messages, but still.

This is how it was before with unread messages:

Before with read messages:

So, I just reworked the code styles. Not sure if I like that or if it is actually an improvement. Unread code is teal on gray when not in focus and becomes blue on orange when focused. I thought the dark gray code background on a black regular background is still nice and subtle. The same similarity in colors for focused messages meant to go with an orange code background on a yellow regular background. The teal was too light, so went with a blue foreground color:

When read and unfocused, the new color scheme calls for the same code style teal on dark gray. However, with white as the main background for selected messages, I went with a light gray code background and a blue code foreground. Again, the contrast with white and teal wasn’t good enough. Vice versa, blue on dark gray is also not all that readable:

It looks like a parrot. Let’s see if I begin to like it.

⤋ Read More

I really think I should go back to Java.

Writing programs in Python is so exhausting. I want a compiler and I want static typing. No, linters and type checkers and IDEs are not good enough. Compilers catch way more errors in advance.

Rust is also exhausting. They’re constantly adding language features and, at the same time, the runtime library remains tiny and you need 3rd party libraries for everything. Many of those are still at version 0.x (SemVer!) and you can’t rely on anything. Often times, you need the latest Rust nightly compiler.

Go is … I don’t like it. And huge binaries.

I like C as a language, but it’s too fragile. I want to have a proper HashMap every now and then.

None of the above have good GUI libraries, at least not on Linux.

And then there’s Java. This is my fractal renderer that I wrote over 17 years ago:

https://movq.de/v/fcd3c4e557/vid-1784121825.mp4

It’s fast. It has a GUI with custom widgets and those weren’t even hard to make. It still works without changing a single line of code. The source code files have timestamps from 2009 and I just noticed that the JAR file I’m using in the video was compiled in 2010.

Java as a language is relatively easy to learn and to master. There are few surprises. The source code organization with packages is good. Java API docs are clear and well written.

The JVM ramp-up times have improved considerably:

https://movq.de/v/e7314e521e/vid-1784121998.mp4

This isn’t like the Dark Ages anymore. Might even be usable for some CLI tools.

The only thing where Java really sucks is anything close-ish to the kernel. Try issuing an ioctl() … I couldn’t have made my TUI framework in Java, but then again, I wouldn’t have needed to because Swing already exists and it just works.

⤋ Read More
In-reply-to » Yeah, lol, fuck off. Tried to reproduce that hashing issue, thus playing around with Go a little bit. And what did I find?

I also set this to local years ago:

$ go env | grep TELEM
GOTELEMETRY='local'

When this came out I was also outraged. But it doesn’t go anywhere, there are no network connections. It is effectively “off” like this.

⤋ Read More
In-reply-to » Yeah, lol, fuck off. Tried to reproduce that hashing issue, thus playing around with Go a little bit. And what did I find?

@movq@www.uninformativ.de Yes, this is absolutely a no-go!

A long time ago when the first telemetry shitstorm happened, I added export GOTELEMETRY=off in my ~/.zshrc. But it doesn’t seem to be picked up at all (I actually call this sabotage!):

$ go env GOTELEMETRY
local

$ go env -w GOTELEMETRY=off
go: GOTELEMETRY cannot be modified

$ go telemetry off

$ go env GOTELEMETRY
off

⤋ Read More

Yeah, lol, fuck off. Tried to reproduce that hashing issue, thus playing around with Go a little bit. And what did I find?

$ tree ~/.config/go
/home/user/.config/go
└── telemetry
    ├── local
    │   ├── asm@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── compile@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── go@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── link@devel-devel-linux-amd64-2026-07-14.v1.count
    │   ├── upload.token
    │   └── weekends
    └── upload

4 directories, 6 files

It collects and uploads “telemetry” now.

No.

(Don’t tell me how I can turn that off. Not interested. This is a compiler and it wants to track me, without asking for consent. That’s a no-go.)

⤋ Read More
In-reply-to » 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 🎉

@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 🤞

⤋ Read More

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!

⤋ Read More
In-reply-to » +00:00 vs Z should be treated as equivalent UTC 🤦‍♂️ I'll take a look at the timestamp parsing in Yarnd 🧐

@prologic@twtxt.net For what it’s worth, the twt hash extension is specifically modeled after yarnd’s implementation with all the quirks coming from Go’s stdlib: https://twtxt.dev/exts/twt-hash.html#timestamp-format

“All timezones representing UTC must be formatted using the designated Zulu indicator Z rather than the numeric offsets +00:00 or -00:00. If the timestamp does not explicitly include any timezone information, it must be assumed to be in UTC.”

⤋ Read More

Friday, my love, we meet again. I am going to take you to lunch, and pamper you. I will led you to believe you are the only one in my life, but then, as the working day sunsets, I shall leave you at the door, like a stood up girl by her prom date.

Weekend babies, here we come! 😂

⤋ Read More
In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

And I meant “its simplicity”. Autocorrect is going to get me in troubles one of these days. LOL.

⤋ Read More

Hello everyone ! 👋 Behold I bring you (after many years) the launch of the Twtxt App 😅 – Ye, this is a Desktop and Mobile app built as a Progressive Web App (PWA) using a little framework (Swag) I put together iafter some experiments @xuu@txt.sour.is and I did in Go and HTMX and Service Workers.

The App is offline-first and supports installing to Desktop and Mobile (add to Home screen) and supports a number of publishing backends, including Yarn.social’s yarnd Pod, Github, Codeberg/Gitea, and a little tiny twtd Twtxt server (See: https://git.mills.io/yarnsocial/twtd).

Please try it out, no need for any account(s) or such, works with your existing feed(s) (as long as the publishing backends work well enough for you!). Please give me feedback! 🙏

Also, did you know the Twtxt Search Engine is back? 🎉

⤋ Read More
In-reply-to » Apologies for the late #caturday post, but I figure it's more of a state of mind, like that time Shadow temporarily "borrowed" the dog bed (and discovered how comfy a blanket pile can be)...

@movq@www.uninformativ.de It varies… We tend to prefer bowtie collars for all of our little boys, but they like to wrestle sometimes, and since they’re indoor-only, they can go for months without collars at all.

⤋ Read More
In-reply-to » Fuck me! I tried to upgrade tview and the first thing I notice is a shitload of added dependency versions:

The mentioned go.{mod,sum} change is already part of tview 0.42.0. After implementing Set/GetDisabled(…) and PasteHandler(), tt starts up fine and seems to work without issues.

⤋ Read More
In-reply-to » I went to check on the fireflies this season. But I didn't see any. Instead lots of moths. At first, I thought it might have been still too light, but it was already dark enough for me to miss and destroy a snail shell. Bummer. Maybe it was too wet tonight. Although, it's probably just another or two weeks until my glowing friends will finally show up.

The firefly season is ending. I only saw 200 of them or so. There was one female directly on the forest road. If only I brought my camera and tripod, that would have worked out I reckon. I had my torch with me and this looked really cool.

Dusk took forever today. It was really long light out there. Full moon is tomorrow.

On the way back, there was suddenly a load clatter and crashing sound 100 meters away from me. I didn’t see anything, but a tree fell over in the forest out of the blue. Fuck me dead, that was scary as hell. Luckily, I was already on the main road, only meadows around me. It’s the second time I witnessed a tree accidentally coming down. The first one was during the most expensive hail storm in our area so far in 2011 behind me when setting up a summer camp. The weather changed in less than 15 minutes.

Maybe not such a good idea to go out so late alone. :-? Any rustling in the forest immediately reminded me of the boar the other day. Luckily, always false alarm. Still a bit terrified from that event.

⤋ Read More
In-reply-to » So I decided to change tact a bit with GoNIX and instead of trying to build apure Go browser from scratch (which I kinda of half succeeded, in at least it was able to render most static ssr sites), I've instead decided to write a new browsered using the Chromium Embedded Framework, otherwise known as CEF. So now I have a fully working browser in GoNIX 🎉 -- However since my goal is to keep GoNIX pretty lcean and mostly written in Go, I delegated the cef part(s) to an OCI container image and run that with GoNIX's box (command-line container runtime). It works great 👍

@movq@www.uninformativ.de CEF turns out to be pretty easy. I had to write a bit of C and Go to bridge, but once that got going I was able to write it into my pure Go go-wayland wlui library for final rendering. The delegating the entire CEF part was a good idea though because it keeps all the complexity in a container Image, leaving me with just the Go + C stubs/interface and SHM/IPC parts.

⤋ Read More

So I decided to change tact a bit with GoNIX and instead of trying to build apure Go browser from scratch (which I kinda of half succeeded, in at least it was able to render most static ssr sites), I’ve instead decided to write a new browsered using the Chromium Embedded Framework, otherwise known as CEF. So now I have a fully working browser in GoNIX 🎉 – However since my goal is to keep GoNIX pretty lcean and mostly written in Go, I delegated the cef part(s) to an OCI container image and run that with GoNIX’s box (command-line container runtime). It works great 👍

⤋ Read More
In-reply-to » @lyse Mhm, yeah, I also think I like date := time.Date(2026, time.June, 19, /**/ 17, 0, 0, 0, time.UTC) the most. 🤔 (My only gripe with this is that it isn’t obvious whether the third 0 is milli-, micro- or nanoseconds. These days it’s probably nanoseconds, but you never know.)

@movq@www.uninformativ.de Right. A Go programmer eventually knows that its nanoseconds precision. Keyword arguments like in Python are just sooo superior to unnamed positional arguments. I wish that Go had them, too.

⤋ Read More
In-reply-to » I went to check on the fireflies this season. But I didn't see any. Instead lots of moths. At first, I thought it might have been still too light, but it was already dark enough for me to miss and destroy a snail shell. Bummer. Maybe it was too wet tonight. Although, it's probably just another or two weeks until my glowing friends will finally show up.

A deer, multiple frogs, several thousand fireflies and something else. It was already very dark when I was silently drifting along on a nice soft mossy path, enjoying the firefly show left and right and in front of me. I then heard some rustling about 30 meters in the distance in the shrubs. I thought that I must have scared up a deer. But it kept on rustling without any worries. And I closed in without seeing anything.

Only when I heard the quick oink from just 10 meters away, I froze. Shit, no deer, but a boar! Suddenly, I was the one who was scared. It probably hadn’t noticed me before. But did it notice me now? Was that grunt a warning or just completely unrelated? The rustling appeared to slowly come closer. What if there were also piglets around? I couldn’t figure out how many boars there were. Maybe just one, possibly more. A wild boar easily rips a hunting dog apart, so I didn’t want to take any chances and decided I will not wait for them to eventually pass me behind the brush in just a hand full of meters, so I can keep on going. While I was just turning around, I heard another oink and was frighened to death. I ran 20 meters, before calming down a little bit. I listened for half a second and nobody was following me. Phew. I then walked back the path.

What an adventure, I tell you. That was my second (or maybe third?) wild boar encounter in the woods ever. A hell lot more scary at night than during daylight when you can actually see something.

⤋ Read More

[copy-pasted from elsewhere]

Exciting news! D: HEAVY WATER, the second installment in #NealStephenson’s Bomb Light series, publishes October 13th.

Europe, 1934. A British journalist arrives in Moscow on a routine cultural assignment. What follows pulls him across a continent on the brink: through Barcelona in the grip of civil war, across Soviet aerodromes, into the frozen landscapes of occupied Norway. At the center of it all is a substance so rare and so consequential that nations are quietly willing to go to war over it.

Heavy water. Two atoms of hydrogen. One oxygen. The difference between a world that holds and one that doesn’t.

For more information and to pre-order your copy, visit this link: https://www.harpercollins.com/products/d-neal-stephenson

Tour info will be shared later this week. So, stay tuned!

#bookstodon The cover of the 2nd book of thr Bomb Light Series, called

⤋ Read More