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:
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):
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. š„³
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 ā¦
(#6d4mo2a) @shinyoukai@yume.laidback.moe š 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)
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.
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.)
(#5sx3vhq) @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 ā¦
(#6acyh5q) @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. š )
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? š¤£
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.
(#hddm6pa) @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?
(#j7zm5xa) @kaa@bridge.twtxt.net Cool, thanks for the support! Iāll try to add something so that a year later it can ask if you want to renew. I just didnāt want to make gift subscriptions auto-recurring.
(#e2rrvga) @kaa@bridge.twtxt.net We have a way to invite someone to Micro.one and pay for the first year. Maybe that would work to start? Thereās a link @3932@bridge.twtxt.net. Otherwise email help and we can figure something out. Thanks!
(#yz5ys2q) @fichteldom@bridge.twtxt.net Are you still seeing the error? I just checked and it looks like it was updated. Let us know if anything looks wrong.
(#xyy4hrq) that is to say, chaotic.ninja still exists (although I donāt directly control it anymore as of last year), the rest is classified information ;P