lyse

lyse.isobeef.org

No description provided.

In-reply-to » I had Chick-fil-A breakfast today (sausage, egg, and cheese biscuit, hash browns, coffee, and orange juice). Then at lunch my work place offered hot dogs. I had two (kosher, if that matters), plus a coke, a macadamia nuts cookie, and a small chocolate brownie.

@bender@twtxt.net Hell yeah, that sounds like a good day!

⤋ Read More
In-reply-to » Today's stroll was really nice. Just around 11km in total I'd reckon. We had a barbie at a mate's garden where everybody went on a hunt for an easter basket. Oh boy, what a preparation that must have been! Baking the bunnies, dying the eggs, mixing the bear leek butter and so on. That's dedication, let me tell you. :-)

Ta, @prologic@twtxt.net! Assuming you mean 13, it’s just some old shed in an orchard. I reckon the owners keep some of their tools in there. They are all over the place around here. To me they look like they were all built like 50 odd years ago or maybe more, not sure. I could be completely wrong. I just like the look of them and actually wanted to capture the dark sky with the rolling in thunderstorm, but my camera had totally other plans. Didn’t work out at all.

⤋ Read More
In-reply-to » Today's stroll was really nice. Just around 11km in total I'd reckon. We had a barbie at a mate's garden where everybody went on a hunt for an easter basket. Oh boy, what a preparation that must have been! Baking the bunnies, dying the eggs, mixing the bear leek butter and so on. That's dedication, let me tell you. :-)

@kat@yarn.girlonthemoon.xyz And tasty! :-) Turns out there’s marzipan in the bunny belly. Yum-yum!

⤋ Read More
In-reply-to » Today's stroll was really nice. Just around 11km in total I'd reckon. We had a barbie at a mate's garden where everybody went on a hunt for an easter basket. Oh boy, what a preparation that must have been! Baking the bunnies, dying the eggs, mixing the bear leek butter and so on. That's dedication, let me tell you. :-)

@bender@twtxt.net Thanks! The rain rapidly cooled off the 17°C to just 10°C. I certainly appreciated that. The weather is coming from the west here, so I thought you’ve sent it our way. Let me try to return it. :-)

⤋ Read More

Today’s stroll was really nice. Just around 11km in total I’d reckon. We had a barbie at a mate’s garden where everybody went on a hunt for an easter basket. Oh boy, what a preparation that must have been! Baking the bunnies, dying the eggs, mixing the bear leek butter and so on. That’s dedication, let me tell you. :-)

Image

It was the first time this year that we had half proper April weather and a thunderstorm in general. It started off with clear sky and lovely sunshine. Right after arvo lunch it started to rain, so we went into the hut. Then, the sun returned.

On the way back with the growling thunder in the distance coming closer and closer we escaped the rain just perfectly. A minute or two after we reached the car, wet stuff started coming down the sky. Not even half a minute after opening the front door, it poured like crazy. Lucky twice today. There’s beautiful sunshine again by now. It smells absolutely great after the rain. I love it!

https://lyse.isobeef.org/waldspaziergang-2025-04-21/

⤋ Read More
In-reply-to » ā€œThe Treeā€ā„¢ in last winter:

@movq@www.uninformativ.de Oh, that’s beautiful!

I opened up all the photos in new tabs and went through them. For a second, I wondered that it was snowing at your place right now. :-D

That made me realize that so far we basically had nearly no April weather whatsoever. May might be full of it then, let’s see. :-)

⤋ Read More
In-reply-to » A mate and I had an amazing but also exhausting hike to the highest of the Three Emperor Mountains yesterday with perfect weather conditions. Sunny 18°C, blue sky with barly a cloud and a little welcoming breeze, just beautiful.

@prologic@twtxt.net @movq@www.uninformativ.de @bmallred@staystrong.run @ionores@twtxt.net Thank you! Yeah, the yellow meadows look truly awesome.

Watching ā€œHappy People: A Year in the Taigaā€ in German the evening before, this thing totally looked like a trap to us. So, we decided to sit on another, more rustic bench nearby. :-) Oh neat, it turns out, there is a much longer four part series of the documentary in English on YouTube. Highly recommended! This is part one: https://www.youtube.com/watch?v=fbhPIK-oBvA

Judging by the surroundings, I think this is actually a forest altar or something of that nature. But it looks like they started with the chappel’s reinforcement steel and then they ran out of money before completing it or even placing the concrete forms. :-P

Yeah, 78 might be photo of the month. It’s one of my favorites.

⤋ Read More

