movq

www.uninformativ.de

No description provided.

Recent twts from movq

Another project where I’m going to use my terminal widget toolkit is a hex editor. This is still very young, obviously, and there’s a lot of work to do (both in the toolkit and this particular application), but I’m making some progress:

https://movq.de/v/2bae14ed16/vid-1769283187.mp4

Since this program is UTF-8 clean (I hope), you can do things like enter multi-byte UTF-8 sequences or paste them from the system clipboard (another hex editor I just tried failed to do this correctly):

https://movq.de/v/e9241034c1/vid-1769283755.mp4

Under the hood, I’m using mmap() with MAP_PRIVATE, which is really cool: I get the entire file as a byte array, no matter how large it is, no need to actually read it upfront; and MAP_PRIVATE means that I can write to this area however I like without changing the underlying file. The kernel does copy-on-write for me. Only when you hit Save, it will write to the filesystem. And it’s just a couple lines of code. The kernel does all the magic. 🥳

⤋ Read More
In-reply-to » @shinyoukai 🙋 with extra 24/7 noise from the construction site outside (construction guys live in a little “container” and they need power, so they have a diesel generator running 24/7)

(Thank goodness, they turned it off for the weekend! So it’s only 24/5! Whoop, whoop.)

⤋ Read More
In-reply-to » My washing machine is making funny noises and I’m this 🤏 close to just throwing it out and washing everything by hand, instead of buying another expensive enshittified product that’s designed to break down in a couple of years.

@lyse@lyse.isobeef.org That’s a long way to walk! 🤯

⤋ Read More
In-reply-to » My washing machine is making funny noises and I’m this 🤏 close to just throwing it out and washing everything by hand, instead of buying another expensive enshittified product that’s designed to break down in a couple of years.

@bender@twtxt.net Naaah, I don’t have a dish washer either, it’ll be fine. 🤣 (No it won’t.)

⤋ Read More

My washing machine is making funny noises and I’m this 🤏 close to just throwing it out and washing everything by hand, instead of buying another expensive enshittified product that’s designed to break down in a couple of years.

Washing is easy anyway, the spin cycle to dry that stuff is the important part …

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

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.

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

@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 » 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…

@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

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

Okay, I had heard of “River” before but I was not aware of this:

https://codeberg.org/river/river

River defers all window management policy to a separate window manager implementing the river-window-management-v1 protocol. This includes window position/size, pointer/keyboard bindings, focus management, window decorations, desktop shell graphics, and more.

This sounds promising and it follows the old X11 model. River does all the nasty Wayland work and I can make just the WM? 🤔🤯

⤋ Read More