~goldstein

https://goldstein.rs

Doing horrible things with Rust and Nix. You can use any pronouns to refer to me.

Recent activity

[PATCH v2] Better URL cleaning for display 2 months ago

From Goldstein to ~bouncepaw/betula

This uses net/url standard package (+ x/net/idna) to clean up URLs
instead of doing it via string manipulation. In particular, this solves
two problems:

1. In URLs like `gopher://example.org/foo` path was previously
   incorrectly detected by splitting on the first `/`, which is in this
   case a scheme separator.

2. Punycode is now decoded on display.

Fixes: https://todo.sr.ht/~bouncepaw/betula/90
---
 Makefile            |  1 +
 go.mod              |  5 ++-
[message trimmed]

[RFC PATCH] WIP: add /query page 3 months ago

From Goldstein to ~bouncepaw/betula

This is a prototype patch adding `/query` page for custom SQL queries to Betula.
It works, but the UI is sorely lacking: columns (and the table overall) is too
thin. `SELECT * FROM Posts` type of queries would probably also benefit
from displaying them as post feed instead of a table.

---
 db/db.go                  |  5 +++
 web/handlers.go           | 92 +++++++++++++++++++++++++++++++++++++++
 web/templates.go          |  1 +
 web/views/query.gohtml    | 27 ++++++++++++
 web/views/skeleton.gohtml |  3 ++
 5 files changed, 128 insertions(+)
 create mode 100644 web/views/query.gohtml
[message trimmed]

[PATCH] Better URL cleaning for display 3 months ago

From Goldstein to ~bouncepaw/betula

This uses net/url standard package (+ x/net/idna) to clean up URLs
instead of doing it via string manipulation. In particular, this solves
two problems:

1. In URLs like `gopher://example.org/foo` path was previously
   incorrectly detected by splitting on the first `/`, which is in this
   case a scheme separator.

2. Punycode is now decoded on display.

Fixes: https://todo.sr.ht/~bouncepaw/betula/90
---
 Makefile            |  1 +
 go.mod              |  5 +++-
[message trimmed]

[PATCH] Fix migration from empty database 3 months ago

From Goldstein to ~bouncepaw/betula

Previous version tried to apply 0->6->1..., which is wrong.
The right order is 0->6->7.

Fixes: https://todo.sr.ht/~bouncepaw/betula/93
---
 db/migrations.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/db/migrations.go b/db/migrations.go
index 59084a6..66ee912 100644
--- a/db/migrations.go
+++ b/db/migrations.go
@@ -81,6 +81,7 @@ func handleMigrations() {
	// DB was never populated! Let's write the latest schema we have.
[message trimmed]

[PATCH v2] try again 3 months ago

From Goldstein to ~sircmpwn/email-test-drive

---
 goldstein | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 goldstein

diff --git a/goldstein b/goldstein
new file mode 100644
index 0000000..66cb3d4
--- /dev/null
+++ b/goldstein
@@ -0,0 +1 @@
I have successfully used git send-email!
-- 
2.42.0
[message trimmed]

[PATCH] try again 3 months ago

From Goldstein to ~sircmpwn/email-test-drive

---
 goldstein | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 goldstein

diff --git a/goldstein b/goldstein
new file mode 100644
index 0000000..b4380e4
--- /dev/null
+++ b/goldstein
@@ -0,0 +1 @@
I'm about to try git send-email!
-- 
2.42.0
[message trimmed]

[PATCH] try sending email 3 months ago

From Goldstein to ~sircmpwn/email-test-drive

---
 goldstein | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 goldstein

diff --git a/goldstein b/goldstein
new file mode 100644
index 0000000..b86c6f9
--- /dev/null
+++ b/goldstein
@@ -0,0 +1 @@
trying this out...
-- 
2.42.0
[message trimmed]