A mate and I had an amazing but also exhausting hike to the highest of the Three Emperor Mountains yesterday with perfect weather conditions. Sunny 18°C, blue sky with barly a cloud and a little welcoming breeze, just beautiful.

Image

Mt. Stuifen is 757 meters above sea level, has a small shelter and a barbie area and is still the most boring one of the three. It’s also the one farthest away from me. Not sure why it has two summit crosses, but both aren’t at the summit. The third, makeshift one at the real summit was gone by now. Four years ago, somebody had cobbled one together and put it up.

We bought our tucker at a local bakery on our way. This was the first time I tried a Teufelsbrezel (lit. devil’s pretzel), a lye pretzel with pepper. Haven’t come across that anywhere else. But I can certainly recommend that, it’s yummy.

We were glad when we were finally back home after some 26 or 27km. I won’t do much today and let my feet rest. Another friend called for a much, much shorter hike tomorrow.

Enjoy the 92 photos: https://lyse.isobeef.org/wanderung-auf-den-stuifen-2025-04-19/

⤋ Read More
In-reply-to » I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.

@bender@twtxt.net Exactly. I suspect it was because of sqlitebrowser also accessing the database in parallel to debug the original issue.

So far, I have not found the exact reason why some replies don’t show up. When I do not filter for unread messages and show all, though, I actually see them. So, there’s that.

⤋ Read More
In-reply-to » I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.

Today is the day where everything is falling apart. Suddenly, I get: SQL logic error: cannot start a transaction within a transaction

⤋ Read More
In-reply-to » I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.

Aha, they all had to do with a dropped feed. I suspect the internal bookkeeping with root paths couldn’t keep up.

⤋ Read More

I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.

Apparently, my query to build up the message tree must be incorrect. It somehow misses seven messages. They all are orphaned, maybe that’s a clue. However, generating missing root messages (and thereby including the replies) typically works just fine. Hmm.

⤋ Read More

Even though I really do like the shell, I always use Dolphin to mount my digicam SD card and copy the photos onto my computer. I finally added a context menu item in Dolphin to create a forest stroll directory with the current date in order to save some typing:

Image

The following goes in ~/.local/share/kservices5/ServiceMenus/galmkdir.desktop:

[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory
Actions=Waldspaziergang;

[Desktop Action Waldspaziergang]
Name=Heutigen Waldspaziergang anlegen…
Icon=folder-green
Exec=~/src/gelbariab/galmkdir "%f"

In order to update the KDE desktop cache and make this action menu item available in Dolphin, I ran:

kbuildsycoca5

The referenced galmkdir script looks like that:

#!/bin/sh
set -e

current_dir="$1"
if [ -z "$current_dir" ]; then
    echo "Usage: $0 DIRECTORY" >&2
    exit 1
fi

dir="$(kdialog \
    --geometry 350x50 \
    --title "Heutigen Waldspaziergang anlegen" \
    --inputbox "Neues Verzeichnis in ā€ž$current_dirā€œ anlegen:" \
    "waldspaziergang-$(date +%Y-%m-%d)")"
mkdir "$current_dir/$dir"
dolphin "$current_dir/$dir"

This solution is far from perfect, though. Ideally, I’d love to have it in the ā€œCreate Newā€ menu instead of the ā€œActionsā€ menu. But that doesn’t really work. I cannot define a default directory name, not to mention even a dynamic one with the current date. (I would have to update the .desktop file every day or so.) I also failed to create an empty directory. I somehow managed to create a directory with some other templates in it for some reason I do not really understand.

Let’s see how that works out in the next days. If I like it, I might define a few more default directory names.

⤋ Read More
In-reply-to » We had some nice 22°C today. But after work, it got rather windy and cloudy, temps rapidly dropped so just 14°C. Still a nice stroll to our backyard mountain. https://lyse.isobeef.org/waldspaziergang-2025-04-16/

@bender@twtxt.net Oooofff, I’m panting for breath when just thinking about that! I’ll immediately stop complaining. :-) I already forgot that a jacket over my jumper would have been nice. I’m happy to be cold.

⤋ Read More
In-reply-to » We’ve been on a trip to another city this weekend and one thing struck me as really odd:

@movq@www.uninformativ.de You just have to dress yourself up in a dog custume to pee on a tree, fence post or house wall. :-P

Depending on the hour, town halls and also graveyards are typically good options for public toilets. But yeah, you have to find them first. And then, there might be the ā€œNette Toiletteā€: https://www.die-nette-toilette.de/ (Unfortunately, you can’t see on the website which towns and cities participate in that concept. :-()

