@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.
@prologic@twtxt.net On the one hand, twtxt has become more popular thanks to Yarn.social. On the other hand, subject and hashtag extensions took away the simplicity of the protocol. For example, it is impossible to understand which conversation (#base32hash) a tweet refers to or to reply to a tweet without going to a yarn.social pod. Compare with re: in this tweet which can be written without using any client at all
one that i think is pretty interesting is building up dependent constraints. see here.. it accepts a type but requires the use of a pointer to type.
https://github.com/sour-is/ev/blob/main/pkg/es/es.go#L315-L325
I learned how to make gopls syntax highlight go templates in VSCodium.
By adding the following to my config

i could go from
into 
Data Point
⌘ Read more
Should I sell my PC?
I’m not sure yet what I’m going to do with my desktop computer (ASRock Deskmini A300), which I don’t really use anymore since I got my new laptop. ⌘ Read more
I need to learn how to crash dates that are going nowhere with way too much escalation. That should be fun
What was the first PDA?
It wasn’t the Palm Pilot. Nor the Newton. Let’s keep going back to find the answer… ⌘ Read more
** December adventure **
Over the past couple years I’ve done the advent of code to varying degrees. I thought I was going to do it again this year but decided to try something different. I’ve been calling what came together a“ December Adventure.”
It isn’t anything fancy; throughout December I aim to write a little bit of code everyday. So far I’ve written a bit of apl, bash, elisp, explored a bunch of flavors of scheme, and star … ⌘ Read more
$name$ and then dispatch the hashing or checking to its specific format.
Circling back to the IsPreferred method. A hasher can define its own IsPreferred method that will be called to check if the current hash meets the complexity requirements. This is good for updating the password hashes to be more secure over time.
func (p *Passwd) IsPreferred(hash string) bool {
_, algo := p.getAlgo(hash)
if algo != nil && algo == p.d {
// if the algorithm defines its own check for preference.
if ck, ok := algo.(interface{ IsPreferred(string) bool }); ok {
return ck.IsPreferred(hash)
}
return true
}
return false
}
https://github.com/sour-is/go-passwd/blob/main/passwd.go#L62-L74
example: https://github.com/sour-is/go-passwd/blob/main/pkg/argon2/argon2.go#L104-L133
$name$ and then dispatch the hashing or checking to its specific format.
Hold up now, that example hash doesn’t have a
$prefix!
Well for this there is the option for a hash type to set itself as a fall through if a matching hash doesn’t exist. This is good for legacy password types that don’t follow the convention.
func (p *plainPasswd) ApplyPasswd(passwd *passwd.Passwd) {
passwd.Register("plain", p)
passwd.SetFallthrough(p)
}
https://github.com/sour-is/go-passwd/blob/main/passwd_test.go#L28-L31
$name$ and then dispatch the hashing or checking to its specific format.
Here is an example of usage:
func Example() {
pass := "my_pass"
hash := "my_pass"
pwd := passwd.New(
&unix.MD5{}, // first is preferred type.
&plainPasswd{},
)
_, err := pwd.Passwd(pass, hash)
if err != nil {
fmt.Println("fail: ", err)
}
// Check if we want to update.
if !pwd.IsPreferred(hash) {
newHash, err := pwd.Passwd(pass, "")
if err != nil {
fmt.Println("fail: ", err)
}
fmt.Println("new hash:", newHash)
}
// Output:
// new hash: $1$81ed91e1131a3a5a50d8a68e8ef85fa0
}
This shows how one would set a preferred hashing type and if the current version of ones password is not the preferred type updates it to enhance the security of the hashed password when someone logs in.
https://github.com/sour-is/go-passwd/blob/main/passwd_test.go#L33-L59
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.
GPT-3 is crazy 🤯
Do you want to read why Go is a great programming language? ⌘ Read more
GPT-3 is crazy 🤯
Do you want to read why Go is a great programming language? ⌘ Read more
JMP: Writing a Chat Client from Scratch
There are a lot of things that go into building a chat system, such as client, server, and protocol. Even for only making a client there are lots of areas of focus, such as user experience, features, and performance. To keep this post a manageable size, we will just be building a client and will use an existing server and protocol (accessing Jabber network services using the XMPP protocol). We’ll make a practical GUI so we can test things, but not spend too much time on p … ⌘ Read more
ahh this is useful https://go.dev/doc/modules/managing-dependencies. the go culture doesn’t typically have large dependency graphs like Ruby or JS.
@prologic@twtxt.net the go get and go mod tidy wont fetch new changes. that’s all a manual affair AFAIK
https://github.com/k88hudson/git-flight-rules #git what to do when things go wrong
another paper which relies on questionnaires for attention span. am i going crazy? how is this a good metric‽
I reworked the current ActivityPub implementation of GoBlog, fixed ActivityPub replies to posts and also added support for reply updates and deletions. Under the hood it’s using the comment system. 🥳 Using the go-ap/activitypub library, working with ActivityPub is much easier (but still more complicated than I wish it would be). ⌘ Read more
LibreOffice going Blockchain?!
Watch now (16 min) | Seriously. LibreOffice met with Ethereum to talk about this. ⌘ Read more
@movq@uninformativ.de yeah.. i rewrote it a few times because i thought there was something breaking.. but was mistaken
though now i am seeing a weird cache corruption.. that seems to come and go.

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 ""
}()
The power of GitHub in the palm of your hand
GitHub Mobile helps keep work going while you’re going. Untether yourself from your office. ⌘ Read more
Why I bought a new laptop 💻
I just updated my Hardware Uses page. Recently, I bought a new notebook and today I reset my Surface Go and sent it to a trade-in portal. ⌘ Read more
You’re Going to Hate This ⌘ Read more
i only allow myself to go the hard way. good or bad?
Developing Go Apps With Docker
Develop Go applications with Docker using these containerization steps, best practices, optimization tips, and more. ⌘ Read more
I’m quite curious about this “Ghosts from the Library”. Medawar edits the collection “Bodies from the Library” (which I recommend) and this idea of going through old newspapers to recover serialised stories or finding never published before ones is quite appealing.
Ghosts and Ghosts from the Library
http://doyouwriteunderyourownname.blogspot.com/2022/10/ghosts-and-ghosts-from-library.html ⌘ Read more
Gajim: Gajim 1.5.3
Gajim 1.5.3 brings back a feature many of you missed: selecting and copying multiple messages. Emoji shortcodes have been improved and cover even more emojis now. Gajim also lets you mark workspaces as read, so you don’t have to go through all conversations. Thank you for all your contributions!
Since we changed the way Gajim displays messages in Gajim 1.4, selecting multiple messages to copy them was not possible anymore. With Gajim 1.5.3 you can now select multiple messag … ⌘ Read more
it uses the queries you define for add/del/set/keys. which corrispond to something like INSERT INTO <table> (key, value) VALUES ($key, $value), DELETE ..., or UPDATE ...
the commands are issued by using the maddycli but not the running maddy daemon.
see https://maddy.email/reference/table/sql_query/
the best way to locate in source is anything that implements the MutableTable interface… https://github.com/foxcpp/maddy/blob/master/framework/module/table.go#L38
Release Radar · September 2022 Edition
Hackatoberfest, hackathons, and open source contributions. It’s been a hectic month with so many community pull requests to all kinds of projects. So many in fact that we had to spend hours going through all the submissions for this blog post. We almost didn’t get it out before the end of October. Nevertheless, we are […] ⌘ Read more
2017 interview with Haiku’s full time developer
Watch now (55 min) | In this classic episode of the Lunduke Hour (Feb-6-2017) I got to chat with one of the long time developers of Haiku OS – an Open Source operating system inspired by BeOS. This developer, known as “Waddlesplash” would go on to become the first (and so far, only) full time, paid developer of Haiku. ⌘ Read more
[…] UN framework convention on climate change said: “This does not go far enough, fast enough. This is nowhere near the scale of reductions required to put us on track to 1.5C. National governments must set new goals now and implement them in the next eight years.”
[…] UN framework convention on climate change said: “This does not go far enough, fast enough. This is nowhere near the scale of reductions required to put us on track to 1.5C. National governments must set new goals now and implement them in … ⌘ Read more
time to go to twittertext sleep I think
@prologic@twtxt.net, business is slow (I also just got off that hyoo-män illness that is going around named COVID), so that leaves me some free time on my entrepreneurial hands. 😂 I have always lurked every couple of weeks or so. I see yarn has regressed on the UI! 😬😩
2045
⌘ Read more
On the go with GitHub Projects on GitHub Mobile (public beta)
Stay connected and up to date on your work with GitHub Projects on GitHub Mobile, now in public beta. ⌘ Read more
Why I Might Go To Prison ⌘ Read more
Another change in my infrastructure setup: I replaced rathole with Chisel. There wasn’t any particular reason, I use it in the same way: It’s making a few services and websites hosted on my home server available on my VPS to publish using Caddy and a static IP. Chisel is just a bit more simple to configure using command line flags. And it’s written in Go. ⌘ Read more
GitHub for Startups is generally available
We’re launching GitHub for Startups to give your startup the tools needed to go from idea to unicorn status on the world’s largest developer platform. ⌘ Read more
Transform your software engineering practices with GitHub Enterprise
Go beyond knowing GitHub as the home of open source and explore how GitHub Enterprise can help you transform your software engineering organization and practices. ⌘ Read more
Everyday Carry
⌘ Read more
GoToSocial seems like a promising alternative to Mastodon. It’s written in Go (👍 in my opinion), lightweight and pretty good documented so far. It’s still “alpha software” but seems to make great progress. In the past, I self hosted a microblog.pub instance and then after some time without any Fediverse profile other than my blog, which has ActivityPub support as well, signed up at Fosstodon to be able to reply to blog comments from the Fediverse. I already set up an instace of GTS, but will probably wait to use it … ⌘ Read more
And that I can silence it without having or go through the full test announcing fire and carbon monox throughout the house.
**Every year, on the 3rd Saturday of September the “Software Freedom Day” is celebrated.
In 🇵🇹 Portugal @ANSOL is going to celebrate with a #SoftwareFreedomDay in Oporto:
https://ansol.org/eventos/2022-09-17-software-freedom-day/**
Every year, on the 3rd Saturday of September the “Software Freedom Day” is celebrated.
In 🇵🇹 Portugal @ANSOL is going to celebrate with a #SoftwareFreedomDay in Oporto:
[ansol.org/eventos/202 … ⌘ Read more
@prologic@twtxt.net Yeah its never going to change but its an option to use UTC
A script for Go dependency updates
I regularly update the dependencies of my blog software, a Go based project. Dependency updates are important because they can contain security fixes or fixes for bugs. ⌘ Read more
@prologic@twtxt.net Yeah I don’t know how I am going to know if someone wants to talk with me but I guess for now twtxt works.