Searching txt.sour.is

Twts matching #gopher
Sort by: Newest, Oldest, Most Relevant
In-reply-to » Righto, @eapl.me, ta for the writeup. Here we go. :-)

@eapl.me@eapl.me here are my replies (somewhat similar to Lyse’s and James’)

  1. Metadata in twts: Key=value is too complicated for non-hackers and hard to write by hand. So if there is a need then we should just use #NSFS or the alt-text file in markdown image syntax ![NSFW](url.to/image.jpg) if something is NSFW

  2. IDs besides datetime. When you edit a twt then you should preserve the datetime if location-based addressing should have any advantages over content-based addressing. If you change the timestamp the its a new post. Just like any other blog cms.

  3. Caching, Yes all good ideas, but that is more a task for the clients not the serving of the twtxt.txt files.

  4. Discovery: User-agent for discovery can become better. I’m working on a wrapper script in PHP, so you don’t need to go to Apaches log-files to see who fetches your feed. But for other Gemini and gopher you need to relay on something else. That could be using my webmentions for twtxt suggestion, or simply defining an email metadata field for letting a person know you follow their feed. Interesting read about why WebMetions might be a bad idea. Twtxt being much simple that a full featured IndieWeb sites, then a lot of the concerns does not apply here. But that’s the issue with any open inbox. This is hard to solve without some form of (centralized or community) spam moderation.

  5. Support more protocols besides http/s. Yes why not, if we can make clients that merge or diffident between the same feed server by multiples URLs

  6. Languages: If the need is big then make a separate feed. I don’t mind seeing stuff in other langues as it is low. You got translating tool if you need to know whats going on. And again when there is a need for easier switching between posting to several feeds, then it’s about building clients with a UI that makes it easy. No something that should takes up space in the format/protocol.

  7. Emojis: I’m not sure what this is about. Do you want to use emojis as avatar in CLI clients or it just about rendering emojis?

⤋ Read More

Simplified twtxt - I want to suggest some dogmas or commandments for twtxt, from where we can work our way back to how to implement different feature like replies/treads:

  1. It’s a text file, so you must be able to write it by hand (ie. no app logic) and read by eye. If you edit a post you change the content not the timestamp. Otherwise it will be considered a new post.

  2. The order of lines in a twtxt.txt must not hold any significant. The file is a container and each line an atomic piece of information. You should be able to run sort on a twtxt.txt and it should still work.

  3. Transport protocol should not matter, as long as the file served is the same. Http and https are preferred, so it is suggested that feed served via Gopher or Gemini also provide http(s).

  4. Do we need more commandments?

⤋ Read More
In-reply-to » should i delete gemini support from twet? iirc in twtxt v2 it starts prohibited. And all of my fields are https

@doesnm@doesnm.p.psf.lt No.

iirc in twtxt v2 it starts prohibited

This is not true. There are no issues supporting fetching feeds via Gemini/Gopher. This is totally fine. What will likely happen is “recommendations” and “drawbacks of using Gemini/Gopher”

