Searching yarn

Twts matching #Go
Sort by: Newest, Oldest, Most Relevant
In-reply-to » PSA: Check your ladders everybody! https://youtu.be/0wqodPGId-8

I don’t know what surprises me the most. Is it the dangerous in red, or the fact we need a 21 minutes video about it. LOL. Sorry, sorry, shouldn’t joke about such safety nightmare. My bad. I will go to my lane now. 🙈

⤋ Read More

As an enjoyer of delightfully bad graphic design, found on most Czech village center cork boards, I’m sad to see the stolen clipart and badly cropped watermarked stock images, gradually replaced with AI slop.

This is far from a serious rant, but generating images of my kind being telepathically hit with sharp rocks, surely gives me a right to complain.

So far these seem the most prominent slop categories, seem to be…

Architecture slop:

  1. find a sketch of what an old building looked like

  2. generate an AI version, without correcting any of the perspective errors - this one is diagonally levitating

  3. generate a recreation of the buildings demise - after going through the AI, for the second time, it is now a completely different building

Moralizing slop:

History slop:

⤋ Read More

Just cancelled my sponsorship of two developers on Github, sorry 😞 – I’m not going to sponsor going forward if no-one else can be bothered to. It seems silly to be the sole sponsor of another’s work or project 🤦‍♂️

⤋ Read More
In-reply-to » The weathermen just cannot be right with their 20°C today, it must have been more. It was awfully hot, the light breeze was not enough and even absent most of the time. In the shade, it was alright. Other than that, the walk to the dairy farm and back was really beautiful. Very lovely scenery.

@lyse@lyse.isobeef.org Those are some very colorful shots. 👌 It was pretty warm here as well, health issues prevented me from going out, though.

(Have we established that Azabache is male? 😃)

⤋ Read More
In-reply-to » Eehhh, what the hell is going on here!?

@lyse@lyse.isobeef.org Yes, and that’s why I’m 100% convinced that we’ll see a massive brain drain in a couple of years. This will affect young people even more, because they don’t have all the “old” knowledge to fall back on.

It’s concerning, I’ve warned about it many times, nobody listens.

I think the best thing one can do is explicitly not use any AI tools but keep your actual skills intact. Might be out of a (good) job for a while, but once this bubble bursts, this is who is going to get hired again. (I think.)

And considering how insanely expensive all this is, I’m still (mostly) convinced that the bubble will actually burst. This stuff just isn’t sustainable.

… or I might be wrong. And if so, I see an even darker future that I don’t want to put into words right now.

⤋ Read More
In-reply-to » Eehhh, what the hell is going on here!?

@lyse@lyse.isobeef.org AI result ahead, feel free to ignore.

I “asked” the AI at work the same question out of morbid curiousity. It “said” that SQLite converts that integer to floating point internally on overflows and then, when converting back, the x86 instruction cvttsd2si will turn it into 0x8000000000000000, even if the actual floating point value is outside of that range. So, yes, it allegedly actually saturates, as a side effect of the type conversion.

I couldn’t find anything about that automatic conversion in SQLite’s manual, yet, but an experiment looks like it might be true:

sqlite> select typeof(1 << 63);
╭─────────────────╮
│ typeof(1 << 63) │
╞═════════════════╡
│ integer         │
╰─────────────────╯

