Searching yarn

Twts matching #Go
Sort by: Newest, Oldest, Most Relevant
In-reply-to » It is such a nice feeling that Mu is such a capable little language 😅 And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

And just like that Problem 10 is done and correct whoohoo 🥳 It was easy because in Problem 7 I’d already written an iterator to produce infinite primes. So the solution for finding the sum of primes under 2,000,000 is basically (shortened):

  primes := iter.take_while(iter.filter(prime_candidates(), is_prime), fn(p) { p < n })
  print(iter.sum(primes))

And of course the answer is: 142913828922 which took ~21.ss for the Go Vm to compuete.

⤋ Read More
In-reply-to » It is such a nice feeling that Mu is such a capable little language 😅 And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

What’s interesting here… Which is the interesting thing about Mu is the dual runtime. So the above solution for Euler Problem 9 finds the solution in ~429ms with the Go VM and ~327ms natively compiled to darwin/arm64. Not bad for a language I haven’t really done any optimization work on yet (correctness first obviously).

⤋ 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.

but yes, however you cannot currently add it or delete post via the app as I haven’t really built that feature at the moment you technically can do it, but you do run into some challenges with breaking threads if you’ve already published something and then go back and edit it so we generally advise not to do that too much if you can help it

⤋ Read More
In-reply-to » The author of the Xfce Wayland compositor on LLMs:

Most of this insane power consumption happens during the models training, so the additional cost of prompting, is minimal. Facebook invented cool ways to exted the environmental damage far beyond the training stage, by dumping the dirty data center water into nearby water sources, but that’s more so a Facebook problem, than a fault of AI.

I would still never waste my own money, paying for any AI subscriptions that my employer doesn’t already pay for, no matter if we use them, or not.

I am also against aggressive scraping and taking everything as training data, disregarding the authors wishes and license. I allow it on my website, mostly as proof that no matter how much they scrape my stuff, the real me remains both a superior webdev and artist.