⤋ Read More
In-reply-to » @bender Re that broken thread (#bqor23a). Its the same one. My pod doesn't have the Root Twt: https://twtxt.net/twt/bqor23a => 404 Not Found.

Oh, and I think I said this before, but just in case, fuck Gemini. Hell, fuck Gopher too. Bring on telnet, and UCCP. 😈

⤋ Read More
In-reply-to » @bender It's just a simple twtxt2html and scp ... it goes like:

@quark@ferengi.one Mine is a little overkill 😂 but I need to do something for practice:

#!/bin/bash
set -e
trap 'echo "!! Something went wrong...!!"' ERR

#============= Variables ==========#

# Source files
LOCAL_DIR=$HOME/twtxt

TWTXT=$LOCAL_DIR/twtxt.txt
HTML=$LOCAL_DIR/log.html
TEMPLATE=$LOCAL_DIR/template.tmpl

# Destination
REMOTE_HOST=remotHostName     # Host already setup in ~/.ssh/config

WEB_DIR="path/to/html/content"
GOPHER_DIR="path/to/phlog/content"
GEMINI_DIR="path/to/gemini-capsule/content"

DIST_DIRS=("$WEB_DIR" "$GOPHER_DIR" "$GEMINI_DIR")


#============ Functions ===========#

# Building log.html:

build_page() {
	twtxt2html -T $TEMPLATE $TWTXT > $HTML
}

# Bulk Copy files to their destinations:

copy_files() {
	for DIR in "${DIST_DIRS[@]}"; do
    # Copy both `txt` and `html` files to the Web server and only `txt`
    # to gemini and gopher server content folders
		if [ "$DIR" == "$WEB_DIR" ]; then
			scp -C "$TWTXT" "$HTML" "$REMOTE_HOST:$DIR/"
		else
			scp -C "$TWTXT" "$REMOTE_HOST:$DIR/"
		fi
	done
}

#========== Call to functions ===========$

build_page && copy_files

⤋ Read More
In-reply-to » @falsifian In my opinion it was a mistake that we defined the first url field in the feed to define the URL for hashing. It should have been the last encountered one. Then, assuming append-style feeds, you could override the old URL with a new one from a certain point on:

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 ?

⤋ Read More

Genkit:新一代基於 Go 的 AI 應用開發框架
Google 推出了 Genkit for Go,這是一個開源框架,用來以 Go 語言原生構建 AI 應用與雲服務。該項目是 Google Firebase 和 Go 團隊聯手合作的最新成果。Genkit for Go 於 7 月 17 日正式推出,目前版本處於 alpha 階段。Gophers 能夠通過它將 Go 的性能和併發優勢與 Genkit 的庫和工具相結合,從而來構建生成式 AI 應用程 ⌘ Read more

⤋ Read More

通過實例理解 Go 訪問和操作數據庫的幾種方式
關係數據庫操作是 Go 應用開發中的重要一環,尤其是 Go Web 應用、微服務等。作爲 Gopher,我們需要了解幾種主流的數據庫訪問和操作方法,以便在項目中做出適當的選擇。我個人在日常開發中較少涉及 CRUD 類應用,因此使用 Go 訪問和操作數據庫的機會並不多,在這方面也算是有一些 “短板”。通過在這篇文章中對數據庫訪問方式進行全面的梳理,我也算是補全一下技能樹,同時也能爲讀者小夥伴提供一些 ⌘ Read more

⤋ Read More

My opinion is that we need more Gophers, good, bad, or otherwise. Let there be thousands, millions of different gophers. Now there are no more than 400 servers left online. I’ll have a panic attack and cry again (

⤋ Read More

golang 開發: goroutine 在項目中的使用姿勢
很多初級的 Gopher 在學習了 goroutine 之後,在項目中其實使用率不高,尤其一些跨語言過來的人,對併發編程理解不深入,可能很多人只知道 go func(), 或者掌控不夠,謹慎一些,儘量少使用或者不使用,用的話就是 go func(),主要列一下我們這邊的主要使用方法。goroutine 在項目中的使用方法看一下樣例代碼,實際上,我們生產環境中就是這麼使用的。package lo ⌘ Read more

⤋ Read More

Sensory Safari at Central Florida Zoo: A sneak peek
The Central Florida Zoo & Botanical Gardens joins Good Day Orlando Xtra to introduce us to Willy, a gopher tortoise, as well as talk about their upcoming Sensory Safari event, which is geared towards children, ages 5-12. It features hands-on learning and interactive experiences. ⌘ Read more

⤋ Read More

Question to all you Gophers out there: How do you deal with custom errors that include more information and different kinds of matching them?

I started with a simple var ErrPermissionNotAllowed = errors.New("permission not allowed"). In my function I then wrap that using fmt.Errorf("%w: %v", ErrPermissionNotAllowed, failedPermissions). I can match this error using errors.Is(err, ErrPermissionNotAllowed). So far so good.

Now for display purposes I’d also like to access the individual permissions that could not be assigned. Parsing the error message is obviously not an option. So I thought, I create a custom error type, e.g. type PermissionNotAllowedError []Permission and give it some func (e PermissionNotAllowedError) Error() string { return fmt.Sprintf("permission not allowed: %v", e) }. My function would then return this error instead: PermissionNotAllowedError{failedPermissions}

At some layers I don’t care about the exact permissions that failed, but at others I do, at least when accessing them. A custom func (e PermissionNotAllowedError) Is(target err) bool could match both the general ErrPermissionNotAllowed as well as the PermissionNotAllowedError. Same with As(…). For testing purposes the PermissionNotAllowedError would then also try to match the included permissions, so assertions in tests would work nicely. But having two different errors for different matching seems not very elegant at all.

Did you ever encounter this scenario before? How did you address this? Is my thinking flawed?

⤋ Read More