Searching txt.sour.is

Twts matching #reading:
Sort by: Newest, Oldest, Most Relevant
In-reply-to » I am finally building a Twtxt / Yarn.social inspired Git forge. I'm actually quite confident that y'all will quite like it, but I won't post links yet until I'm quietly confident in its design, functionality and behaviour(s).

gitxt is a purely decentralised git forge. There is no federation protocol, no instance-to-instance API, no accounts on other people’s servers. Each forge instance is fully independent; collaboration is an act of publishing and reading plain text files over HTTP

⤋ Read More

If I say companies should at least consider the 3 line CC license before scraping my sites, I’m seen as the unreasonable one.

But when I use an alternative forontend, to read feeds on their sites, without having to make yet another free account, now the same companies and their users scream about some unspecified part of their license being violated, threaten legal action and expect me to care about it.

GitHub thread: https://github.com/zedeus/nitter/issues/1442#issuecomment-5413651441

⤋ Read More

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:

#!/usr/bin/env mu

// Largest Product in a Series

import "fp"
import "sys"

fn usage() {
  print("Usage: cat |", args()[0], "<n>")
}

fn products(xs) {
  return fp.reduce(xs, 1, fn(x, y) {
    if y == nil {
      return x
    }
    return x * y
  })
}

fn main() {
  if len(args()) < 2 {
    usage()
    exit(1)
  }

  s := must(sys.read_all(0))
  if len(s) == 0 {
    usage()
    exit(1)
  }

  n := must(int(args()[1]))
  r := fp.max(fp.map(fp.sliding(fp.map(s, int), n), products))
  print(r)
}

main()

⤋ Read More

Bwahahaha, these security folks have a great sense of humor! :-D Got a phishing test e-mail disguised as an overdue anti-phishing training e-mail:

Image

We receive these test phishing e-mails every now and then at work. When you follow the links and log in at the fake login, you probably get assigned another (real) training.

When I got this e-mail, I immediately thought of such a test. Since I actually do have some stupid training deadlines coming up soon, I wasn’t 100% sure, but still doubted that this was one of them. To make the timing even better, in the team meeting last week, our bosses reminded us to complete outstanding trainings before the deadlines. Ideally well in advance. Notifications about deadlines coming closer are sometimes not only sent to the individuals but also to the bosses and their bosses. And then things can get out of hands when somebody doesn’t read the e-mails properly and mistakes them for deadline exceeded reports.

Anyway, the URL also looked kinda legit. It really doesn’t help a single bit that domain names change all the fucking time. So, still with the test program in mind, I thought, I just give it a quick shot out of curiosity. Since I just had logged in before, the empty SSO username field was totally obvious then. Looking at the e-mail headers confirmed that this was indeed one of security’s field checks. :-)

⤋ Read More

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.

https://git.mills.io/prologic/muos

⤋ 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 » I should really fix this damn bug where new replies to read replies to unknown conversation roots are not showing up in tt. I run into this bug almost daily for weeks now.

@prologic@twtxt.net A screenshot won’t help in this case, as you don’t see anything. :-D It starts off just fine with a conversation tree like that:

Unknown conversation root
└╴Read reply
  └╴Read subreply

Everything works. After reloading the feeds, a new message becomes part of the conversation, so the conversation e.g. looks:

Unknown conversation root
└╴Read reply
  ├╴Read subreply
  └╴Unread subreply

However, the bug is that the whole conversation is not shown at all. None of the three (or four with the root) messages appear in the message tree view. My recursive SQL determining the messages to display is clearly broken.

⤋ Read More

📣 ACTION REQUIRED: Hey folks 👋 For those of you whom are using the Twtxt App either via the Hosted option or on your own twtd instnace or via Github/Gitea or any other publishing backend (doesn’t amtter). Please read.

Please open the app and you should be prompted to save your recovery code for your device. This basically is all of your settings, follows, etc in the app itself. This is synced to the Origin everytime you make a change, and also stored on-device. This is what makes it possible to sync your setting across services, move to another device, etc.

Please save a copy of the recovery code somewhere. This is only your only way to recover your settings.

Thank you 🙏

⤋ Read More

I should really fix this damn bug where new replies to read replies to unknown conversation roots are not showing up in tt. I run into this bug almost daily for weeks now.