⤋ Read More
In-reply-to » Add support for skipping backup if data is unchagned Ā· 0cf9514e9e - backup-docker-volumes - Mills šŸ‘ˆ I just discovered today, when running backups, that this commit is why my backups stopped working for the last 4 months. It wasn't that I was forgetting to do them every month, I broke the fucking tool 🤣 Fuck šŸ¤¦ā€ā™‚ļø

@prologic@twtxt.net So, this flag isn’t doing exactly what you thought it does? Or is there a bug in the implementation itself?

⤋ Read More
In-reply-to » A mate and I met at the scout yard to prepare an upcoming workshop. Boy did we have an amazing sunset when we left. The photos don't reflect it, it was a hell lot more beautiful in person: https://lyse.isobeef.org/plaetzle-2025-04-11/

@bender@twtxt.net @ionores@twtxt.net Yep, it’s extremely seldom that a photo turns out looking better than reality. Very rarely does that happen. But basically never with sunsets. ;-) Maybe once a leap year I’m very surprised to wonder how that subject wasn’t better in person but actually on film.

⤋ Read More

@anth@a.9srv.net Hahaha, for a second I thought that you implemented word splitting according to Swiss (.ch) rules. :-D

Btw, both manpage links string(2) and getields(2) (it’s missing an f) point into nothingness: http://a.9srv.net/src/wordwrap.2.html

I can’t help but notice line 9: http://a.9srv.net/src/wordwrap.c

And I reckon your finger slipped one key to the right for quore: http://a.9srv.net/src/litclock.1.html

Cool stuff! :-)

⤋ Read More
In-reply-to » Hit by the arvo sun rays behind the window I was convinced that it is t-shirt weather. Deep blue sky, yeah, for sure! It turned out to be just 15°C and declining, though. So, I had to wear my jacket on today's windy stroll. Pretty nice. Didn't take many photos, but there you go: https://lyse.isobeef.org/waldspaziergang-2025-04-10/

@bender@twtxt.net @movq@www.uninformativ.de Thanks! I’ll think about switching to higher resolution teasers in the future. The reasoning behind the thumbnails is to avoid wasting traffic. Maybe folks in the outback or on expensive mobile networks appreciate it. Yeah, they could disable images in general.

⤋ Read More
In-reply-to » Another nice stroll in nature last week: https://lyse.isobeef.org/waldspaziergang-2025-04-03/

@movq@www.uninformativ.de @ionores@twtxt.net Thank you! Nope, still a petting farm over here. The only dangerous (to humans) animals are boars and ticks. But I only ever encountered a wild hog once in my entire life so far. Luckily, it took off and didn’t attack me. Ticks, on the other hand, regularly attack me.

⤋ Read More
In-reply-to » guys help how do i unmute a twt i accidentally hit the wrong button

@kat@yarn.girlonthemoon.xyz It’s very well hidden, it took me a while to find that. Go to ā€œSettingsā€ in the menu bar up top → ā€œProfile and Privacyā€ (already selected) → on the right at ā€œUser Infoā€ → ā€œ1 Mutedā€ → click the link with the minus in the circle at the message you want to unmute.

⤋ Read More
In-reply-to » This weekend (as some of you may now) I accidently nuke this Pod's entire data volume šŸ¤¦ā€ā™‚ļø What a disastrous incident 🤣 I decided instead of trying to restore from a 4-month old backup (we'll get into why I hadn't been taking backups consistently later), that we'd start a fresh! šŸ˜… Spring clean! 🧼 -- Anyway... One of the things I realised was I was missing a very critical Safety Controls in my own ways of working... I've now rectified this...

@prologic@twtxt.net Not sure if the confirmation helps at all. You just condition yourself to immediately press y on a daily basis.

Apart from that, aborting the removal should probably terminate the function with a non-zero exit code, something like return 1.

⤋ Read More
In-reply-to » Oh well. I've gone and done it again! This time I've lost 4 months of data because for some reason I've been busy and haven't been taking backups of all the things I should be?! šŸ¤” Farrrrk 🤬

@prologic@twtxt.net Spring cleanup! That’s one way to encourage people to self-host their feeds. :-D

Since I’m only interested in the url metadata field for hashing, I do not keep any comments or metadata for that matter, just the messages themselves. The last time I fetched was probably some time yesterday evening (UTC+2). I cannot tell exactly, because the recorded last fetch timestamp has been overridden with today’s by now.

