~sotirisp

Munich, DE

https://sotiris.papatheodorou.xyz

PhD student at the Smart Robotics Lab in Imperial College London/Technical University of Munich.

~sotirisp/today

Last active 4 months ago

~sotirisp/go-netcache-discuss

Last active 9 months ago

~sotirisp/go-netcache-devel

Last active 9 months ago

~sotirisp/go-netcache-announce

Last active 9 months ago

~sotirisp/public-inbox

Last active 1 year, 5 months ago

~sotirisp/kindleto-discuss

Last active 2 years ago

~sotirisp/kindleto-devel

Last active 2 years ago

~sotirisp/kindleto-announce

Last active 2 years ago
View more

Recent activity

[pages.sr.ht] Gemini URLs to directories missing trailing slash 10 days ago

From Sotiris Papatheodorou to ~sircmpwn/sr.ht-discuss

It seems that when a Gemini URL without a trailing slash but 
corresponding to a directory is requested it's not redirected to the 
same URL with a trailing slash. For example 
gemini://sotiris.papatheodorou.xyz/gemlog isn't redirected to 
gemini://sotiris.papatheodorou.xyz/gemlog/ as expected.

This behavior breaks relative links in the response since they're rooted 
on gemini://sotiris.papatheodorou.xyz/ instead of on 
gemini://sotiris.papatheodorou.xyz/gemlog/.

I've got a patch that might fix this issue (pasted below) but no easy 
way to test it. I have managed to package the patched version (by 
modifying a manifest from some build on lists.sr.ht) but I'm not sure 
how to test that the issue is fixed.
[message trimmed]

Re: Using git as a cache ? a month ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

On 2023-12-15, Ploum wrote:
>Each single domain would be a separate git repository. Each new sync in
>that domain would be a new commit to the repository.

It's actually an interesting idea. Each computer becomes a small Wayback 
Machine, I think it's worth a try.

I'll attempt to add the functionality in my offpunk-compatible (minus my 
bugs) caching proxy. Its architecture allows different storage types for 
the cache so this shouldn't be too difficult. It will likely take a few 
months though, I'm quite busy at the time.


On 2023-12-15, Ploum wrote:

Re: grotty fatal error: 'V' command invalid before first 'p' command 4 months ago

From Sotiris Papatheodorou to ~sotirisp/today

I use the man command to view manual pages and that has always worked 
fine with scdoc-generated pages.

For me grotty fails instead with:
     grotty:doc/today.1:1: fatal error: the first command must be 'x T'
It also fails to open a minimal manual page generated by scdoc so I 
don't think this issue has anything to do with today. It seems like a 
bug in grotty or scdoc (and considering man works fine grotty is more 
likely).

Best regards,
Sotiris

Re: [PATCH 1/2] Provide manuals for new commands. 5 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

On 2023-08-29, Ploum wrote:
>I’ve implemented that but with a simple integer as the cache version
>which is independant from offpunk version.

Even simpler, fine by me.

On 2023-08-29, Ploum wrote:
>Review of the code is welcome

Had a quick look and all seems well!

Best,
Sotiris

Re: [PATCH 1/2] Provide manuals for new commands. 5 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

On 2023-08-27, Ploum wrote:
>Also, regarding the migration script: I’ve come to the conclusion that
>there should be a VERSION file in the root folder of the cache. This
>file could be checked at launch and run the migration script if needed.
>
>Sotiris, what do you think?

Sounds good to me! Maybe something like a .version file in the cache 
root containing an offpunk version number, e.g. 1.10.0. Offpunk attempts 
to read the file on startup:

* If the file doesn't exist, offpunk creates it and runs all migration 
   commands.
* If the version in the file is smaller than the current offpunk

Re: Refactorisation of the network/certificate code 7 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

On Jul 10, 2023 10:57, Ploum <sourcehut@ploum.eu> wrote:
> My first question involves the option "tls_mode". By default, the 
> tls_mode is "tofu". It could also be set as "ca". If I’m right, the 
> tls_mode "ca" means that you would only accept communicating with Gemini 
> capsule you trust. 
>
> Has anyone ever tried to set that option? 
>
> Is there a single usecase in 2023 gemini that would require it?

What it does is change the way TLS certificates are verified. The tofu 
mode is what is described in the Gemini spec, i.e. store the certificate 
(or its fingerprint) on the first connection and warm the user if it 
ever changes. The ca mode implements the classic certificate authority

Re: Short code for analog bookmarking? 8 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

In European languages it's typically easy to infer a word even if all of 
its vowels have been removed so maybe this works as a human-centric way 
of URL shortening that mostly avoids ambiguity. File extensions and less 
unique parts of the URL could also be removed. For example:

gemini://ploum.net/2023-06-15-merdification.gmi

could become:

gmn/plm.nt/20230615-mrdfctn

A modified Levenshtein distance (i.e. with higher distance for letter 
changes and removals) could be used to get the URL in the cache that 
closest to the shorthand version.

[PATCH v2] Change the Gopher index filename to gophermap 10 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

This seems to be the most common convention among gopher servers (e.g.
Gophernicus, go-gopher).

Added a script to migrate the cache to the new format. Alternatively the
following command can be used for migration in a POSIX system:

find ~/.cache/offpunk/gopher/ -type f -name 'index.txt' -exec sh -c 'mv {} "$(dirname {})/gophermap"' \;
---
 CHANGELOG             |  1 +
 migrate-offpunk-cache | 47 +++++++++++++++++++++++++++++++++++++++++++
 offpunk.py            |  4 +++-
 3 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100755 migrate-offpunk-cache
[message trimmed]

[PATCH] Change the Gopher index filename to gophermap 10 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

This seems to be the most common convention among gopher servers (e.g.
Gophernicus, go-gopher).

The following command can be used to update the cache to the new format
in a POSIX system:

find ~/.cache/offpunk/gopher/ -type f -name 'index.txt' -exec sh -c 'mv {} "$(dirname {})/gophermap"' \;
---
 CHANGELOG  | 1 +
 offpunk.py | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index 3b54ff5..0a8f90e 100644
[message trimmed]

[PATCH] Fix merging dictionaries with common keys 10 months ago

From Sotiris Papatheodorou to ~lioploum/offpunk-devel

The previous code would throw KeyError if a key was present in both
os.environ and env, e.g. when LESSHISTFILE is defined in the
environment. The current code ensures that for keys present in both
dictionaries the value from env will be used.
---
 CHANGELOG  | 1 +
 offpunk.py | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 16a1c46..2b1a372 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@
[message trimmed]