I would personally rather see something like this:
2025-09-25T22:41:19+10:00 Hello World
2025-09-25T22:41:19+10:00 (#kexv5vq https://example.com/twtxt.html#:~:text=2025-09-25T22:41:19%2B10:00) Hey!
Preserving both content-based addressing as well as location-based addressing and text fragment linking.
The emails that reveal how Optus downplayed the Triple Zero disaster
It began with what should have been a routine upgrade but the result was catastrophic. Within hours, three people were dead. ā Read more
Optus CEO to keep job as human error blamed for Triple Zero failure
Stephen Rue says that human error by staff at home and abroad was responsible for the catastrophic Triple Zero failure that cost at least three lives. ā Read more
Albanese says heād be surprised if Optus boss wasnāt considering his future
The prime minister says Optus hasnāt fulfilled its Triple Zero obligations, while Communications Minister Anika Wells says the telco āperpetuated an enormous failure on the Australian peopleā. ā Read more
Blackmagic turns the latest iPhone into a professional cinema camera
The Melbourne company worked with Apple to create a dock that allows pro camera connections on the iPhone 17 Pro. ā Read more
From memes to murder: How the āterminally onlineā are radicalised
The killing of Charlie Kirk has laid bare the dark pipeline from gaming forums and chats to extremist violence. ā Read more
Why Appleās new phone is eSIM only, and what it means for you
Apple executives on why the time is right to break away from the little plastic squares we carry over from phone to phone. ā Read more
Face-off: What Kmartās illegal surveillance means for shoppers
If youāre one of the 8 million or so Australians who shop at Kmart every year, chances are you were being watched. ā Read more
Trevor Long reviews Appleās latest iPhones
Tech expert Trevor Long gives his verdict on Appleās new iPhones. ā Read more
nicks? i remember reading somewhere whitespace should not be allowed, but i don't see it in the spec on twtxt.dev ā in fact, are there any other resources on twtxt extensions outside of twtxt.dev?
@zvava@twtxt.net @movq@www.uninformativ.de Iām not entirely sure about the spaces, but maybe they were omitted to simplify parsing of mentions in the form of @<nick url>. If the next token after the @<nick does not look like a URL, itās not a mention but regular text. This is just wild guessing, though.
Looking at the regex and tests in the original twtxt reference implementation seems to confirm that theory in the sense as it relies on whitespace as the delimiter:
https://lyse.isobeef.org/tmp/screenshot-2025-09-17-21-30-25.png
Another thing about nicks is that the original twtxt reference implementation converts nicks to all lowercase:
https://lyse.isobeef.org/tmp/screenshot-2025-09-17-21-20-39.png
You probably know this already, the original twtxt file format specification can be found here: https://twtxt.readthedocs.io/en/latest/user/twtxtfile.html
As for extensions, I donāt know of anything outside of twtxt.dev that has actually been (partially) implemented. However, there is also the issue tracker of the official reference implementation. You might wanna dig through that. For example, there is an alternative suggestions of multiline messages: https://github.com/buckket/twtxt/issues/157
nicks? i remember reading somewhere whitespace should not be allowed, but i don't see it in the spec on twtxt.dev ā in fact, are there any other resources on twtxt extensions outside of twtxt.dev?
@zvava@twtxt.net Good question. This is the spec, I think:
https://twtxt.dev/exts/metadata.html#nick
It doesnāt say much. š¤
In the wild, Iāve only seen ātraditionalā nick names, i.e. ASCII 0x21 thru 0x7E.
My client removes anything but r'[a-zA-Z0-9]' from nick names.
Does Apple really need to become an AI company?
Amid claims it is falling behind the likes of Google and OpenAI, the iPhone-maker continues to double down on what itās actually good at. ā Read more
XMPP Interop Testing: Lots More Options
Since the last update, weāve added a lot more options on how to run your tests. Weāve added a slew of new CI systems, this time focussing on freedom-respecting, open source CI systems for your open source projects.
Recent additions include Jenkins, Drone, Harness and Woodpecker.
This brings our total number of CI systems in which you can run XMPP interop tests up to a whopping ELEVEN, plus anywhere else you can run containers!
Whether youāre building ⦠ā Read more
Today, the NBN is getting a huge upgrade. Hereās what you need to know
Download and upload speeds are about to skyrocket, though not for everyone. ā Read more
Great. Yet another messed up plain text e-mail part. The URL was actually HTML-escaped. Took me five attempts to figure this out, because of course it had to be several kilometers long. In fact, the e-mail stated: āPlease do not be surprised that the link is particularly long. It contains your personal configuration.ā
A normal person is completely lost (thatās why I got involved). Visting the broken URL opens a popup dialog suggesting to deactivate script blockers. Which I had already done upfront as a matter of prudence.
Fun bonus on top: The JWT in the link has identical iat (issued at) and exp (expiry) claims. The expiry is definitely not checked, itās well in the past.
Medical software just has to be horrible. Itās a law.
From hallucinations to High Court: Can AI administer justice?
There are calls for Australian courts to consider trialling AI technology, and even allow it to decide cases, despite a growing number of fabrications and errors. ā Read more
Why now might be a good time to upgrade your iPhone
The lineup for 2026 includes an improved iPhone 17 and 17 Pro, plus the skinny iPhone Air, and phones are not likely to go down in price by this time next year. ā Read more
Apple unveils thinnest iPhone ever
Trevor Long reports from Cupertino, where Apple has unveiled its slimmest phone ever. ā Read more
@lyse@lyse.isobeef.org a content warning is kind of like a forum spoiler cut, or like the <details> tag in HTML; it lets you write a sentence or so that someone can then click to expand to see the actual post. itās called a CW because most people use it to warn for potentially triggering/harmful subjects, but you can really use it for anything, like spoilers in a TV show or even for joke punchlines
Checking out this #leafmap demoā¦
https://demo.leafmap.org/lab/index.html
I hope that one day weāll have a #py5 kernel running on #JupyterLite, via #pyodide :D
@dce@hashnix.club You should try los86! 8-)
Well, what are you trying to do on this ThinkPad? That might affect the OS choices.
I really had to laugh when I read your initial comparison. I love it! :-D
š āHow to Make an Apostrophe in HTML: The Complete 2500 Word Guideā https://thelinuxcode.com/how-can-i-make-an-apostrophe-in-html/
Hmm, gnu.org is slow as heck. Shorter HTML pages load in about ten seconds. This complete AWK manual all in one large HTML page took a full minute: https://www.gnu.org/software/gawk/manual/gawk.html Is there maybe some anti AI shenanigans going on?
In any case, I find the user guide super interesting. My AWK skills are basically non-existent, so I finally decided to change that. This document is incredibly well written and makes it really fun to keep reading and learning. Iām very impressed. So far, I made it to section 1.6, happy to continue.
Mathieu Pasquet: slixmpp v1.11
This new version includes a few new XEP plugins as well as fixes, notably
for some leftover issues in our rust JID code, as well as one for a bug that
caused issues in Home Assistant.
Thanks to everyone who contributed with code, issues, suggestions, and reviews!
CI and buildNicoco put in a lot of work in order to get all possible wheels built in CI. We now have manylinux and musl builds of everything doable within codeberg,
published to the codeberg pypi repo, and published on pypi. ⦠ā Read more
spring and summer photons | https://nilfm.cc/photojournal.html
Ni Hao; bÄ«ng qĆlĆn!
Iām just dropping in, to emphasize my love for ice cream and the Chinese crawler bots, allocating their time and resources, towards scraping my humble website.