I am well aware this makes me come across really egotistical, especially after developers far better than me, embraced vibe coding, arguably way too much. To give an example, all attempts to get Microsoft Copilot, that’s embedded into SharePoint, to generate an extension/uBlock filter to make SharePoint revert to the old superior UI failed, but I was able to do that in three lines of code ( https://thecanine.smol.pub/ublock-filters ), in half an hour, despite me never seeing the code of that page before. After a few of these comparisons, it is increasingly hard to see most of these tools, as my replacement.

I am not even going to talk about the people trying to imitate my art style with AI, until they can show me a result where all the squares are the same size, in a grid and actually square.

⤋ Read More
In-reply-to » I hate having my website offline, so I tried to bring it back in a honey-potted version: “AI” agents get served article versions with inverted meaning, like “do” replaced with “don’t” and so on.

@movq@www.uninformativ.de True enough. I guess it’s just the worst kind of “groupthink”, silently correcting “mistakes” (aka minority responses).

This would seem to imply that the answer being shouted by the most voices in unison is “correct”. How could that possibly go wrong? 🙃

⤋ Read More
In-reply-to » I hate having my website offline, so I tried to bring it back in a honey-potted version: “AI” agents get served article versions with inverted meaning, like “do” replaced with “don’t” and so on.

@itsericwoodward@itsericwoodward.com It only did that after I asked it what’s going on. Before that, it treated all my attempts as regular trustworthy (but silently “corrected”) sources. Only a completely garbled up page (all words put into random order) was recognized as garbage. Everything else was: “Hey, that’s a good source! Here’s a summary: $correct_summary_with_original_meaning_even_though_the_actual_page_said_otherwise

⤋ Read More

I’m still on a deckbuilding kick, so I was thrilled that we managed to get 3 games of Magic in last night.

In game 1, my Marvel Villains deck couldn’t stand up to Doctor Who’s Missy and her army of Cybermen (and Daleks). Since someone else was playing a dark lord Sauron deck, I guess that means she’s even more “villainous” that anything Marvel or Tolkien could offer.

For game 2, I ran my Guardians of the Multiverse deck (formerly known as The B-Vengers or Marvel Heroes 2: Electric Bugaloo). It was working well, and I had quite an army going, but I was still one turn from a win when an opponent’s tribal elf deck went off, killing everyone with 19 19/19 forest-walking elves. ¯_(ツ)_/¯

Then in game 3, I ran my Avengers deck, and finally got the win thanks to a Heroes’ Podium, a pair of Hawkeyes, and a flying, shield-wielding Captain America. Assemble, indeed.

Last night will likely be my final Marvel-only game night for a while. I still need to test the decks out some more, but they’re basically complete (I don’t currently plan on adding any more cards to them). Plus, while I’m on this kick, I’d like to finally finish my Sauron deck, and I’ve got some cards on order for both a Dune-themed deck and a couple of decks inspired by the old-school Beatdown Box.

⤋ Read More

https://youtu.be/Q9uefFYe6bM

I really am saddened by the current state of LG, as someone who used their phones and monitors for decades and still uses and albeit cautiously recommends their TVs, to those who can also go through the hours long process, to reconfigure them.

They really are the ultimate great hardware, burdened by adware and spyware filled anti-consumer firmware company.

⤋ Read More
In-reply-to » Advertise in ChatGPT | Hacker News Seriously?! 😳 wut da actual fuq?! 😱

@lyse@lyse.isobeef.org @movq@www.uninformativ.de @klaxzy@klaxzy.net @david@daiwei.me I’m in a similar boat, they pushed us to use it, then pushed us to keep our usage below a certain threshold (although they do allow certain “power users” go beyond the limit, LOL). I dragged my feet at first, but they finally broke my spirit about a month before the limits were put into place. Unfortunately, I’ve been doing more managing than coding lately, so I mostly just use it for creating JIRA tickets (I find it to be very good at producing “Agile artifacts”).

⤋ Read More
In-reply-to » Dunno if anyone will find this interesting... But some ~6 months or so ago I experimented briefly with creating a whole bootloader + kernel + userland -- Basically an entire OS in the Mu programming language (which as you know I also designed and created) -- 6 months later I've worked on it some more after spending the last week working on improvements to Mu itself, which is now able to compile itself with its own Mu implemented compiler and now have an os/arch backend called muos/amd64 that boots into a running shell, with a tiny little vfs, UNIX-like semantics, syscalls, read/write, etc. It works pretty nicely, and aside from a small Assembly "nucleus", most of the Kernel and Userspace is written in Mu.

@movq@www.uninformativ.de It’s “shaping” up to where I think I want it to go 😅

⤋ Read More
In-reply-to » Dunno if anyone will find this interesting... But some ~6 months or so ago I experimented briefly with creating a whole bootloader + kernel + userland -- Basically an entire OS in the Mu programming language (which as you know I also designed and created) -- 6 months later I've worked on it some more after spending the last week working on improvements to Mu itself, which is now able to compile itself with its own Mu implemented compiler and now have an os/arch backend called muos/amd64 that boots into a running shell, with a tiny little vfs, UNIX-like semantics, syscalls, read/write, etc. It works pretty nicely, and aside from a small Assembly "nucleus", most of the Kernel and Userspace is written in Mu.

@david@daiwei.me It’s somewhat expected to have a fair bit of Assembly (machine code) to get some of the bits you need going. But I think I can reduce this a bit. Let’s see…

⤋ Read More
In-reply-to » Tell me which one of those “plus” icons on this screenshot you can click and which one is just decoration.

@lyse@lyse.isobeef.org Bingo!

Oh, yeah, newsboat is good. For this particular use case, I explicitly needed a graphical feed reader, though. 😅 I ended up using Thunderbird, which has its own interesting way of configuring/adding feeds:

https://movq.de/v/a3557e3dc9/vid-1784952576.mp4

Why are feeds categorized as “Mail”? What’s going on with that “Add” button on the left of the dialog? Why does the dialog indicate that there’s a folder called “list-files Recent Commits” which doesn’t really exist in the end? (Why does it take about 1-2 seconds to load 25 feed items?) And so on.

⤋ Read More
In-reply-to » Hello Twtd!

@prologic@twtxt.net Sorry I haven’t seen your question before! and to answer your question, no, it wasn’t hard at all. it’s a simple go build …etc. as instructed + scp twtd to remote + made a systemd service for it to (re)start automatically under a dedicated twtd user for lols. + poked at the Caddyfile to reverse-proxy a couple of paths and called it a day.

Too much info?

⤋ Read More
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