sqlite> select typeof((1 << 63) - 1);
╭──────────────────────╮
│ typeof((1 << 63) ... │
╞══════════════════════╡
│ real                 │
╰──────────────────────╯

As for cvttsd2si, this source confirms the handling of 0x8000000000000000 on range errors: https://www.felixcloutier.com/x86/cvttsd2si

The following C program also confirms it (run through gdb to see cvttsd2si in action):

<a href="https://yarn.girlonthemoon.xyz/search?q=%23include">#include</a> <stdint.h>
<a href="https://yarn.girlonthemoon.xyz/search?q=%23include">#include</a> <stdio.h>

int
main()
{
    int64_t i;
    double d;

    /* -3000 instead of -1, because `double` can’t represent a
     * difference of -1 at this scale. */
    d = -9223372036854775808.0 - 3000;

    i = d;
    printf("%lf, 0x%lx, %ld\n", d, i, i);

    return 0;
}

(Remark about AI usage: Fine, I got an answer and maybe it’s even correct. But doing this completely ruined it for me. It would have been much more satisfying to figure this out myself. I actually suspected some floating point stuff going on here, but instead of verifying this myself I reached for the unethical tool and denied myself a little bit of fun at the weekend. Won’t do that again.)

⤋ Read More

Eehhh, what the hell is going on here!?

SELECT
    printf("0x%x", (1 << 63) - 2),
    printf("0x%x", (1 << 63) - 1),
    printf("0x%x",  1 << 63     ),
    printf("0x%x", (1 << 63) + 1),
    printf("0x%x", (1 << 63) + 2)

SQLite yields:

0x8000000000000000 (instead of 0x7ffffffffffffffe)
0x8000000000000000 (instead of 0x7fffffffffffffff)
0x8000000000000000 (correct)
0x8000000000000001 (correct)
0x8000000000000002 (correct)

Huh!? O_o Am I stupid? What am I missing here? Or is this actually a bug? :-?

With 62 bits, everything is spot on:

0x3ffffffffffffffe
0x3fffffffffffffff
0x4000000000000000
0x4000000000000001
0x4000000000000002

And 64 bits rather unsurprisingly also yield:

0xfffffffffffffffe
0xffffffffffffffff
0x0
0x1
0x2

⤋ Read More
In-reply-to » It's blackbird time again! https://lyse.isobeef.org/amsel-2026-03-29/

@lyse@lyse.isobeef.org easy come, easy go. They grow so fast! :-) Also, Azabache allows to be seeing when ready for it, you know, just like Gandalf “*a wizard is never late, nor is he early, he arrives precisely when he means to*”. :-D

⤋ Read More
In-reply-to » In case you’re wondering where they are: https://artemistracker.com/

@movq@www.uninformativ.de with the current regime, everything is, to put it politely, rather odd, and in disarray. They have yesterday’s window, otherwise the next one was on the 12 of April, or something like that. We knew it was going up for a few days, but we are used to that kind of thing, so it is not that super exciting any more. LOL.

Yeah, I saw it in person.

⤋ Read More
In-reply-to » In case you’re wondering where they are: https://artemistracker.com/

This whole thing was pretty weird, btw. I had no idea it was happening until basically yesterday. No news coverage, nobody mentioned it. 🤔 And suddenly, boom, we’re going to the moon. What? 😅

⤋ Read More

2nd Van trip coming up this weekend, taking Friday off work. Gonna sleep in the Van tonight and see if I can fiddle with the town water supply (basically our outside tap near the Van haha 😆) and see if I can have a shower in the Van, brush my teeth and go to bed 🛌 – Basically I just want to figure out the rest of the plumbing 🪠

⤋ Read More
In-reply-to » I'm happy to report that, earlier today, I published an early version of express-twtkpr: an ExpressJS library that enables hosting (and directly posting to) a twtxt.txt file. It works great (otherwise you wouldn't be able to read this), but it's still in alpha and lacks documentation, examples, tests, installation flexibility, or polish, so please use it at your own risk. Enjoy! https://www.npmjs.com/package/express-twtkpr

@bender@twtxt.net Thanks for the tip-off, fixed!

I hope to have some time this weekend to tease apart my current setup and build a couple of example sites with it (while also writing some docs along the way). But given the rate I’ve been going, it’ll probably be another month. 😢

⤋ Read More

I thought that YouTube finally destroyed all the feeds, because I didn’t get any new entries in my newsreader for days. Now I realized that Newsboat somehow just froze. No idea what happened. This is the very first time ever in all those years. Haven’t updated the version for literally years. I reckon I will compile the upcoming version then. This will require a new Rust toolchain, that’s going to be great fun, I’m sure. Already looking forward to that…

⤋ Read More
In-reply-to » Can anyone recommend a command-line SQL query formatter? Unfortunately, sqlparse is also unsuitable for me: https://github.com/andialbrecht/sqlparse/issues/688