⤋ Read More

@david@daiwei.me Ha, I just noticed that I changed Newsboat’s defaults. Right from the factory, new items are just bold, while read ones aren’t. No different colors, white on black. Focused items are bold yellow on blue. No matter the read status. I think that’s why I started to play with the config to differentiate them. It’s been so long ago that I didn’t know anymore I even messed with that.

And yes, you’re right, the red on black is borderline readable. Also, my white on green focus is rather silly. But I’m sooo used to it, I don’t realize how bad the contrast is. To be fair, I don’t spend a lot of time in the lists. Aha, there are new articles, Enter to hit the artice view, read it, press n to immediately jump to the next unread article, rince and repeat, finally I’m back in the article list view.

Default theme, read focused:

Image

Default theme, unread focused:

Image

Lyse’s schlimmbesserung, read focused:

Image

Lyse’s schlimmbesserung, unread focused:

Image

⤋ Read More

@dce@hashnix.club Fixed! 🥳 That 403 was our bug — connect was checking your token via /api/v1/user (needs read:user), but your token’s scoped to just the repo so it can’t. Now it validates against the repo itself instead 👍

⤋ Read More

@david@daiwei.me Not sure if you only mean the code segments or in general. In theory, a general darker text color for read messages would probably work. The thing is that regular white on black is quite standard. In Newsboat, new articles are red (I opted for yellow here) and read ones white. I found that useful and kinda copied it for tt.

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

As an alternative, I also gave a much simpler teal on gray with reversed colors on focus a shot. Hmm, not so sure either. :-?

Unread messages:

Image

Read messages:

Image

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

Image

Before with read messages:

Image

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:

Image

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:

Image

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

⤋ Read More
In-reply-to » I trip over this in our code at work all the time.

@movq@www.uninformativ.de The nice thing about properties is that you can compute and cache things on the fly at first attempt and also ensure validation for writing. But like you said, since it’s not obvious that reading or writing might do some more things, it’s strongly advised to avoid doing expensive stuff disguised as properties.

I reckon the vast majority of property use cases is to provide read-only access. At least that was my impression when I was doing a lot more in Python.

Personally, I think that this just reads a lot nicer:

oink.my_property
oink.my_property = 42

Than:

oink.get_my_property()
oink.set_my_property(42)

Btw, any field access is implemented using method calls. I might be wrong, but I believe there’s always __getattr__ and __setattr__ involved. 8-)

⤋ Read More

I trip over this in our code at work all the time.

Python has this concept of “properties”:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo


a = Oink()
print(a.my_property)

my_property() is a method but it can be used as if it were a field.

This can also be used to define a setter:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo

    @my_property.setter
    def my_property(self, value):
        self._foo = 123 * value

Because, for some reason, Python people don’t like getters and setters. Instead, they hide it behind a property.

The result is, when you read this:

a.my_property = 5
print(a.my_property)

You have no idea that this actually calls a method.

⤋ 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

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 » @lyse the siting lady reads this?

@bender@twtxt.net Thanks, mate!

On the back of the bench, the badge says: “Gestiftet Verein berg hohenstaufen Göppingen 2013”. I read that as the Mt. Hohenstaufen club donated the bench itself:

Image

On the front of the bench, the badge says: “Gestiftet von Hildegard Schuster, Gesellschafterin der Schwarz-Gruppe, Firma Wackler”. The bronze lady was donated by a shareholder of the Schwarz group, specifically the local Wackler trucking and logistics company. Clip of 27 in original resolution:

Image

The book itself reads: “Zur Erinnerung an Ralph Kobza” It’s in memory of the sales manager of the art foundry next town that created also this statue. My mate took this photo:

Image

⤋ Read More
In-reply-to » My mate and I hiked up the backyard mountain. We got 25°C and quite some wind, so it was actually not too terrible. The wind could have blown harder or the temps a little lower, but oh well.

@lyse@lyse.isobeef.org the siting lady reads this?

Gestiftet von
Hildegard Schünar
Gesellschafterin
der Schwarz-Gruppe
Firma Wüst's
Anni

Or it is something else? Awesome pics, Lyse! Some oldies I missed (the lady), and some pretty cool new ones. I can’t get enough of nature pics!