To show my gratitude, Iāve even added a random little dog generator to https://thecanine.ueuo.com/sparkle.html so that everyone can pick up their own custom dogFT, on their journey through my site.
This is soooo bloody cool, @movq@www.uninformativ.de! https://www.uninformativ.de/blog/postings/2025-08-30/0/POSTING-en.html
This is something that @kat@yarn.girlonthemoon.xyz might enjoy:
Recreating the āEPSON Image Scan!ā logo with one of my Tux plushies. š
Iāve got a prototype of my hardcopy simulator going. Iām typing on the keyboard and the ādisplayā goes to the printer:
https://movq.de/v/56feb53912/s.png
https://movq.de/v/235c1eabac/MVI_8810.MOV.mp4
The biiiiiiiiiig problem is that the print head and plastic cover make it impossible to see whatās currently being printed, because this is not a typewriter. This means: In order to see what I just entered, I have to feed the paper back and forth and back and forth ⦠itās not ideal.
I got that idea of moving back/forth from Drew DeVault, who ā as it turned out ā did something similar a few years back. (I tried hard to read as little as possible of his blog post, because figuring things out myself is more fun. But that could mean I missed a great idea here or there.)
But hey, at least this is running on my Pentium 133 on SuSE Linux 6.4, printer connected with a parallel cable. š
(Also, yes, you can see the printouts of earlier tests and, yes, I used ed(1) wrong at one point. 𤪠And ls insisted on using colors ā¦)
@prologic@twtxt.net Yes, this is another instance of restricting āpersonalā computing. You wonāt be able to install arbitrary software anymore (āsideloadingā, as they call it).
Itās not unique, itās not new. Boiling the frog alive.
Weāre heading towards this: https://www.gnu.org/philosophy/right-to-read.html
#Pyxel is a retro inspired #GameEngine for #Python, itās very impressive!
Itās not hard to generate a static HTML page that loads your game to run on the browser with #pyodide (WASM). And it comes with an assets editor and a #chiptune making tool.
yet another monologue about how to computer | https://nilfm.cc/new_flow.html
Please enjoy this horrible madness: https://userinyerface.com/game.html
In order to publish my personal projects/pages (and most of my teaching materials, hundreds of pages) on #Codeberg, I need to convert #markdown files into #HTML and sprinkle some CSS & JS from a layout template, like #GitHubās Pages #Jekyll does, but I dread the complexity of installing and tending to Jekyll or Hugo or other static site generators, and I canāt even imagine going near Forejo Actions or any sort of CI intergration.
Should I be brave and do the Jekyll /static generator thing? Any other ideas for poor, overworked, stressed out, clumsy people? :(
Okay, often times, these āemployer gimmicksā are just silly, but this one did make me laugh:
A cargo train ripped off several hundred meters of catenary and during construction they found a WW2 bomb. If I had gone to the office today, I would not have made it home for two reasons. https://www.swr.de/swraktuell/baden-wuerttemberg/stuttgart/bombenfund-in-stuttgart-untertuerkheim-100.html
DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldnāt understand what to do instead :(
And the plot thickens:
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding I guess youāll want to check this out at some point. py5_tools.animated_gif uses this)
DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldnāt understand what to do instead :(
And the plot thickens (this affects many projects, there are some workarounds, but some argument about ārevertingā this change allowing some āmodeā on import):
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding@py5coding I guess youāll want to check this out at some point. py5_tools.animated_gif uses mode=āRGBā)
#Pillow #PIL #Python
On Image.fromarray():
DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldnāt understand what to do instead :(
And the plot thickens (this affects many projects, there are some workarounds, but some argument about ārevertingā this change allowing some āmodeā on import):
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding@py5coding I guess youāll want to check this out at some point. py5_tools.animated_gif uses mode=āRGBā)
@kat@yarn.girlonthemoon.xyz On the one hand, all these programs have a very long history and the technology behind manpages is actually very powerful ā you can use it to write books:
https://www.troff.org/pubs.html
I have two books from that list, for example āThe UNIX programming environmentā:
https://movq.de/v/c3dab75c97/upe.jpg
Itās a bit older, of course, but it looks and feels like a normal book, and it uses the same tech as manpages ā which I think is really cool. š
Itās comparable to LaTeX (just harder/different to use) but much faster than LaTeX. You can also do stuff like render manpages as a PDF (man -Tpdf cp >cp.pdf) or as an HTML file (man -Thtml cp >cp.html). I think I once made slides for a talk this way.
On the other hand, traditional manpages (i.e., ones that are not written in mandoc) do not use semantic markup. They literally say, āthis text is bold, that text over here is italicsā, and so on.
So when you run man foo, it has no other choice but to show it in black, white, bold, underline ā showing it in color would be wrong, because thatās not what the source code of that manpage says.
Colorizing them is a hack, to be honest. Youāre not meant to do this. (The devs actually broke this by accident recently. They themselves arenāt really aware that people use colors.)
If mandoc and semantic markup was more commonly used, I think it would be easier to convince the devs to add proper customizable colors.
psst iāll be at my local event for HTML day!!! iām very excited but very nervous, i donāt even know what iāll be working on! but iāll figure it outā¦
#GitHub #GitHubPages #fail This is driving me madā¦
Images randomly deciding not to load on all my pages.
Is it just me? Is it my browserās fault? Is it just in Brazil?
I was working on this #shapely + #trimesh page⦠and I can only see the last image (the animated gif)!
https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/shapely-e-trimesh.html
#GitHub #GitHubPages #fail This is driving me madā¦
Images randomly deciding not to load on all my pages.
Is it just me? Is it my browserās fault? Is it just in Brazil?
I was working on this #shapely + #trimesh page⦠and I can only see the last image (the animated gif)!
https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/shapely-e-trimesh.html
Update: On this exact page I have bungled the image URLs (I blame Marktext for being stupid and not using a relative reference). But I swear loading problems have been going on other well formed pages.
XMPP Interop Testing: MOAR TESTS!
Ever heard of XMPP Interop Testing? Itās this cool project that helps make sure different XMPP servers can all work
together smoothly. Our XMPP Interop Testing project provides a suite of automated tests that can be integrated into
CI/CD pipelines to verify the compliance and interoperability of XMPP server implementations.
Late last year, we reported that we had secured funding graciously provided by NLnet that allowed
us to massively build out t ⦠ā Read more
mandoc is nicer to read/write than the man macro package and, most importantly, itās semantic markup.
HTML output is a bit broken in GNU groff, though (OpenBSD on the left, GNU on the right):
https://movq.de/v/f1898e648f/s.png
š¤
Still, Iām inclined to convert my manpages to mandoc.
@bender@twtxt.net I think itās actually a new XEP proposal ( https://xmpp.org/extensions/xep-0084.html#proto-info ), but itās still a bit unclear. Sorry for the late and vague response, Iām still trying to test it and see what itās even about, didnāt yet find a server, that supports it.
In 1996, they came up with the X11 āSECURITYā extension:
https://www.reddit.com/r/linux/comments/4w548u/what_is_up_with_the_x11_security_extension/
This is what could have (eventually) solved the security issues that weāre currently seeing with X11. Those issues are cited as one of the reasons for switching to Wayland.
That extension never took off. The person on reddit wonders why ā I think itās simple: Containers and sandboxes werenāt a thing in 1996. It hardly mattered if X11 was āinsecureā. If you could run an X11 client, you probably already had access to the machine and could just do all kinds of other nasty things.
Today, sandboxing is a thing. Today, this matters.
Iāve heard so many times that āX11 is beyond fixable, itās hopeless.ā I donāt believe that. I believe that these problems are solveable with X11 and some devs have said āyeah, we could have kept working on itā. Itās that people donāt want to do it:
Why not extend the X server?
Because for the first time we have a realistic chance of not having to do that.
https://wayland.freedesktop.org/faq.html
Iām not in a position to judge the devs. Maybe the X.Org code really is so bad that you want to run away, screaming in horror. I donāt know.
But all this was a choice. I donāt buy the argument that we never would have gotten rid of things like core fonts.
All the toolkits and programs had to be ported to Wayland. A huge, still unfinished effort. If that was an acceptable thing to do, then it would have been acceptable to make an āX12ā that keeps all the good things about X11, remains compatible where feasible, eliminates the problems, and requires some clients to be adjusted. (You could have still made āX11X12ā like āXWaylandā for actual legacy programs.)
New World Chaos 7: Program of Life-and-Death | https://nilfm.cc/mixes.html
37C3 and New Yearās Eve 2023
Another one from the vaults. The 37C3 conference took place in
December, 2023. This report was mostly written in January, 2024.
Mostly finished it at night in my cottage between 28 and 29th
December, then edited and added some stuff in July, 2025. So⦠Only
1.5 years late?
It was a little ironic, and a little sad, that I was finishing the
37C3 report during 38C3. I didnāt manage to get any tickets for me and
#3 for 38C3 and had to make do with watching the stream.
The links to the talks go to [C ⦠ā Read more
@prologic@twtxt.net what a great world we live in! No wonder they marked this sector unoccupied.
Hereās an example of X11/Xlib being old and archaic.
X11 knows the data type ācardinalā. For example, the window property _NET_WM_ICON (which holds image data for icons) is an array of ācardinalā. I am already not really familiar with that word and Iām assuming that it comes from mathematics:
https://en.wikipedia.org/wiki/Cardinal_number
(It could also be a bird, but probably not: https://en.wikipedia.org/wiki/Cardinalidae)
We would probably call this an āintegerā today.
EWMH says that icons are arrays of cardinals and that theyāre 32-bit numbers:
https://specifications.freedesktop.org/wm-spec/latest-single/#id-1.6.13
So itās something like 0x11223344 with 0x11 being the alpha channel, 0x22 is red, and so on.
You would assume that, when you retrieve such an array from the X11 server, youād get an array of uint32_t, right?
Nope.
Xlib is so old, they use char for 8-bit stuff, short int for 16-bit, and long int for 32-bit:
That is congruent with the general C data types, so it does make sense:
https://en.wikipedia.org/wiki/C_data_types
Now the funny thing is, on modern x86_64, the type long int is actually 64 bits wide.
The result is that every pixel in a Pixmap, for example, is twice as large in memory as it would need to be. Just because Xlib uses long int, because uint32_t didnāt exist, yet.
And this is something that I wouldnāt know how to fix without breaking clients.
gomdn: Yet another Static Site Generator
Yet another Static Site Generator (SSG), but this one is mine.
Itās a stupidly simple Go program ( wc says 229 lines), more like a
hack, really, but I donāt need something like Hugo. Most of the real
work is done by the goldmark package, of course. This is mostly just a
wrapper, deciding if something needs to be rebuilt.
Iāve been using a Perl script together with cmark (originally
Markdown.pl) since forever. And before that the old [txt2tags](htt ⦠ā Read more
@movq@www.uninformativ.de I fully agree with you on https://www.uninformativ.de/blog/postings/2025-07-22/0/POSTING-en.html!
Although, in the first screenshot, the window title background is much darker in the new version than the old one!1!1 :-P Kidding aside, the contrast in the old one is still better.
Also, note the missing underlines for the Alt hotkeys now. I just think that the underline in the old one is too thick.
Status 2025-07-21
Morning, computer! Spending my days off trying to figure things out.
Some of them will occur in this post. I think best when Iām writing,
after all.
Iām back from a short vacation since a couple of weeks. Iām still
going to take a few days off every week for a while. I need the break.
Itās been way too many 12-16 hour workdays. Iām nominally working 80%
(~6 hour days), so I figure Iāve been working a lot for free.
Yeah, well, I like the TKey project to succeed. The ideas behind it
have implicatio ⦠ā Read more
HTTP referrers are quite broken, arenāt they?
Because of that recent storm on my blog, I had a peek at them. Thereās a lot of garbage in there. For example, https://docs.freebsd.org/en/books/handbook/disks-virtual.html is supposed to refer to one of my blog posts ā¦
Whatās going on here?
TKey: The Next Generation
Not speaking for my employer, just as an interested developer in an
interesting open source project.
As you might have noticed, the platform repo of the Tillitis TKey has
some alpha tags for the next generation, Castor:
https://github.com/tillitis/tillitis-key1/tags
An alpha tag means that all planned features for the platform are in
place, but thereās not yet a complete audit and a lot of testing ⦠ā Read more
st tries not to redraw immediately after new data arrives:
https://git.suckless.org/st/file/x.c.html#l1984
The exact timings are configurable.
This is the PR that changed the timing in VTE recently (2023):
https://gitlab.gnome.org/GNOME/vte/-/issues/2678
There is a long discussion. Itās not a trivial problem, especially not in the context of GTK and multiple competing terminal widgets. st dodges all these issues (for various reasons).
The WM_CLASS Property is used on X11 to assign rules to certain windows, e.g. āthis is a GIMP window, it should appear on workspace number 16.ā It consists of two fields, name and class.
Wayland (or rather, the XDG shell protocol ā core Wayland knows nothing about this) only has a single field called app_id.
When you run X11 programs under Wayland, you use XWayland, which is baked into most compositors. Then you have to deal with all three fields.
Some compositors map name to app_id, others map class to app_id, and even others directly expose the original name and class.
Apparently, there is no consensus.
ADS time in this TV SHOW: http://i.shibboleths.org Frree static one-page HTML in Netscape Gold Style! Thanks.
@movq@www.uninformativ.de Yeah, itās a shitshow. MS overconfirms all my prejudices constantly.
Ignoring e-mail after lunch works great, though. :-)
Our timetracking is offline for over a week because of reasons. The responsible bunglers are falling by the skin of their teeth: https://lyse.isobeef.org/tmp/timetracking.png
- The error message neither includes the timeframe nor a link to an announcement article.
- The HTML page needs to download JS in order to display the fucking error message.
- Proper HTTP status codes are clearly only for big losers.
- Despite being down, heaps of resources are still fetched.
I find it really fascinating how one can screw up on so many levels. This is developed inhouse, Iām just so glad that weāre not a software engineering company. Oh wait. How embarrassing.
Itās that time again, Iāve just rotated my #twtxt feed!
Find Juneās twts at the feed: https://tilde.pt/~marado/twtxt-2025M06.txt , or see them on the web: https://tilde.pt/~marado/twtxt-2025M06.html
kitchen witchery abound, new recipes | https://nilfm.cc/recipes.html
@movq@www.uninformativ.de Willsch a bissle Eis schlotza? https://www.tagesschau.de/inland/regional/badenwuerttemberg/swr-schwere-hagelgewitter-weisse-strassen-in-sipplingen-100.html
āFor learning, #genAI is a forklift at the gym.ā ā @glyph@glyph
https://blog.glyph.im/2025/06/i-think-im-done-thinking-about-genai-for-now.html
Updating my āhow install and use #py5ā pages, check them out if you want to ā⦠draw and experiment some #CreativeCoding with #Python ā¦ā
EN: https://abav.lugaralgum.com/como-instalar-py5/index-EN.html
ES: https://abav.lugaralgum.com/como-instalar-py5/index-ES.html
I did a ālectureā/āworkshopā about this at work today. 16-bit DOS, real mode. š¾ Pretty cool and the audience (devs and sysadmins) seemed quite interested. š„³
- People used the Intel docs to figure out the instruction encodings.
- Then they wrote a little DOS program that exits with a return code and they used uhex in DOSBox to do that. Yes, we wrote a COM file manually, no Assembler involved. (Many of them had never used DOS before.)
- DEBUG from FreeDOS was used to single-step through the program, showing what it does.
- This gets tedious rather quickly, so we switched to SVED from SvarDOS for writing the rest of the program in Assembly language. nasm worked great for us.
- At the end, we switched to BIOS calls instead of DOS syscalls to demonstrate that the same binary COM file works on another OS. Also a good opportunity to talk about bootloaders a little bit.
- (I think they even understood the basics of segmentation in the end.)
The 8086 / 16-bit real-mode DOS is a great platform to explain a lot of the fundamentals without having to deal with OS semantics or executable file formats.
Now that was a lot of fun. š„³ Itās very rare that we do something like this, sadly. I love doing this kind of low-level stuff.
On my blog: Short Fiction ā Transgender Athlete Bans https://john.colagioia.net/blog/2025/06/22/title-ix-hope.html #fiction #freeculture #lgbtpridemonth #politics
Thumbnail novo para a minha pÔgina sobre compreensão de listas⦠#Python
https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/comprehension.html
(preciso dar uma melhoradinha na pƔgina, por umas imagens, arrumar links quebrados)
On my blog: Free Culture Book Club ā First Woman ā Dream to Reality https://john.colagioia.net/blog/2025/06/21/first-woman-1.html #freeculture #bookclub
Okay, hereās a thing I like about Rust: Returning things as Option and error handling. (Or the more complex Result, but itās easier to explain with Option.)
fn mydiv(num: f64, denom: f64) -> Option<f64> {
// (Letās ignore precision issues for a second.)
if denom == 0.0 {
return None;
} else {
return Some(num / denom);
}
}
fn main() {
// Explicit, verbose version:
let num: f64 = 123.0;
let denom: f64 = 456.0;
let wrapped_res = mydiv(num, denom);
if wrapped_res.is_some() {
println!("Unwrapped result: {}", wrapped_res.unwrap());
}
// Shorter version using "if let":
if let Some(res) = mydiv(123.0, 456.0) {
println!("Hereās a result: {}", res);
}
if let Some(res) = mydiv(123.0, 0.0) {
println!("Huh, we divided by zero? This never happens. {}", res);
}
}
You canāt divide by zero, so the function returns an āerrorā in that case. (Option isnāt really used for errors, IIUC, but the basic idea is the same for Result.)
Option is an enum. It can have the value Some or None. In the case of Some, you can attach additional data to the enum. In this case, we are attaching a floating point value.
The caller then has to decide: Is the value None or Some? Did the function succeed or not? If it is Some, the caller can do .unwrap() on this enum to get the inner value (the floating point value). If you do .unwrap() on a None value, the program will panic and die.
The if let version using destructuring is much shorter and, once you got used to it, actually quite nice.
Now the trick is that you must somehow handle these two cases. You must either call something like .unwrap() or do destructuring or something, otherwise you canāt access the attached value at all. As I understand it, it is impossible to just completely ignore error cases. And the compiler enforces it.
(In case of Result, the compiler would warn you if you ignore the return value entirely. So something like doing write() and then ignoring the return value would be caught as well.)
On my blog: Toots 𦣠from 06/16 to 06/20 https://john.colagioia.net/blog/2025/06/20/week.html #linkdump #socialmedia #quotes #week
On my blog: Real Life in Star Trek, Gambit part 1 https://john.colagioia.net/blog/2025/06/19/gambit-part-1.html #scifi #startrek #closereading
Itās that time again, Iāve just rotated my #twtxt feed!
Find Mayās twts at the feed: https://tilde.pt/~marado/twtxt-2025M05.txt , or see them on the web: https://tilde.pt/~marado/twtxt-2025M05.html
@kat@yarn.girlonthemoon.xyz uh, i use yandex mail which uses HTML by default
https://threadreaderapp.com/thread/1935344122103308748.html Interesting article on how ChatGPT is rotting your brain š¤£
@kat@yarn.girlonthemoon.xyz Ooh, Iāve got to bookmark that page. š
@aelaraji@aelaraji.com I wish I had the luxury of not reading that junk. š But instead, I have a Mutt hotkey that pipes an HTML mail through elinks ⦠Bah.
@prologic@twtxt.net Iām trying to call some libc functions (because the Rust stdlib does not have an equivalent for getpeername(), for example, so I donāt have a choice), so I have to do some FFI stuff and deal with raw pointers and all that, which is very gnarly in Rust ā because youāre not supposed to do this. Things like that are trivial in C or even Assembler, but I have not yet understood what Rust does under the hood. How and when does it allocate or free memory ⦠is the pointer that I get even still valid by the time I do the libc call? Stuff like that.
I hope that I eventually learn this over time ⦠but I get slapped in the face at every step. Itās very frustrating and Iām always this š¤ close to giving up (only to try again a year later).
Oh, yeah, yeah, I guess I could ājustā use some 3rd party library for this. socket2 gets mentioned a lot in this context. But I donāt want to. I literally need one getpeername() call during the lifetime of my program, I donāt even do the socket(), bind(), listen(), accept() dance, I already have a fully functional file descriptor. Using a library for that is total overkill and Iād rather do it myself. (And look at the version number: 0.5.10. The library is 6 years old but theyāre still saying: āNah, weāre not 1.0 yet, we reserve the right to make breaking changes with every new release.ā So many Rust libs are still unstable ā¦)
⦠and I could go on and on and on ⦠š¤£
Come on, why is the bloody IBAN only in the damn HTML part of your e-mail but not in the plain text!? Grrr! Donāt you wanna get paid, dealer!? Your new web shop system sucks so bad, I want the old version back.
On my blog: Developer Diary, Day of the African Child https://john.colagioia.net/blog/2025/06/16/african-child.html #programming #project #devjournal
orb v0.1.0 - tiny metasearch | https://nilfm.cc/orb.html
On my blog: Go Nowhere Fast https://john.colagioia.net/blog/2025/06/15/go-nowhere-fast.html #harm #rant #politics #harm
fn sub(foo: &String) {
println!("We got this string: [{}]", foo);
}
fn main() {
// "Hello", 0x00, 0x00, "!"
let buf: [u8; 8] = [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x00, 0x21];
// Create a string from the byte array above, interpret as UTF-8, ignore decoding errors.
let lossy_unicode = String::from_utf8_lossy(&buf).to_string();
sub(&lossy_unicode);
}
Create a string from a byte array, but the result isnāt a string, itās a cow š®, so you need another to_string() to convert your āstringā into a string.
- https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy
- https://doc.rust-lang.org/std/borrow/enum.Cow.html
I still have a lot to learn.
(into_owned() instead of to_string() also works and makes more sense to me, itās just that the compiler suggested to_string() first, which led to this funny example.)
So I was using this function in Rust:
https://doc.rust-lang.org/std/path/struct.Path.html#method.display
Note the little 1.0.0 in the top right corner, which means that this function has been āstable since Rust version 1.0.0ā. Weāre at 1.87 now, so weāre good.
Then I compiled my program on OpenBSD with Rust 1.86, i.e. just one version behind, but well ahead of 1.0.0.
The compiler said that I was using an unstable library feature.
Turns out, that function internally uses this:
https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.display
And that is only available since Rust 1.87.
How was I supposed to know this? š¤Øš«©
On my blog: Free Culture Book Club ā Tag Team https://john.colagioia.net/blog/2025/06/14/tag-team.html #freeculture #bookclub
Iām now going to delete 7,336 old photos (previews, resized web versions and index.htmls) and reclaim 3.3 GiB disk space on my laptop.
On my blog: Toots 𦣠from 06/09 to 06/13 https://john.colagioia.net/blog/2025/06/13/week.html #linkdump #socialmedia #quotes #week
On my blog: Real Life in Star Trek, Interface https://john.colagioia.net/blog/2025/06/12/interface.html #scifi #startrek #closereading
Neue Spiele: Dune Awakening schlƤgt GTA-Mƶchtegern-Klon
Zwei Neuverƶffentlichungen mit sehr unterschiedlichen Reaktionen der Community: Ab sofort sind Dune Awakening und Mindseye erhƤltlich. ( Dune Awakening, Steam)
Neom: Brücke über das Rote Meer zu The Line geplant
Saudi-Arabien und die Halbinsel Sinai sollen mit einer 20 km langen Brücke verbunden werden. Das Megaprojekt Neom würde damit eine Bahnverbindung bekommen. ( Infrastruktur, Energie & Klima)
Huawei-Gründer: US-Chip-Handelskrieg für China ākein Grund zur Sorgeā
Ren Zhengfei ruft dazu auf, hart zu arbeiten, um den Rückstand gegenüber den USA aufzuholen. Huawei liege nur noch um eine Chipgeneration hinter den USA. ( Huawei, Prozessor)
Anzeige: Fahrradtrainer bei Amazon mit 34 Prozent Rabatt im Angebot
Bei Amazon gibt es derzeit ein attraktives Angebot zu einem Fahrradergometer von Tretmann. Es ist mit 34 Prozent Rabatt erhƤltlich. ( Sport, Amazon)
Anzeige: USB-SSD-Stick mit 1 TByte günstig wie nie
GroĆ wie ein Flashdrive, schnell wie eine Festplatte: Amazon verkauft den 1 TByte groĆen USB-SSD-Stick von Move Speed zum neuen Tiefstpreis. ( Solid State Drive, Speichermedien)
Bemannter Marsflug: Starship benƶtigt zum Mars halb so viel Zeit
Eine andere Route und effizientere Abläufe könnten das Starship von SpaceX in 90 Tagen zum Mars befördern. 2033 wäre das perfekte Jahr für den Start. ( Starship, Nasa)
Anzeige: Videotürklingel mit Akku bei Amazon für nur 46,66 Euro
Eine kabellose Videotürklingel von Tapo mit 2K-Auflösung, Gegensprechfunktion und Alexa gibt es bei Amazon inklusive Gong zum Aktionspreis. ( Technik/Hardware)
Top 500: Europas leistungsstärkster Computer steht in Jülich
Jupiter ist als Europas erster Exascale-Computer geplant. In der aktuellen Top-500-Liste kommt er aber an drei US-Systemen nicht vorbei. ( Supercomputer, Computer)
Neue Ryzen-Z2-APUs: Steamdeck-SoC erlebt Comeback als Ryzen Z2 A
Die Ryzen-Z2-Serie wird um ein neues Topmodell mit integrierter NPU sowie um einen sparsamen Einsteiger-Chip erweitert. Letzterer kommt uns bekannt vor. ( Prozessor, AMD)
Media Markt übernimmt: Zahl der Saturn-Märkte bundesweit halbiert
Von den einst 150 Saturn-Filialen in Deutschland sind kaum 70 übrig geblieben. Es sollen noch weniger werden. ( Saturn, Media Markt)
Auch uBlock Origin betroffen: Youtube greift weiter gegen Werbeblocker durch
Im Netz hƤufen sich Beschwerden von Nutzern, die mit Adblocker keine Youtube-Videos mehr abspielen kƶnnen. Viele gƤngige Werbeblocker sind betroffen. ( Youtube, Firefox)