I’m supporting incremental SQLite schema changes to just upgrade from an older database version to whatever the current software version supports. In the past, I already noticed that this is quite expensive in unit tests when each test case runs through the entire schema patches and applies them one by one.

To speed up test execution I now decided that I finally go through the troubles of maintaining both a set of incremental patches and a full schema setup in one go. A unit test verifies that both ways end up with the same structure. This gives me a set of SQLs to check the structures:

SELECT type, name, tbl_name, sql
FROM sqlite_schema
ORDER BY type, name, tbl_name

Unfortunately, the resulting CREATE TABLE SQL queries are formatted differently, depending on whether the full schema was set up in one big step or the structure had been modified with ALTER TABLE. Mainly, added columns are not on their own lines but appended in one physical line. That’s why I wanted an SQL formatting tool. Since I didn’t find one that works decently, I’m now doing some simple string manipulation. Joining consecutive whitespace into a single space character, removing spaces before commas and closing parentheses and spaces after opening parentheses. This works surpringly good enough. Of course, if it fails, the “diff” is absolutely horrendous.

Now for the cool part, my test execution dropped from around 5:05 minutes to just 1:32 minutes! I call that a win.

I just stumbled across PRAGMA table_info('tablename') https://sqlite.org/pragma.html#pragma_table_info, PRAGMA foreign_key_list('tablename') and friends. I guess, I have to play with that, now. It’s probably much better to use than the SQL text approach.

