In-reply-to » 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!

@prologic@twtxt.net Reminds me to have another look at LSP. Last time I checked, it was super messy in Vim. đŸ€”

​ Read More

Spent basically the entire day (except for the mandatory walk) fighting with Python’s type hints. But, the result is that my widget toolkit now passes mypy --strict.

I really, really don’t want to write larger pieces of software without static typing anymore. With dynamic typing, you must test every code path in your program to catch even the most basic errors. pylint helps a bit (doesn’t need type hints), but that’s really not enough.

Also, somewhere along the way, I picked up a very bad (Python) programming style. (Actually, I know exactly where I picked that up, but I don’t want to point the finger now.) This style makes heavy use of dicts and tuples instead of proper classes. That works for small scripts, but it very quickly turns into an absolute mess once the program grows. Prime example: jenny. đŸ˜©

I have a love-hate relationship with Python’s type hints, because they are meaningless at runtime, so they can be utterly misleading. I’m beginning to like them as an additional safety-net, though.

(But really, if correctness is the goal, you either need to invest a ton of time to get 100% test coverage – or don’t use Python.)

​ Read More
In-reply-to » Yikes. https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fix-circular-imports/

@lyse@lyse.isobeef.org The thing is that’s hard to avoid if TYPE_CHECKING, but documentation tools such as pdoc don’t support that 
 so it’s either type hints or API docs. đŸ€·

I hope I can eventually find a way out of this mess 


​ 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 » @movq Hehe. :-) This steep footpath connects a hiking parking lot outside the village and the edge of the village in a fairly straight line. Garden owners are allowed to drive their vehicles down from the village to their lots on this pathway and up again. These two poles are placed about a third up from the botton on a short, comparatively flat section to stop people from taking this shortcut to get down to the country road. Said road goes through the village but there are hairpins getting up and down. The road markings have been added recentlyish. I suspect to warn shooting down cyclists of the danger ahead. I haven't seen something like this anywhere else either. :-)

There are the two poles: https://www.openstreetmap.org/directions?from=48.735473%2C9.718418

​ Read More
In-reply-to » @lyse All that short brown grass, almost looks like Scotland. đŸ€” (I’ve never been there. 😅)

@movq@www.uninformativ.de Hehe. :-) This steep footpath connects a hiking parking lot outside the village and the edge of the village in a fairly straight line. Garden owners are allowed to drive their vehicles down from the village to their lots on this pathway and up again. These two poles are placed about a third up from the botton on a short, comparatively flat section to stop people from taking this shortcut to get down to the country road. Said road goes through the village but there are hairpins getting up and down. The road markings have been added recentlyish. I suspect to warn shooting down cyclists of the danger ahead. I haven’t seen something like this anywhere else either. :-)

​ Read More
In-reply-to » My mate and I went on a hike earlier. Yesterday, we had lovely 12°C. But today, it was down to at most 4°C. Oh well. At least the sun was out and and there was just a tiny bit of wind. We knew upfont that scarf, beanie and gloves were mandatory. Especially at the more windy sections like up top the hills. The view was absolutely terrible, but we made the best of it.

@lyse@lyse.isobeef.org All that short brown grass, almost looks like Scotland. đŸ€” (I’ve never been there. 😅)

What the heck is 06.jpg?

​ Read More

My mate and I went on a hike earlier. Yesterday, we had lovely 12°C. But today, it was down to at most 4°C. Oh well. At least the sun was out and and there was just a tiny bit of wind. We knew upfont that scarf, beanie and gloves were mandatory. Especially at the more windy sections like up top the hills. The view was absolutely terrible, but we made the best of it.

With the sun shining on us during our lunch break at a forest edge bench, we still enjoyed the lookout in 01. I brought some old carpet scraps to sit on and was happily surprised that they isolated even better than I had hoped for. Some hot tea helped us staying warm.

After five hours we returned just after sunset. I’m quite tired now, completely out of shape.

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

​ Read More
In-reply-to » @movq I still think that your original domain is cool as fuck! :-)

@lyse@lyse.isobeef.org (At least I didn’t break all the links again. In late 2015, I switched from a PHP backend to the current static website, which changed just about everything. I hope doing a disruptive change like this one every 10 years is tolerable. 😅)

​ Read More

So, are you guys up for an experiment?

I’m really not happy with the domain “uninformativ.de” anymore. I’m going to switch to “movq.de” soon (or maybe something else if I get another fancy idea).

If I keep the url = field in my twtxt file, nothing should break, right? Right? đŸ€Ł

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

@lyse@lyse.isobeef.org Thanks!

​ Read More
In-reply-to » https://github.com/unix-v4-commentary/unix-v4-source-commentary

Wow, as I anticipated, this is waaay out of my capabilities to really understand it. But I’m quite happy to just have spotted a mistake in an explanatory comment in section 4.5.2 “The icode Array”. Of course, it should be /e + tc + /i + ni + t\0. Let’s hope that my e-mail with the patch actually makes it into Briam’s inbox. I fear GMail just hides it in the spam folder.

​ Read More

I recently got an email with this byte sequence:

\xf0\x9f\x8e\x81\xf0\x9f\x95\xaf\xef\xb8\x8f

That’s U+1F381, U+1F56F, U+FE0F. The last one is a “variation selector”:

https://unicodeplus.com/U+FE0F

My toolkit renders this incorrectly – and so do tmux and GNU screen.

Unicode ain’t easy. đŸ„Ž

​ Read More
In-reply-to » https://github.com/unix-v4-commentary/unix-v4-source-commentary

