movq

www.uninformativ.de

No description provided.

In-reply-to » Slow progress: My hex editor now has an info panel that shows what’s under the cursor. https://movq.de/v/f9586ec65c/s.png

@lyse@lyse.isobeef.org

I can’t remember if the hex viewer back then had these options. Don’t even recall what software that was. :-)

The one that I used during my Windows 95 days was ā€œHex Workshopā€. It had similar features, just not as promimently displayed. It shows them down there in the statusline as ā€œValueā€:

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

Newer versions can probably do more, haven’t checked. šŸ˜… (Assuming this program still exists.)

Apart from selecting text to copy into the clipboard. But that probably has the potential for trouble and interference with button clicks, etc.

Yeah, that’s a big problem: Once you activate mouse mode in the terminal, the terminal loses the ability to select text. šŸ˜ž You’d either have to emulate that in the program itself (like Vim does) or give the user an easy way to turn mouse support on/off during runtime.

How did the startup times develop?

They’re pretty stable at around 230 ms on my old NUC. It’s just fast enough so that it doesn’t annoy me.

⤋ Read More
In-reply-to » Slow progress: My hex editor now has an info panel that shows what’s under the cursor. https://movq.de/v/f9586ec65c/s.png

I’m inclined to remove all mouse support, except for moving windows. šŸ¤” I originally wanted this to emulate the behavior of DOS programs, but a) mouse support is a lot of code, b) using the mouse is cumbersome anyway and I would rarely do it.

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

@lyse@lyse.isobeef.org Sauna is awesome – if it wasn’t for other people. 🤣 A little mƶkki in Finland with a private sauna, that would be it.

⤋ Read More
In-reply-to » @lyse I don’t know a number (wait, why can’t I google a Wetterbericht but only a Wettervorhersage?!), but it was enough for public transportation to shut down. šŸ˜… I think I saw around five trucks on the side of the road who couldn’t continue, too icy. Some cars stranded.

@lyse@lyse.isobeef.org Found some numbers now, they’re saying it was around 10cm in 3-4 hours. I don’t know, felt like more. šŸ˜‚ The forecast wasn’t really good either, now that I think about it. They said there’s going to be some snow, okay, fine, but then, boom.

Haha, that old ad is lovely. Those days are over. 🤣

⤋ Read More
In-reply-to » Well that was a lot of snow. Barely made it home. (Because, of course, today was the day where I went to the office. 🤣)

@lyse@lyse.isobeef.org I don’t know a number (wait, why can’t I google a Wetterbericht but only a Wettervorhersage?!), but it was enough for public transportation to shut down. šŸ˜… I think I saw around five trucks on the side of the road who couldn’t continue, too icy. Some cars stranded.

My car has an automatic gearbox and I’m not sure if that’s good or bad in such conditions. šŸ˜‚ Pretty hard to accelerate without spinning wheels …

⤋ Read More
In-reply-to » Trying an experiment. Created a Github repo for mu over at https://github.com/prologic/mu as a social experiment to see if we can maintain a tailored Github docs-only repo of a project, see if it gets any interest šŸ¤”