⤋ Read More
In-reply-to » (#rdg46da) @falsifian Correct, the two smaller versions are loading perfectly fine. The hickup is only for the originals. But in all reality, the middle ones are sufficient for me personally. Please don't get me wrong, at least for the people photos, the subjects are large enough. The Japanese landscapes, however, would definitely benefit from a bit more detail. ;-)

Turns out, I even go down to only 50% quality for my thumbnails: https://lyse.isobeef.org/tmp/galres.txt The difference between 50% and 80/90% is just barely noticeable.

$ convert -strip -quality 50 IMG_20251106_035048_448_size_400.jpg 50-stripped.jpg
$ convert -quality 50 IMG_20251106_035048_448_size_400.jpg 50.jpg
$ ls -lh 50*jpg | awk '{print $5 " " $9}'
26K 50.jpg
25K 50-stripped.jpg

⤋ Read More

@rdlmda@rdlmda.me most of our conversations used to be about twtxt, I am not going to lie. Lately? Not so much. It turns out (a) we don’t need a longer hash, (b) we don’t care so much about changing addressing, and © I am just Bender, what else can I say? :-D :-P

⤋ Read More
In-reply-to » (#aoiknhq) @rdlmda But I am gad you at least have figured out how to have a feed description and avatar, that's always nice 👍

@prologic@twtxt.net well, it isn’t rocket science, is it? 😅 Yet, without using the hashes and starting to follow people, it is very, very rudimentary. I know, I know, there were a couple of years during which people lived just fine without those. Yet, once you get used to certain things, there is no going back.

⤋ Read More

There was an endless coming and going of sun, clouds and rain. Not to forget about the wind. I called it quits a bit earlier and went into the woods.

Towards the end I was completeley surrounded by rain curtains in all directions. This looked super cool. I thought I might make it home just in time without having to use my umbrella, but the rain clouds were way quicker than I anticipated. Just after the rain hit me, I met an acquaintance who just started his walk. The wind picked up hard and rain hammered down, mixed with snow. Holding the umbrella was a workout. Shortly after I returned, the rain stopped again.

I didn’t notice the kestrel sitting on the tree when I took the last photo. That was a nice surprise when I sorted through the nearly 300 pics.

https://lyse.isobeef.org/waldspaziergang-2026-02-17/

⤋ Read More

Well it’s ~2am and I finally defeated the AI player in a game of Frontier Crown 👑 – On that note I’m now going to bed, I’ve made so many improvements to the aesthetics (UX) of the game, the mechanics, and it’s now quite nicely playable 👌 G’night! 😴

⤋ Read More

Fuck me dead! I accidentally confused an HTML file for a YAML file and manually opened it in my browser. Unfortunately, I clicked on the OK button of the popped up dialog a bit too fast, it just caught me off guard. It asked which program to open the YAML file in. Of course Firefox thought that it could handle that and suggested itself by default. Conveniently, the “don’t prompt me again and always use this selection from now on” checkbox was enabled.

And then the endless loop of death started. Turns out, this fucking browser can’t do shit with YAML files and delegated to what had been just configured. Oh, would you look at that!? Firefox! Empty tabs after empty tabs appeared. Killing and restarting Firefox just loaded the last session with all the tabs and the loop continued.

Some bloody snakeoil on my work machine slows down link openening requests by two, three seconds. It’s always absolutely anoying, but luckily, it actually limited the rate of new tabs popping up. I still could not close the many tabs fast enough that had accumulated before I noticed what was going on in the background.

Going to the settings to change them was always interrupted with a new tab opening in the foreground.

Finally, killing Firefox and renaming the file on disk before restarting Firefox did the trick and broke the loop. I was still holding down Ctrl+W for a minute or so to get rid of the useless tabs. I didn’t want to loose the important tabs, so just ditching the session wasn’t an option.

⤋ Read More
In-reply-to » I spent the day today integrating @xuu's double ratcheting work and ratchet library back into the reference client/broker implementation saltyim as a v2 branch. I completely redesigned and rewrite the salty-chat TUI client as well, which now includes proper notifications and a background agent that keeps running so you never miss any messages. It all "just works"™ and I'm quite happy with the outcome! 🤩 #saltyim #revamp

@prologic@twtxt.net keep going, keep going!

⤋ Read More

Hmmm, that’s a pity. I never realized that before. The following Go code

var b bool
…
b |= otherBool

results in a compilation error:

invalid operation: operator | not defined on b (variable of type bool)

I cannot use || for assignments as in ||= according to https://go.dev/ref/spec#Assignment_statements. Instead, I have to write b = b || otherBool like a barbarian. Oh well, probably doesn’t happen all that often, given that I only now run into this after all those many years.

⤋ Read More

It was so great going to the sauna again, we were looking forward to that the whole week. :-) It’s been over a year, holy cow, time flies. We definitely have to pick up on that tradition again, that’s for sure.

We attended two Aufguss sessions, the first and last one in our four hour visit. Unfortunately, we didn’t make it to the other two, because the crazy people already occupied the entire sauna 15 minutes before the start. Yeah, no.

Now, the bellies are stuffed with kebabs. Yum! Let’s see how often I wake up tonight to rehydrate.

⤋ Read More

What a beautiful, beautiful 0°C Sunday arvo and evening! The weather forecast delayed the snow by the minute. An hour or so after it finally started very, very lightly, I headed off for the woods to check out the lake again. Unfortunately, with the fresh snow layer, the crazy wild surface texture of the ice sheet wasn’t visible anymore. But it brought some other nice views and photo opportunities.

I initially thought that I just go for a quick turn. However, with the snowfall a wee bit increasing I was hooked and kept going. Visibility was poor, but the snow blankets just looked too stunning. The road surfaces were quite slippery, so I often just walked alongside the pathways. On downhill slopes I had some good fun sliding down the road on my feet. With varying success. Luckily, I managed not to fall.

On the summit of the mountain the twigs had those absolutely magnificently looking windblown crystal coverings. Awwwwwww! They never get old. It was already getting dark, so the camera was tired and wanted to sleep. The snow program then made use of the flash and I’m quite pleased with how these shots turned out.

Two deer crossed the road in front of me and ran into the woods, that was sight for sore eyes. Although I felt bad that they had to flee from me in this white terrain. By the time I got home, the snow had accumulated around eight centimeters in height, even in town down in the valley. Walking on this fresh snow is just amazing. And I love the sound it makes. Today, the snow consistency must have been just right, because the crushing sound was really loud.

I cannot recall that I had frozen hair and beard before, but today, there was a thick ice buildup. In case I had, it was definitely never this much. Felt really cool.

Enough of this preliminary skirmishing, there ya go: https://lyse.isobeef.org/waldspaziergang-2026-01-25/

⤋ Read More
In-reply-to » This weekend, I'm building a service that turns PDFs into chaptered, audiobook‑quality narration in minutes—upload, listen in a built‑in player, and download MP3/M4B files with clean metadata.

Has a bit of a long history story behind this, where last year at work we were reading this book called Engineering a Safer World and initially came across a service called Speech Reply that allowed me to upload a PDF copy of the book and start to read it, but unfortunately, the free trial right now before I can finish reading it turns out that Speech Reply service cost a whopping US$30 a month and expected me to pay a full year upfront, which was well over US$300 just for one fucking book! So I sent their sales and support staff a message kindly asking if it were possible to just pay for the audio transcription of just a single book or to change to a monthly subscription fee, to which they refused, so basically in the end I got very angry and told them to go fuck themselves and built my own service. A year later here we are :-)

