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
Base: 1.75 miles, 00:09:42 average pace, 00:16:58 duration
had to stop for code brown.
#running #treadmill
@prologic@twtxt.net hey mate, all working well here so far. The login issue isnāt really an issue as far as actually logging in goes, rather if I get my password wrong it gives the response error code in console, the response of which contains the HTML for the wrong password page if you inspect it, but on the frontend itself nothing actually happens which is the confusion. Just stays on the login page as if it was never submitted. Am I alone in having this issue as well?
Should I just code in a work-around? If the Referer
is /post
then consider that total bullshit, and ignore? š¤
Une semaine de merde, de lāĆ©cologie et un projet de code: https://si3t.ch/log/2024-05-31-traces-1.txt
Room Code
ā Read more
OK time to put this to the test, I ended up setting my $VISUAL env
{-here-} variable, so that jenny can launch neovim instead of plain old vi like
{-here-} it is instructed in the code. But as you can see, I still get these
{-here-} wired new lines every ~70th character (marked them with {-here-})
Added support for #tag clouds and #search to timeline. Based on code from @dfaria.eu@dfaria.euš
Live at: http://darch.dk/timeline/?profile=https://darch.dk/twtxt.txt
If AI coding machines become mainstream in less than ten years no human will be able to understand how any digital service works any more.
Even AI coding machines will need to rotate their access credentials every 90 days.
It not that easy @xuu@txt.sour.is since I implemented webmentions in a different way that how it have been done in yarnd to work with txt-files. You can find the code in webmention_endpoint.php and new_twt.php at main Ā· sorenpeter/timeline
I wrote up a lab report on my daily to-do tracking āsystemā, mostly so I could stop thinking about it. The report is at http://a.9srv.net/reports/daily.pdf and the referenced code is at http://txtpunk.com/daily/index.html.
@shreyan@twtxt.net What do you mean when you say federation protocol?
Either use webfinger for identity like mastodon etc. or use ATproto from Bluesky (or both?)
We can use webmentions or create our own twt-mentions for notifying someones feed (WIP code at: https://github.com/sorenpeter/timeline/tree/webmention/views)
Iām not sure we need much else. I would not even bother with encryption since other platforms does that better, and for me twtxt/yarn/timeline is for making things public
I came across Google Summer of Code
This one looks interesting, Iāll apply soon, and perhaps is interesting for you as well
https://kiwix.org/en/google-summer-of-code/
Would ātwtxtā be a good project for the next one? š¤
Pinellas County - Tempo: 6.26 miles, 00:08:33 average pace, 00:53:29 duration
whew, it was a tough one. very little sleep from working late last night and an early morning for my sonās coding club. it was a pleasant run, but it really took the energy out of me.
#running
Je ne sais plus si jāen avais parlĆ©, mais jāai Ć©crit un petit script pour māenvoyer par mail les pages que jāaimerais lire plus tard. Pour Ć©viter de les perdre, elles sont aussi enregistrĆ©e sur archive.org. https://si3t.ch/code/soulcoud/
āno-codeā and ālow-codeā is still someone elseās code.
when writing a new tool/software, write doc first, explaining how it works. Then, actually writing the code is much easier :)