Searching yarn

Twts matching #coding
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
In-reply-to » 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.)

@movq@www.uninformativ.de All the returns tell me that you’re not a real Rust programmer. :-D Personally, I would never omit them either. They make code 100 times more readable.

⤋ 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

When I chose the MIT license for all of my software, I thought:

ā€œShould I use GPL, which I don’t really understand? Is that worth it? Yeah, there is a theoretical possibility that some company might use my code in their proprietary product … and then what? Should I sue them to enforce the GPL? I’m not going to do that anyway, so I’ll just use the MIT license.ā€

And now we have those LLM scrapers and now it’s suddenly a reality that these companies (ab)use my code. I can see it in my logs. I didn’t expect that back then.

GPL wouldn’t help, either, of course. (Regardless, I now think that GPL would have been the better choice anyway.)

I’m honestly considering taking my code and website offline. Maybe make it accessible through some obscure protocol like Gopher or Gemini, but no more HTTP.

(Yes, Anubis might help. Temporarily.)

I’m just tired.

⤋ Read More
In-reply-to » nice, i just learned how to follow somebody from the other pod/mastodon

that isn’t mine, a newly made friend bought the domain & code that simple site for me, i find it’s hilarious to have so i put it in the front

thank you!!!

⤋ Read More

QR codes, already posted about them in the last two posts, but I want to hear your hot takes: Should they only be black and white, are they even worth doing in 2025, incorporating them into things,..?
Also, finally getting full screen view for avatars in XMPP - a better integrated one, after 25 years. Y@ay!

Image

⤋ 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

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

⤋ Read More

I sent you my QR code, please respond!

Image


*for context: long ago, there were some complaints, about some of my sitting drawings, where the legs are apart, not using dithering/more shading and one of my favourite artists, made a video, exploring the use of QR codes, in art
P.S.: the code just redirects to my websites

⤋ Read More

i got so emo about my site not being statically generated and instead hand coded but it’s like i don’t even know if i want that because i feel most SSGs are built for blogging and continuous posting and i don’t want that i just want to make my silly pages….

that being said, the one i’d use if i did switch to one would be astro and that one is so flexible i could really do anything with it including keeping my pages as is mostly without doing the blog stuff. idk! something to consider

⤋ Read More

What do you think I just learned about in this awesome Computerphile video with Matt Godbolt called ā€œSubroutines in Low Level Codeā€? https://www.youtube.com/watch?v=1su3lAh-k4o

Here’s the plot twist, the phrase ā€œtill the cows come homeā€. Hahaha, I never heard this before, but I love it! It’s always interesting to me to hear English sayings. Sometimes we have the same in German, sometimes – like in this case – entirely different ones. It’s fascinating that even though one hasn’t come across proverbs, it’s typically still clear from the context what’s meant.

Yep, some unexpected language stuff. ;-)

⤋ Read More
In-reply-to » @lyse Nice! Next up: Passing file descriptors over Unix sockets. 😃

Thanks, @movq@www.uninformativ.de! That seems to be much easier. It’s already implemented in the Python docs as examples of recvmsg(…) and sendmsg(…):

I looked at them sooo many times in order to figure out why my SCM_CREDENTIALS sending code didn’t work. :-D

⤋ Read More

Nobody want to be a shitty programmer. The question is: Do you do anything not to not be one?
Reading blogs or social media and watching YouTube videos is fun. After them, your code may be a little better, of course. But you need a lot. You need to study! Read good books and study the code of other programmers, for example. Maybe work with a new language, architectures and paradigms. You need break the routine.

If you know Object-oriented programming, you learn functional programming.
If you know Model-View-Controller, you learn Model-View-ViewModel.
If you don’t know anything about architectures, you learn Clean Architecture, Hexagonal Architecture, etc.
If you know Python, you learn Ruby or Go.
If you know Clojure or Lisp… you don’t need to learn anything else. You are already a good programmer. Just kidding. You can learn Elixir or Scala.

Be a good programmer my friend.

⤋ Read More

slowing working away at my latest code project: learning PHP by recreating the 2000s fandom mainstay known as a fanlisting! it’s been super fun i added a dynamic nav bar and other modifications in the latest commit