⤋ Read More

yes, yes that’s right. Mu (µ) now has a built-in LSP server for fans of VS Code / VSCodium 😅 You just go install ./cmd/mu-lsp/... and install the VS extension and hey presto 🥳 You get outlines of any Mu source, Find References and Go to Definition!

⤋ Read More
In-reply-to » Btw @movq you've inspired me to try and have a good 'ol crack at writing a bootloader, stage1 and customer microkernel (µKernel) that will eventually load up a Mu (µ) program and run it! 🤣 I will teach Mu (µ) to have a ./bin/mu -B -o ... -p muos/amd64 ... target.

@prologic@twtxt.net Damn, nice! I know exactly what you mean – the output/screenshot looks trivial, but there’s so much going on behind the scenes. 😃

Did you do the whole dance with BIOS boot and everything?

⤋ Read More

Took me nearly all week (in my spare time), but Mu (µ) finally officially support linux/amd64 🥳 I completely refactored the native code backend and borrowed a lot of the structure from another project called wazero (the zero dependency Go WASM runtime/compiler). This is amazing stuff because now Mu (µ) runs in more places natively, as well as running everywhere Go runs via the bytecode VM interpreter 🤞

⤋ Read More

I’m trying to implement configurable key bindings in tt. Boy, is parsing the key names into tcell.EventKeys a horrible thing. This type consists of three information:

  1. maybe a predefined compound key sequence, like Ctrl+A
  2. maybe some modifiers, such as Shift, Ctrl, etc.
  3. maybe a rune if neither modifiers are present nor a predefined compound key exists

It’s hardcoded usage results in code like this:

func (t *TreeView[T]) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
    return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
        switch event.Key() {
        case tcell.KeyUp:
            t.moveUp()
        case tcell.KeyDown:
            t.moveDown()
        case tcell.KeyHome:
            t.moveTop()
        case tcell.KeyEnd:
            t.moveBottom()
        case tcell.KeyCtrlE:
            t.moveScrollOffsetDown()
        case tcell.KeyCtrlY:
            t.moveScrollOffsetUp()
        case tcell.KeyTab, tcell.KeyBacktab:
            if t.finished != nil {
                t.finished(event.Key())
            }
        case tcell.KeyRune:
            if event.Modifiers() == tcell.ModNone {
                switch event.Rune() {
                case 'k':
                    t.moveUp()
                case 'j':
                    t.moveDown()
                case 'g':
                    t.moveTop()
                case 'G':
                    t.moveBottom()
                }
            }
        }
    })
}

This data structure is just awful to handle and especially initialize in my opinion. Some compound tcell.Keys are mapped to human-readable names in tcell.KeyNames. However, these names always use - to join modifiers, e.g. resulting in Ctrl-A, whereas tcell.EventKey.Name() produces +-delimited strings, e.g. Ctrl+A. Gnaarf, why this asymmetry!? O_o

