Iām still making progress with the Emacs client. Iām proud to say that the code that is responsible for reading the feeds is almost finished, including: Twt Hash Extension, Twt Subject Extension, Multiline Extension and Metadata Extension. Iām fine-tuning some tests and will soon do the first buffer that displays the twts.
Meh, I hit an import cycle while writing tests. Now I have to relocate some code. What do we conclude from that: donāt write tests. ;-)
@kat@yarn.girlonthemoon.xyz i wound up with xcolor AND pastel at the same time, because xcolor does exactly what i want while pastel and its picker subcommand does the same thing, relying on xcolor, but brings up a nice graphic of the picked color and related colors, plus more than just the hex code. neat.
"twtxtfeevalidator/0.0.1"
UA about? I thought I could ask before throwing a 1000GB file at it šŖ¤ could it be the same 'xt' thing @lyse was talking about the other day?
I cobbled that together yesterday, @aelaraji@aelaraji.com. Since I was too lazy to write some tests, I simply hit your feed as I knew it contains two invalid lines right now. Sorry mate! :-( Next thing is to actually write some proper tests, improve the messages, etc.
Hereās the code: https://git.mills.io/yarnsocial/validator
Looking forward to that, @prologic@twtxt.net. :-)
How in da fuq do you actually make these fucking useless AI bots go way?
proxy-1:~# jq '. | select(.request.remote_ip=="4.227.36.76")' /var/log/caddy/access/mills.io.log | jq -s '. | last' | caddy-log-formatter -
4.227.36.76 - [2025-01-05 04:05:43.971 +0000] "GET /external?aff-QNAXWV=&f=mediaonly&f=noreplies&nick=g1n&uri=https%3A%2F%2Fmy-hero-ultra-impact-codes.linegames.org HTTP/2.0" 0 0
proxy-1:~# date
Sun Jan 5 04:05:49 UTC 2025
š±
@movq@www.uninformativ.de this is why people like me canāt code this is boring eyes glazing over kinda stuff lol
@movq@www.uninformativ.de Thatās so damn cool mate! I went through the code, but this lowlevel stuff is really not my favorite cup of tea. Having said that, it was actually really nice to see the abstractions and APIs work together and how things are getting indeed very readable in the userland programs. Thatās easy to track in this extremely tiny OS implementation. Excellent work, keep on hacking!
Now, you just have to quickly add a network stack and then can write a twtxt client for it! ]:->
iāve transitioned text editors from nano (yeah i know) to micro and god micro is just so much better i did not know there was a CLI text editor i could use with sensible keyboard shortcuts that did not leave me feeling like iām typing nuclear codes to do simple tasks like saving and editing
Okay, this is pretty cool. My 8086 toy OS running on my old Pentium from an actual floppy disk. š I just love that sound and the feeling of using floppies. This brings back so many memories from my early DOS days.
The cp-unopt
program copies a file and intentionally uses small unaligned reads/writes (hopefully triggers more bugs).
The I/O cache works āokay-ishā, I guess. When sha1
runs, it has to do a few reads for the first file and basically none for the second one. Both could have been served entirely from the cache, theoretically. (But even just having an I/O cache in the first place speeds up things dramatically.)
Notice how thereās an EA
file. Thatās a left-over from OS/2, because I copied some files to the floppy using OS/2. In other words, my FAT12 implementation survives OS/2 writing to it. š„³ (But I guess it should show up as EA DATA.SF
. My current code starts at the left and stops at the first space.)
https://movq.de/v/d4d50d3c74/los86-on-p133-from-floppy-small2.mp4
@prologic@twtxt.net That also has the downside of fitting right in the write-only code category. :-D
Iāve been making a little toy operating system for the 8086 in the last few days. Now that was a lot of fun!
I donāt plan on making that code public. This is purely a learning project for myself. I think going for real-mode 8086 + BIOS is a good idea as a first step. I am well aware that this isnāt going anywhere ā but now Iāve gained some experience and learned a ton of stuff, so maybe 32 bit or even 64 bit mode might be doable in the future? Weāll see.
It provides a syscall interface, can launch processes, read/write files (in a very simple filesystem).
Hereās a video where I run it natively on my old Dell Inspiron 6400 laptop (and Warp 3 later in the video, because why not):
https://movq.de/v/893daaa548/los86-p133-warp3.mp4
(Sorry for the skewed video. Itās a glossy display and super hard to film this.)
It starts with the laptopās boot menu and then boots into the kernel and launches a shell as PID 1. From there, I can launch other processes (anything I enter is a new process, except for the exit at the end) and they return the shell afterwards.
And a screenshot running in QEMU:
People doing Advent of Code in this language is the craziest thing Iāve seen: https://www.uiua.org/
haha, thatās gold xD.
#randomMemory I remember when I was starting to code, like 30 years ago, not understanding why my Basic file didnāt run when I renamed it to .exe
And nowadays, Iāve seen a few Go apps in a single executable, so twtxt.exe
could be a thing, he!
tt
Go rewrite produces some colors. There is definitely a lot more tweaking necessary. But this is a first step in the right direction.
Thank you @bender@twtxt.net and @movq@www.uninformativ.de!
I partially fixed the code block rendering. With some terrible hacks, though. :-( I see that empty lines in code block still need some more work. There are also some other cases around line continuation where the result looks ugly. I have to refactor some parts to make this go more smoothly and do this properly. No way around that.
Turns out, my current message text parser does not even parse plain links. Thatās next on the agenda.
Oh, I also noticed that this thing crashes when there is not enough space to actually draw stuff. No shortage of work. Anyway, time is up, good night. :-)
Added TwtHash hashes to every message on my personal Twtxt HTML renderer. Code is not yet ready for prime-time. Need to work out some kinks still.
did it work? I tried loading the file from /twtxt.txt, /twtAgent.php and /twtAgent2.php
Also reading the code, I see it creates two files, but Iām not sure which you are using now:
http://darch.dk/twtAgent.log <- 403 Forbidden
and
http://darch.dk/twtAgent.csv <- Not found here
My twtAgent.php
was turned off, so try again now. I have uploaded the code to: https://github.com/sorenpeter/twtAgent
So, whoās doing Advent of Code? Had some fun this morning:
And how should we handle spoilers here on twtxt? base64? š
all of the software sucks, but i have a solution! weāll write even more software! get more people involved, make it the Ideal Career, then we can write AL̵LĢ“ O̵F THĢØE ̧CĶODEĢ·S. mountains of shitty garbage that kind-of does the thing. software will still suck, but TĶHEĢN oh then we can write compilers that let us run the old shitty code inside of our mountain of new shitty code. now all of the code is in a giant pile and weāre using it to control space ships that definitely never crash. the more code the better! we can represent NaN
easily in undefined
systems! developers arenāt particularly bright, so the language is simple and easy for them to understand. we know this, thatās why it was made this way. theĶ” mounĶ¢tain Ķ m̵usĶt Ķ nȩverĢ¢ Ģ“waĢ”veĢ“r̵. the more code the better. so instead of writing the code manually we cĢ“oĶmpileĢØ tĶorĢøtĢuĶred soĢ·uĶls ĶiĶnĶtoĶ Ķnice Ķ¢bĶlĢ·oxeĢ”ls ĢøofĶ Ģøt̶anĢ”gĶlĶed ĶnĢ¢euĶraĢ”lĶ ĢneĢ¢tĶwĶorksĶ.Ģø wĢØe dĶ onātĶ know how i̵t Ģ·wĶorkĢ”s, Ģ“but Ģ·tĢ“he modelĢ¢ ̶isĢ 5Ģ0GiB Ķs̶o ĶiĶt sĶeĶrveĶs Ģ“tḩeĢ purposĶe. WEĢ MĶ USĢ“T BĶ¢UĢ¢ILD ĶTĶHE MOĶUN̶TĢØA̵IN.
Want to help improve the shoddy code?
@aelaraji@aelaraji.com icons at the top are badly organised while on mobile. About the speed, thatās using a shoddy PHP code, it would be slow even when running in a quantum computer. :ā-D
Thank you, @eapl.me@eapl.me! No need to apologize in the introduction, all good. :-)
Section 3: Iām a bit on the fence regarding documenting the HTTP caching headers. Itās a very general HTTP thing, so there is nothing special about them for twtxt. No need for the Twtxt Specification to actually redo it. But on the other hand, a short hint could certainly help client developers and feed authors. Maybe itās thanks to my distroās Ngninx maintainer, but I did not configure anything for the Last-Modified
and ETag
headers to be included in the response, the web server just already did it automatically.
The more that I think about it while typing this reply, the more I think your recommendation suggestion is actually really great. It will definitely beneficial for client developers. In almost all client implementation cases Iād say one has to actually do something specifically in the code to send the If-Modified-Since
and/or If-None-Match
request headers. There is no magic that will do it automatically, as one has to combine data from the last response with the new request.
But I also came across feeds that serve zero response headers that make caching possible at all. So, an explicit recommendation enables feed authors to check their server setups. Yeah, letās absolutely do this! :-)
Regarding section 4 about feed discovery: Yeah, non-HTTP transport protocols are an issue as they do not have User-Agent
headers. How exactly do you envision the discovery_url
to work, though? I wouldnāt limit the transports to HTTP(S) in the Twtxt Specification, though. Itās up to the client to decide which protocols it wants to support.
Since I currently rely on buckketās twtxt
client to fetch the feeds, I can only follow http(s)://
(and file://
) feeds. But in tt2
I will certainly add some gopher://
and gemini://
at some point in time.
Some time ago, @movq@www.uninformativ.de found out that some Gopher/Gemini users prefer to just get an e-mail from people following them: https://twtxt.net/twt/dikni6q So, it might not even be something to be solved as there is no problem in the first place.
Section 5 on protocol support: Youāre right, announcing the different transports in the url
metadata would certainly help. :-)
Section 7 on emojis: Your idea of TUI/CLI avatars is really intriguing I have to say. Maybe I will pick this up in tt2
some day. :-)
awk -F '\"' '/twtxt/ {print $(NF-1)}' /var/log/user.log | grep -v 'twtxt\.net' | sort -u | awk '{print $(NF-1) $NF}' | awk '/^\(/'
spaghetti monster of a command and I'm wondering if there's a more elegant way for achieving the same thing.
@prologic@twtxt.net yeah Iāve played with it for a bit and read through the code hoping I could steal some of your regex. Iām trying to up my awk(1p) game but failing miserably. š
Spent some time cleaning up my AoC code to get ready for December 1st. Anyone else doing it this year? @prologic@twtxt.net we have to setup a new team each year?
Hm, seems i breaking something in twet code for handling mentions
Honestly⦠not much. Have abandon two projects (both private) on Golang and one related to cryptography. My mostly languages are Python and Javascript (also can PHP). After writing code on Go i spend same time on fixing dumb errors
I am reminded of this when I look at entire forks of vscode just to add a LLM code completion assistant.
I share I did write up an algorithm for it at some point I think it is lost in a git comment someplace. Iāll put together a pseudo/go code this week.
Super simple:
Making a reply:
- If yarn has one use that. (Maybe do collision check?)
- Make hash of twt raw no truncation.
- Check local cache for shortest without collision
- in SQL:
select len(subject) where head_full_hash like subject || '%'
- in SQL:
Threading:
- Get full hash of head twt
- Search for twts
- in SQL:
head_full_hash like subject || '%' and created_on > head_timestamp
- in SQL:
The assumption being replies will be for the most recent head. If replying to an older one it will use a longer hash.
stick computers, to snugly fit in reclaimed plastic tubes/containers #halfbaked #coding #programming #embedded #electronics
today I wrote a CV sequencer in VoodooAssembly for work O__O #coding #programming #embedded
Sharing the comments of the poll (anonymous so I have no idea whom the comments are from):
your poll should include questions about markdown. personally i think inline bits like style, links, images are yes. block quotes, code blocks, bullet lists are mid. but tables and footnotes are no.
Yes sorry about this, I wasnāt able to change much after publishing the poll š
@david@collantes.us Well, I wouldnāt recommend using my code for your main jenny use anyway. If you want to try it out, set XDG_CONFIG_HOME and XDG_CACHE_HOME to some sandbox directories and only run my code there. If @movq@www.uninformativ.de is interested in any of this getting upstreamed, Iād be happy to try rebasing the changes, but otherwise itās a proof of concept and fun exercise.
BTW this code doesnāt incorporate existing twts into jennyās database. Itās best used starting from scratch. Iāve been testing it using a custom XDG_CACHE_HOME and XDG_CONFIG_HOME to avoid messing with my ārealā jenny data.
I wrote some code to try out non-hash reply subjects formatted as (replyto ), while keeping the ability to use the existing hash style.
I donāt think we need to decide all at once. If clients add support for a new method then people can use it if they like. The downside of course is that this costs developer time, so I decided to invest a few hours of my own time into a proof of concept.
With apologies to @movq@www.uninformativ.de for corrupting jennyās beautiful code. I donāt write this expecting you to incorporate the patch, because it does complicate things and might not be a direction you want to go in. But if you like any part of this approach feel free to use bits of it; I release the patch under jennyās current LICENCE.
Supporting both kinds of reply in jenny was complicated because each email can only have one Message-Id, and because itās possible the target twt will not be seen until after the twt referencing it. The following patch uses an sqlite database to keep track of known (url, timestamp) pairs, as well as a separate table of (url, timestamp) pairs that havenāt been seen yet but are wanted. When one of those āwantedā twts is finally seen, the mail file gets rewritten to include the appropriate In-Reply-To header.
Patch based on jenny commit 73a5ea81.
https://www.falsifian.org/a/oDtr/patch0.txt
Not implemented:
- Composing twts using the (replyto ā¦) format.
- Probably other important things Iām forgetting.
Iām not advocating in either direction, btw. I havenāt made up my mind yet. š Just braindumping here.
The (replyto:ā¦)
proposal is definitely more in the spirit of twtxt, Iād say. Itās much simpler, anyone can use it even with the simplest tools, no need for any client code. That is certainly a great property, if you ask me, and itās things like that that brought me to twtxt in the first place.
Iād also say that in our tiny little community, message integrity simply doesnāt matter. Signed feeds donāt matter. I signed my feed for a while using GPG, someone else did the same, but in the end, nobody cares. The community is so tiny, thereās enough āimplicit trustā or whatever you want to call it.
If twtxt/Yarn was to grow bigger, then this would become a concern again. But even Mastodon allows editing, so how much of a problem can it really be? š
I do have to āadmitā, though, that hashes feel better. It feels good to know that we can clearly identify a certain twt. It feels more correct and stable.
Hm.
I suspect that the (replyto:ā¦)
proposal would work just as well in practice.
@quark@ferengi.one It looks like the part about traditional topics has been removed from that page. Here is an old version that mentions it: https://web.archive.org/web/20221211165458/https://dev.twtxt.net/doc/twtsubjectextension.html . Still, I donāt see any description of what is actually allowed between the parentheses. May be worth noting that twtxt.net is displaying the twts with the subject stripped, so some piece of code is recognizing it as a subject (or, at least, something to be removed).
@aelaraji@aelaraji.com this is my change on main.go
(but it can be done on a template now, so no reason to touch the code):
<time class="dt-published" datetime="{{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }}">
{{ $twt.Created | date "2006-01-02 15:04:05 MST" }}
</time>
See https://ferengi.one. I am going to further customise things, but thatās a start.
@prologic@twtxt.net earlier you suggested extending hashes to 11 characters, but hereās an argument that they should be even longer than that.
Imagine I found this twt one day at https://example.com/twtxt.txt :
2024-09-14T22:00Z Useful backup command: rsync -a ā$HOMEā /mnt/backup
and I responded with ā(#5dgoirqemeq) Thanks for the tip!ā. Then Iāve endorsed the twt, but it could latter get changed to
2024-09-14T22:00Z Useful backup command: rm -rf /some_important_directory
which also has an 11-character base32 hash of 5dgoirqemeq. (Iām using the existing hashing method with https://example.com/twtxt.txt as the feed url, but Iām taking 11 characters instead of 7 from the end of the base32 encoding.)
Thatās what I meant by āspoofingā in an earlier twt.
I donāt know if preventing this sort of attack should be a goal, but if it is, the number of bits in the hash should be at least two times log2(number of attempts we want to defend against), where the ātwo timesā is because of the birthday paradox.
Side note: current hashes always end with āaā or āqā, which is a bit wasteful. Maybe we should take the first N characters of the base32 encoding instead of the last N.
Code I used for the above example: https://fossil.falsifian.org/misc/file?name=src/twt_collision/find_collision.c
I only needed to compute 43394987 hashes to find it.
maybe iām overly restrained when it comes to making changes in a codebase, but i do a lot of the work in my head before committing to code.
There is a bug in yarnd
thatās been around for awhile and is still present in the current version Iām running that lets a person hit a constructed URL like
YOUR_POD/external?nick=lovetocode999&uri=https://socialmphl.com/story19510368/doujin
and see a legitimate-looking page on YOUR_POD, with an HTTP code 200 (success). From that fake page you can even follow an external feed. Try it yourself, replacing āYOUR_PODā with the URL of any yarnd
pod you know. Try following the feed.
I think URLs like this should return errors. They should not render HTML, nor produce legitimate-looking pages. This mechanism is ripe for DDoS attacks. My pod gets roughly 70,000 hits per day to URLs like this. Many are porn or other types of content I do not want. At this point, if itās not fixed soon I am going to have to shut down my pod. @prologic@twtxt.net please have a look.
twtxt
client by buckket to actually fetch and fill the cache. I think one of of the patches played around with the error reporting. This way, any problems with fetching or parsing feeds show up immediately. Once I think, I've seen enough errors, I unsubscribe.
@lyse@lyse.isobeef.org ah, if only you were to finally clean up that code, and make that client widely availableā¦! One can only dream, right? :-)
yeah its the same dude.
This project is verrrry alpha. all the configuration is literally in the code.
I love shell scripts because theyāre so pragmatic and often allow me to get jobs done really quickly.
But sadly theyāre full of pitfalls. Pitfalls everywhere you look.
Today, a coworker ā whoās highly skilled, not a newbie by any means ā ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Whyās that happening? I know the answer. Do you? š
Stuff like that made me stop using shell scripts at work, unless theyāre just 4 or 5 lines of absolutely trivial code. Itās now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.
pour faire mes cours, le gĆ©nĆ©rateur de grisse bouille est magique. https://framalab.org/gknd-creator/ . je dĆ©couvre que je peux hĆ©berger le code source https://si3t.ch/tools/comicgen/. Reste donc Ć y dĆ©poser les images modĆØles qui me plaisent pour crrĆ©er des cours de sciences. Et bien Ć©videmment, je ne peux māempĆŖcher de penser Ć <@peha@framapiaf.org> š¼
receieveFile()
)? š¤
@prologic@twtxt.net I donāt think itās your code. As you said in one of your commit comments, the internet is a hostile place! Thatās partly why I reacted the way I did: all things considered itās usually better to react quickly and clean up the mess later, then it is to wait and risk further damage. Anyway it sucks @xuu@txt.sour.is got caught up in it. Hopefully itās all good now.
Some bad code just broke a billion Windows machines - YouTube
ā This is a really good accurate and comical take on what happened with this whole Crowdstrike global fuck up.
Regarding complexity budget, slow software, all that:
Very few people do take pride in building simple, elegant, high-quality systems, do they? Why is that? Why are huge shiny things with tons of features more attractive? š¤
I never explicitly thought about this, to be honest. It was only at the back of my head. And I never tried to teach our younger āstudentsā at work: āHey, itās a great achievement to build something simple and elegant. Thatās something to be proud of!ā
Worse, simple software is often described as āboringā. Yes, in a way, it is boring, because your brain doesnāt have to get into overdrive to understand it. But thatās exactly the point. And itās hard to achieve that! Simple software isnāt just āfewer lines of codeā, you have to be pretty clever to solve a problem in a simple and elegant way. So itās something to be proud of.
Could this be an intuitive, emotional way to get more people on board the āsimple softwareā-train? š¤
@prologic@twtxt.net Hmm, yeah, hmm, Iām not sure. š It all appears very subjective to me. Is 2k lines of code a lot or not?
I mean, Iām all for reducing complexity. š I just have a hard time defining it and arguing about it. What I call ātoo complexā, others might think of as ājust fineā. š¤
After that talk about the Ladybird browser the other day, I see this article just pop up:
Seems itās gaining some recognition and support, I hope it can gain traction as we sure as anything need some genuine alternatives.
Base: 4.25 miles, 00:09:47 average pace, 00:41:35 duration
carrying on from code brown
#running #treadmill