⤋ Read More

I just read @kat@yarn.girlonthemoon.xyz’s blog post over here:

https://bubblegum.girlonthemoon.xyz/articles/learning-to-code-like-it-s-the-90s

Jesus, it must be so overwhelming for young people to get started with programming.

When I started programming, there was the built-in ROM BASIC of that PC and probably a bit of BASIC on a floppy, and that was it. Nowadays? Millions of libraries and frameworks and languages and what not – and, much worse, there’s the expectation that you need to make something fancy. When I started, printing something and understanding IF was good enough.

⤋ Read More

Woman, 21, dies after bungee staff ‘forget’ to attach rope
Maria Eduarda Rodrigues de Freitas was killed in front of horrified witnesses at an abandoned Brazilian railway bridge after workers launched her into a 40-metre drop in a “Superman” pose. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

FIFA World Cup 2026 Live updates: Germany thump Curacao 7-1 as Japan take on the Netherlands
The Netherlands and Japan kick-off our coverage this morning before we take the Ivory Coast take on Ecuador and later, Sweden v Tunisia. Follow all the action. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

FIFA World Cup 2026 Live updates: Germany thump Curacao 7-1 as Japan take on the Netherlands
The Netherlands and Japan kick-off our coverage this morning before we take the Ivory Coast take on Ecuador and later, Sweden v Tunisia. Follow all the action. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

Deadlocked Wars: How Major Powers Misread the Regions They Attacked
Russia and the United States projected their own centralized views onto Ukraine and Iran, analysts said. As a result, the smaller countries trapped larger ones in a costly confrontation. ⌘ Read more

⤋ Read More

Víťazi 54. ročníka Folklórneho festivalu Tancuj, tancuj…
V sobotu 13. júna sa v Hložanoch uskutočnil 54. ročník Folklórneho festivalu Tancuj, tancuj… Na javisku Domu kultúry a v hložianskom amfiteátri vystúpili stovky účinkujúcich: 34 speváckych skupín, 6 ľudových orchestrov a 19 tanečných skupín. Podľa rozhodnutia odborných porôt najkrajší tanec predviedol Folklórny súbor Klasy zo Starej Pazovy, najkrajšie spievala mužská spevácka skupina SKUS Pivnica a SKOS … ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

Penny was told her agonising pain was just ovulation. The next day, she was begging to die
The case is one of more than 400 accounts submitted to this masthead’s medical misogyny investigation in which women and girls had their pain dismissed, minimised or declared imaginary. ⌘ Read more

⤋ Read More

Penny was told her agonising pain was just ovulation. The next day, she was begging to die
The case is one of more than 400 accounts submitted to this masthead’s medical misogyny investigation in which women and girls had their pain dismissed, minimised or declared imaginary. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

ASX set for unsteady start; SpaceX soars in its debut on Wall Street
The Australian sharemarket is set for an unsteady start amid a fresh escalation in tensions in the Middle East while SpaceX soared in its highly anticipated debut on Wall Street. ⌘ Read more

⤋ Read More

Iran War Live Updates: Trump Calls for Restraint After Israel Strikes Beirut Suburbs
President Trump said “all sides should stand down,” as the conflict in Lebanon between Israel and the Iranian-backed militant group Hezbollah complicated efforts to finalize a cease-fire agreement with Tehran. ⌘ Read more

⤋ Read More

Eat like an Italian: Two budget-friendly recipes to hit your five veg a day
Forget dietary “magic bullets” and embrace these rustic, vegetable-forward dishes. They’re thrifty, comforting and delicious – and just happen to be healthy. ⌘ Read more

⤋ Read More

A ‘house of sourdough’ opens in a hallowed bakery site in Melbourne’s north
An eastern suburbs pastry specialist expands and bets big on bread, crafting crusty pizza slices, Italian deli sandwiches and artisanal loaves kids and adults will love. ⌘ Read more

⤋ Read More

Bored of brekkie? Try the lemongrass sausage muffin at this cafe-bar unlike anywhere else
A co-founder of ACME and a fourth generation Vietnamese restaurateur have partnered to open an intimate all-day diner with a fresh take on the familiar. ⌘ Read more

⤋ Read More