I just checked k9s and they’re extending tcell.KeyNames with their own tcell.Key definitions like crazy: https://github.com/derailed/k9s/blob/master/internal/ui/key.go Then, they convert an original tcell.EventKey to tcell.Key: https://github.com/derailed/k9s/blob/b53f3091ca2d9ab963913b0d5e59376aea3f3e51/internal/ui/app.go#L287 This must be used when actually handling keyboard input: https://github.com/derailed/k9s/blob/e55083ba271eed6fc4014674890f70c5ed6c70e0/internal/ui/tree.go#L101

This seems to be much nicer to use. However, I fear this will break eventually. And it’s more fragile in general, because it’s rather easy to forget the conversion or one can get confused whether a certain key at hand is now an original tcell.Key coming from the library or an “extended” one.

I will see if I can find some other programs that provide configurable tcell key bindings.

⤋ Read More
In-reply-to » Since I used so much Rust during the holidays, I got totally used to rustfmt. I now use similar tools for Python (black and isort).

@movq@www.uninformativ.de @prologic@twtxt.net That’s what I like about Go, too. However, every now and then I really dislike the result, e.g. when removing spaces from a column layout. Doesn’t happen often, but when it does, I hate it.

I think I should have a look at Python formatters, too. Pep8 is deprecated, I think, it’s been some time that I looked at it.

⤋ Read More

It drizzled all morning when we picked up the old christmas trees in town with the scouts. Right after lunch the snow storm suddenly hit and dumped three centimeters of snow in just 15 minutes. I cycled home in these crazy conditions, freezing rain hammered my face. As soon as I arrived, it stopped. It’s now down to drizzling again.

All my soaked gear is now hung up to dry. The next 11 months, I’m going to find needles over needles in all kind of impossible places.

⤋ Read More
In-reply-to » @lyse Ah, the lower right corner is different on purpose: It’s where you can click and drag to resize the window. https://movq.de/v/cbfc575ca6/vid-1767977198.mp4 Not sure how to make this easier to recognize. 🤔 (It’s the only corner where you can drag, btw.)

@lyse@lyse.isobeef.org It’s not super comfortable, that’s right.

But these mouse events come with a caveat anyway:

ncurses uses the XM terminfo entry to enable mouse events, but it looks like this entry does not enable motion events for most terminal emulators. Reporting motion events is supported by, say, XTerm, xiate, st, or urxvt, it just isn’t activated by XM. This makes all this dragging stuff useless.

For the moment, I edited the terminfo entry for my terminal to include motion events. That can’t be a proper solution. I’m not sure yet if I’m supposed to send the appropriate sequence manually …

And the terminfo entries for tmux or screen don’t include XM at all. tmux itself supports the mouse, but I’m not sure yet how to make it pass on the events to the programs running inside of it (maybe that’s just not supported).

To make things worse, on the Linux VT (outside of X11 or Wayland), the whole thing works differently: You have to use good old gpm to get mouse events (gpm has been around forever, I already used this on SuSE Linux). ncurses does support this, but this is a build flag and Arch Linux doesn’t set this flag. So, at the moment, I’m running a custom build of ncurses as a quick hack. 😅 And this doesn’t report motion events either! Just clicks. (I don’t know if gpm itself can report motion events, I never used the library directly.)

tl;dr: The whole thing will probably be “keyboard first” and then the mouse stuff is a gimmick on top. As much as I’d like to, this isn’t going to be like TUI applications on DOS. I’ll use “Windows” for popups or a multi-window view (with the “WindowManager” being a tiny little tiling WM).

⤋ Read More
In-reply-to » I think this is finally a good metaphor to talk about “simple” software:

@prologic@twtxt.net Yep! I like that this distillation metaphor makes it explicit: You have to go ahead and actually distill something. It doesn’t happen automatically. The metaphor acknowledges that this is work that needs to be done by someone.

⤋ Read More

I came across this on “Why Is SQLite Coded In C”, which I found interesting:

“There has lately been a lot of interest in “safe” programming languages like Rust or Go in which it is impossible, or is at least difficult, to make common programming errors like memory leaks or array overruns.”

If that’s true, then encountering those issues means the programmer is, simply, horrible?

⤋ Read More
In-reply-to » @lyse A "Hello World" binary is ~372KB in size. I currently have peephole optimization and deac code optimizations in play, and a few other performance related ones, but nothing too fancy. I have a test case that ensures fib(35) doesn't regress too badly as I continue to evolve the language.