I dumped my new SQLite cache into: https://lyse.isobeef.org/tmp/backup.tar.gz This time maybe even correctly, if you’re lucky. I’m not entirely sure. It took me a few attempts (date and time were separated by space instead of T at first, I normalized offsets +00:00 to Z as yarnd does and converted newlines back to U+2028). At least now the simple cross check with the Twtxt Feed Validator does not yield any problems.

⤋ Read More
In-reply-to » The photo series covering old stuff continues. This time, Gundelsheim. Actually, mostly the castle hotel Horneck, I hardly took any photos from the town itself. I really should have, though. Let me just blame… aehm… yeah, the rain! It's totally the rain's fault!! When it started to drizzle, I actually took the first photos, so it's a total lie. https://lyse.isobeef.org/schlosshotel-horneck-in-gundelsheim-2025-03-30/

@david@collantes.us This pink tree I featured in a few shots is a magnolia tree. I haven’t noticed any particular smell, it just looks pretty. :-) That’s a close-up: https://lyse.isobeef.org/bad-wimpfen-2025-03-28/18.jpg (I only noticed the spider and its web when I reviewed my photos.)

⤋ Read More

The photo series covering old stuff continues. This time, Gundelsheim. Actually, mostly the castle hotel Horneck, I hardly took any photos from the town itself. I really should have, though. Let me just blame… aehm… yeah, the rain! It’s totally the rain’s fault!! When it started to drizzle, I actually took the first photos, so it’s a total lie. https://lyse.isobeef.org/schlosshotel-horneck-in-gundelsheim-2025-03-30/

Image

⤋ Read More
In-reply-to » Markdown and the Slow Fade of the Formatting Fetish - a nice article about Markdown VS proprietary formatting. With quotes like "Microsoft Office works in an office where you pretend to work until you can finally go home." šŸ˜„

@arne@uplegger.eu I’m very glad I only rarely have to deal with .docx & Co. And when I have to, 99% is in read mode only. Even though, I don’t think that Markdown is the best choice, I use it on a daily basis. Some things, like links, in reStructuredText are better in my opinion.

Jira just resists to switch to Markdown and forces us to use its silly markup language.

For real typesetting, LaTeX is the way to go. But I very, very rarely do that.

⤋ Read More

@thecanine@twtxt.net My apologies, mate! :-( As @david@collantes.us pointed out, this was definitely not my intent at all.

For the easter egg hunt, I first looked for a hidden image map link on the pixel dog in the right lower corner itself. Maybe one giant pixel just links to somewhere else, I figured. But I couldn’t find any and then quickly moved on. Hence, I naturally viewed the HTML source. Because where else would be a good hiding place for easter eggs, right?

Next, I noticed the <font> tags. I thought I had read quite some time ago that they are not an HTML5 thing, but wasn’t entirely sure about it. So, I asked the W3C HTML validator. Sure enough. I thought I let you know about the violations. If somebody had found a mistake on my site, I’d love to hear about it, so I could fix it. I’m sorry that my chosen form of report didn’t resonate with you all that well. I reckoned you’ll also find it a bit funny, but I was clearly very wrong on that.

I actually followed the dog cow link to the video, so I ended up on the easter egg. However, I didn’t recognize it as such. ĀÆ_(惄)_/ĀÆ Oh well.

Regarding my message about the browser quirks: I read your answer that you were arguing against the HTML validator findings. Of course, everybody can do with their sites whatever they likes.

⤋ Read More
In-reply-to » Hello, i want to present my new revolution twtxt v3 format - twjson That's why you should use it: 1. It's easy to to parse 2. It's easy to read (in formatted mode :D) 3. It used actually \n for newlines, you don't need unprintable symbols 4. Forget about hash collisions because using full hash Here is my twjson feed: https://doesnm.p.psf.lt/twjson.json And twtxt2json converter: https://doesnm.p.psf.lt/twjson.js

Let me introduce you to the much superior version 4 instead: https://lyse.isobeef.org/tmp/twxm4.xml

⤋ Read More

@thecanine@twtxt.net And this is exactly why there are quirks modes in browsers…

I’m actually glad I don’t have to deal with all this web shit and work with compilers that hit me in the face when I do something illegal. :-)

⤋ Read More
In-reply-to » hey friends guess who had tiktok teens flood a mostly abandoned site of hers that was meant for a small group of friends? and went from 15 to ~60 users in 20 minutes? ya girl

@kat@yarn.girlonthemoon.xyz They all just wanted to be friends with a cool gal like you. ;-) It’s sad that putting things openly on the internet just waits to be raided by script kiddies, bots or spammers eventually.