fanlistings even to this day rely on old PHP scripts dating back to the early 2000s that need whole ass mySQL or postgres DBs and are incredibly insecure. you can look at them here they’re like super jank lol it’s sad that new fanlistings have to use them because there’s no other options….

⤋ Read More
In-reply-to » @kat I've almost fixed this btw šŸ¤— Just testing it thoroughly and polihsing the code. In case you're curious, I do this style of development called "Observability Driven Development" (ODD) whereby I make observations of the system via metrics and internal observations and adjust the system's overall behavior to the desired outcome šŸ˜…

@prologic@twtxt.net ODD, lol. I don’t wanna be rude, but this sounds more like Code And Fix.

⤋ Read More
In-reply-to » Hey @kat If you see this, I'm aware of a bug. I'm trying to figure it out and fix it. bare with me šŸ¤— It is what's causing things to "stall" and to have to "restart". Sorry šŸ˜ž

@kat@yarn.girlonthemoon.xyz I’ve almost fixed this btw šŸ¤— Just testing it thoroughly and polihsing the code. In case you’re curious, I do this style of development called ā€œObservability Driven Developmentā€ (ODD) whereby I make observations of the system via metrics and internal observations and adjust the system’s overall behavior to the desired outcome šŸ˜…

⤋ Read More
In-reply-to » 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 @movq @eapl.me @bender @aelaraji @arne @david @lyse @doesnm @xuu @sorenpeter 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

@andros@twtxt.andros.dev I set up a test feed here:

https://www.uninformativ.de/texudus.txt

I made some preliminary adjustments to my client so that it can work with the different threading model. (And I totally get the concerns, this can be quite a bit of work. Especially in a large code base like Yarn.)

⤋ Read More
In-reply-to » We havet an AI assistant at work, new version came out today "nearby restaurant recommendations" mentioned. Gotta try that!

@kat@yarn.girlonthemoon.xyz yes, both the newsletter and the podcast, from time to time.

@prologic@twtxt.net I was not expecting much, but since the list of restaurants near company buildings, was hard coded into it, I did expect it to at least copy the menu text, from the websites, in its database. Ironically, the only restaurant where it got something right, is the only one, where the websites has the text as a transparent PNG, the AI has to convert to text.

⤋ Read More
In-reply-to » Someone has started to run git pull on one of my repos – once every two minutes. This is a very pointless endeavour. I push new code a couple of times per month.

@movq@www.uninformativ.de You better push new code sooner!!

As @bender@twtxt.net says, that sounds like a bot. I’d just block the IP address, hoping it doesn’t change all the time. But then you know for sure that it’s the AI fuckwits.

Also, the devil in me thinks it’s funny to swap out the repo in question for something entirely different. :-D

⤋ Read More

Someone has started to run git pull on one of my repos – once every two minutes. This is a very pointless endeavour. I push new code a couple of times per month.

So far, this isn’t causing any issues. I think this is just a regular human being who misconfigured some automation. And I hope this doesn’t mean that the ā€œAIā€ bots have finally discovered my page …

⤋ 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

I will be adding the code in for yarnd very soonā„¢ for this change, with a if the date is >= 2025-07-01 then compute_new_hashes else compute_old_hashes

⤋ Read More
In-reply-to » @sorenpeter you raw feed says otherwise. Also, https://txt.sour.is/conv/wj5bcwq.

@bender@twtxt.net Hehe good sleuthing 🤣 I swear it was an edit āœļø Haha šŸ˜‚ yarnd now ā€œseesā€ both every single time, where-as before it would just obliterate the old Twt, but remain in archive. Now you get to see both šŸ˜… Not sure if that’s a good thing or not, but it certainly makes it much clearer how to write ā€œcode logicā€ for detecting edits and doing something more UX(y) about ā€˜em šŸ¤”

⤋ Read More
In-reply-to » To the parents or teachers: How do you teach kids to program these days? šŸ¤”

@lyse@lyse.isobeef.org hey pascal bro! My first coding class was with an old Borland Turbo Pascal. I made my own little window manager for the assignments for class.

The teacher didn’t appreciate it much since I had to print out the code to turn it in. My Yatzee game was a stack of pages. 🤪

⤋ Read More