@prologic@twtxt.net Not bad for a start, ey! Looking forward to see you going down these rabbit holes and opening one can of worms after the other. :‘-D Very, very impressive, hats off to you. :-)

⤋ Read More

@shinyoukai@neko.laidback.moe Because you might not want to commit all changed files in a single commit. I very often make use of this and create several commits. In fact, I like to git add --patch to interactively select which parts of a file go in the next commit. This happens most likely when refactoring during a feature implementation or bug fix. I couldn’t live without that anymore. :-)

If you have a much more organized way of working where this does not come up, you can just git commit --all to include all changed files in the next commit without git adding them first. But new files still have to be git added manually once.

⤋ Read More
In-reply-to » Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the user's home directory by user.Current().HomeDir. Maybe that's overkill, I have to check the XDG spec.

Ok, the standard library implementation is wonky at best, at least in regards to XDG, because it really doesn’t implement it properly. https://github.com/golang/go/issues/62382 I stick to my own code then. It doesn’t properly support anything else than Linux or Unixes that use XDG, but personally, I don’t care about them anyway. And the cross-platform situation is a giant mess. Unsurprisingly.

⤋ Read More
In-reply-to » @lyse Well, I used SnipMate years ago (until 2012). IIRC, it’s more than just “insert a bit of text here”, it can also jump to the correct next location(s) and stuff like that. Don’t remember why I stopped using it.

@movq@www.uninformativ.de Thanks! I’ll have a look at SnipMate. Currently, I’m (mis)using the abbreviation mechanism to expand a code snippet inplace, e.g.

autocmd FileType go inoreab <buffer> testfunc func Test(t *testing.T) {<CR>}<ESC>k0wwi

or this monstrosity:

autocmd FileType go inoreab <buffer> tabletest for _, tt := range []struct {<CR>    name string<CR><CR><BS>}{<CR>   {<CR>   name: "",<CR><BS>},<CR><BS>} {<CR>  t.Run(tt.name, func(t *testing.T) {<CR><CR>})<CR><BS>}<ESC>9ki<TAB>

But this of course has the disadvantage that I still have to remove the last space or tab to trigger the expansion by hand again. It’s a bit annoying, but better than typing it out by hand.

⤋ Read More

The tt URLs View now automatically selects the first URL that I probably are going to open. In decreasing order, the URL types are:

  1. markdown media URLs (images, videos, etc.)
  2. markdown or plaintext URLs
  3. subjects
  4. mentions

I might differentiate between mentions of subscribed and unsubscribed feeds in the future. The odds of opening a new feed over an already existing one are higher.

⤋ Read More
In-reply-to » @lyse while caching those is a good idea the problem is baking data that can be calculated into the database instead of some cache, because post hashes are not fixed and change for every post edit. you can always easily look up other twts by hash with a cached lookup table, but now you're not locked into them so supporting hashv2 or other hash variants or any other solution becomes far easier

@zvava@twtxt.net By hashing definition, if you edit your message, it simply becomes a new message. It’s just not the same message anymore. At least from a technical point of view. As a human, personally I disagree, but that’s what I’m stuck with. There’s no reliable way to detect and “correct” for that.

Storing the hash in your database doesn’t prevent you from switching to another hashing implementation later on. As of now, message creation timestamps earlier than some magical point in time use twt hash v1, messages on or after that magical timestamp use twt hash v2. So, a message either has a v1 or a v2 hash, but not both. At least one of them is never meaningful.

Once you “upgrade” your database schema, you can check for stored messages from the future which should have been hashed using v2, but were actually v1-hashed and simply fix them.

If there will ever be another addressing scheme, you could reuse the existing hash column if it supersedes the v1/v2 hashes. Otherwise, a new column might be useful, or perhaps no column at all (looking at location-based addressing or how it was called). The old v1/v2 hashes are still needed for all past conversation trees.

In my opinion, always recalculating the hashes is a big waste of time and energy. But if it serves you well, then go for it.

⤋ Read More