/me clones the repository, calls gemini-cli, and asks for an executive summary. Gemini-CLI replies “Don’t bother!” LOL.

​ 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 Tada! Maybe one day I might look into this lowlevel stuff, too. But I can’t see it on the horizon yet. Happy hacking! :-)

​ 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 I’d love to take a look at the code. 😅

I’m kind of curious to know how much Assembly I need vs. How much of a microkernel can I build purely in Mu (”)? đŸ€”

Can’t really answer that, because I only made a working kernel for 16-bit real mode yet. That is 99% C, though, only syscall entry points are Assembly. (The OpenWatcom compiler provides C wrappers for triggering software interrupts, which makes things easier.)

But in long mode? No idea yet. 😅 At least changing the page tables will require a tiny little bit of Assembly.

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

I’m kind of curious to know how much Assembly I need vs. How much of a microkernel can I build purely in Mu (”)? đŸ€”

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

I’ve only got a handful of syscalls working right now. Taking inspiration from the calling convention of the Linux kernel and even made the service/interrupt handler int 0x80h đŸ€Ł I’ve only got read, write, alloc and exit working righ tnow đŸ„Č

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

@movq@www.uninformativ.de Yes!

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

Yup! Fark’n LBA shit and all, loading up the GDT, TSS and switching to x86_64 long mode đŸ€Ł

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

Whohoo! đŸ„ł You have no idea how great a feeling this is! This includes the Mu stdlib and runtime as well, not just some simple stupid program, this means a significant portion of the runtime and stdlib “just works”ℱ đŸ€Ł

​ Read More

Btw @movq@www.uninformativ.de 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.

​ Read More

@kiwu@twtxt.net problems are aplenty everywhere, Kiwu. As we all know, ups and downs flare often times when we least expect them. When downs come, don’t despair: nothing lasts forever, and ups will soon come, one way or another. Pa’lante!

​ 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
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


@movq@www.uninformativ.de I guess so, yes. I read something about that in some ticket. In v3 the terminfo support was dropped, though. I’m still on v2 at the moment.

​ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


@lyse@lyse.isobeef.org 
 I sure hope that they generate these files from the general terminfo database instead of maintaining their own DB. 😳

​ Read More
In-reply-to » Some work on the menu system to brighten my mood a little bit. No mouse support yet.

@bender@twtxt.net I’m already using it for tracktivity (meant for tracking activities and events, like weather, food consumption, stuff like that), which is basically a somewhat-fancy CSV editor:

https://movq.de/v/f26eb836ee/s.png

I have a couple of other projects where I could use it, because they are plain curses at the moment. Like, one of them has an “edit box”, but you can’t enter Unicode, because it was too complicated. That would benefit from the framework.

Either way, it’s the most satisfying project in a long time and I’m learning a ton of stuff.

​ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


@movq@www.uninformativ.de Yeah, I know that terminals are super weird and messy. In both the KDE Konsole (identifying itself as TERM=xterm-256color) and xterm (TERM=xterm) it just works flawlessly. My urxvt (TERM=rxvt-unicode-256color) just doesn’t. I also tried messing with TERM in urxvt, but no luck so far.

​ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


@lyse@lyse.isobeef.org Unix terminals are quite limited in that regard. đŸ«€ You know how Ctrl works? The XOR 0x40 thing? And Alt doesn’t exist at all, it’s just a prefixed ESC byte.

I was surprised to see curses knowing about “Shift+Tab”, wondering how that is supposed to work. Well, it’s an escape sequence, of course (depending on the terminal, of course).

​ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


Well, in Xterm, I actually do get key combinations with the Shift modifier. Also, combinations of several modifiers just work exactly as I expect. But not in URXvt. Hmm.

​ Read More

Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace
 :-D Yep, suddenly there went my X


So far, it appears as if I can have either only Ctrl or Alt as modifiers. But not in combination. And Shift is just never ever set at all. Interesting.

​ Read More

Ainda ando pasmado com o facto de uma sĂ©rie cheia de body horror, violĂȘncia contra crianças, gore e violĂȘncia gratuita (#StrangerThings) estar a ser agressivamente marketizada para um pĂșblico infantil

Ontem um amigo de 9 anos do meu filho estava a contar-me como Ă© a melhor sĂ©rie de sempre, e eu ainda estou burro de como hĂĄ miĂșdos que estejam a ver isto

Btw nĂŁo tenho problemas com a sĂ©rie (acabei ontem a 5ÂȘ temp e acho profundamente meh), Ă© este esforço em vendĂȘ-la a crianças quando Ă© claramente uma sĂ©rie 16+ no mĂ­nimo

​ Read More

This week, Mu (”) get s bit more serious and starts to refactor the native backend (a lot). Soonℱ we will support darwin/arm64, linux/arm64 and linux/amd64 (Yes, other forms of BSD will come!) – Mu (”) also last week grew concurrency support too! đŸ€Ł

​ 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 » @lyse

@movq@www.uninformativ.de Sorry, I meant the builtin module:

$ python3 -m pep8 file.py
/usr/lib/python3/dist-packages/pep8.py:2123: UserWarning: 

pep8 has been renamed to pycodestyle (GitHub issue #466)
Use of the pep8 tool will be removed in a future release.
Please install and use `pycodestyle` instead.

  $ pip install pycodestyle
  $ pycodestyle ...

I can’t seem to remember the name pycodestyle for the life of me. Maybe that’s why I almost never use it.

​ 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

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

What have I been doing all these years?! I never want to format code manually again. đŸ€ŁđŸ˜…

​ Read More