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 :)
Pinellas County - 90â (part I): 4.53 miles, 00:08:41 average pace, 00:39:21 duration
whoa this run felt great. seemed very fun effort while the heart rate was relatively low with a nice pace. it was very cold out, 42F with a wind chill of 38F, but it didnât matter once the engine was going. unfortunately, halfway through the run code brown sirens were blaring and had to cut it short.
#running
Pinellas County - 10 x 1km [30â]: 8.22 miles, 00:08:42 average pace, 01:11:36 duration
good session besides warning signs of code brown. kept the paces at around target pace of 8:30. i figure this may be close to maximum effort for the marathon so wanted to practice.
#running
So, I finally got day 17 to under a second on my machine. (in the test runner it takes 10)
I implemented a Fibonacci Heap to replace the priority queue to great success.
https://git.sour.is/xuu/advent-of-code/src/branch/main/search.go#L168-L268
OH MY FREAKING HECK. So.. I made my pather able to run as Dijkstra or A* if the interface includes a heuristic.. when i tried without the heuristic it finished faster :|
So now to figure out why its not working right.
i am wondering if maybe i need a better heap like a btree backed one instead of just list sort on Dequeue.
I found a bug where i didnt include an open/closed list that seemed to shave off a little. right now it runs in about 70 seconds on my machine.. it takes over the 300s limit when it runs on the testrunner on the same box.. docker must be restricting resources for it.
I might come back to it after i work through improving my code for day 23. Its similar but looking for the longest path instead of shortest.
man⊠day17 has been a struggle for me.. i have managed to implement A* but the solve still takes about 2 minutes for me.. not sure how some are able to get it under 10 seconds.
Solution: https://git.sour.is/xuu/advent-of-code/src/branch/main/day17/main.go
A* PathFind: https://git.sour.is/xuu/advent-of-code/src/branch/main/search.go
some seem to simplify the seen check to only be horizontal/vertical instead of each direction.. but it doesnât give me the right answer
I have been doing interview prep for next year. The problems have been great to get practice and make it fun when compared to the dry solve this you get on hacker rank or code scene.
That and so many great write-ups to explain the problems.
I found these write-ups for advent of code. They are quite well done and a great learning resouce for algorithms!
@movq@www.uninformativ.de So.. i eventually made it to the end on this one.. was able to reuse code from days 8 and 9!
SSBzdGlsbCBkbyBub3QgdW5kZXJzdGFuZCB3aHkgdXNpbmcgdGhlIHJhdGUgb2YgY2hhbmdlIGlu
IHRoZSBwdXNoZXMgZ2l2ZXMgbWUgdGhlIGFuc3dlci4uIGJ1dCB5ZWFoLi4K
Iâm really bad at competitive programming. đ For todayâs #AdventOfCode puzzle, I spent an eternity trying to understand exactly what kind of bG9naWMgY2lyY3VpdAo= the puzzle input describes â I havenât done that in well over a decade, so I made little progress. I knew right from the start that SSBoYWQgdG8gbG9vayBmb3IgY3ljbGUgbGVuZ3RocyBhbmQgdGhlbiBmaW5kIHRoZSBMQ00K. It just didnât occur to me to just run my program on cGFydGlhbCBpbnB1dAo= and print those numbers. đ„Ž I only did that after over 4 hours (including time to debug my nasty C code) and then, boom, solution âŠ
Todayâs Advent of Code puzzle was rather easy (luckily), so I spent the day doing two other things:
- Explore VGA a bit: How to draw pixels on DOS all by yourself without a library in graphics mode 12h?
- Explose XMS a bit: How can I use more than 640 kB / 1 MB on DOS?
Both are ⊠quite awkward. đŹ For VGA, Iâll stick to using the Borland Graphics Interface for now. Mode 13h is great, all pixels are directly addressable â but itâs only 320x200. Mode 12h (640 x 480 with 16 colors) is pretty horrible to use with all the planes and what not.
As per this spec, Iâve written a small XMS example that uses 32 MB of memory:
https://movq.de/v/9ed329b401/xms.c
It works, but it appears the only way to make use of this memory is to copy data back and forth between conventional memory and extended memory. I donât know how useful that is going to be. đ€ But at least I know how it works now.
Its the latest ryzen 7 chipset for laptop/mini form factor.
I am very surprised about the times others are getting. I guess thatâs the difference between interpreted and compiled showing.
This day one advantage of code was pretty neat looking.
https://twitter.com/gereleth/status/1730495736070938786?s=09
Code here: https://github.com/gereleth/aoc_python/blob/main/src/year2023/day01vis.py
@movq@www.uninformativ.de Dang. Really going overboard with this!
@prologic@twtxt.net I didnât have to do much backtracking. I parsed into an AST-ish table and then just needed some lookups.
The part 2 was pretty easy to work into the AST after.
https://git.sour.is/xuu/advent-of-code-2023/commit/c894853cbd08d5e5733dfa14f22b249d0fb7b06c
Day 3 of #AdventOfCode puzzle đ
Letâs go! đ€Ł
Come join us! đ€
đ Hey you Twtxters/Yarners đ Letâs get a Advent of Code leaderboard going!
Join with
1093404-315fafb8
and please use your usual Twtxt feed alias/name đ
My code is here. https://git.sour.is/xuu/advent-of-code-2023