⤋ Read More
In-reply-to » This time, I brought my cam along. We checked out a piece of ex-forest they've cut down. It looks terrible now. :-( At least the spruce resin smell was nice. https://lyse.isobeef.org/waldspaziergang-2025-03-27/

@movq@www.uninformativ.de Yeah, like nearly all of them. There is the so called Bannwald, where it typically is not allowed to log, but there’s only one in my entire county and I haven’t even visted it. I should change that. https://de.wikipedia.org/wiki/Bannwald

⤋ Read More
In-reply-to » Not in the mood to deal with reality today, so here’s another one of those silly things: https://movq.de/v/68c61f8ecc/r2_session.ogg This time on electric bass, tuned down to B-standard because oomph. (Well, sounds okay on my headphones, but I’m obviously no sound engineer. 🤪)

@movq@www.uninformativ.de That’s really great! I can’t tell the difference to the original. :-)

⤋ Read More
In-reply-to » Wow, phishing is just around the corner šŸ‘€

@eapl.me@eapl.me Interesting! Two points stood right out to me:

  1. Why the hell are e-mail newsletters considered a valid option in the first place? Just offer an Atom feed and be done with it! Especially for a blog of this very type. This doesn’t even involve a third party service. Although, in addition he also links to Feedburner, what the fuck!? No e-mail address or the like is needed and subject to being disclosed.

  2. When these spam mailers want to prevent resubscribing, then for fuck’s sake, why don’t they use a hash of the e-mail address (I saw that in yarnd) for that purpose? Storing the e-mail address in clear text after unsubscribing is illegal in my book.

⤋ Read More
In-reply-to » I need to import my yarn cache. It's sitting at about 1.5G in registry format. That should make things interesting...

@xuu@txt.sour.is Wow, that’s a giant graveyard. In my new database I have 16,428 messages as of now. Archive feed support is not yet available, so it’s just the sum of all the 36 main feeds.

⤋ Read More
In-reply-to » Thanks, @movq!

There are 82.108 read statuses, but only 24.421 messages in the cache. In contrast to the cache with the messages, the read statuses are never cleaned up when a feed was unsubscribed from. And the read statuses also contain old style hashes, before we settled on the what we have today. Still a huge difference. Hmm.

⤋ Read More
In-reply-to » I now subscribed to most feeds in my Go tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I "dropped" heaps of feeds that appeared to be inactive.

Thanks, @movq@www.uninformativ.de!

My backing SQLite database with indices is 8.7 MiB in size right now.

The twtxt cache is 7.6 MiB, it uses Python’s pickle module. And next to it there is a 16.0 MiB second database with all the read statuses for the old tt. Wow, super inefficient, it shouldn’t contain anything else, it’s a giant, pickled {"$hash": {"read": True/False}, …}. What the heck, why is it so big?! O_o

⤋ Read More
In-reply-to » Thinking about adding a little ā€œfocusā€ feature to my window manager: It hides all but one window, no wallpaper, no bars.

@movq@www.uninformativ.de You could also just use a tiling window manager. :-) As a bonus, it doesn’t waste dead space, the window utilizes the entire screen. To also get rid of panels and stuff, put the window in fullscreen mode.

⤋ Read More
In-reply-to » I now subscribed to most feeds in my Go tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I "dropped" heaps of feeds that appeared to be inactive.

If I didn’t mess this up, 61 feeds reduced down to 36.

⤋ Read More

I now subscribed to most feeds in my Go tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I ā€œdroppedā€ heaps of feeds that appeared to be inactive.

This might motivate me to actually ā€œfinishā€ the new client, so that it could become my daily driver. No need to use the old software stack any longer. Let’s see how bad this goes.

⤋ Read More
In-reply-to » When will the flat UI craze end? Can I get my buttons, scrollbars, and toolbars back, please?

@movq@www.uninformativ.de Yeah, most of the graphical applications are actually KDE programs:

  • KMail – e-mail client
  • Okular – PDF viewer
  • Gwenview – image viewer
  • Dolphin – file browser
  • KWallet – password manager (I want to check out pass one day. The most annoying thing is that when I copy a password, it says that the password has been modified and asks me whether I want to save the changes. I never do, because the password is still the same. I don’t get it.)
  • KPatience – card game
  • Kdenlive – video editor
  • Kleopatra – certificate manager

