@abucci@anthony.buc.ci Its not better than a Cat5e. I have had two versions of the device. The old ones were only 200Mbps i didn’t have the MAC issue but its like using an old 10baseT. The newer model can support 1Gbps on each port for a total bandwidth of 2Gbps.. i typically would see 400-500Mbps from my Wifi6 router. I am not sure if it was some type of internal timeout or being confused by switching between different wifi access points and seeing the mac on different sides.
Right now I have my wifi connected directly with a cat6e this gets me just under my providers 1.3G downlink. the only thing faster is plugging in directly.
MoCA is a good option, they have 2.5G models in the same price range as the 1G Powerline models BUT, only if you have the coax in wall already.. which puts you in the same spot if you don’t. You are for sure going to have an outlet in every room of the house by code.
@prologic@twtxt.net odd is it maybe a wrong mime type thing? Should be text/calendar
. Some http servers can mistakenly mark them application/octet-stream
@movq@www.uninformativ.de the real question is… Can it ScreamTracker3?
@lyse@lyse.isobeef.org hah! I cut some out to fit into my pods 4k limit.
Yeah that does studder a bit. To be honest I have no idea what I was thinking there. This excerpt was written a good year ago.
@prologic@twtxt.net I think we could use deltachats new decentralising app format for it: https://delta.chat/en/2022-06-14-webxdcintro
@lyse@lyse.isobeef.org I do wonder how we could build a decentralized way to do this 🤔
@prologic@twtxt.net and others, video call tomorrow/tonight?
👋 Hello @burglar@txt.sour.is, welcome to txt.sour.is, a Yarn.social Pod! To get started you may want to check out the pod’s Discover feed to find users to follow and interact with. To follow new users, use the ⨁ Follow
button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
@prologic@twtxt.net correct type parameters. 😅
@mckinley@twtxt.net Haha, while composing I was wondering two or three times whether I should throw my thoughts in an HTML page instead. But out of utter laziness I discarded that idea. ¯_(ツ)_/¯
@prologic@twtxt.net Error handling especially in Go is very tricky I think. Even though the idea is simple, it’s fairly hard to actually implement and use in a meaningful way in my opinion. All this error wrapping or the lack of it and checking whether some specific error occurred is a mess. errors.As(…)
just doesn’t feel natural. errors.Is(…)
only just. I mainly avoided it. Yesterday evening I actually researched a bit about that and found this article on errors with Go 1.13. It shed a little bit of light, but I still have a long way to go, I reckon.
We tried several things but haven’t found the holy grail. Currently, we have a mix of different styles, but nothing feels really right. And having plenty of different approaches also doesn’t help, that’s right. I agree, error messages often end up getting wrapped way too much with useless information. We haven’t found a solution yet. We just noticed that it kind of depends on the exact circumstances, sometimes the caller should add more information, sometimes it’s better if the callee already includes what it was supposed to do.
To experiment and get a feel for yesterday’s research results I tried myself on the combined log parser and how to signal three different errors. I’m not happy with it. Any feedback is highly appreciated. The idea is to let the caller check (not implemented yet) whether a specific error occurred. That means I have to define some dedicated errors upfront (ErrInvalidFormat
, ErrInvalidStatusCode
, ErrInvalidSentBytes
) that can be used in the err == ErrInvalidFormat
or probably more correct errors.Is(err, ErrInvalidFormat)
check at the caller.
All three errors define separate error categories and are created using errors.New(…)
. But for the invalid status code and invalid sent bytes cases I want to include more detail, the actual invalid number that is. Since these errors are already predefined, I cannot add this dynamic information to them. So I would need to wrap them à la fmt.Errorf("invalid sent bytes '%s': %w", sentBytes, ErrInvalidSentBytes")
. Yet, the ErrInvalidSentBytes
is wrapped and can be asserted later on using errors.Is(err, ErrInvalidSentBytes)
, but the big problem is that the message is repeated. I don’t want that!
Having a Python and Java background, exception hierarchies are a well understood concept I’m trying to use here. While typing this long message it occurs to me that this is probably the issue here. Anyways, I thought, I just create a ParseError
type, that can hold a custom message and some causing error (one of the three ErrInvalid*
above). The custom message is then returned at Error()
and the wrapped cause will be matched in Is(…)
. I then just return a ParseError{fmt.Sprintf("invalid sent bytes '%s'", sentBytes), ErrInvalidSentBytes}
, but that looks super weird.
I probably need to scrap the “parent error” ParseError
and make all three “suberrors” three dedicated error types implementing Error() string
methods where I create a useful error messages. Then the caller probably could just errors.Is(err, InvalidSentBytesError{})
. But creating an instance of the InvalidSentBytesError
type only to check for such an error category just does feel wrong to me. However, it might be the way to do this. I don’t know. To be tried. Opinions, anyone? Implementing a whole new type is some effort, that I want to avoid.
Alternatively just one ParseError
containing an error kind enumeration for InvalidFormat
and friends could be used. Also seen that pattern before. But that would then require the much more verbose var parseError ParseError; if errors.As(err, &parseError) && parseError.Kind == InvalidSentBytes { … }
or something like that. Far from elegant in my eyes.
@prologic@twtxt.net can Yarn pods be consumers to other yarn pods?
@abucci@anthony.buc.ci I think so. IndieAuth is what I’m a big fan of. All Yarn pods are IndieAuth providers for example (if there are any concumsers out there, we have to work on a consumer ourselves…)
Hi, I am playing with making an event sourcing database. Its super alpha but I thought I would share since others are talking about databases and such.
It’s super basic. Using tidwall/wal as the disk backing. The first use case I am playing with is an implementation of msgbus. I can post events to it and read them back in reverse order.
I plan to expand it to handle other event sourcing type things like aggregates and projections.
Find it here: sour-is/ev
@prologic@twtxt.net @movq@www.uninformativ.de @lyse@lyse.isobeef.org
Yarn #mtevilq Cut flowers in the room maybe, a proper bath not just shower and stationery in room @maya@maya.land
need to stay focussed @prologic@twtxt.net
Hmm, @prologic@twtxt.net / @lyse@lyse.isobeef.org: Should we remove the section “Traditional Human-Readable Topics” from the spec? Or mark is as deprecated? I haven’t seen this being used in the wild for years. 🤔
@chronolink@chrono.tilde.cafe Replies are not part of the original twtxt format. They were added later as an extension by Yarn.social: https://dev.twtxt.net/doc/twtsubjectextension.html (only the section “Machine-Parsable Conversation Grouping” is used these days)
@prologic@twtxt.net Oh.. reading comprehension is strong today.. you went to US and now back.
@prologic@twtxt.net Hol-Up. You are state side now? That’s a pretty big change!
@movq@www.uninformativ.de I usually only use eggs for baking or fry them for potatoes and spinach. @prologic@twtxt.net Why don’t you have them anymore? Did the fox get them all when the door didn’t close in time? ]:->
@kubikpixel@thunix.net hellooo!!!! \o//
@novaburst@twt.nfld.uk Ah.. that is probably the XMPP verify code.. it doesnt really work that well. I aught to take it out.
@tkanos@twtxt.net Yep. https://twitter.com/jack/status/1510314535671922689
@mutefall@twtxt.net interesting.. were you working on one of the two universities that used it between 1989 and 1991?
hey @xuu@txt.sour.is i’m trying to sort of get running your keyproofs thing on my hashbang’s site root, but I get this:
Apr 01 02:55:25 de1 sour.is-keyproofs[9084]: 2:55AM ERR home/novaburst/keyproofs/main.go:73 > Application Failed error=": missing jid"
@prologic@twtxt.net yeah. For commercial use even. Just need to put an attribution note in the project README
maxlenght
?, I found a workaround by writing from Goryon on mobile, on PC i can simply change the limit with the inspector but isn't it there for a reason?
@mckinley@twtxt.net Agreed! 👌
Can we all vote on the new default being 1024
then perhaps? 🤔
+1 from me
@xuu@txt.sour.is So that means we’re allowed to use it right? 😅
@prologic@twtxt.net if we do adopt this one it is CC-BY from twitter. https://twemoji.twitter.com
@prologic@twtxt.net @ullarah@txt.quisquiliae.com I often see messages longer than what the textbox limit is, isn’t it limited by the maxlenght
?, I found a workaround by writing from Goryon on mobile, on PC i can simply change the limit with the inspector but isn’t it there for a reason?
I too would like to express a bit more if possible, especially if i have to refer to users and link URLs and images for example, having a limit that isn’t too much of a limit is kind of pointless i think. 🤔
@lyse@lyse.isobeef.org Excellent use of old denim, and also excellent use of long-form twt!
@adi@twtxt.net Also, I noticed you followed me on Twitter, but you might enjoy @anths if you want techie stuff instead of Oregon politics. 🤣
@novaburst@twt.nfld.uk I doubt there will ever be a 2.0 … It may end up like java and they strip off the 1.
@ullarah@txt.quisquiliae.com works for me! A tricky bitmight be if it splits within a codeblock so markdown can’t parse
@ullarah@txt.quisquiliae.com Didn’t we talk about at some point a way to set the maximum height of te panels with some UX way to read the rest? 🤔 Is that still on the cards or a bad ideas? 🤔
#!/bin/sh
# Validate environment
if ! command -v msgbus > /dev/null; then
printf "missing msgbus command. Use: go install git.mills.io/prologic/msgbus/cmd/msgbus@latest"
exit 1
fi
if ! command -v salty > /dev/null; then
printf "missing salty command. Use: go install go.mills.io/salty/cmd/salty@latest"
exit 1
fi
if ! command -v salty-keygen > /dev/null; then
printf "missing salty-keygen command. Use: go install go.mills.io/salty/cmd/salty-keygen@latest"
exit 1
fi
if [ -z "$SALTY_IDENTITY" ]; then
export SALTY_IDENTITY="$HOME/.config/salty/$USER.key"
fi
get_user () {
user=$(grep user: "$SALTY_IDENTITY" | awk '{print $3}')
if [ -z "$user" ]; then
user="$USER"
fi
echo "$user"
}
stream () {
if [ -z "$SALTY_IDENTITY" ]; then
echo "SALTY_IDENTITY not set"
exit 2
fi
jq -r '.payload' | base64 -d | salty -i "$SALTY_IDENTITY" -d
}
lookup () {
if [ $# -lt 1 ]; then
printf "Usage: %s nick@domain\n" "$(basename "$0")"
exit 1
fi
user="$1"
nick="$(echo "$user" | awk -F@ '{ print $1 }')"
domain="$(echo "$user" | awk -F@ '{ print $2 }')"
curl -qsSL "https://$domain/.well-known/salty/${nick}.json"
}
readmsgs () {
topic="$1"
if [ -z "$topic" ]; then
topic=$(get_user)
fi
export SALTY_IDENTITY="$HOME/.config/salty/$topic.key"
if [ ! -f "$SALTY_IDENTITY" ]; then
echo "identity file missing for user $topic" >&2
exit 1
fi
msgbus sub "$topic" "$0"
}
sendmsg () {
if [ $# -lt 2 ]; then
printf "Usage: %s nick@domain.tld <message>\n" "$(basename "$0")"
exit 0
fi
if [ -z "$SALTY_IDENTITY" ]; then
echo "SALTY_IDENTITY not set"
exit 2
fi
user="$1"
message="$2"
salty_json="$(mktemp /tmp/salty.XXXXXX)"
lookup "$user" > "$salty_json"
endpoint="$(jq -r '.endpoint' < "$salty_json")"
topic="$(jq -r '.topic' < "$salty_json")"
key="$(jq -r '.key' < "$salty_json")"
rm "$salty_json"
message="[$(date +%FT%TZ)] <$(get_user)> $message"
echo "$message" \
| salty -i "$SALTY_IDENTITY" -r "$key" \
| msgbus -u "$endpoint" pub "$topic"
}
make_user () {
mkdir -p "$HOME/.config/salty"
if [ $# -lt 1 ]; then
user=$USER
else
user=$1
fi
identity_file="$HOME/.config/salty/$user.key"
if [ -f "$identity_file" ]; then
printf "user key exists!"
exit 1
fi
# Check for msgbus env.. probably can make it fallback to looking for a config file?
if [ -z "$MSGBUS_URI" ]; then
printf "missing MSGBUS_URI in environment"
exit 1
fi
salty-keygen -o "$identity_file"
echo "# user: $user" >> "$identity_file"
pubkey=$(grep key: "$identity_file" | awk '{print $4}')
cat <<- EOF
Create this file in your webserver well-known folder. https://hostname.tld/.well-known/salty/$user.json
{
"endpoint": "$MSGBUS_URI",
"topic": "$user",
"key": "$pubkey"
}
EOF
}
# check if streaming
if [ ! -t 1 ]; then
stream
exit 0
fi
# Show Help
if [ $# -lt 1 ]; then
printf "Commands: send read lookup"
exit 0
fi
CMD=$1
shift
case $CMD in
send)
sendmsg "$@"
;;
read)
readmsgs "$@"
;;
lookup)
lookup "$@"
;;
make-user)
make_user "$@"
;;
esac
ssh
client, because that's me, no-matter where I am. The only exception to this rule is I usually create a separate key for any "work" / " company" I am a part of.
@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 :)
ssh
client, because that's me, no-matter where I am. The only exception to this rule is I usually create a separate key for any "work" / " company" I am a part of.
@prologic@twtxt.net for shame! lol me too.
@prologic@twtxt.net yarn builds in 1.18!
@prologic@twtxt.net Re: Chat system, What if the base specification included a system for per-user arbitrary JSON storage on the server? Kind of like XEP-0049, but expanded upon. Two kinds of objects: public and private. Public objects can be queried by anyone, private objects cannot and must be encrypted with the user’s private key. Public keys could be stored there, as well as anything else defined by extensions. Roster, user block list, avatar, etc.
@prologic@twtxt.net hmm so each individual feed on your pod sub’s my feed? Wouldn’t that flood your server for each post?
@david@netbros.com Do you always link that?
@screem@yarn.yarnpods.com we have had to really shorten our process. I think long interviews were scaring off talent.
@screem@yarn.yarnpods.com yah I finally saw all of Dave’s twts and figured he had explained Gog’s/gitea better.
@prologic@twtxt.net interesting. The twt must’ve been deleted, I guess 😂