Searching yarn

Twts matching #1
Sort by: Newest, Oldest, Most Relevant

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.

⤋ Read More

Saw this on Mastodon:

https://racingbunny.com/@mookie/114718466149264471

18 rules of Software Engineering

  1. You will regret complexity when on-call
  2. Stop falling in love with your own code
  3. Everything is a trade-off. There’s no ā€œbestā€ 3. Every line of code you write is a liability 4. Document your decisions and designs
  4. Everyone hates code they didn’t write
  5. Don’t use unnecessary dependencies
  6. Coding standards prevent arguments
  7. Write meaningful commit messages
  8. Don’t ever stop learning new things
  9. Code reviews spread knowledge
  10. Always build for maintainability
  11. Ask for help when you’re stuck
  12. Fix root causes, not symptoms
  13. Software is never completed
  14. Estimates are not promises
  15. Ship early, iterate often
  16. Keep. It. Simple.

Solid list, even though 14 is up for debate in my opinion: Software can be completed. You have a use case / problem, you solve that problem, done. Your software is completed now. There might still be bugs and they should be fixed – but this doesn’t ā€œaddā€ to the program. Don’t use ā€œsoftware is never doneā€ as an excuse to keep adding and adding stuff to your code.

⤋ Read More
In-reply-to » Just discovered how easy it is to recall my last arg in shell and my brain went 🤯 How come I've never learned about this before!? I wonder how many other QOL shortcuts I'm missing on 🄲

@aelaraji@aelaraji.com I use Alt+. all the time, it’s great. šŸ‘Œ

FWIW, another thing I often use is !! to recall the entire previous command line:

$ find -iname '*foo*'
./This is a foo file.txt

$ cat "$(!!)"
cat "$(find -iname '*foo*')"
This is just a test.

Yep!

Or:

$ ls -al subdir
ls: cannot open directory 'subdir': Permission denied

$ sudo !!
sudo ls -al subdir
total 0
drwx------ 2 root root  60 Jun 20 19:39 .
drwx------ 7 jess jess 360 Jun 20 19:39 ..
-rw-r--r-- 1 root root   0 Jun 20 19:39 nothing-to-see

⤋ Read More
In-reply-to » Fuck me sideways, Rust is so hard. Will we ever be friends?

@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 … 🤣

⤋ Read More

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? 🤨🫩

⤋ Read More

next up: authentication center / for both work & personal use.
for the work project, the customers (of my client) are unhappy with the account login flow and I need a fast & easy SSO for them.

for personal use: just a gateway to lock all the apps and provide access to friends.

i slowly realize the power of 1% everyday on what i am doing.

⤋ Read More

Maybe you’ll enjoy this as well:

I still have one of my first modems, a Creatix LC 144 VF:

Image

I think this was the modem that I used when I first connected to the internet, but I’m not sure.

I plugged it in again and it still works:

Image


Image

The firmware appears to be from 1994, which sounds about right. I don’t think we had internet access before that. We certainly did use local mailboxes, though. (Or BBS’s, as you might call them.)

I now want to actually use that modem again. For the moment, I can only use a phone to dial into it, I lack a second modem to actually establish a connection. Here’s a video:

Image

Not spectacular, but the modem does answer after me entering ATA.

I bought another cheap old modem on eBay and am now waiting for it to arrive. Once it’s here, I want to simulate an actual dial-up session, hopefully from OS/2 or Windows 3.x.

⤋ Read More
In-reply-to » @kat I don’t like Golang much either, but I am not a programmer. This little site, Go by example might explain a thing or two.

One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:

⤋ Read More
In-reply-to » i wish it was realistic for me to learn golang but every single time i try to comprehend any go code i'm like What the fuck am i looking at. why is all of this so short and condensed GIVE ME VERBOSE CODE

@movq@www.uninformativ.de i feel like when i read go code i’m reading some algebra shit where every part is 1-5 letters long and then there’s weird symbols like := and it’s just infinitely harder for me to parse and infer meaning from lol. it’s such a me problem

⤋ Read More
In-reply-to » Over the past few weeks I've been experimenting with and doing some deep learning and researching into neutral networks and evolutionary adaptation of them. The thing is I haven't gotten very far. I've been able to build two different approaches so far with limited results. The frustrating part is that these things are so "random" it isn't even funny. Like I can't even get a basic ANN + GA to evolve a network that solves the XOR pattern every time with high levels of accuracy. šŸ˜ž

This is one of my attempts:

Image