Qt:

  • VLC – video player
  • Psi – Jabber client (I happily used Kopete in the past, but that is not supported anymore or so. I don’t remember.)
  • sqlitebrowser – SQLite browser

Gtk:

  • Firefox – web browser
  • Quod Libet – music player (I should look for a better alternative. Can’t remember why I had to move away from Amarok, was it dead? There was a fork Clementine or so, but I had to drop that for some unknown reason, too.)
  • Audacity – audio editor
  • GIMP – image editor

These are the things that are open right now or that I could think of. Most other stuff I actually do in the terminal.

In the pastā„¢, I used the Python KDE4 bindings. That was really nice. I could pass most stuff directly in the constructor and didn’t have to call gazillions of setters improving the experience significantly. If I ever wanted to do GUI programming again, I’d definitely go that route. There are also great Qt bindings for Python if one wanted to avoid the KDE stuff on top. The vast majority I do for myself, though, is either CLI or maybe TUI. A few web shit things, but no GUIs anymore. :-)

⤋ Read More
In-reply-to » i really wanna learn golang it looks fun and capable and i can read it kind of but every time i try it i'm immediately stuck on basic concepts like "what the fuck is a pointer" (this has been explained to me and i still don't get it). i did have types explained to me as like notes on code which makes sense a bit but i'm mostly lost on basic code concepts

@movq@www.uninformativ.de Oh, right, a type would be good to have! :-D

⤋ Read More
In-reply-to » When will the flat UI craze end? Can I get my buttons, scrollbars, and toolbars back, please?

@movq@www.uninformativ.de Where can I join your club? Although, most software I use is decentish in that regard.

I just noted today that JetBrains improv^Wcompletely fucked up their new commit dialog. There’s no diff anymore where I would also be able to select which changes to stage. I guess from now on I’m going to exclusively commit from only the shell. No bloody git integration anymore. >:-( This is so useless now, unbelievable.

⤋ Read More
In-reply-to » i really wanna learn golang it looks fun and capable and i can read it kind of but every time i try it i'm immediately stuck on basic concepts like "what the fuck is a pointer" (this has been explained to me and i still don't get it). i did have types explained to me as like notes on code which makes sense a bit but i'm mostly lost on basic code concepts

@kat@yarn.girlonthemoon.xyz Pointers can be a bit tricky. I know it took me also quite some time to wrap my head around them. Let my try to explain. It’s a pretty simple, yet very powerful concept with many facets to it.

A pointer is an indirection. At a lower level, when you have some chunk of memory, you can have some actual values sitting in there, ready for direct use. A pointer, on the other hand, points to some other location where to look for the values one’s actually after. Following that pointer is also called dereferencing the pointer.

I can’t come up with a good real-world example, so this poor comparison has to do. It’s a bit like you have a book (the real value that is being pointed to) and an ISBN referencing that book (the pointer). So, instead of sending you all these many pages from that book, I could give you just a small tag containing the ISBN. With that small piece of information, you’re able to locate the book. Probably a copy of that book and that’s where this analogy falls apart.

In contrast to that flawed comparision, it’s actually the other way around. Many different pointers can point to the same value. But there are many books (values) and just one ISBN (pointer).

The pointer’s target might actually be another pointer. You typically then would follow both of them. There are no limits on how long your pointer chains can become.

One important property of pointers is that they can also point into nothingness, signalling a dead end. This is typically called a null pointer. Following such a null pointer calls for big trouble, it typically crashes your program. Hence, you must never follow any null pointer.

Pointers are important for example in linked lists, trees or graphs. Let’s look at a doubly linked list. One entry could be a triple consisting of (actual value, pointer to next entry, pointer to previous entry).

  _______________________
 /               ________\_______________
↓               ↓         |              \
+---+---+---+   +---+---+-|-+   +---+---+-|-+
| 7 | n | x |   | 23| n | p |   | 42| x | p |
+---+-|-+---+   +---+-|-+---+   +---+---+---+
      |         ↑     |         ↑
       \_______/       \_______/

The ā€œxā€ indicates a null pointer. So, the first element of the doubly linked list with value 7 does not have any reference to a previous element. The same is true for the next element pointer in the last element with value 42.

In the middle element with value 23, both pointers to the next (labeled ā€œnā€) and previous (labeled ā€œpā€) elements are pointing to the respective elements.

You can also see that the middle element is pointed to by two pointers. By the ā€œnextā€ pointer in the first element and the ā€œpreviousā€ pointer in the last element.

That’s it for now. There are heaps ;-) more things to tell about pointers. But it might help you a tiny bit.

⤋ Read More