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? 😮💨
#ubuezaa
If this user/feed is violating this Pod's (yarn.meff.me) community guidelines as set out in the Abuse Policy, please report them immediately!
You are also free to Unfollow or Mute this user or feed. Muting will also remove that user/feed's content from your view and you will no longer see content from that user/feed anywhere.
@vain does not follow you (they may not see your replies!)
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? 😮💨
(#xtkev6q) @lyse@lyse.isobeef.org I’ll let you guys know when/if it’s ready to get published. 😅 There are still rough edges and, obviously, very few widgets. Most importantly, a list view and a table widget are missing. But my vacation is over now, so things will crawl to a halt.
(#533m7aa) @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.
“What is a PC compatible?” https://codon.org.uk/~mjg59/blog/p/what-is-a-pc-compatible/
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. 🤔
(#lzax5vq) @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. 🤪
(#psb5xha) @bender@twtxt.net I am so prepared and ready for retirement. 🤣 (Not gonna happen for a while, though. If ever.)
(#lzax5vq) @prologic@twtxt.net SimCity 2000 in DOSBox 😅
I just wanted to chill a bit, then this fucker came along and burned everything to the ground.
(#vqu5wfq) @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.
(#fadfcsa) @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? 🤣
(#bfoknma) @prologic@twtxt.net Computers are great, eh? Soooo many problems to choose from! What do you want to solve today? 😅
(#xtkev6q) 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). 🤔
Looks like someone loves Depth First Search.
More widget system progress:
https://movq.de/v/87e2bce376/vid-1767467193.mp4
I like the oldschool shadow effect. 😅 Not sure if I’ll keep it, but it’s neat.
The menu bar is still fake.
Had to spend quite a bit of time optimizing the rendering today. This can get really slow really quickly.
Unicode is Pain.
I might be able to start porting my first program (currently uses urwid) soon. 🤔
(#vqu5wfq) @shinyoukai@neko.laidback.moe Yeah, probably. Not going down the CURRENT route, that’s for sure. 😅
(#vqu5wfq) @lyse@lyse.isobeef.org It’s already fixed:
https://github.com/openbsd/src/commit/668f1f05e71c5e979d278f1ad4568956226715ea
Question is when that fix will land. 😅
(#vqu5wfq) @lyse@lyse.isobeef.org Bah. Yeah, that looks like a bug. Let’s see if this already reported upstream. 🤔
Finally Skyrim weather. 🥳
(#voi7gxa) @eldersnake@we.loveprivacy.club
Steps to world domination:
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.
(#ex5vwtq) 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.
On my way to having windows and mouse support:
https://movq.de/v/95bbbbd3e8/basic-windows.mp4
It would be cool to have something like Turbo Vision eventually.
(I considered just using Turbo Vision, but it’s a C++ library and that’s not quite what I’m looking for. But it’s not yet completely off the table.)
(#wap76wa) @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?
(#zbcjyua) @javivf@adn.org.es Happy New Year! Let’s hope so. 😂
(#p43aoaq) @prologic@twtxt.net Not bad. 😃
(#zs4mzka) @prologic@twtxt.net Anything by Charlotte de Witte. 😅 For example:
(#zs4mzka) @lyse@lyse.isobeef.org Ooh, lovely! 🌇
I’m drowning the noise with this: https://www.youtube.com/watch?v=tgivYC2s6hs 😅
(#5pjhgha) @lyse@lyse.isobeef.org You actually have a Markdown parser/renderer in there? Oh dear. I would have been (well, I am) way too lazy for that. 😅
(#fdx5m6a) @prologic@twtxt.net Happy New Year 🥳🎆
Why have these Unicode smilies never caught on, I wonder? 🤪
(#2p27wba) The baseline here is about 55 ms for nothing, btw. Python ain’t fast to start up.
$ time python -c 'exit(0)'
real 0m0.055s
user 0m0.046s
sys 0m0.007s
(#2p27wba) @lyse@lyse.isobeef.org
I assume you made the thing load quickly, didn’t you?
That’s the problem with Python. If you have a couple of files to import, it will take time.
I want this to be reasonably fast on my old Intel NUC from 2016 (Celeron N3050 @ 1.60GHz) and I already notice that the program startup takes about 95 ms (or 125 ms when there are no .pyc files yet). That’s still fine, but it shows that I’ll have to be careful and keep this thing very small …
Python 3.14 will bring lazy imports, maybe that can help in some cases.
(#yiihgta) @prologic@twtxt.net No, that’s Python/curses on Linux. 😅
Well, you girls and guys are making cool things, and I have some progress to show as well. 😅
https://movq.de/v/c0408a80b1/movwin.mp4
Scrolling widgets appears to work now. This is (mostly) Unicode-aware: Note how emojis like “😅” are double-width “characters” and the widget system knows this. It doesn’t try to place a “😅” in a location where there’s only one cell available.
Same goes for that weird “ä” thingie, which is actually “a” followed by U+0308 (a combining diacritic). Python itself thinks of this as two “characters”, but they only occupy one cell on the screen. (Assuming your terminal supports this …)
This library does the heavy Unicode lifting: https://github.com/jquast/wcwidth (Take a look at its implementation to learn how horrible Unicode and human languages are.)
The program itself looks like this, it’s a proper widget hierarchy:
https://movq.de/v/1d155106e2/s.png
(There is no input handling yet, hence some things are hardwired for the moment.)
(#xwn45gq) @lyse@lyse.isobeef.org 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.
Then I used nothing for a long time. Just before Christmas, I made my own plugin (… of course …), which does everything I need at the moment (and nothing more).
It can insert simple templates and then jump to the next location:
https://movq.de/v/67cdf7c827/sisni%2Dpython.mp4
And replace a string after insertion:
https://movq.de/v/67cdf7c827/sisni%2Dheader.mp4
(It’s not public (yet?) and it also uses vim9script, so I guess it wouldn’t work on your system.)
(#tackqqq) @prologic@twtxt.net Debugging this stuff on bare metal hardware (without an underlying OS) is a nightmare. 🤣
(#sd722yq) @lyse@lyse.isobeef.org That sounds useful. 🤔
This was the scariest movie I’ve seen in a long time, jesus. 🤣 https://en.wikipedia.org/wiki/Fall_(2022_film)
(#j5s5khq) @lyse@lyse.isobeef.org I’m toying with the idea of making a widget/window system on top of Python’s ncurses. I’ve never really been happy with the existing ones (like urwid, textual, pytermgui, …). I mean, they’re not horrible, it’s mostly the performance that’s bugging me – I don’t want to wait an entire second for a terminal program to start up.
Not sure if I’ll actually see it through, though. Unicode makes this kind of thing extremely hard. 🫤
(#7tsxwnq) @lyse@lyse.isobeef.org Bwahaha. 🤣
Trying to come up with a name for a new project and every name is already taken. 🤣 The internet is full!