@kat@yarn.girlonthemoon.xyz Welcome back. 👋 (It’s a bit quiet here in general. 🤔)
I wanted to port this to Rust as an excercise, but they still have no random number generator in the core library: https://github.com/rust-lang/rust/issues/130703
prologic@JamessMacStudio
Sun May 25 21:44:41
~/tmp/neurog
(main) 130
$ go build ./cmd/ttt/... && ./ttt
Generation 27 | Fitness: 0.486111 | Nodes: 44 | Conns: 82
… experimenting with building and training a tic-tac-toe game, which evolves a. neural net that learn to paly the game against the best evolved champions 😅
This is one of my attempts:
$ go build ./cmd/xor/... && ./xor
Generation 95 | Fitness: 0.999964 | Nodes: 9 | Conns: 19
Target reached!
Best network performance:
[0 0] → got=0 exp=0 (raw=0.000) ✅
[0 1] → got=1 exp=1 (raw=0.990) ✅
[1 0] → got=1 exp=1 (raw=0.716) ✅
[1 1] → got=0 exp=0 (raw=0.045) ✅
Overall accuracy: 100.0%
Wrote best.dot – render with `dot -Tpng best.dot -o best.png`
To follow up what I said minutes ago, they don’t even want you to think of the initial idea, they want you to be a mindless organism, the AI algorithm analyses and tells what you should make, down to the script, so that you get the highest number of people possible to click it and see some AI generated advertisement, blended seemly into what’s no lonher even your work.
https://arstechnica.com/gadgets/2025/05/netflix-will-show-generative-ai-ads-midway-through-streams-in-2026/
https://youtu.be/dGA6sVaGveU
@thecanine@twtxt.net Things in general just sitting around collect dust. Granted, plush is an even worse dust magnet. We badly need some anti-dust material. ;-)
Nice, did you print this keychain yourself?
static site generators make website-ing so fun like i wanna do so much with my site now
1 RPM
. This is a rather aggressive rate limit actually. This basically makes Github inaccessible and useless for basically anything unless you're logged in. You can basically kiss "pursuing" casually, anonymously goodbye.
@prologic@twtxt.net that will not be a problem; as long as it doesn’t affect authenticated users it wouldn’t make a difference. But we are comparing apples and eggs here. I don’t access GitHub while unauthenticated, but I can see how others might. It comes across as anti-web in general.
that site of mine i mentioned earlier? well it’s now statically generated with astro, AND it automatically builds and deploys after i push changes to my own git instance, with the power of sourcehut builds! this is so cool
@kat@yarn.girlonthemoon.xyz Nothing wrong with handwritten HTML. That’s often superior to generated stuff I believe. :-)
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net Given that all these programs are super old (tar
is from the late 1970ies), while trying to retain backwards-compatibilty, I’m not surprised that the UI isn’t too great. 🤔
find
has quite a few pitfalls, that is very true. At work, we don’t even use it anymore in more complex scenarios but write Python scripts instead. find
can be fast and efficient, but fewer and fewer people lack the knowledge to use it … The same goes for Shell scripting in general, actually.
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
E não é que os finórios do Airbnb conseguiram encaixar um artigo no Público como “opinião”?
We havet an AI assistant at work, new version came out today “nearby restaurant recommendations” mentioned. Gotta try that!
Ask it where I can get a burger, knowing there’s 3 spots that had it on the menu, AI says there’s none. Ask it to list all the restaurants nearby it can check… it knows 3, of the 10 or so around, but 1/3, even has a burger, on the menu.
Ask it to list the whole menu at restaurant 1: it hallucinates random meals, none of which they had (I ate there).
Restaurant 2 (the one most people go to, so they must have at least tested it with this one): it lists the soup of the day and ¾ meals available. Incomplete, but better than false.
Restaurant 3: it says “food” and gives a general description of food. You have to be fucking kidding me!
“BuT cAnInE, tHe A(G)i ReVoLuTiOn Is NoW”
@movq@www.uninformativ.de Agreed, finding the right motivation can be tricky. You sometimes have to torture yourself in order to later then realize, yeah, that was actually totally worth it. It’s often hard.
I think if you find a project or goal in general that these kids want to achieve, that is the best and maybe only choice with a good chance of positive outcome. I don’t know, like building a price scraper, a weather station or whatever. Yeah, these are already too advanced if they never programmed, but you get the idea. If they have something they want to build for themselves for their private life, that can be a great motivator I’ve experienced. Or you could assign ‘em the task to build their own twtxt client if they don’t have any own suitable ideas. :-)
Showing them that you do a lot of your daily work in the shell can maybe also help to get them interested in text-based boring stuff. Or at least break the ice. Lead by example. The more I think about it, the more I believe this to be very important. That’s how I still learn and improve from my favorite workmate today in general. Which I’m very thankful of.
We’re all old farts. When we started, there weren’t a lot of options. But today? I’d be completely overwhelmed, I think.
Hence, I’d recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice
That’s what I usually do (when we have young people at work who never really programmed before), but it doesn’t really “hit” them. They’ve seen so much, crazy graphics, web pages, it’s all fancy. Just some text output is utterly boring these days. ☹️ And that’s my problem: I have no idea how I could possibly spark some interest in things like pointers or something “low-level” like that. And I truly believe that you need to understand things like pointers in order to program, in general.
@bender@twtxt.net I can fix and make that work in the parser too. But I’m no longer sure how to cater for the general case. It’s too much to support all punctuation whilst at the same time as other contradicting rules. For example you cannot both support .
in nicknames and then expect to be able to to end a mention with a .
🤦♂️
Today’s stroll was really nice. Just around 11km in total I’d reckon. We had a barbie at a mate’s garden where everybody went on a hunt for an easter basket. Oh boy, what a preparation that must have been! Baking the bunnies, dying the eggs, mixing the bear leek butter and so on. That’s dedication, let me tell you. :-)
It was the first time this year that we had half proper April weather and a thunderstorm in general. It started off with clear sky and lovely sunshine. Right after arvo lunch it started to rain, so we went into the hut. Then, the sun returned.
On the way back with the growling thunder in the distance coming closer and closer we escaped the rain just perfectly. A minute or two after we reached the car, wet stuff started coming down the sky. Not even half a minute after opening the front door, it poured like crazy. Lucky twice today. There’s beautiful sunshine again by now. It smells absolutely great after the rain. I love it!
So, the Pope died. From my non-religious stand point, I think he has been the best Pope in a generation. Let’s see how the upcoming one does.
I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.
Apparently, my query to build up the message tree must be incorrect. It somehow misses seven messages. They all are orphaned, maybe that’s a clue. However, generating missing root messages (and thereby including the replies) typically works just fine. Hmm.
@javivf@adn.org.es Generally speaking if it has been reviewed, discussed and merged, then we accept it as a standard to the set of specs we support. However we might want to document this process and set some guidelines about this to be clear 🤣 We’ve been fairly lax/lose here and I think that’s okay given teh size of our community 👌
It’s ready 🥳! https://dm-echo.andros.dev/
An example: https://dm-echo.andros.dev/generate/?url=https://twtxt.andros.dev/
#twtxt
@bender@twtxt.net @movq@www.uninformativ.de Thanks! I’ll think about switching to higher resolution teasers in the future. The reasoning behind the thumbnails is to avoid wasting traffic. Maybe folks in the outback or on expensive mobile networks appreciate it. Yeah, they could disable images in general.
hello friends i spent a couple hours today using a random string generator by charm CLI called hotdiva2000 to make a script that 1) generates a static index.html page 2) the page is a prompt generator where all the prompts are from hotdiva2000!!!!!
this makes more sense if you look at it check it out
@prologic@twtxt.net it’s fine, I never expected my yeets, to be preserved for future generations. Any art I posted here, can be found through my (now almost entirely HTML 5 complient) website.
In Mexico you couldn’t register the word Sonora (state), nor Taqueria (kind of restaurant) as there are two common words, but perhaps the combination of both is trademarkable, I’m not sure, so many ‘taquerias’ here don’t file a trademark request. It’s usually “Taquería [LAST_NAME]” or “Taquería [PLACE]”.
At the same time, the word “taqueria” was trademarked in UK, like it would be “Paris” or “Pub” I guess, so basically Sonora Taqueria didn’t reply to the cease and desist, based on:
[Lizbeth García]: A brand may not use a word that is generic or descriptive of the products or services it is putting into circulation on the market.
Since he (Ismael, Taqueria’s representative) didn’t get any response, he decided to leave it in the hands of his law firm.
In early 2023, after all the noise on the internet and the mobilization caused by this case, an agreement was finally reached with Taquería to settle the matter peaceably.
In March 2023, Michelle and Sam decided to register the Sonora Taquería brand and logo with the UK Intellectual Property Office.
I want to present the twtxt feed from Python Valencia: https://twtxt.python-valencia.es/
Technical curiosity: It is generated using n8n, using the official rss.
#welcome
@movq@www.uninformativ.de I have no doubt that you’re not seeing the images correctly 😀. It’s just that it’s broken when viewing them, in my case, and analyzing the URLs, I’ve seen everything I mentioned.
Regarding the hash, you’re right. I’ll have to investigate what’s going on. I’m having a hard time getting the hash generation to work properly.
@andros@twtxt.andros.dev Hm, looks correct to me. The image to be displayed is a thumbnail and this links to the full-sized image. The thumbnail (JPG) is auto-generated from the full image (PNG), hence the two extensions.
What does look strange, though, is that your client came up with the hash pqsmcka
, while it should have been te5quba
. 🤔
Yeah. It’s mostly a parser at the moment. But I have extended the calendar.txt to include todo.txt and a repeat syntax to generate future occurances of events and todos.
@andros@twtxt.andros.dev If something fits in a CSV file, it typically doesn’t require a database. I agree with that. Depending on the application, more complicated queries might benefit from a database, though. I don’t know awk very well, but I could imagine that grep, sed and cut reach their CSV processing limits rather quickly when you have to deal with escaped (multiline) fields.
I only very rarely have to deal with CSV files or databases in my day to day life. Maybe, these classic Unix tools offer some tricks I’m not aware of. When I have some more complicated CSV input, I generally reach for Python.
@andros@twtxt.andros.dev Just before the pandemic, we watched Uncle Bob videos once a week in the lunch break. While almost all of my old teammates agreed with his views, I partially found them to be very odd and even counterproductive.
I didn’t come across John Ousterhout or any of his work before, at least not deliberately. So, this document is my first contact.
I only finished the chapter on comments and I totally agree with John so far. This document just manifests to me how weird Bob’s view is on certain subjects.
I always disagreed with the concept of a maximum method length. Sure, generally, shorter functions are probably better, but it always depends. And I’ve certainly seen super short methods that just made the code flow even worse to follow. While “one function should only do one thing” is a nice general rule, I’m 100% in team John with the shown examples. There are cases, where this doesn’t help readability at all. Not even close.
To me, a function always has to justify its existence. Either by reusing it at least at another place or by coming up with dedicated tests for it. But if it is just called once and there are no tests, I almost always decide against it. Personally, I don’t mind longer methods. We just recently had a discussion about that and I lost against two other workmates who are more in Uncle Bob’s camp, they refactored one medium sized method into three very short ones. Luckily, we agree on most other topics.
Lol, what!? The shorter the method, the longer the variables inside? I first thought I misread or the writeup mixed it up. I’ll always do it the other way around.
I’ve been also bitten badly by outdated comments in the past, but Bob must have worked on really terrible projects to end up with such an attitude to dislike comments. Oh well. No doubt, I’ve come across by several orders of magnitude more useless comments, in my experience (autogenerated) JavaDocs fall in the category more frequently than not. So, I know that there are different types of comments. A comment doesn’t automatically mean that it is good and justified.
But I also partially agree with Bob and John and think that a good name has a proper chance to save a comment. Though, when in doubt, I go John’s route and use a shorter name with a comment rather than use a kilometer long identifier. Writing good comments typically takes some time, sometimes much longer than writing the code. It regularly takes me several minutes. It’s a hard art.
I perhaps should read up on John’s work. He seems to be more reasonable and likeminded. :-) Let me continue to complete this document.
Na, you’re spot on, @movq@www.uninformativ.de! The result is an expected, terrible disaster. It just seems the absolute catastrophy is delayed for another four years.
Even though I’m the last one who wouldn’t be glad about banning the nazis, I’m not a fan of banning parties in general. I believe that a healthy democracy has to withstand extremists. Whether it’s still healthy is debatable. To me it appeared that the failed attempts to ban NPD in the past actually helped them gain more supporters.
The big established parties are all bad traitors. I blame them and their actions to help raise AfD. They just give a fuck about the ordinary people, they’re only concerned about their private gain and power. I bet nothing will change, to the contrary, it will only get worse. The winners do have the chance to turn it for the better, but they just will not. No way, unfortunately.
But then, we must not forget that people are just dumb and stupid, too. Also, that won’t change. AfD won’t help these idiots either, but they still vote for them. I also don’t understand how there is still so much support for the other big parties left. Education is important. Very important. But I have the impression that we’re lacking it.
My hypothesis about that thing breaking my twts is that it might have something to do with the parenthesis surrounding the root twt hash in the replay twt-A
when I replay to it with fork-twt-B
; I imagine elisp interpreting those as a s-expression thus breaking the generation precess of hash (#twt-A) before prepending it to for-twt-B
… but then I’m too ignorant to figure out how to test my theory (heck I couldn’t even recalculate the hashes myself correctly in bash xD). I’ll keep trying tho.
@prologic@twtxt.net Agreed! But clients can hallucinate and generate wrong hashes
aka Lies
🤣 Also, If you chheck your own twt on twtxt.net, it looks like a root twt instead of a replay.
@andros@twtxt.andros.dev is it me or twtxt-el generates a wrong twt hash when I use the [ ↳ Reply to twt ]
button?
@eapl.me@eapl.me Nope, I switched to the openssl library in PHP. But our rubberducking 🦆 seems to be working. Your find https://crypto.stackexchange.com/a/79855 for the IV generation may be the breakthrough …
@arne@uplegger.eu Hi! I love that you’re implementing it! Maybe, when we’re both done, we could test the clients by communicating both.
I don’t think I’m going to be able to help you much, my knowledge of OpenSSL and PHP is not as high as I’d like it to be.
Maybe the OpenSSL version uses SHA-1 by default in PHP. Or that the IV is derived together with the key (not generated separately). But I’m not able to answer your questions, sorry.
I’m invoking the commands directly, without any libraries in between. Maybe that would help you?
@arne@uplegger.eu Well, just for my understanding. The command:
echo "Lorem ipsum" | openssl enc -aes-256-cbc -pbkdf2 -iter 100000 -out message.enc -pass file:shared_key.bin
will take the input string from echo
to openssl
. It then will
- use the content of
shared_key.bin
as password
- use
PBKDF2
with an iteration of 100000 to generate a encryption key from the given password (shared_key.bin
)
- use the
PBKDF2
generated key for anaes-256-cbc
encryption
The final result is encrypted data with the prepended salt (which was generated by runtime), e.g.: Salted__q�;��-�T���"h%��5�� ...
.
With a dummy script I now can generate a valide shared key within PHP ‘openssl_pkey_derive()’ - identical to OpenSSL.
I also can en-/decrypt salted data within my script, but not with OpenSSL. There are several parameters of PBKDF2
unknown to me.
Question:
- Is the salt, used by
aes-256-cbc
andPBKDF2
the same, prepended in the encrypted data?
- Witch algorithm/cipher is used within
PBKDF2
: sha1, sha256, …?
- What is the desired key length of
PBKDF2
(https://www.php.net/manual/en/function.openssl-pbkdf2.php)?
To be continued …
@andros@twtxt.andros.dev The article is a good reminder of the true blogging mindset. But let’s try to think beyond. 2 ideas: (1) writing “forces clarity, structures your thoughts, sharpens your perspective”. But it also generates thoughts in the sense of Heinrich von Kleist (1805). (2) You’re writing for “the future you, one right person, one day” but you are also writing for the AI. The idea of AI as an audience.
General is “peoples”. Our community want replies and reactions minimum. Currently used Telegram+Matrix (most on Telegram and me from bridge)
@andros@twtxt.andros.dev How about putting the whole encrypted conversation into a sperate twtxt-file. Just like the archive feature (?). That way, the general clients don’t have to cope with the decrytption stuff and it won’t break the general public conversations.
@prologic@twtxt.net Since I live in Germany, I do believe the media here is generally reputable. It really depends where you live of course. Source I look at are Reuters, NPR, The Guardian, Die Zeit, NY Times, CNN, Tagesschau, Spiegel Online, RP Online (for local news), … I would never just trust what I see in my social media feeds.
messing with gemini again, this time a static site generator called gssg - https://git.sr.ht/~gsthnz/gssg
my capsule is linked in my profile but just in case it’s over at gemini://lazuli.sayitditto.net
I’ve been thinking of a few improvements for the next generation of twtxt spec, let me know if these are useful or interesting :) https://text.eapl.mx/a-few-ideas-for-a-next-twtxt-version
If all Orange Face Elefant party voters would take them on their words and make them actually do whatever insane world they invented, then perhaps people will realize the grave mistake that was made today. Many people have to feel consequences before they believe it. I hope there will still be history books in the future to disclose the insanity for future generations. But whatever happens, the World will keep spinning…
@prologic@twtxt.net I think printf is a more portable option than echo -e for interpreting \t as tab. E.g. printf ‘%s\t%s\t%s’ “$url” “$time” “$text”. In general I always prefer printf over echo for anything non-trivial in unix shell scripts. See last paragraph of https://en.wikipedia.org/wiki/Echo_(command)#History
@prologic@twtxt.net Regarding the new way of generating twt-hashes, to me it makes more sense to use tabs as separator instead of spaces, since the you can just copy/past a line directly from a twtxt-file that already go a tab between timestamp and message. But tabs might be hard to “type” when you are in a terminal, since it will activate autocomplete…🤔
Another thing, it seems that you sugget we only use the domain in the hash-creation and not the full path to the twtxt.txt
$ echo -e "https://example.com 2024-09-29T13:30:00Z Hello World!" | sha256sum - | awk '{ print $1 }' | base64 | head -c 12
Some more arguments for a local-based treading model over a content-based one:
The format:
(#<DATE URL>)
or(@<DATE URL>)
both makes sense: # as prefix is for a hashtag like we allredy got with the(#twthash)
and @ as prefix denotes that this is mention of a specific post in a feed, and not just the feed in general. Using either can make implementation easier, since most clients already got this kind of filtering.Having something like
(#<DATE URL>)
will also make mentions via webmetions for twtxt easier to implement, since there is no need for looking up the#twthash
. This will also make it possible to make 3th part twt-mentions services.Supporting twt/webmentions will also increase discoverability as a way to know about both replies and feed mentions from feeds that you don’t follow.
@prologic@twtxt.net Thanks for writing that up!
I hope it can remain a living document (or sequence of draft revisions) for a good long time while we figure out how this stuff works in practice.
I am not sure how I feel about all this being done at once, vs. letting conventions arise.
For example, even today I could reply to twt abc1234 with “(#abc1234) Edit: …” and I think all you humans would understand it as an edit to (#abc1234). Maybe eventually it would become a common enough convention that clients would start to support it explicitly.
Similarly we could just start using 11-digit hashes. We should iron out whether it’s sha256 or whatever but there’s no need get all the other stuff right at the same time.
I have similar thoughts about how some users could try out location-based replies in a backward-compatible way (append the replyto: stuff after the legacy (#hash) style).
However I recognize that I’m not the one implementing this stuff, and it’s less work to just have everything determined up front.
Misc comments (I haven’t read the whole thing):
Did you mean to make hashes hexadecimal? You lose 11 bits that way compared to base32. I’d suggest gaining 11 bits with base64 instead.
“Clients MUST preserve the original hash” — do you mean they MUST preserve the original twt?
Thanks for phrasing the bit about deletions so neutrally.
I don’t like the MUST in “Clients MUST follow the chain of reply-to references…”. If someone writes a client as a 40-line shell script that requires the user to piece together the threading themselves, IMO we shouldn’t declare the client non-conforming just because they didn’t get to all the bells and whistles.
Similarly I don’t like the MUST for user agents. For one thing, you might want to fetch a feed without revealing your identty. Also, it raises the bar for a minimal implementation (I’m again thinking again of the 40-line shell script).
For “who follows” lists: why must the long, random tokens be only valid for a limited time? Do you have a scenario in mind where they could leak?
Why can’t feeds be served over HTTP/1.0? Again, thinking about simple software. I recently tried implementing HTTP/1.1 and it wasn’t too bad, but 1.0 would have been slightly simpler.
Why get into the nitty-gritty about caching headers? This seems like generic advice for HTTP servers and clients.
I’m a little sad about other protocols being not recommended.
I don’t know how I feel about including markdown. I don’t mind too much that yarn users emit twts full of markdown, but I’m more of a plain text kind of person. Also it adds to the length. I wonder if putting a separate document would make more sense; that would also help with the length.
There’s a simple reason all the current hashes end in a or q: the hash is 256 bits, the base32 encoding chops that into groups of 5 bits, and 256 isn’t divisible by 5. The last character of the base32 encoding just has that left-over single bit (256 mod 5 = 1).
So I agree with #3 below, but do you have a source for #1, #2 or #4? I would expect any lack of variability in any part of a hash function’s output would make it more vulnerable to attacks, so designers of hash functions would want to make the whole output vary as much as possible.
Other than the divisible-by-5 thing, my current intuition is it doesn’t matter what part you take.
Hash Structure: Hashes are typically designed so that their outputs have specific statistical properties. The first few characters often have more entropy or variability, meaning they are less likely to have patterns. The last characters may not maintain this randomness, especially if the encoding method has a tendency to produce less varied endings.
Collision Resistance: When using hashes, the goal is to minimize the risk of collisions (different inputs producing the same output). By using the first few characters, you leverage the full distribution of the hash. The last characters may not distribute in the same way, potentially increasing the likelihood of collisions.
Encoding Characteristics: Base32 encoding has a specific structure and padding that might influence the last characters more than the first. If the data being hashed is similar, the last characters may be more similar across different hashes.
Use Cases: In many applications (like generating unique identifiers), the beginning of the hash is often the most informative and varied. Relying on the end might reduce the uniqueness of generated identifiers, especially if a prefix has a specific context or meaning.
I was not suggesting to that everyone need to setup a working webfinger endpoint, but that we take the format of nick+(sub)domain as base for generating the hashed together with the message date and content.
If we omit the protocol prefix from the way we do things now will that not solve most of the problems? In the case of gemini://gemini.ctrl-c.club/~nristen/twtxt.txt
they also have a working twtxt.txt at https://ctrl-c.club/~nristen/twtxt.txt
… damn I just notice the gemini.
subdomain.
Okay what about defining a prefers protocol as part of the hash schema? so 1: https , 2: http 3: gemini 4: gopher ?
@sorenpeter@darch.dk There was a client that would generate a unique hash for each twt. It didn’t get wide adoption.
@prologic@twtxt.net do that mean that for every new post (not replies) the client will have to generate a UUID or similar when posting and add that to to the twt?
how little data is needed for generating the hashes? Instead of the full URL, can we makedo with just the domain (example.net) so we avoid the conflicts with gemini://
, https://
and only http://
(like in my own twtxt.txt) or construct something like like a webfinger id nick@domain
(also used by mastodon etc.) from the domain and nick if there, else use domain as nick as well
I feel like complexity is measured differently at different levels of a project..
- at the function level you use cyclomatic complexity or how many branches internally and how much you need to keep in mind as it calls out to other functions.
- at a file/module level is a balance of the module doing too much against being so granular that you have cross dependency across modules. I have trouble with keeping things dry at this level because it can lead to parts being so abstract or generalized that it adds complexity.
- at a project level i suppose its a matter of how coupled things are across sub-modules.
it works fine if you properly escape your urls!
URIs include components and subcomponents that are delimited by
characters in the "reserved" set. These characters are called
"reserved" because they may (or may not) be defined as delimiters by
the generic syntax, by each scheme-specific syntax, or by the
implementation-specific syntax of a URI's dereferencing algorithm.
If data for a URI component would conflict with a reserved
character's purpose as a delimiter, then the conflicting data must be
percent-encoded before the URI is formed.
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
password is generated using caddy hash-password
@lyse@lyse.isobeef.org Yeah the func in func threw me off.. The generic type iter.Seq[V]
does make things a bit more clear though.
>
?
@eapl.me@eapl.me this is interesting. Is the square bracket something used in the wild for multilingual twts?
@prologic@twtxt.net what are your thoughts? Should we extend the parser to handle [lang] and [boost] ? Or a generic attribute spec. Single word is a boolean attribute. And one with an =
is a string key/value.
Interesting thing happening over on Xitter. Apparently some of the women in tech accounts are being exposed as being run by men that hire women to pose for images/videos. They would be invited to tech conferences but would always drop out last minute.
Makes me wonder if maybe there is need for a sort of verifiable web of trust is needed where influencers can be proven as authentic by others. This will only get worse as AI generative content gets pushed into our feeds.
@movq@www.uninformativ.de Thanks for reaching out - just general wonkiness with the Epson printing job configuration UI. They offer Fedora software, but it seems that not all features are supported
von Neumann: I came up with this new system that generalizes probability theory to consider convex sets instead of point estimates. I think that I could use this to prove regret bounds…
I’m not super a fan of using json. I feel we could still use text as the medium. Maybe a modified version to fix any weakness.
What if instead of signing each twt individually we generated a merkle tree using the twt hashes? Then a signature of the root hash. This would ensure the full stream of twts are intact with a minimal overhead. With the added bonus of helping clients identify missing twts when syncing/gossiping.
Have two endpoints. One as the webfinger to link profile details and avatar like you posted. And the signature for the merkleroot twt. And the other a pageable stream of twts. Or individual twts/merkle branch to incrementally access twt feeds.
orthogonality of substrate and structure in general
So. Some bits.
i := fIndex(xs, 5.6)
Can also be
i := Index(xs, 5.6)
The compiler can infer the type automatically. Looks like you mention that later.
Also the infer is super smart.. You can define functions that take functions with generic types in the arguments. This can be useful for a generic value mapper for a repository
func Map[U,V any](rows []U, fn func(U) V) []V {
out := make([]V, len(rows))
for i := range rows { out = fn(rows[i]) }
return out
}
rows := []int{1,2,3}
out := Map(rows, func(v int) uint64 { return uint64(v) })
I am pretty sure the type parameters goes the other way with the type name first and constraint second.
func Foo[comparable T](xs T, s T) int
Should be
func Foo[T comparable](xs T, s T) int
@prologic@twtxt.net it is from the generator. But in the actual go implementation methods are represented with a unsigned short. So 65k is the hard limit in go.
@eldersnake@we.loveprivacy.club apparently someone that generates graphql endpoints for a biiiig app
@prologic@twtxt.net I get the worry of privacy. But I think there is some value in the data being collected. Do I think that Russ is up there scheming new ways to discover what packages you use in internal projects for targeting ads?? Probably not.
Go has always been driven by usage data. Look at modules. There was need for having repeatable builds so various package tool chains were made and evolved into what we have today. Generics took time and seeing pain points where they would provide value. They weren’t done just so it could be checked off on a box of features. Some languages seem to do that to the extreme.
Whenever changes are made to the language there are extensive searches across public modules for where the change might cause issues or could be improved with the change. The fs embed and strings.Cut come to mind.
I think its good that the language maintainers are using what metrics they have to guide where to focus time and energy. Some of the other languages could use it. So time and effort isn’t wasted in maintaining something that has little impact.
The economics of the “spying” are to improve the product and ecosystem. Is it “spying” when a municipality uses water usage metrics in neighborhoods to forecast need of new water projects? Or is it to discover your shower habits for nefarious reasons?
here’s a question: when do NNs generalize, and how hard? as in adding two specific numbers together vs. n-digit integer addition vs. addition in general vs. simple arithmetical operations
@abucci@anthony.buc.ci So.. The issue is that its showing the password by default? Would making an alias to always include the -c help? We can probably engage Jason with a PR to enable a more hardened approach when desired. I’ve spoken to him before and is generally a pretty open to ideas.
I found this app that was created by the gopass author that does copy by default and has a tui or GUI mode https://github.com/cortex/ripasso
Did something chchange with how the discover feed is generated? My pods logout mode now only shows my twts. It used to be all twts from watcher observation like my logged on discover tab. @prologic@twtxt.net
@prologic@twtxt.net see where its used maybe that can help.
https://github.com/sour-is/ev/blob/main/app/peerfinder/http.go#L153
This is an upsert. So I pass a streamID which is like a globally unique id for the object. And then see how the type of the parameter in the function is used to infer the generic type. In the function it will create a new *Info and populate it from the datastore to pass to the function. The func will do its modifications and if it returns a nil error it will commit the changes.
The PA type contract ensures that the type fulfills the Aggregate interface and is a pointer to type at compile time.
My Generation — The Who (Eurobeat Remix)
(cont.)
Just to give some context on some of the components around the code structure.. I wrote this up around an earlier version of aggregate code. This generic bit simplifies things by removing the need of the Crud functions for each aggregate.
Domain ObjectsA domain object can be used as an aggregate by adding the event.AggregateRoot
struct and finish implementing event.Aggregate. The AggregateRoot implements logic for adding events after they are either Raised by a command or Appended by the eventstore Load or service ApplyFn methods. It also tracks the uncommitted events that are saved using the eventstore Save method.
type User struct {
Identity string ```json:"identity"`
CreatedAt time.Time
event.AggregateRoot
}
// StreamID for the aggregate when stored or loaded from ES.
func (a *User) StreamID() string {
return "user-" + a.Identity
}
// ApplyEvent to the aggregate state.
func (a *User) ApplyEvent(lis ...event.Event) {
for _, e := range lis {
switch e := e.(type) {
case *UserCreated:
a.Identity = e.Identity
a.CreatedAt = e.EventMeta().CreatedDate
/* ... */
}
}
}
Events
Events are applied to the aggregate. They are defined by adding the event.Meta
and implementing the getter/setters for event.Event
type UserCreated struct {
eventMeta event.Meta
Identity string
}
func (c *UserCreated) EventMeta() (m event.Meta) {
if c != nil {
m = c.eventMeta
}
return m
}
func (c *UserCreated) SetEventMeta(m event.Meta) {
if c != nil {
c.eventMeta = m
}
}
Reading Events from EventStore
With a domain object that implements the event.Aggregate
the event store client can load events and apply them using the Load(ctx, agg)
method.
// GetUser populates an user from event store.
func (rw *User) GetUser(ctx context.Context, userID string) (*domain.User, error) {
user := &domain.User{Identity: userID}
err := rw.es.Load(ctx, user)
if err != nil {
if err != nil {
if errors.Is(err, eventstore.ErrStreamNotFound) {
return user, ErrNotFound
}
return user, err
}
return nil, err
}
return user, err
}
OnX Commands
An OnX command will validate the state of the domain object can have the command performed on it. If it can be applied it raises the event using event.Raise() Otherwise it returns an error.
// OnCreate raises an UserCreated event to create the user.
// Note: The handler will check that the user does not already exsist.
func (a *User) OnCreate(identity string) error {
event.Raise(a, &UserCreated{Identity: identity})
return nil
}
// OnScored will attempt to score a task.
// If the task is not in a Created state it will fail.
func (a *Task) OnScored(taskID string, score int64, attributes Attributes) error {
if a.State != TaskStateCreated {
return fmt.Errorf("task expected created, got %s", a.State)
}
event.Raise(a, &TaskScored{TaskID: taskID, Attributes: attributes, Score: score})
return nil
}
Crud Operations for OnX Commands
The following functions in the aggregate service can be used to perform creation and updating of aggregates. The Update function will ensure the aggregate exists, where the Create is intended for non-existent aggregates. These can probably be combined into one function.
// Create is used when the stream does not yet exist.
func (rw *User) Create(
ctx context.Context,
identity string,
fn func(*domain.User) error,
) (*domain.User, error) {
session, err := rw.GetUser(ctx, identity)
if err != nil && !errors.Is(err, ErrNotFound) {
return nil, err
}
if err = fn(session); err != nil {
return nil, err
}
_, err = rw.es.Save(ctx, session)
return session, err
}
// Update is used when the stream already exists.
func (rw *User) Update(
ctx context.Context,
identity string,
fn func(*domain.User) error,
) (*domain.User, error) {
session, err := rw.GetUser(ctx, identity)
if err != nil {
return nil, err
}
if err = fn(session); err != nil {
return nil, err
}
_, err = rw.es.Save(ctx, session)
return session, err
}
Progress! so i have moved into working on aggregates. Which are a grouping of events that replayed on an object set the current state of the object. I came up with this little bit of generic wonder.
type PA[T any] interface {
event.Aggregate
*T
}
// Create uses fn to create a new aggregate and store in db.
func Create[A any, T PA[A]](ctx context.Context, es *EventStore, streamID string, fn func(context.Context, T) error) (agg T, err error) {
ctx, span := logz.Span(ctx)
defer span.End()
agg = new(A)
agg.SetStreamID(streamID)
if err = es.Load(ctx, agg); err != nil {
return
}
if err = event.NotExists(agg); err != nil {
return
}
if err = fn(ctx, agg); err != nil {
return
}
var i uint64
if i, err = es.Save(ctx, agg); err != nil {
return
}
span.AddEvent(fmt.Sprint("wrote events = ", i))
return
}
This lets me do something like this:
a, err := es.Create(ctx, r.es, streamID, func(ctx context.Context, agg *domain.SaltyUser) error {
return agg.OnUserRegister(nick, key)
})
I can tell the function the type being modified and returned using the function argument that is passed in. pretty cray cray.
in general, lw feels like a place where it would be good for many people to cross-post to, a content aggregator/archiver
if you’re not special, generating passwords is like running from bears: you don’t need to be good, you just need to be better than the majority
guy who takes mdma at a techno rave and says “so this is what it’s all about”, but not just about raving culture, but, like, life in general
@prologic@twtxt.net I have seen single use keys that are signed by a central PKI .. Keybase has one that uses a chatbot to generate the keys on the fly.
It just comes down to your threat model :)
there was a connection between one of the guys who wrote the first pickup advice in the 70s, and general semantics. i could investigate
generic answer to any threat: “if the grease doesn’t get me first”
saying “without loss of generality” is a great way to hide bullshit in a proof. i have applied it many times with huge success
fake english word generation for Go and CLI: [[https://github.com/nwtgck/go-fakelish]] #links
@adi@f.adi.onl Ugh sorry for not replying. If the file list is dynamic, usually you use something like autoconf to generate the Makefile. I’ve also used wildcards in the past and that works okay. You should be able to use shell commands to populate the file list.
Third generation of AirPods. So, new AirPods. Read more at Apple. 😂
Apple’s event on Monday is bringing, as always, speculation to the table. One thing most outlets seem to agree is the introduction of an “M1X” chip, thought Apple might call it differently. M1X might also mean, M1(we don’t know what comes after, or next generation). Either way, I would really like to see the return of the 27” iMac, but I will not hold my breath. Nevertheless, Monday is going to be an exciting day for many, including me! 🍎
Everybody is building one because, you know, why not? Why I built my own static site generator.
Test to generate more logging.
new algo in #sndkit @!(sndkitref “sparse”)!@ is a sparse noise generator, similar to velvet noise, that produces a random series of impulses at a specified rate in Hz.
rational people can use very irrational people as babble generators in conversations, if the rational people are high prune (which they usually are).
added a !projects page. it’s dynamically generated :)
Whether to invest in stocks is moral tracks with whether general economic growth is moral.
2x3: {lives in social/physical reality}×{views things generally as positive/zero/negative sum}. To be honest, I think there’s relatively few people in social positive sum reality frames.
the ‘magic circle’ sine wave algorithm: [[https://ccrma.stanford.edu/~jos/pasp/Digital_Sinusoid_Generators.html]] #links
@jlj@twt.nfld.uk “A good read: Why I find longtermism hard – […]” -> Interesting! I don’t particularly share that emotional intuition (although my bias probably cuts the other way: I am more moved by interesting projects, and more interesting problems probably also less neglected)–I generally find most problems other people find salient not very moving at all (although probably equally strongly moved by extremely near suffering compared to other people, but with a stronger emotional distance discount). EA makes sense in a very different way to me (phenomenologically, probably closest to philosophical high valence states it evokes).
new algorithm in @!(ref “sndkit”)!@: @!(sndkitref “phasor”)!@ generates a normalized periodic ramp signal, typically used for table-lookup oscillators.
Mirroring my private sites on the IPFS network. Generating my static site using 11ty
a dynamically generated page for food recipes: !food
Tactic: Salty chips (Salty chips that make you buy water as a general pattern).