blog.ratterobert.com

xuu (txt.sour.is)

Xuu /zuː/ I am AWESOME! ○△□ ⍼

xuu (txt.sour.is)

Why you got to lie to me Google?

Read replies 5 months ago
xuu (txt.sour.is)

i made a little twtxt feed fixer for when a feed uses other whitespace instead of tabs.

https://git.mills.io/yarnsocial/go-lextwt/pulls/32

Read replies 5 months ago
xuu (txt.sour.is) Read replies 6 months ago
xuu (txt.sour.is)

Bro.. Gitea I think you are drunk. How is Jan 2024 5 days ago?

Read replies 7 months ago
xuu (txt.sour.is)

One benefit with bluesky is your username is also a website. And not a clunky URL with slashes and such. I wish twtxt adopted that. I have advocated for webfinger to for twtxt to let us do something like it with usernames. Nostr has something like it

By default the bsky.social urls all redirect to their feeds like: hmpxvt.bsky.social Many custom urls will redirect to some kind of linktree or just their feed cwebonline.com or la.bonne.petite.sour.is or if you are a major outlet just to your web presence like https://theonion.com‬ or https://netflix.com

Its just good SEO practice

Do all nostr addresses take you to the person if typed into a browser? That is the secret sauce. No having to go to some random page first. no accounts. no apps to install. just direct to the person.

Read replies 7 months ago
xuu (txt.sour.is)

Interesting.. QUIC isn't very quick over fast internet.

QUIC is expected to be a game-changer in improving web application performance. In this paper, we conduct a systematic examination of QUIC's performance over high-speed networks. We find that over fast Internet, the UDP+QUIC+HTTP/3 stack suffers a data rate reduction of up to 45.2% compared to the TCP+TLS+HTTP/2 counterpart. Moreover, the performance gap between QUIC and HTTP/2 grows as the underlying bandwidth increases. We observe this issue on lightweight data transfer clients and major web browsers (Chrome, Edge, Firefox, Opera), on different hosts (desktop, mobile), and over diverse networks (wired broadband, cellular). It affects not only file transfers, but also various applications such as video streaming (up to 9.8% video bitrate reduction) and web browsing. Through rigorous packet trace analysis and kernel- and user-space profiling, we identify the root cause to be high receiver-side processing overhead, in particular, excessive data packets and QUIC's user-space ACKs. We make concrete recommendations for mitigating the observed performance issues.

https://dl.acm.org/doi/10.1145/3589334.3645323

Read replies 10 months ago
xuu (txt.sour.is)

Google Chrome will have Gemini LLM built into the browser.

Read replies 1 year ago
xuu (txt.sour.is)

@lyse

You can't catch the kill signal. Should this be syscall.SIGTERM instead of os.Kill, xuu? https://git.sour.is/sour-is/go-paste/src/branch/main/main.go#L21

You are totally right.. i think i was going for SIGTERM and SIGQUIT

Read replies 1 year ago
xuu (txt.sour.is)

I would love to see a world where ones twtxt feed is defined by webfinger. So @xuu@txt.sour.is => https://text.sour.is/user/xuu/twtxt.txt

Then my identity can exist independent of the feed location. And I can host multiple protocol types for my feed. Ie. http/gopher/Gemini/irc DCC/etc

Read replies 1 year ago
xuu (txt.sour.is)

Go 1.22.0 introduces a new experiment for range functions. Have you tried them out? What do you think it can make easier to accomplish?

Read replies 1 year ago
xuu (txt.sour.is)

Twtxt spec enhancement proposal thread 🧵

Adding attributes to individual twts similar to adding feed attributes in the heading comments.

https://git.mills.io/yarnsocial/go-lextwt/pulls/17

The basic use case would be for multilingual feeds where there is a default language and some twts will be written a different language.

As seen in the wild: https://eapl.mx/twtxt.txt

The attributes are formatted as [key=value]

They can show up in the twt anywhere it is not enclosed by another element such as codeblock or part of a markdown link.

Read replies 1 year ago
xuu (txt.sour.is)

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

Read replies 1 year ago
xuu (txt.sour.is)

I found these write-ups for advent of code. They are quite well done and a great learning resouce for algorithms!

https://advent-of-code.xavd.id/writeups/2023/

Read replies 1 year ago
xuu (txt.sour.is)

Read this interesting retro about discords migration path from Mongo to Cassandra to now ScyllaDB.

https://discord.com/blog/how-discord-stores-trillions-of-messages

Read replies 1 year ago
xuu (txt.sour.is)

This is some cool development for the go 1.22 standard http mux. Its adding the ability to have path vars and define methods for handlers. Also the errors are quite helpful if you have conflicting paths!

https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122/

Read replies 1 year ago
xuu (txt.sour.is)

@prologic is goryon not in the google app store?

Read replies 2 years ago
xuu (txt.sour.is)

What is a good device for home virtualization these days? I have been looking at the Intel NUC 13 pro's. Basically I want something "quiet" (ie not a screaming banshee 1U), smallish, but with lots of threads and rams. Disk will come from an external NAS.

Read replies 2 years ago
xuu (txt.sour.is)

Oof.

Read replies 2 years ago
xuu (txt.sour.is)

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

Read replies 2 years ago
xuu (txt.sour.is)

I learned how to make gopls syntax highlight go templates in VSCodium.

By adding the following to my config i could go from into

Read replies 2 years ago
xuu (txt.sour.is)

Logged in using new argon2i password hash!

Read replies 2 years ago
xuu (txt.sour.is)

I made a thing. Its a multi password type checker. Using the PHC string format we can identify a password hashing format from the prefix $name$ and then dispatch the hashing or checking to its specific format.

Read replies 2 years ago
xuu (txt.sour.is)

@prologic.. hmm and now they are gone. :(

Read replies 2 years ago
xuu (txt.sour.is)

Tell me you write go like javascript without telling me you write go like javascript:

import "runtime/debug"

var Commit = func() string {
  if info, ok := debug.ReadBuildInfo(); ok {
    for _, setting := range info.Settings {
      if setting.Key == "vcs.revision" {
        return setting.Value
      }
    }
  }

  return "" 
}()

https://developers.redhat.com/articles/2022/11/14/3-ways-embed-commit-hash-go-programs#3__using_runtime_debug_package

Read replies 2 years ago
xuu (txt.sour.is)

@prologic

#!/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
Read replies 3 years ago
xuu (txt.sour.is)

One down! More to go.

BREAKING: Russian billionaire Alisher Usmanov's super yacht, one of the biggest in the world, seized in Germany - Forbes

https://www.forbes.com/sites/giacomotognini/2022/03/02/germans-seize-russian-billionaire-alisher-usmanovs-mega-yacht/?sh=8b18f5052ddd

Read replies 3 years ago
xuu (txt.sour.is) Read replies 4 years ago
xuu (txt.sour.is)

@prologic https://github.com/JonLundy/twtxt/tree/xuu/integrate-lextwt I made a stats command for the new parser that extracts a bunch of info about a twtxt file. run like: go run ./cmd/stats https://twtxt.net/user/prologic/twtxt.txt

Read replies 4 years ago
xuu (txt.sour.is)

So excited for Go embedded files. https://golangtutorial.dev/tips/embed-files-in-go/

Read replies 4 years ago
Reply via email