Last modified: 2025-06-28 22:04:47
< 2025-06-27 2025-06-30 >I finished machining the flats on the rear axle, it went well, and the wheels fit.
Great success, this is a good milestone. Also proves that my machine fix was good.
I still need to somehow make it so that the wheels are held on. My original plan was to thread the outside of the ends of the axles M20 and use M20 nuts, but since I can't stick this material through the lathe headstock I may have to do something else.
Either cross-drill and use a split pin, or drill the ends to take M8 bolts or something and use spacers/washers to hold the wheels on? Unsure which I prefer. The split pin idea sounds not very good, the wheels would always have some play in them. But drilling a hole straight down the end of the shaft sounds quite tricky, and then I have to faff about finding suitable spacers and washers. Not sure yet.
And in either case the axle may want cutting down slightly, I think it is still longer than it needs to be.
I made the sprocket hub, wasn't too hard except hacksawing it to length was quite a workout.
The hub and axle both need cross-drilling for mounting it, but I was tired after hacksawing so I stopped for today.
To get some experience with some of the new web stuff I'm looking at, I'm going to make a new version of the https://img.incoherency.co.uk/ application.
I want to use:
And I want some sort of web framework for Go that feels a bit like Mojolicious did. It looks like there might not be an exact replacement, you maybe have to patch it together yourself out of lots of different components.
Let's go with https://github.com/go-chi/chi I think.
Hmm, Templ requires you to install the extra binary alongside Go. Potentially annoying, because "go get" won't install it for you. Maybe that's the best option.
You can apparently add it as a dependency with "go get -tool ...", but only since Go 1.24. Maybe that's good enough.
Update: Tailwind CSS needs a build step, so that's out. Maybe https://tachyons.io/ ?
Meh, probably not worth it. Just do it by hand.
OK I realise I made a blunder. At least I've learnt something, that is what this is all for.
I made my templates take just an "App" reference, but that doesn't give you access to information about the user session or the specific request they've made. In Mojolicious you get a "Controller" object, which has information about the session, and the request reader and the response writer.
The Go thing seems to be that you pass around the request object and the response writer object separately. I guess if you also have some user state you'll pass that around as a 3rd object?
ChatGPT suggests attaching them to the "request context" using context.WithValue()
, unsure if I like this idea.
Not least because it means you have to have runtime type-checking.
I think a better idea is to define your own "RequestContext" struct or something, which has references to the
http.Request
, http.ResponseWriter
, user session, etc., and make all your functions take that.
I might be able to make a Mojolicious-like web framework for Go. It needs to give you:
Alternatively, what if I stop trying to add frameworks on to this and just go with what Go gives you?
So try to get along with html/template
instead of Templ. And I guess implement sessions and stash/flash
myself?
I haven't come up with anything I like tonight. I should just do the simplest thing that could possibly work and see how that looks.
< 2025-06-27 2025-06-30 >