$ go build ./cmd/xor/... && ./xor
Generation  95 | Fitness: 0.999964 | Nodes: 9   | Conns: 19
Target reached!

Best network performance:
  [0 0] → got=0 exp=0 (raw=0.000) āœ…
  [0 1] → got=1 exp=1 (raw=0.990) āœ…
  [1 0] → got=1 exp=1 (raw=0.716) āœ…
  [1 1] → got=0 exp=0 (raw=0.045) āœ…
Overall accuracy: 100.0%
Wrote best.dot – render with `dot -Tpng best.dot -o best.png`

⤋ Read More
In-reply-to » RIP GitHub https://github.blog/changelog/2025-05-08-updated-rate-limits-for-unauthenticated-requests/

@bender@twtxt.net Basically the way I’m reading this is 1 RPM. This is a rather aggressive rate limit actually. This basically makes Github inaccessible and useless for basically anything unless you’re logged in. You can basically kiss ā€œpursuingā€ casually, anonymously goodbye.

Imagine if I imposed that kind of rate limit on twtxt.net?! 🤣

⤋ Read More
In-reply-to » Sometimes things go wrong when buying CDs second-hand. I bought an album quite cheap – but as it turned out, they only checked the cover, not the content, so I got something else instead which is actually much more expensive. 🤣

The album I got by accident is starting to grow on me. Not that bad. šŸ¤” It’s Dredg – El Cielo, btw: https://www.youtube.com/watch?v=e4JB8rmXaO8&list=PLRASiMqDV8psZSFQi7nUX4p0R8oRHbUy_&index=1

⤋ Read More
In-reply-to » https://alex.party/posts/2025-05-05-the-future-of-web-development-is-ai-get-on-or-get-left-behind/

And on a similar note, cross-post from Mastodon:

What I love about HTML and HTTP is that it can degrade rather gracefully on old browsers.

My website isn’t spectacular but I don’t think it looks horrible, either. And it’s still usable just fine all the way down to WfW 3.11:

It’s not perfect, but it’s usable. And that makes me happy. Almost 30 years of compatibilty.

The biggest sacrifice is probably that I don’t enforce TLS and that HTTP 1.0 has no Host: header, so no vhosts (or rather, everything must come from the default vhost). (Yes, some old browsers send Host:, even though they predate HTTP 1.1. Netscape does, but not IBM WebExplorer, for example.)

(On the other hand, it might completely suck on modern mobile devices. Dunno, I barely use those. 🤪)

⤋ Read More

