@arne@uplegger.eu Ohjemine, TYPO3! O_o Lass mich schreiend davonlaufen!
Mit dieser absoluten Katastrophensoftware vor dem Herrn haben wir mal ein Studienprojekt gemacht. Die hat alle Vorurteile komplett übererfüllt. Angefangen von Fehlerseiten, die statt 4xx oder dergleichen immer mit HTTP 200 ausgeliefert wurden oder auch, dass das generierte HTML leider einfach ungültig war. Ćber die Implementierung von Lƶschen durch einen Deleted-Schalter in der Datenbank, das Speichern von Passwƶrtern im Klartext bis hin zu vƶllig umstƤndlichen Bedienungskonzepten. Alles hat immer brutal viele Schritte gebraucht. Das Zeilennummernrumgeeier im TYPO-Script erinnerte eher an Basic. Uns kam es auch so vor, als ob man damit nicht ernsthaft was sinnvolles machen kƶnnte.
Zu allem Ćberfluss hatte irgendwer noch ein ganz hundsmiserables Buch ausgegraben, das als Vorbereitung dienen sollte. Ich kann mich zum Glück weder an den Titel noch den Autor erinnern, aber ich weiĆ noch, wie das komplett inkonsistent geschrieben war. Anfangs gabs mehrere Seiten zu Unicode und UTF-8 wurde angepriesen, aber alle Beispiele haben dann auf ISO-8859-1 gesetzt. Gezeigter Beispielcode war hƤufig unterste Schublade. Selten hab ich so merkwürdige ErklƤrungen gelesen: āWenn Sie die Sicherheitswarnhinweise stƶren, kommentieren Sie doch bitte im Quelltext die die()
-Funktion in $ZEILE
aus.ā Oder ein anderer Klassiker: āAusgeschrieben würde der Code wohl folgendes tunā¦ā. War sich der Autor also nicht ganz sicher, ob sein Codeschnipsel vllt. doch in Wahrheit was ganz anderes tut.
Seit diesem gigantischen Trauma (das hat mich wirklich sehr nachhaltig geprƤgt, wie man Dinge nicht machen sollte) hab ich erfolgreich einen Bogen um das TYPO3-Universum gemacht.
Ich kann nur hoffen, dass es zwischenzeitlich ein wenig besser geworden ist. Aber Deinem Kurzbericht zufolge scheint da ja immer noch der Wurm drin zu sein. Mein Beileid! :-(
If people just wrote error free code to begin with, there would be no need for error handling! :-P
No, honestly, I donāt think that there is anything wrong with the current approach. I donāt see any wins of any of the proposals Iāve come across.
For many years I have found Flask to be too basic a tool for modern development. But since I create APIs using Flask with Pydantic to validate the input data, some middlewares for parsing and Blueprint to separate the code into modules⦠I must admit that I am super comfortable, fast and easy to test.
#flask #python #pydantic
?
operator in Go š No. For so many reasons.
@lyse@lyse.isobeef.org one time i saw that operator when working with ruby on rails and i was so confused by it that i got stuck on the same code involving it for 9 hours straight
What is clean architecture? Thatās a good question.
You think of a pattern for ordering code with good decisions isolating technologies (you can change the web framework or database without break the business logic), easy to test (you only test interfaces and use cases), sharing code between frameworks (entities and use cases), scalability, modulations and standardizing names. Clean architecture is not perfect, it has a learning curve and some abstraction in each technology. You can even find rejection with yours colleagues.
I have a good article on this topic.
https://programadorwebvalencia.com/implementando-arquitectura-limpia-en-python/
#python
thinking about l-systems again, maybe a morse beacon #coding #sound #radio #halfbaked
@kat@yarn.girlonthemoon.xyz I approve! Thatās how I learned HTML (version 4 at the time and XHTML shortly after) and making websites, too. Some of them are still made like this to this day. Hand-written HTML. Hardly any <div>
and class nonsense. I canāt remember with which editor I started out with, but I upgraded to Webweaver (later renamed to Webcraft) quickly. Yeah, this were the times when there was just a single computer for the whole family.
Free hosting on Arcor, Freenet and I donāt know anymore how they were all called. Like this author, I uploaded everything via FTP. Oh dear, when was the last time I used that? And I had registered plenty of free .de.vu
domains.
Being on Windows at the time, everything was ISO-8859-1 for me. No UTF-8, I donāt think Iāve heard about it back then.
Later, I wrote my own CMSes in PHP. Man, were they bad in retrospect. :-D Of course, MySQL databases were used as backends. I still exactly know the moment I read the first time about SQL injections. I tried it on my own CMS login and was shocked when I could just break in. The very next thing I did was to lock down everything with an .htaccess until I actually fixed my broken PHP code. Hahaha, good memories.
I swear by Atom or RSS feeds. Many of my sites offer them. I daily consume feeds, theyāre just great.
@movq@www.uninformativ.de Yes, exactly that. Itās awful! And itās getting worse from my perspective. Nobody in charge is ever gonna learn anything. I figure we just fully deserve this M$ crap, every single bit. :-(
Luckily, the most important development platform still worked for me, so I could actually do something, review code, pull and push, etc. But the calls with the screenshares were nightmares. Canāt see shit on such a tiny display with todayās extreme monitor sizes people use. Looking at logs, hahahahahahaaaā¦
@kat@yarn.girlonthemoon.xyz Wrrrrrmmmmm, wrrrrmmm, have fun! I think I played that about 15 years ago last time or so. I never was much of a gamer, always loved to code useless stuff instead. :-D
Iām refactoring (mangling four lines of of code with assignments into one function call) and man, do I love vim macros! Such a bloody amazing invention. Saves me heaps of manual labor.
i missed web design but i did not miss coding
Your code apparently works just fine. Until it @doesnm@doesnm.p.psf.ltāt. ;-) The shell languages are weird and having some strange properties that one is just not used to when coming from other languages.
shellcheck
: https://github.com/koalaman/shellcheck It points out common errors and gives some suggestions on how to improve the code. Some details in shell scripting are very tricky to get right at first. Even after decades of shell programming, I run into "corner cases" every now and then.
PSA: Yarnd operators might want to define code { white-space: pre }
in their CSS themes to render things as theyāre supposed to look like.
@kat@yarn.girlonthemoon.xyz To improve you shell programming skills, I highly recommend to check out shellcheck
: https://github.com/koalaman/shellcheck It points out common errors and gives some suggestions on how to improve the code. Some details in shell scripting are very tricky to get right at first. Even after decades of shell programming, I run into ācorner casesā every now and then.
E.g. in getlyr
ās line 7 it warns:
echo -e $(gum style --italic --foreground "#f4b8e4" "'$artist', '$song'")
^-- SC2046: Quote this to prevent word splitting.
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
Most likely not all that problematic in this application, but itās good to know about this underlying concept. Word splitting is basically splitting tokens on whitespace, this can lead to interesting consequences as illustrated by this little code:
$ echo $(echo "Hello World")
Hello World
$ echo "$(echo "Hello World")"
Hello World
In the first case the shells sees two whitespace-separated tokens or arguments for the echo
command. This basically becomes echo Hello World
. So, echo
joins them by a single space. In the second one it sees one argument for the echo
command, so echo
simply echos this single argument that contains three spaces.
The editor can launch a new shell now:
https://movq.de/v/6ec68b50dd/los86-edit-shell.mp4
Trivial to implement but super useful. It allows for simple but meaningful dev cycles: Edit source code, run/test it, back to editor. Thatās what I do in the video.
(The Brainfuck program is silly, but I got nothing else at the moment.)
The I/O cache is also getting better. All that back and forth doesnāt hit the disk at all, once cached.
This whole thing is much more fun and interesting when you run it from a real floppy disk. Itās a 5.25ā floppy in the video (so itās actually floppy š ). Disk seek times can be catastrophic and you donāt notice any of this on modern disks.
Thanks š! @aelaraji@aelaraji.com I am working on a fork now because the new version will break the current code. Therefore, I will upgrade the current repository (https://codeberg.org/deadblackclover/twtxt-el). The original author is helping me with reviews. I am sorry for my long development, I am working in my free time and it is scarce. I will report back to you all. š
StackExchange/dnscontrol: Infrastructure as code for DNS! šš Now this looks might interesting⦠I might look into this for managing my own domains and DNS. I note that my current registrar isnāt on the list of supported registrars, oh well, I donāt like OnlyDomains⢠much anyway. Anyone familiar with these regisrars?
- AWS Route 53
- CSC Global
- CentralNic Reseller (formerly RRPProxy)
- DNSOVERHTTPS
- Dzynadot
- easyname
- Gandi
- HEXONET
- hosting.de
- Internet.bs
- INWX
- Namecheap
- Name.com
- OpenSRS
- OVH
- Realtime Register
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.