-- Leo's gemini proxy

-- Connecting to alexschroeder.ch:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

2024-02-09 Oddµ namespaces and live updating


> It's a slow morning. I had my two cups of coffee, ate my pancakes with plum jam, spent time online reading Mastodon, talked to my wife about wannabe-axe murderers on Swiss trains, looked up stuff about taxing the rich…


taxing the rich


I've been working on Oddmu again. My goal is to be able to reproduce the Campaign Wiki setup:


Campaign Wiki


people can get a "space" for their site by signing up in some way

they can make changes to the look and feel of their site (change the headers, footers, colours, i.e. make changes to both the HTML template and the CSS)

feeds, list of changes and all that are limited to their site


Using Oddmu would also result in the following:


sites are no longer publically editable (which isn't a requirement for such spaces like role-playing game campaigns)


Oddmu now has the following features:


when editing pages in a subdirectory, the `index` and `changes` page in the same directory are updated (instead of the root directory)

when HTML templates exist in the same directory, those are used instead of the templates in the root directory (e.g. Oddµ)

when uploading a HTML template, it is loaded immediately (no more server restart)


Oddµ


Once I had this implemented using a library that watches the filesystem for changes, I realized that I could use the same feature to index new pages. This brings me closer to having online and offline writing feature equivalence: Using the web site to create a page should be equivalent to writing a page elsewhere and uploading it to the site via rsync. (Offline you can use the `oddmu notify` command to add links to `index`, `changes` and hashtag pages.)


I think I'm getting close!


​#Oddµ


Also, code complexity is through the roof, now. All the global maps aren't thread-safe so they need mutexes. There's a weird Heisenbug I have where I run the test suite and then `view.html` is gone. The next test run then fails, of course. Thinking it was related to the order of tests, I started running `go test -shuffle on` and found a plethora of *other* bugs. And I've seen at least two occasions where I noticed the disappearing `view.html` bug, noted the shuffle id, reran the test with that id, got the error again, tried for a third time, and then tests passed. So… it must be a race condition of some sort.


How aggravating.


Maybe something got lost, with that last set of changes.


I do feel, however, that I've found a lot of bugs… Just now, for example, to help prevent Oddmu from showing any directories or files with a path segment starting with a period…


**2024-02-14**. I need to think about an archive handler that allows you to get a zip file for the current directory. (I guess zip files are more accessible than .tar.gz files? Like, for Windows and macOS…)


And the archive needs to take ODDMU_FILTER into account!


ODDMU_FILTER


Done. ✔️


-- Response ended

-- Page fetched on Sat May 18 20:44:39 2024