I’ve just released version 1.0 of twtxt.el (the Emacs client), the stable and final version with the current extensions. I’ll let the community maintain it, if there are interested in using it. I will also be open to fix small bugs.
I don’t know if this twt is a goodbye or a see you later. Maybe I will never come back, or maybe I will post a new twt this afternoon. But it’s always important to be grateful. Thanks to @prologic@twtxt.net @movq@www.uninformativ.de @eapl.me@eapl.me @bender@twtxt.net @aelaraji@aelaraji.com @arne@uplegger.eu @david@collantes.us @lyse@lyse.isobeef.org @doesnm@doesnm.p.psf.lt @xuu@txt.sour.is @sorenpeter@darch.dk for everything you have taught me. I’ve learned a lot about #twtxt, HTTP and working in community. It has been a fantastic adventure!
What will become of me? I have created a twtxt fork called Texudus (https://texudus.readthedocs.io/). I want to continue learning on my own without the legacy limitations or technologies that implement twtxt. It’s not a replacement for any technology, it’s just my own little lab. I have also made a fork of my own client and will be focusing on it for a while. I don’t expect anyone to use it, but feedback is always welcome.
Best regards to everyone.
#twtxt #emacs #twtxt-el #texudus

⤋ Read More
In-reply-to » If we must stick to hashes for threading, can we maybe make it mandatory to always include a reference to the original twt URL when writing replies?

@movq@www.uninformativ.de If we’re focusing on solving the ā€œmissing rootsā€ problems. I would start to think about ā€œclient recommendationsā€. The first recommendation would be:

  1. Replying to a Twt that has no initial Subject must itself have a Subject of the form (hash; url).

This way it’s a hint to fetching clients that follow B, but not A (in the case of no mentions) that the Subject/Root might (very likely) is in the feed url.

⤋ Read More
In-reply-to » Finally I propose that we increase the Twt Hash length from 7 to 12 and use the first 12 characters of the base32 encoded blake2b hash. This will solve two problems, the fact that all hashes today either end in q or a (oops) šŸ˜… And increasing the Twt Hash size will ensure that we never run into the chance of collision for ions to come. Chances of a 50% collision with 64 bits / 12 characters is roughly ~12.44B Twts. That ought to be enough! -- I also propose that we modify all our clients and make this change from the 1st July 2025, which will be Yarn.social's 5th birthday and 5 years since I started this whole project and endeavour! 😱 #Twtxt #Update

@eapl.me@eapl.me I honestly believe you are overreacting here a little bit 🤣 I completely emphasize with you, it can be pretty tough to feel part of a community at times and run a project with a kind of ā€œdemocracyā€ or ā€œvote by committeeā€. But one thing that life has taught me about open source projects and especially decentralised ecosystems is that this doesn’t really work.

It isn’t that I’ve not considered all the other options on the table (which can still be), it’s just that I’ve made a decision as the project lead that largely helped trigger a rebirth of the use of Twtxt back in July 1 2020. There are good reasons not to change the threading model right now, as the changes being proposed are quite disruptive and don’t consider all the possible things that could go wrong.

⤋ Read More

We havet an AI assistant at work, new version came out today ā€œnearby restaurant recommendationsā€ mentioned. Gotta try that!

Ask it where I can get a burger, knowing there’s 3 spots that had it on the menu, AI says there’s none. Ask it to list all the restaurants nearby it can check… it knows 3, of the 10 or so around, but 1/3, even has a burger, on the menu.

Ask it to list the whole menu at restaurant 1: it hallucinates random meals, none of which they had (I ate there).

Restaurant 2 (the one most people go to, so they must have at least tested it with this one): it lists the soup of the day and ¾ meals available. Incomplete, but better than false.

Restaurant 3: it says ā€œfoodā€ and gives a general description of food. You have to be fucking kidding me!

ā€œBuT cAnInE, tHe A(G)i ReVoLuTiOn Is NoWā€

⤋ Read More

Trinity Desktop Environment R14.1.4 released
The Trinity Desktop Environment, the modern-day continuation of the KDE 3.x series, has released version R14.1.4. This maintenance release brings new vector wallpapers and colour schemes, support for Unicode surrogate characters and planes above zero (for emoji, among other things), tabs in kpdf, transparency and other new visual effects for Dekorator, and much more. TDE R14.1.4 is already available for a variety of Linux distributions, and c … ⌘ Read more

⤋ Read More

I just fixed a bug in tt’s reply to parent feature. Previously, when the message tree looked like the following

Message
ā”œā•“Reply 1
│ └╓Subreply
└╓Reply 2

and ā€œReply 2ā€ was selected, pressing A to reply to the parent should have picked ā€œMessageā€. However, a reply to ā€œReply 2ā€ was composed instead. The reason was a precausiously introduced safety guard to abort the parent search which stopped at ā€œSubreplyā€, because its subject didn’t match ā€œReply 2ā€ā€™s. It was originally intended to abort on a completely different message conversation root. Just in case. Turns out that this thoght was flawed.

Fixing bugs by only removing code is always cool. :-)

⤋ Read More
In-reply-to » Can you beat me at the circle game? šŸ˜‚ https://neal.fun/perfect-circle/

Can you automate the drawing with a script? On X11, you can:

#!/bin/sh

# Position the pointer at the center of the dot, then run this script.

sleep 1

start=$(xdotool getmouselocation --shell)
eval $start

r=400
steps=100
down=0

for step in $(seq $((steps + 1)) )
do
    # pi = 4 * atan(1)
    new_x=$(printf '%s + %s * c(%s / %s * 2 * (4 * a(1)))\n' $X $r $step $steps | bc -l)
    new_y=$(printf '%s + %s * s(%s / %s * 2 * (4 * a(1)))\n' $Y $r $step $steps | bc -l)

    xte "mousemove ${new_x%%.*} ${new_y%%.*}"
    if ! (( down ))
    then
        xte 'mousedown 1'
        down=1
    fi
done

xte 'mouseup 1'
xte "mousemove $X $Y"

Image

Interestingly, you can abuse the scoring system (not manually, only with a script). Since the mouse jumps to the locations along the circle, you can just use very few steps and still get a great score because every step you make is very accurate – but the result looks funny:

Image

🄓

⤋ Read More

Regex Isn’t Hard - Tim Kellogg šŸ‘ˆ this is a pretty good conscience article on regexes, and I agree, regex isn’t that hardā„¢ – However I think I can make the TL;DR even shorter šŸ˜…

Regex core subset (portable across languages):