@prologic@twtxt.net (While browsing through that, I noticed that https://mu-lang.dev/ itself doesn’t really mention the source code repo, does it? šŸ¤” Like, the quickstart guide begins with ā€œBuild the host: go build ./cmd/muā€, but where’s the git clone … command? šŸ˜…)

I’m not really sure what the goal is. šŸ¤” Do you want to get pull requests for the docs? Or bug reports for mu itself? šŸ¤”

⤋ Read More
In-reply-to » Fell into a bit of a rabbit hole and learned that it took German law until 2008 to actually allow unisex/gender-neutral first names: https://www.bundesverfassungsgericht.de/entscheidungen/rk20081205_1bvr057607.html 🤦

@lyse@lyse.isobeef.org

I reckon up until then you had to have another first name that clearly differentiated.

Yes, apparently so. (I’m glad we stopped doing that. I don’t get this obsession with the contents of other people’s pants. 🤢)

Now I’m wondering, was that also the beginning when parents started giving their kids really weird names?

Did this ever happen or was this an urban myth? Would have to dig up some statistics, I guess. (Anecdotal evidence: None of the people I know gave their kids crazy names. šŸ˜†)

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

@prologic@twtxt.net (I still don’t know how you can muster up so much motivation and energy (especially when you have a family). Are we the same species?! šŸ˜…)

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

@lyse@lyse.isobeef.org Ohh, Winter Wonderland. Lovely!

Never had frozen hair. 😳 With just around 0°C? šŸ¤”

⤋ Read More
In-reply-to » Omg, Python. Parsing arguments with argparse takes 50 ms on my NUC, because this pulls in all kinds of fancy stuff behind the scenes, colorization and what not. šŸ˜®ā€šŸ’Ø

Just importing data classes takes another 60 ms … This fancy new stuff is really costly.

⤋ Read More

Omg, Python. Parsing arguments with argparse takes 50 ms on my NUC, because this pulls in all kinds of fancy stuff behind the scenes, colorization and what not. šŸ˜®ā€šŸ’Ø

⤋ Read More

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 » (#6d4mo2a) @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.

@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 » 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
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
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 my widget toolkit will have an amber theme by default:

@lyse@lyse.isobeef.org 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.)

@bender@twtxt.net Seriously, if I ever get a CRT monitor again, I want it to be an amber one and then hook it up to some 8086. šŸ˜… Only problem is that this stuff is expensive as hell now …

⤋ Read More
In-reply-to » I think my widget toolkit will have an amber theme by default:

(The background and the window shadow are not amber and it wouldn’t have looked like that on a real monitor, unless you cranked up the brightness way too high.)

⤋ Read More

I think my widget toolkit will have an amber theme by default:

https://movq.de/v/22662db9b2/amber.png

My first PC had a monochrome amber screen and I just love looking at this. 😃

(It looks even better with redshift enabled, but I can’t screenshot that.)

Only downside is that there aren’t that many amber shades in the standard 256 color palette. Or well, maybe that’s actually a good thing, as it probably helps to keep the theme more minimal and less cluttered/noisy. šŸ¤”

⤋ Read More

Vacation: Doing crazy things like C on DOS, lots of Rust, bare-metal assembly code, everything is fine.

Back at work: How the fuck do I move an email in this web mail program? Am I stupid? šŸ˜®ā€šŸ’Ø

⤋ 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 think this is finally a good metaphor to talk about ā€œsimpleā€ software:

https://oldbytes.space/@psf/115846939202097661

Distilled software.

I quote in full:

principles of software distillation:

Old software is usually small and new software is usually large. A distilled program can be old or new, but is always small, and is powerful by its choice of ideas, not its implementation size.

A distilled program has the conciseness of an initial version and the refinement of a final version.

A distilled program is a finished work, but remains hackable due to its small size, allowing it to serve as the starting point for new works.

Many people write programs, but few stick with a program long enough to distill it.

I often tried to tell people about ā€œsimpleā€ or ā€œminimalisticā€ software, ā€œKISSā€, stuff like that, but they never understand – because everybody has a different idea of ā€œsimpleā€. The term ā€œsimpleā€ is too abstract.

This is worth thinking about some more. šŸ¤”

⤋ Read More
In-reply-to » I just wanted to chill a bit, then this fucker came along and burned everything to the ground.

@prologic@twtxt.net Yup, it’s been a while since I played that. šŸ˜… Hardly rememberd it, to be honest. And apparently I did everything wrong, because that monster just came along and trashed my city, no way to stop it. 🤪

⤋ Read More
In-reply-to » @movq I noticed that your feed's last modification timestamp was missing in my database. I cannot tell for certain, but I think it did work before. Turns out, your httpd now sends the Last-Modified with UTC instead of GMT. Current example:

@shinyoukai@neko.laidback.moe Not using OpenBSD or httpd? Yeah. It’s been working quite well since ~2017, so, meh, too lazy to switch now. But nothing is set in stone, of course.

⤋ Read More
In-reply-to » Ending three luxurious do-what-I-please weeks; tomorrow is back to work. What do you all do during your break (and this assumes you had one, even if short)? I mostly did nothing, which in itself was truly something! So much, I long to do it all over again. A man can dream, right? Haha!

@bender@twtxt.net I have another two days of vacation, then it’s back to the grindstone for me as well. 😢

Can’t we have vacation all year round? 🤣

⤋ Read More
In-reply-to » More widget system progress:

And now the event loop is not a simple loop around curses’ getch() anymore but it can wait for events on any file descriptor. Here’s a simple test program that waits for connections on a TCP socket, accepts it, reads a line, sends back a line:

https://movq.de/v/93fa46a030/vid-1767547942.mp4

And the scrollbar indicators are working now.

I’ll probably implement timer callbacks using timerfd (even though that’s Linux-only). šŸ¤”

⤋ Read More
In-reply-to » @movq I noticed that your feed's last modification timestamp was missing in my database. I cannot tell for certain, but I think it did work before. Turns out, your httpd now sends the Last-Modified with UTC instead of GMT. Current example:

@lyse@lyse.isobeef.org It’s already fixed:

https://github.com/openbsd/src/commit/668f1f05e71c5e979d278f1ad4568956226715ea

Question is when that fix will land. šŸ˜…

⤋ Read More
In-reply-to » @movq I noticed that your feed's last modification timestamp was missing in my database. I cannot tell for certain, but I think it did work before. Turns out, your httpd now sends the Last-Modified with UTC instead of GMT. Current example:

@lyse@lyse.isobeef.org Bah. Yeah, that looks like a bug. Let’s see if this already reported upstream. šŸ¤”

⤋ Read More

@eldersnake@we.loveprivacy.club

Steps to world domination:

  1. ā€œInventā€ ā€œAIā€ (by using other people’s data).
  2. Get people hyped about it and ideally hooked on it.
  3. Only provide it as a cloud service. But hey, if you want to, you can run it locally!
  4. Buy all hardware available on the market, so that nobody but you can build more systems.
  5. All PCs of consumers and competitors are too weak now and can’t be upgraded anymore.
  6. Everybody depends on your cloud service! Win!

All of that is possible because corporations don’t have a ā€œconscienceā€ in capitalism. Nobody forces the RAM manufacturers to sell all their stuff to just one or two buyers, but since the only goal of that manufacturer is to make money, they do it.

⤋ Read More
In-reply-to » On my way to having windows and mouse support:

At around 19 seconds in the video, you can see some minor graphical glitches.

Text mode applications in Unix terminals are such a mess. It’s a miracle that this works at all.

In the old DOS days, you could get text (and colors) on the screen just by writing to memory, because the VGA memory was mapped to a fixed address. We don’t have that model anymore. To write a character to a certain position, you have to send an escape sequence to move the cursor to that position, then more escape sequences to set the color/attributes, then more escape sequences to get the cursor to where you actually want it. And then of course UTF-8 on top, i.e. you have no idea what the terminal will actually do when you send it a ā€œšŸ™‚ā€.

Mouse events work by the terminal sending escape sequences to you (https://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking).

ncurses does an amazing job here. It’s fast (by having off-screen buffers and tracking changes, so it rarely has to actually send full screen updates to the terminal) and reliable and works across terminals. Without the terminfo database that keeps track of which terminal supports/requires which escape sequences, we’d be lost.

But gosh, what a mess this is under the hood … Makes you really miss memory mapped VGA and mouse drivers.

⤋ Read More
In-reply-to » The only good thing about this absolute craziness is that I can restock my rocket sticks. I picked up twelve along the way. Unfortunately, it looks like 99.999% of ammunition is bombs instead of rockets. Some sections of my street look exactly like an arbitrary Pakistanian town that I've seen online.

@lyse@lyse.isobeef.org I haven’t spoken to a single person yet who was a fan of all this. Not even the more conservative family members.

Some people have detonated several really loud bombs yesterday. This wasn’t a ā€œBƶllerā€. It shook my walls, doors, windows. Family members in other parts of the country reported the same … Is this a new trend?

⤋ Read More