Recent activity

CGI programs and the gemini protocol 9 months ago

From Hugo Wetterberg to ~adnano/gemini

It's underspecified in the way that it breaks from what's the common
expectations of how query components work without being explicitly clear
on the fact that it does so. I'm onboard with that it might be formally
correct, but when I read the spec that was one that confused me.

On Sat, 2021-03-20 at 01:46 +0100, Philip Linde wrote:
> I don't see how it's how it's underspecified. In particular, I don't
> see why anyone should assume &-separated values. The spec refers to
> IETF RFC 3986, which doesn't at all concern how to encode multiple
> values. It simple describes the query as a segment of a URI starting
> with a "?" and ending with the end of the URI or a fragment marker
> "#".

Re: Seeking feedback for version v0.1.15 10 months ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

Great work! I haven't had time to kick the tires as much as Drew, but I
looked through the changes yesterday. Big thumbs up on adding contexts
to the handlers, I have been missing that. I also look forward to being
able to use the nice new embedding feature whenever resources need to be
bundled with the binary.

I understand Drews more measured approach to upgrades and new features,
but I think that in the case of Go it's mitigated by two things: the
language isn't volatile (unlike something like Rust) so upgrading in
itself isn't that much of a burden; and it's compiled so there are no
new runtimes with potential system-wide effects that need to be deployed
to production servers, the effect is limited to workstations & build
servers (that usally employs some container tech to create stable build
envs). There shouldn't be any kind of quasi-religious "move fast"

[tech] reverse proxy gemini 10 months ago

From Hugo Wetterberg to ~adnano/gemini

I had almost the same use-case for my small gemini server and wrote a
proxy that only does vhost routing:


But if you're serving static files/some CGI you're probably better off
following mieums advice and use a server that uses different docroots
for different hostnames. Then you don't have to layer different proxies
and servers, and it's easy to combine that workflow with git post-
recieve hooks that generates the static files.


Storing capsule pages? 11 months ago

From Hugo Wetterberg to ~adnano/gemini

I use an oddball publishing scheme where my gemlog server understands
and reacts to changes to a bare git repository. So I make and commit my
changes and the git push over SSH to my server:

It relies on having a custom application running on your server, rather
than taking the static files + CGI approach with a generic gemini
server, so it's probably not everyones cup of tea :)


[ANN] [users] new capsule and assorted gemini software 11 months ago

From Hugo Wetterberg to ~adnano/gemini

Hi all,

I read Omar Polos mail to the list yesterday and realised that maybe
it's time to stop lurking and actually say hi.?

I'm running a personal capsule on gemini:// that
mostly has been about Gemini application development. I used the
christmas break to get started on some projects that had been brewing in
the back of my head since I started reading the CAPCOM feed. It's a joy
to work in such a restricted design space after many years of web and
information system development work.

My projects are avaliable here gemini:// and on
Sourcehut. A quick round-up:

Re: [PATCH] tofu: Refactor known hosts handling 11 months ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

Resending some comments that I accidentally only sent to Adnan. I
haven't had the time to look properly at the v2 patch. But at first
glance it seems to be addressing my concerns.


I'm not wild about struct embedding in general. An API like this raises
the question of f.ex. what does Load() do in the context of
PersistentHosts? You and I know that it just affects KnownHosts, but
yeah. There's also the overloading thing. I guess it just feels a bit
un-idiomatic to me. Which in turn feels like a shoddy way to legitimize
a lazy "I don't like it".

Is it only meant to be initialised through LoadPersistentHosts (which

Re: [PATCH] tofu: Refactor known hosts handling 1 year, 3 days ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

Yeah, that's much better.

I added this function in my application to handle persistent TOFU:

func PersistentTOFU(
	hosts *tofu.KnownHosts, w *tofu.HostWriter,
) func(string, *x509.Certificate) error {
	return func(hostname string, cert *x509.Certificate) error {
		host := tofu.NewHost(hostname, cert.Raw, cert.NotAfter)

		knownHost, ok := hosts.Lookup(hostname)
		if !ok || time.Now().After(knownHost.Expires) {

Re: [PATCH go-gemini] tofu: change underlying file handling, known hosts parsing 1 year, 4 days ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

The individual application will work fine, as you advance the file
position by reading the file, and then start writing to it. Concurrent
writes (without append) will cause overlapping writes.

Re: [PATCH go-gemini] tofu: change underlying file handling, known hosts parsing 1 year, 4 days ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

Multiple applications can technically keep the file open for RW and
write to it, but the result would be garbled as they all track their own
position in the file.

This example illustrates the issue pretty well:

package main

import (

Re: [PATCH go-gemini] tofu: change underlying file handling, known hosts parsing 1 year, 4 days ago

From Hugo Wetterberg to ~adnano/go-gemini-devel

> We probably shouldn't return an error here. If the algorithm is
> unsupported, we should skip it and move on. The known hosts file might
> be used by other software that use their own fingerprint algorithms
> (e.g. SHA-256).

Ok, that makes sense. But it also raises the question of whether we
should keep a shared file open the way we do at the moment. I would also
say that it strengthens the case for warnings.

> I think it might be better to accept a string instead of a byte slice.

I wrote it that way to conform to