Character sets
• a matches ā€œaā€
• [a-z] any lowercase
• [a-zA-Z0-9] alphanumeric
• [^ab] any char but a or b

Repetition (applies to the preceding atom)
• ? zero or one
• * zero or more
• + one or more

Groups
• (ab)+ matches ā€œabā€, ā€œababā€, …
• Capture for extract/substitute via $1 or \1

Operators
• foo|bar = foo or bar
• ^ start anchor
• $ end anchor

Ignore non‑portable shortcuts: \w, ., {n}, *?, lookarounds.

#regex101

⤋ Read More

Hmmm there’s a bug somewhere in the way I’m ingesting archived feeds šŸ¤”

sqlite> select * from twts where content like 'The web is such garbage these days%';
      hash = 37sjhla
  feed_url = https://twtxt.net/user/prologic/twtxt.txt/1
   content = The web is such garbage these days šŸ˜” Or is it the garbage search engines? šŸ¤”
   created = 2024-11-14T01:53:46Z
created_dt = 2024-11-14 01:53:46
   subject = #37sjhla
  mentions = []
      tags = []
     links = []
sqlite>

⤋ Read More
In-reply-to » @lyse It wasn’t our building, yeah, luckily. But I’m pretty scared it might happen some day. I think I’ll put more effort into preparing for that. But whatever I do, it would be horrific to lose all your stuff and the memories attached to it …

@prologic@twtxt.net @bmallred@staystrong.run Ah, I just found this, didn’t see it before:

https://restic.net/#compatibility

So, yeah, they do use semver and, yes, they’re not at 1.0.0 yet, so things might break on the next restic update … but they ā€œpromiseā€ to not break things too lightheartedly. Hm, well. šŸ˜… Probably doesn’t make a big difference (they don’t say ā€œdon’t use this software until we reach 1.0.0ā€).

⤋ Read More
In-reply-to » Some A hole has been trying to pull every single Twtxt feed that existed/still exists since forever. How do I know? Welp' They've been querying my Timelineā„¢ instance for all of it, every single twtxt file and twt Hash they can find. šŸ˜†šŸ¤¦ It must have been going on for days and I have just noticed... + it's all coming from the same ASN AS136907 HWCLOUDS-AS-AP HUAWEI CLOUDS

@prologic@twtxt.net This shi_ is as fun as it is frustrating! šŸ˜† the bot is poking at me from a different ASN now, Alibaba’s.

  1. Short term solution: I’ve geo-locked my Timeline instance since I’m the only one using it (and I only do so for reading twts when I’m away from terminal).
  2. Long term: I took a look at your Caddy WAF but couldn’t figure things out on my own; until then, I’ll be poking at Caddy-Defender, maybe throw in a Crowdsec for lols… #FUN

⤋ Read More

Google is a monopolist in online advertising tech, judge says
Google acted illegally to maintain a monopoly in some online advertising technology, a federal judge ruled on Thursday, adding to legal troubles that could reshape the $1.86 trillion company and alter its power over the internet. Judge Leonie Brinkema of the U.S. District Court for the Eastern District of Virginia said in a 115-page ruling that Google had broken the law to build its dominance over the largely … ⌘ Read more

⤋ Read More

@david@collantes.us If I run

printf '%s\n%s\n%s' 'https://aelaraji.com/twtxt.txt' '2025-04-16T22:49:11+00:00' "Am I tripping or `rsync` is actually THIS effing faster than `scp`!!? 🫨" | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | tr -d '=' | tr 'A-Z' 'a-z' | tail -c 8

I have xqfsv6a. It is raw text

But… If I change de date to 2025-04-16T22:49:11Z I have si4er3q.

⤋ 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 » @prologic @bender @eapl.me I think opening another file is a bad idea because it adds complexity to the clients, breaks the single feed and I think keeping legacy clients will be more complex to add new features in the future. A modern approach is important. I'll be honest, I'm a bit tired of the fight around the direct message. Perhaps, we can remove it as an extension and use the alternative @prologic . My suggestion apparently doesn't like to the community. I have no problem with remove it.

@andros@twtxt.andros.dev how often do you send a private message on the Fediverse? How often do you send PGP/SMIME encrypted emails? Are there other tools that are more suitable for the task? If implementing direct/private messages on twtxt scratches an itch (you know, that hobbyist itch we all get from time to time), then don’t give up so easily. Worse comes to worse, and your feed becomes too noisy, people can simply unfollow/mute.

I really don’t care about direct messages here, but I might be on that bottom 1%!

⤋ Read More