Crucial Wii homebrew library contains code stolen from Nintendo, RTEMS
The Wii homebrew community has been dealt a pretty serious blow, as developers of The Homebrew Channel for the Wii have discovered that not only does an important library most Wii homebrew software rely on use code stolen straight from Nintendo, that same library also uses code taken from an open source real-time operating system without giving proper attribution. Most Wii homebrew software i … ⌘ Read more

⤋ Read More
In-reply-to » To the parents or teachers: How do you teach kids to program these days? šŸ¤”

@movq@www.uninformativ.de I started with Delphi in school, the book (that we never ever used even once and I also never looked at) taught Pascal. The UI part felt easy at first but prevented me from understanding fundamental stuff like procedures or functions or even begin and end blocks for ifs or loops. For example I always thought that I needed to have a button somewhere, even if hidden. That gave me a handler procedure where I could put code and somehow call it. Two or three years later, a new mate from the parallel class finally told me that this wasn’t necessary and how to do thing better.

You know all too well that back in the day there was not a whole lot of information out there. And the bits that did exist were well hidden. At least from me. Eventually discovering planet-quellcodes.de (I don’t remember if that was the original forum or if that got split off from some other board) via my best schoolmate was like finding the Amber Room. Yeah, reading the ITG book would have been a very good idea for sure. :-)

In hindsight, a console program without the UI overhead might have been better. At least for the very start. Much less things to worry about or get lost.

Hence, I’d recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice, it doesn’t require a lot of surrounding boilerplate like, say Java or Go. It also does exceptionally well in the principle of least surprise.

⤋ 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

TacOS: an x86_64 UNIX-like OS from scratch
TacOS is a UNIX-like kernel which is able to run DOOM, among various other smaller userspace programs. It has things like a VFS, scheduler, TempFS, devices, context switching, virtual memory management, physical page frame allocation, and a port of Doom. It runs both on real hardware (tested on my laptop) and in the Qemu emulator. ↫ TacOS GitHub page TacOS – great name – is written in C, and explicitly a hobby and toy project. The code’s licensed … ⌘ Read more

⤋ Read More
In-reply-to » i wrote (citation needed) a PHP script thing that does a check for on demand TLS purposes and it works but like only partly? like there's records in the DB that it 404s on even though. they are very much there. so idk what's up with that but i've worked at this all day i'll leave it at this for now

@aelaraji@aelaraji.com this is REAL VIBE CODING no AI needed

⤋ Read More
In-reply-to » i wrote (citation needed) a PHP script thing that does a check for on demand TLS purposes and it works but like only partly? like there's records in the DB that it 404s on even though. they are very much there. so idk what's up with that but i've worked at this all day i'll leave it at this for now

@kat@yarn.girlonthemoon.xyz At least it wasn’t Vibe coding, so just take the win! šŸ˜†

⤋ Read More

This code displays the last 10 lines of a twtxt feed without a full dowload.

FEED_URL="https://twtxt.net/user/prologic/twtxt.txt"
MAX_RANGE=$(curl -sI $FEED_URL | grep -i 'content-length' | awk '{print $2}' | tr -d '\r')
MIN_RANGE=$((MAX_RANGE - 5000))

curl -s --range "$MIN_RANGE-$MAX_RANGE" "$FEED_URL" | grep -v -e '^#' -e '^$' | head -n 10

My self-response!

@prologic@twtxt.net @david@collantes.us

#twtxt

⤋ Read More
In-reply-to » @david @andros The correct hash would be si4er3q. See https://twtxt.dev/exts/twt-hash.html, a timezone offset of +00:00 or -00:00 must be replaced by Z.

@movq@www.uninformativ.de @aelaraji@aelaraji.com Yes @david@collantes.us It would be good for me, or new developers, if the documentation were agnostic. And if possible with many example cases. I’m fine-tuning the code as you inform me of bugs, trial and error. It’s a lesson to be learned for the future.

⤋ Read More

Am I the only one that’s confused by the discussions, and then the voting we had on the whole threading model? šŸ¤” I’m not even sure what I voted for, but I know it wasn’t the one that won haha 🤣 (which I’m still very much against for based on an intuition, experience and lots of code writing lately).

⤋ Read More